Add AssetLookup module to find assets by name.

This commit is contained in:
2025-04-01 22:31:27 -04:00
parent b26d56048f
commit aa511b9b8c
11 changed files with 250 additions and 78 deletions

View File

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