Add AssetLookup module to find assets by name.
This commit is contained in:
@@ -33,10 +33,10 @@ void UlxTangible::SetActorBlueprint(const FString &XName) {
|
||||
}
|
||||
|
||||
// Get the blueprint.
|
||||
UClass *blueprint = Manager->GetTangibleClass(Name);
|
||||
UClass *blueprint = UlxAssetLookup::GetTangibleClassByName(this, Name);
|
||||
if (blueprint == nullptr)
|
||||
{
|
||||
blueprint = Manager->GetTangibleClass(DEFAULT_BLUEPRINT);
|
||||
blueprint = UlxAssetLookup::GetTangibleClassByName(this, DEFAULT_BLUEPRINT);
|
||||
check(blueprint != nullptr);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ void UlxTangible::MaybeExecuteAnimStateChanged() {
|
||||
if (blueprint.IsEmpty()) blueprint = DEFAULT_BLUEPRINT;
|
||||
SetActorBlueprint(blueprint);
|
||||
AActor *actor = GetActor();
|
||||
UFunction *aqchanged = UlxTangibleManager::GetAnimationQueueChanged(actor->GetClass());
|
||||
UFunction *aqchanged = actor->GetClass()->FindFunctionByName(FName(TEXT("Animation Queue Changed")));
|
||||
if (aqchanged != nullptr) {
|
||||
actor->ProcessEvent(aqchanged, nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user