Legacy Documentation: Version 2017.2 (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.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答