Get rid of lxTangibleInterface
This commit is contained in:
@@ -10,6 +10,13 @@ using namespace DebugPrint;
|
||||
using TanArray = UlxTangibleManager::TanArray;
|
||||
using IdArray = UlxTangibleManager::IdArray;
|
||||
|
||||
UFunction *UlxTangibleManager::GetAnimationQueueChanged(UClass *uclass) {
|
||||
UFunction *result = uclass->FindFunctionByName(FName(TEXT("Animation Queue Changed")));
|
||||
if (result == nullptr) return nullptr;
|
||||
if (result->ParmsSize != 0) return nullptr;
|
||||
return result;
|
||||
}
|
||||
|
||||
UClass *UlxTangibleManager::GetTangibleClass(const FString &name) {
|
||||
if (name.IsEmpty()) {
|
||||
return nullptr;
|
||||
@@ -22,13 +29,18 @@ UClass *UlxTangibleManager::GetTangibleClass(const FString &name) {
|
||||
path += TCHAR('_');
|
||||
path += TCHAR('C');
|
||||
UClass *result = LoadObject<UClass>(nullptr, *path);
|
||||
if (result != nullptr) {
|
||||
if (!result->IsChildOf(AActor::StaticClass())) {
|
||||
return nullptr;
|
||||
}
|
||||
if (!result->ImplementsInterface(UlxTangibleInterface::StaticClass())) {
|
||||
return nullptr;
|
||||
}
|
||||
if (result == nullptr) {
|
||||
UE_LOG(LogBlueprint, Error, TEXT("No such UClass: %s"), *path);
|
||||
return nullptr;
|
||||
}
|
||||
if (!result->IsChildOf(AActor::StaticClass())) {
|
||||
UE_LOG(LogBlueprint, Error, TEXT("UClass is not an actor: %s"), *path);
|
||||
return nullptr;
|
||||
}
|
||||
UFunction *aqchanged = GetAnimationQueueChanged(result);
|
||||
if (aqchanged == nullptr) {
|
||||
UE_LOG(LogBlueprint, Error, TEXT("UClass does not have 'Animation Queue Changed' function: %s"), *path);
|
||||
return nullptr;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user