Created
August 12, 2021 11:05
-
-
Save Infinitusvoid/ac203439ec5f19a0197478910e5b3495 to your computer and use it in GitHub Desktop.
Unity C# : How to create a scene in runtime and move objects to separate scene?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using UnityEngine.SceneManagement; | |
//Create a scene and move Object to sepeate scene? | |
Scene pool_scene = SceneManager.CreateScene("PoolScene"); | |
for (int i = 0; i < list_of_gameobjects.Count; i++) | |
{ | |
SceneManager.MoveGameObjectToScene( | |
list_of_gameobjects[i], pool_scene | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment