From fa045af87f2088b383113152149aacc61260b9f0 Mon Sep 17 00:00:00 2001 From: jyelon Date: Mon, 22 Jan 2024 17:11:21 -0500 Subject: [PATCH] Load TangibleActor by name in TangibleManager --- Content/Characters/Mannequins/Animations/ABP_Manny.uasset | 4 ++-- .../Mannequins/Rigs/CR_Mannequin_BasicFootIK.uasset | 4 ++-- Content/IntegrationGameModeBaseBP.uasset | 4 ++-- Content/TanActor.uasset | 4 ++-- Content/TangibleActor.uasset | 3 --- Content/Tangibles/TangibleCharacter.uasset | 3 +++ Content/Tangibles/TangibleStaticMesh.uasset | 3 +++ Content/ThirdPerson/Blueprints/BP_Controller.uasset | 4 ++-- .../ThirdPerson/Blueprints/BP_ThirdPersonCharacter.uasset | 3 --- Source/Integration/IntegrationGameModeBase.cpp | 2 +- Source/Integration/IntegrationGameModeBase.h | 4 ---- Source/Integration/TangibleManager.cpp | 8 +++++--- Source/Integration/TangibleManager.h | 5 ++++- 13 files changed, 26 insertions(+), 25 deletions(-) delete mode 100644 Content/TangibleActor.uasset create mode 100644 Content/Tangibles/TangibleCharacter.uasset create mode 100644 Content/Tangibles/TangibleStaticMesh.uasset delete mode 100644 Content/ThirdPerson/Blueprints/BP_ThirdPersonCharacter.uasset diff --git a/Content/Characters/Mannequins/Animations/ABP_Manny.uasset b/Content/Characters/Mannequins/Animations/ABP_Manny.uasset index 14198cc2..0a6ce0b1 100644 --- a/Content/Characters/Mannequins/Animations/ABP_Manny.uasset +++ b/Content/Characters/Mannequins/Animations/ABP_Manny.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef885fec5239424f588fa43e85ccd760c722d2a64b1a87f7c56b7e960305c693 -size 334569 +oid sha256:76f29c53966aa4590e50a4eafa70df607f978c75120c359a4dc5c05bafa2262c +size 339660 diff --git a/Content/Characters/Mannequins/Rigs/CR_Mannequin_BasicFootIK.uasset b/Content/Characters/Mannequins/Rigs/CR_Mannequin_BasicFootIK.uasset index c2c5c683..086aa84e 100644 --- a/Content/Characters/Mannequins/Rigs/CR_Mannequin_BasicFootIK.uasset +++ b/Content/Characters/Mannequins/Rigs/CR_Mannequin_BasicFootIK.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4e17ed57148a85dce228797e3bc02fc1849fc2d1206a282e8d53e76834fbfca -size 614544 +oid sha256:3c0d6ba5c3da8432dc2571670a1825a1a6489d9ebf0f6c2fced6d87d23e94783 +size 451006 diff --git a/Content/IntegrationGameModeBaseBP.uasset b/Content/IntegrationGameModeBaseBP.uasset index 11e947c4..aa473885 100644 --- a/Content/IntegrationGameModeBaseBP.uasset +++ b/Content/IntegrationGameModeBaseBP.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5d0146aa1bb2e87847726dae381f9e5631fa1441f321ebdba04b8a175afe109 -size 53679 +oid sha256:43718d556a2a71f7aaa29c3bc93edce6a2de4bdaf35e09a1430f25b01069d2ea +size 54726 diff --git a/Content/TanActor.uasset b/Content/TanActor.uasset index 836c78c6..505568e1 100644 --- a/Content/TanActor.uasset +++ b/Content/TanActor.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8c1e57e6eda0e0446fe1a7fc05b57e376f6e850f6ba8d7705579fed7c6dda0e7 -size 2320 +oid sha256:933564ce1f62b2a7a4d5720c07f70ae3f1074e48aaa00ed87ed395315842edb1 +size 2378 diff --git a/Content/TangibleActor.uasset b/Content/TangibleActor.uasset deleted file mode 100644 index c555e555..00000000 --- a/Content/TangibleActor.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2c5a6f79210c7dd229172fe2d6cafa59890ea2f7c33e7a906dbe0c23427fcd2 -size 289726 diff --git a/Content/Tangibles/TangibleCharacter.uasset b/Content/Tangibles/TangibleCharacter.uasset new file mode 100644 index 00000000..77818aba --- /dev/null +++ b/Content/Tangibles/TangibleCharacter.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e6b4409dc510deec415210788ac3db022f9cb5e9f54a84ab72837171468ffbe +size 306466 diff --git a/Content/Tangibles/TangibleStaticMesh.uasset b/Content/Tangibles/TangibleStaticMesh.uasset new file mode 100644 index 00000000..9383dd3e --- /dev/null +++ b/Content/Tangibles/TangibleStaticMesh.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26bc03d24705abc78c65c099ffcbbd32eea43be8e3390083189c163e35cbed48 +size 288136 diff --git a/Content/ThirdPerson/Blueprints/BP_Controller.uasset b/Content/ThirdPerson/Blueprints/BP_Controller.uasset index b3e0eef1..7807e034 100644 --- a/Content/ThirdPerson/Blueprints/BP_Controller.uasset +++ b/Content/ThirdPerson/Blueprints/BP_Controller.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:50a4b3b63b1981bc38ed00427490b5add9efff62e57ffb351eaa1310ad2293db -size 45202 +oid sha256:9cc0f6397d7e9777ab459caf635f10dddd78261d8cefd76194e6af863e371942 +size 45595 diff --git a/Content/ThirdPerson/Blueprints/BP_ThirdPersonCharacter.uasset b/Content/ThirdPerson/Blueprints/BP_ThirdPersonCharacter.uasset deleted file mode 100644 index f9dc25a3..00000000 --- a/Content/ThirdPerson/Blueprints/BP_ThirdPersonCharacter.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa5173ad8de3a610cf1240309f49e4d8ab4f19d7495b8ebd903227a8f92cdde2 -size 307746 diff --git a/Source/Integration/IntegrationGameModeBase.cpp b/Source/Integration/IntegrationGameModeBase.cpp index ce4d277b..aba67aa8 100644 --- a/Source/Integration/IntegrationGameModeBase.cpp +++ b/Source/Integration/IntegrationGameModeBase.cpp @@ -253,7 +253,7 @@ void AIntegrationGameModeBase::BeginPlay() // Initialize the tangible manager. TangibleManager = NewObject(); - TangibleManager->Init(GetWorld(), ClassTangibleActor); + TangibleManager->Init(GetWorld()); } void AIntegrationGameModeBase::EndPlay(const EEndPlayReason::Type EndPlayReason) diff --git a/Source/Integration/IntegrationGameModeBase.h b/Source/Integration/IntegrationGameModeBase.h index e6c5ff5a..fc2b8bc2 100644 --- a/Source/Integration/IntegrationGameModeBase.h +++ b/Source/Integration/IntegrationGameModeBase.h @@ -39,10 +39,6 @@ public: UFUNCTION(BlueprintCallable, Category = "Luprex") void ConsoleSendInput(const FString& text); - // The blueprint class TangibleActor - UPROPERTY(EditDefaultsOnly, Category = "Luprex") - TSubclassOf ClassTangibleActor; - // Execute a debugging command, typed on the GUI. void ExecuteDebuggingCommand(const FString &fs); diff --git a/Source/Integration/TangibleManager.cpp b/Source/Integration/TangibleManager.cpp index 3bbeda20..48a2b7fc 100644 --- a/Source/Integration/TangibleManager.cpp +++ b/Source/Integration/TangibleManager.cpp @@ -11,12 +11,14 @@ using IdArray = UlxTangibleManager::IdArray; UlxTangibleManager::UlxTangibleManager() { World = nullptr; - ClassTangibleActor = nullptr; + ClassTangibleActor = LoadObject(nullptr, TEXT("/Game/Tangibles/TangibleStaticMesh.TangibleStaticMesh_C")); + static ConstructorHelpers::FClassFinder Asset(TEXT("/Game/Tangibles/TangibleStaticMesh")); + // if(Asset.Succeeded()) + // ClassTangibleActor = Asset.Class; } -void UlxTangibleManager::Init(UWorld* world, UClass* tanact) { +void UlxTangibleManager::Init(UWorld* world) { World = world; - ClassTangibleActor = tanact; } UlxTangible* UlxTangibleManager::GetTangible(int64 id) const { diff --git a/Source/Integration/TangibleManager.h b/Source/Integration/TangibleManager.h index 6d9c8827..0f1e3430 100644 --- a/Source/Integration/TangibleManager.h +++ b/Source/Integration/TangibleManager.h @@ -28,6 +28,9 @@ public: UPROPERTY() TSubclassOf ClassTangibleActor; + // A pointer to the name-to-actor data table. + UDataTable *NameToActorTable; + // Given a tangible ID, look up the TangibleComponent of that actor. UPROPERTY() TMap IdToTangible; @@ -37,7 +40,7 @@ public: // Initialize the tangible manager. // - void Init(UWorld *world, UClass* tanact); + void Init(UWorld *world); // Get a pointer to our world. //