Can now specify bp= in the animation queue, and it works
This commit is contained in:
@@ -9,10 +9,31 @@ using namespace DebugPrint;
|
||||
using TanArray = UlxTangibleManager::TanArray;
|
||||
using IdArray = UlxTangibleManager::IdArray;
|
||||
|
||||
UClass *UlxTangibleManager::GetTangibleClass(const FString &name) {
|
||||
if (name.IsEmpty()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
FString path(TEXT("/Game/Tangibles/"));
|
||||
path += name;
|
||||
path += TCHAR('.');
|
||||
path += 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;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
UlxTangibleManager::UlxTangibleManager() {
|
||||
World = nullptr;
|
||||
ClassTangibleStaticMesh = LoadObject<UClass>(nullptr, TEXT("/Game/Tangibles/TangibleStaticMesh.TangibleStaticMesh_C"));
|
||||
check(ClassTangibleStaticMesh != nullptr);
|
||||
}
|
||||
|
||||
void UlxTangibleManager::Init(UWorld* world) {
|
||||
@@ -34,11 +55,6 @@ UlxTangible* UlxTangibleManager::MakeTangible(int64 id) {
|
||||
if (t == nullptr) {
|
||||
t = NewObject<UlxTangible>();
|
||||
t->Init(this, id);
|
||||
|
||||
// TODO: fix this. The blueprint needs to be assigned
|
||||
// during animation queue parsing, based on the animation
|
||||
// queue keyword 'bp'.
|
||||
t->SetActorBlueprintClass(ClassTangibleStaticMesh);
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user