Legacy Documentation: Version 2017.1 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

SceneManager.MoveGameObjectToScene

public static void MoveGameObjectToScene(GameObject go, SceneManagement.Scene scene);

Parameters

go GameObject to move.
scene Scene to move into.

Description

Move a GameObject from its current scene to a new Scene.

You can only move root GameObjects from one Scene to another. This means the GameObject to move must not be a child of any other GameObject in its Scene.

Did you find this page useful? Please give it a rating: