Load TangibleActor by name in TangibleManager
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/TanActor.uasset
LFS
BIN
Content/TanActor.uasset
LFS
Binary file not shown.
BIN
Content/TangibleActor.uasset
LFS
BIN
Content/TangibleActor.uasset
LFS
Binary file not shown.
BIN
Content/Tangibles/TangibleCharacter.uasset
LFS
Normal file
BIN
Content/Tangibles/TangibleCharacter.uasset
LFS
Normal file
Binary file not shown.
BIN
Content/Tangibles/TangibleStaticMesh.uasset
LFS
Normal file
BIN
Content/Tangibles/TangibleStaticMesh.uasset
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -253,7 +253,7 @@ void AIntegrationGameModeBase::BeginPlay()
|
||||
|
||||
// Initialize the tangible manager.
|
||||
TangibleManager = NewObject<UlxTangibleManager>();
|
||||
TangibleManager->Init(GetWorld(), ClassTangibleActor);
|
||||
TangibleManager->Init(GetWorld());
|
||||
}
|
||||
|
||||
void AIntegrationGameModeBase::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
||||
|
||||
@@ -39,10 +39,6 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex")
|
||||
void ConsoleSendInput(const FString& text);
|
||||
|
||||
// The blueprint class TangibleActor
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Luprex")
|
||||
TSubclassOf<AActor> ClassTangibleActor;
|
||||
|
||||
// Execute a debugging command, typed on the GUI.
|
||||
void ExecuteDebuggingCommand(const FString &fs);
|
||||
|
||||
|
||||
@@ -11,12 +11,14 @@ using IdArray = UlxTangibleManager::IdArray;
|
||||
|
||||
UlxTangibleManager::UlxTangibleManager() {
|
||||
World = nullptr;
|
||||
ClassTangibleActor = nullptr;
|
||||
ClassTangibleActor = LoadObject<UClass>(nullptr, TEXT("/Game/Tangibles/TangibleStaticMesh.TangibleStaticMesh_C"));
|
||||
static ConstructorHelpers::FClassFinder<AActor> 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 {
|
||||
|
||||
@@ -28,6 +28,9 @@ public:
|
||||
UPROPERTY()
|
||||
TSubclassOf<AActor> 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<int64, UlxTangible*> 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.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user