diff --git a/Content/Blueprint/Core/BP_3DtextHelp.uasset b/Content/Blueprint/Core/BP_3DtextHelp.uasset index 7074eae4..d3afa112 100644 Binary files a/Content/Blueprint/Core/BP_3DtextHelp.uasset and b/Content/Blueprint/Core/BP_3DtextHelp.uasset differ diff --git a/Content/Blueprint/Core/BP_allObjectCreate.uasset b/Content/Blueprint/Core/BP_allObjectCreate.uasset index f27c146f..f79cbb54 100644 Binary files a/Content/Blueprint/Core/BP_allObjectCreate.uasset and b/Content/Blueprint/Core/BP_allObjectCreate.uasset differ diff --git a/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset b/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset index c5c963fa..ad2444f8 100644 Binary files a/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset and b/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset differ diff --git a/Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset b/Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset index a9cf138a..c17738c8 100644 Binary files a/Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset and b/Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset differ diff --git a/Content/GameBP/UI/Settings/WB_CaptureSettings.uasset b/Content/GameBP/UI/Settings/WB_CaptureSettings.uasset index 28cc5740..360b0698 100644 Binary files a/Content/GameBP/UI/Settings/WB_CaptureSettings.uasset and b/Content/GameBP/UI/Settings/WB_CaptureSettings.uasset differ diff --git a/Content/GameBP/UI/Settings/WB_TaskListView.uasset b/Content/GameBP/UI/Settings/WB_TaskListView.uasset index e290fdca..a12ea7f5 100644 Binary files a/Content/GameBP/UI/Settings/WB_TaskListView.uasset and b/Content/GameBP/UI/Settings/WB_TaskListView.uasset differ diff --git a/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp b/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp index ebc40ce3..9f494d93 100644 --- a/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp +++ b/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp @@ -242,7 +242,7 @@ FString ULuckyRobotsGameInstance::GetWriteFolderPath() return WriteFolderPath; } -TSoftObjectPtr ULuckyRobotsGameInstance::GetRandomMesh() +TSoftObjectPtr ULuckyRobotsGameInstance::GetRandomMesh(FTransform& SpawnTransform) { int32 MeshCount = GetCurrentRandomMeshes().Num(); if (MeshCount > 0) @@ -250,7 +250,19 @@ TSoftObjectPtr ULuckyRobotsGameInstance::GetRandomMesh() int32 RandomIndex = UKismetMathLibrary::RandomIntegerInRange(0, MeshCount - 1); if (GetCurrentRandomMeshes().IsValidIndex(RandomIndex)) { - return GetCurrentRandomMeshes()[RandomIndex]; + TSoftObjectPtr randommesh = (GetCurrentRandomMeshes()[RandomIndex]); + + TArray SelectableItemList = GetSelectableItemList(EItemCategory::Furniture); + for (auto SelectableItem : SelectableItemList) + { + if (SelectableItem.Mesh == randommesh) + { + SpawnTransform = SelectableItem.Transform; + break; + } + } + + return randommesh; } } diff --git a/Source/LuckyWorldV2/Public/Core/LuckyRobotsGameInstance.h b/Source/LuckyWorldV2/Public/Core/LuckyRobotsGameInstance.h index 06216130..8d2def0e 100644 --- a/Source/LuckyWorldV2/Public/Core/LuckyRobotsGameInstance.h +++ b/Source/LuckyWorldV2/Public/Core/LuckyRobotsGameInstance.h @@ -202,7 +202,7 @@ public: FString GetWriteFolderPath(); UFUNCTION(BlueprintPure) - TSoftObjectPtr GetRandomMesh(); + TSoftObjectPtr GetRandomMesh(FTransform& SpawnTransform); UFUNCTION(BlueprintPure, Category = "Selectable Items") TArray GetSelectableItemList(EItemCategory ItemCategory);