Undo.MoveGameObjectToScene

Switch to Manual
public static void MoveGameObjectToScene (GameObject go, SceneManagement.Scene scene, string name);

Parameters

go要移动的游戏对象。
scene将游戏对象移动到的目标场景。
name撤销操作的名称。

Description

Move a GameObject from its current Scene to a new Scene. It is required that the GameObject is at the root of its current Scene.