2023-09-02 01:33:11 -04:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "UObject/NoExportTypes.h"
|
|
|
|
|
#include "TangibleManager.generated.h"
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
USTRUCT()
|
|
|
|
|
struct INTEGRATION_API FTangibleManager
|
|
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
public:
|
2023-09-02 01:39:35 -04:00
|
|
|
// A pointer to the UWorld.
|
|
|
|
|
UWorld* World;
|
2023-09-02 01:33:11 -04:00
|
|
|
|
2023-09-02 01:39:35 -04:00
|
|
|
// A pointer to uclass TangibleActor.
|
|
|
|
|
UPROPERTY()
|
|
|
|
|
TSubclassOf<AActor> ClassTangibleActor;
|
2023-09-02 01:33:11 -04:00
|
|
|
|
2023-09-02 01:43:44 -04:00
|
|
|
// Given a tangible ID, look up actor pointer (or NULL if actor was deleted)
|
|
|
|
|
UPROPERTY()
|
|
|
|
|
TMap<int64, AActor*> IdToActor;
|
2023-09-02 01:33:11 -04:00
|
|
|
|
|
|
|
|
public:
|
2023-09-02 01:39:35 -04:00
|
|
|
// Initialize the tangible manager.
|
|
|
|
|
//
|
|
|
|
|
void Init(UWorld *world, UClass* tanact);
|
2023-09-02 01:33:11 -04:00
|
|
|
|
2023-09-02 01:43:44 -04:00
|
|
|
// Get the tangible if it exists, otherwise return NULL
|
|
|
|
|
AActor* GetTangible(int64 id);
|
2023-09-02 01:33:11 -04:00
|
|
|
|
2023-09-02 01:43:44 -04:00
|
|
|
// Get the tangible if it exists, otherwise create it.
|
|
|
|
|
AActor* MakeTangible(int64 id);
|
2023-09-02 01:33:11 -04:00
|
|
|
|
2023-09-02 01:43:44 -04:00
|
|
|
// Delete the tangible.
|
|
|
|
|
void DeleteTangible(int64 id);
|
2023-09-02 01:33:11 -04:00
|
|
|
};
|