mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-02 02:55:13 +00:00
Makes sure if you don't spawn a game object into MissionGroup, it spawns it into MissionCleanup.
This commit is contained in:
parent
553cf260f1
commit
bbf7865a77
1 changed files with 3 additions and 1 deletions
|
|
@ -77,8 +77,10 @@ function spawnGameObject(%name, %addToMissionGroup)
|
|||
{
|
||||
%newSGOObject = TamlRead(%gameObjectAsset.TAMLFilePath);
|
||||
|
||||
if(%addToMissionGroup == true)
|
||||
if(%addToMissionGroup == true) //save instance when saving level
|
||||
MissionGroup.add(%newSGOObject);
|
||||
else // clear instance on level exit
|
||||
MissionCleanup.add(%newSGOObject);
|
||||
|
||||
return %newSGOObject;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue