Announcement

Collapse
No announcement yet.

LevelPluginLog:Error: OnMountPak is not bound ,why?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    Click image for larger version

Name:	21.JPG
Views:	1
Size:	53.8 KB
ID:	1191767

    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;
    }

    #2
    LevelPluginLog:Error: OnMountPak is not bound ,why?

    Comment


      #3
      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.

      Comment

      Working...
      X