Version: 2021.2
言語: 日本語
public GameObject[] GetRootGameObjects ();

戻り値

GameObject[] ゲームオブジェクトの配列

説明

Returns all the root game objects in the Scene.


public void GetRootGameObjects (List<GameObject> rootGameObjects);

パラメーター

rootGameObjects ルートのゲームオブジェクトを返すために使用されるリスト

説明

Returns all the root game objects in the Scene.

リストの容量は必ず Scene.rootCount より大きく設定してください。そうしなければ Unity が内部的にメモリを割り当てられません。