From 1494e4f8e69e280f73f86de84b3630c62d55ed94 Mon Sep 17 00:00:00 2001 From: jyelon Date: Sat, 2 Sep 2023 01:39:35 -0400 Subject: [PATCH] TangibleManager Init function implemeneted --- Source/Integration/IntegrationGameModeBase.cpp | 4 ++-- Source/Integration/IntegrationGameModeBase.h | 4 ++-- Source/Integration/TangibleManager.cpp | 10 +++++----- Source/Integration/TangibleManager.h | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Source/Integration/IntegrationGameModeBase.cpp b/Source/Integration/IntegrationGameModeBase.cpp index e3d1fbfc..e0f7fbdf 100644 --- a/Source/Integration/IntegrationGameModeBase.cpp +++ b/Source/Integration/IntegrationGameModeBase.cpp @@ -192,8 +192,8 @@ void AIntegrationGameModeBase::BeginPlay() Thread = FRunnableThread::Create(this, TEXT("Worker Thread")); } - //// Create a tangible. - //TangibleManager.Init(GetWorld(), ClassTangibleActor); + // Create a tangible. + TangibleManager.Init(GetWorld(), ClassTangibleActor); //TangibleManager.MakeTangible(123); } diff --git a/Source/Integration/IntegrationGameModeBase.h b/Source/Integration/IntegrationGameModeBase.h index 2ae5404f..35c1c71e 100644 --- a/Source/Integration/IntegrationGameModeBase.h +++ b/Source/Integration/IntegrationGameModeBase.h @@ -47,8 +47,8 @@ public: // Transfer console output from the Luprex engine to unreal. void HandleLuprexConsoleOutput(); - //UPROPERTY() - //FTangibleManager TangibleManager; + UPROPERTY() + FTangibleManager TangibleManager; // This stores the entire text currently visible in the console. engineutil::ConsoleOutput ConsoleOutput; diff --git a/Source/Integration/TangibleManager.cpp b/Source/Integration/TangibleManager.cpp index b638dbc1..6264c243 100644 --- a/Source/Integration/TangibleManager.cpp +++ b/Source/Integration/TangibleManager.cpp @@ -5,11 +5,11 @@ //using AActorPtr = AActor*; -//void FTangibleManager::Init(UWorld *world, UClass* tanact) { -// World = world; -// ClassTangibleActor = tanact; -//} -// +void FTangibleManager::Init(UWorld *world, UClass* tanact) { + World = world; + ClassTangibleActor = tanact; +} + //AActorPtr FTangibleManager::GetTangible(int64 id) { // AActorPtr *p = IdToActor.Find(id); // if (p == nullptr) { diff --git a/Source/Integration/TangibleManager.h b/Source/Integration/TangibleManager.h index a36554be..156168c5 100644 --- a/Source/Integration/TangibleManager.h +++ b/Source/Integration/TangibleManager.h @@ -15,21 +15,21 @@ struct INTEGRATION_API FTangibleManager GENERATED_BODY() public: - //// A pointer to the UWorld. - //UWorld* world; + // A pointer to the UWorld. + UWorld* World; - //// A pointer to uclass TangibleActor. - //UPROPERTY() - //TSubclassOf ClassTangibleActor; + // A pointer to uclass TangibleActor. + UPROPERTY() + TSubclassOf ClassTangibleActor; //// Given a tangible ID, look up actor pointer (or NULL if actor was deleted) //UPROPERTY() //TMap IdToActor; public: - //// Initialize the tangible manager. - //// - //void Init(UWorld *world, UClass* tanact); + // Initialize the tangible manager. + // + void Init(UWorld *world, UClass* tanact); //// Get the tangible if it exists, otherwise return NULL //AActor* GetTangible(int64 id);