1
0
forked from cgvr/DeltaVR

manage spawned object node hierarchy better

This commit is contained in:
2025-12-16 13:30:08 +02:00
parent 5796887f79
commit 90781191b7
4 changed files with 45 additions and 25 deletions

View File

@@ -48,7 +48,8 @@ public class ModelGenerationBox : MonoBehaviour
string modelPath = await PipelineManager.Instance.GenerateModelAsync(inputPrompt);
lastModelPath = modelPath;
GameObject spawnedObject = await PipelineManager.Instance.SpawnModel(modelPath, true);
GameObject spawnedObject = await PipelineManager.Instance.SpawnModel(modelPath);
spawnedObject.AddComponent<Rigidbody>();
spawnedObject.transform.parent = modelSpawnPoint;
spawnedObject.transform.position = modelSpawnPoint.position;