Overhauling asset loading
This commit is contained in:
@@ -59,11 +59,12 @@ void UlxTangible::SetActorBlueprint(const FString &XName) {
|
||||
return;
|
||||
}
|
||||
|
||||
UClass *blueprint = UlxAssetLookup::LoadTangibleBlueprintAsset(this, Name);
|
||||
if (blueprint == nullptr)
|
||||
TSubclassOf<AActor> Blueprint;
|
||||
UlxAssetLookup::LoadTangibleBlueprintAsset(Blueprint, this, Name);
|
||||
if (Blueprint == nullptr)
|
||||
{
|
||||
blueprint = UlxAssetLookup::LoadTangibleBlueprintAsset(this, DEFAULT_BLUEPRINT);
|
||||
check(blueprint != nullptr);
|
||||
UlxAssetLookup::LoadTangibleBlueprintAsset(Blueprint, this, DEFAULT_BLUEPRINT);
|
||||
check(Blueprint != nullptr);
|
||||
}
|
||||
|
||||
// Update the blueprint name
|
||||
@@ -109,7 +110,7 @@ void UlxTangible::SetActorBlueprint(const FString &XName) {
|
||||
};
|
||||
|
||||
UE_LOG(LogLuprexIntegration, Display, TEXT("Creating Actor: %s"), *params.Name.ToString());
|
||||
AActor* a = w->SpawnActor(blueprint, &transform, params);
|
||||
AActor* a = w->SpawnActor(Blueprint, &transform, params);
|
||||
check(a != nullptr);
|
||||
CurrentActor = a;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user