Download

LevelPluginLog:Error: OnMountPak is not bound ,why?

LevelPluginLog:Error: OnMountPak is not bound
LogScript:Warning: Accessed None trying to read property ActorPaks
PaksModelShop_C /Engine/Transient.UnrealEdEngine_0:MMOInstance_C_1.FullUI_C_0.WidgetTree_2161.ChushouM
Function /Game/MMO/Blueprints/Shop/PaksModelShop.PaksModelShop_C:ExecuteUbergraph_PaksModelShop:0020
LogScript:Warning: Accessed None
PaksModelShop_C /Engine/Transient.UnrealEdEngine_0:MMOInstance_C_1.FullUI_C_0.WidgetTree_2161.ChushouM
Function /Game/MMO/Blueprints/Shop/PaksModelShop.PaksModelShop_C:ExecuteUbergraph_PaksModelShop:0035

21.JPG

bool ULevelLoaderObject::AlternateLoadLevelFromPak(UObject* WorldContextObject, const FString& pakPath, UStaticMesh*& LoadedStaticMesh)
{
UWorld* World = WorldContextObject->GetWorld();

UE_LOG(LevelPluginLog, Log, TEXT("Game Content Dir: %s"), *FPaths::GameContentDir());

if (FCoreDelegates::OnMountPak.IsBound())
{
	if (FCoreDelegates::OnMountPak.Execute(*pakPath, 0, nullptr))
	{
		FStreamableManager AssetLoader;
		FStringAssetReference AssetRef(TEXT("/Engine/dronepackmesh.dronepackmesh"));
		LoadedStaticMesh = Cast<UStaticMesh>(AssetLoader.SynchronousLoad(AssetRef));

		AStaticMeshActor* actor = World->SpawnActor<AStaticMeshActor>(FVector::ZeroVector, FRotator::ZeroRotator);
		actor->GetStaticMeshComponent()->Mobility = EComponentMobility::Movable;
		actor->GetStaticMeshComponent()->SetStaticMesh(LoadedStaticMesh);

		UE_LOG(LevelPluginLog, Log, TEXT("Pak successfully mounted"));
	}
	else
		UE_LOG(LevelPluginLog, Error, TEXT("Pak failed to mount"));
}
else
	UE_LOG(LevelPluginLog, Error, TEXT("OnMountPak is not bound"));

return true;

}

LevelPluginLog:Error: OnMountPak is not bound ,why?

Are you running from PIE? If so then OnMountPak will probably not be bound. At least that was true at one time. Need to run standalone or packaged code.