Try to get the Blueprint from the .pak file

Hi, Im trying to get a Blueprint file from a .pak file. First I mount the .pak file and it seems to be working good, but I cant use the blueprint object that is inside. Im dying into it since days, can someone tell me whats wrong with this code?

void AMyFirstActor::Mount()
{
	FString PakFileFullPath = TEXT("D:/UnrealEngine/Epic Games/Unreal Projects/MyProject01/WindowsNoEditor/MyProject01/Content/Paks/pakchunk1001-WindowsNoEditor.pak");
	OldPlatform = &FPlatformFileManager::Get().GetPlatformFile();
	if (!PakPlatform)//Judge whether the smart pointer is valid
	{
		PakPlatform = MakeShareable<FPakPlatformFile>(new FPakPlatformFile());
	}
	PakPlatform->Initialize(&FPlatformFileManager::Get().GetPlatformFile(), TEXT(""));
	FPlatformFileManager::Get().SetPlatformFile(*PakPlatform.Get());
 if(FPlatformFileManager::Get().GetPlatformFile().FileExists(*PakFileFullPath))//Determine whether the file exists
	{
		//Gets a reference to the pak file from the file system
		FPakFile * TmpPak = new FPakFile(PakPlatform.Get(), *PakFileFullPath, false);
		if (TmpPak)
		{ 
			TArray<FString> ExistPaks;
			PakPlatform->GetMountedPakFilenames(ExistPaks);
			if (ExistPaks.Find("pakchunk1001-WindowsNoEditor.pak") >= 0)
			{
				return;
			}
			FString PakMountPoint = TmpPak->GetMountPoint();
			int32 Pos = PakMountPoint.Find("Content/");
			FString NewMountPoint = PakMountPoint.RightChop(Pos);
			NewMountPoint = FPaths::ProjectDir() + NewMountPoint;
			TmpPak->SetMountPoint(*NewMountPoint);
			
			if (PakPlatform->Mount(*PakFileFullPath, 1, *NewMountPoint))
			{
				//The uclass is null
				UClass* uclass = LoadClass<AActor>(NULL, TEXT("Blueprint'Games/Blueprints/Blueprint_CeilingLight'"));
				if (uclass)
				{
					AActor* actor = GetWorld()->SpawnActor<AActor>(uclass, FVector(0), FRotator(0));
				}
			}
		}
	}
	FPlatformFileManager::Get().SetPlatformFile(*OldPlatform);
}	

The Blueprint type is not a class. It’s more like a class builder, with all the data and functions necessary to make the blueprint editor work. When you click compile, it generates a class (BlueprintGeneratedClass = UClass) and a default object, which are serialized into the uasset package.

When cooking, the Blueprints are stripped out as they are not needed anymore at runtime, only the generated classes and default objects remain.

From the looks of it you are trying to load the class, which should be :

UClass* uclass = LoadClass<AActor>(NULL, TEXT("/Game/Blueprints/Blueprint_CeilingLight.Blueprint_CeilingLight_C"));

As for mounting the pak I cannot help with that.
Due to the altered mount point the path might be wrong (might not be /Game), but I wouldn’t know.