Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MoveGameObjectToScene(GameObject, Scene, string)

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.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static void MoveGameObjectToScene(GameObject go, Scene scene, string name)

Parameters

GameObject to move.

scene

Scene to move the GameObject into.

name

Name of the undo action.