Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CollectInSceneAssets

Gets information about in-scene assets referenced by the given GameObjects or scene.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

CollectInSceneAssets(GameObject[])

Gets information about in-scene assets referenced by the given GameObjects or scene.
public static InSceneAssetInformation[] CollectInSceneAssets(GameObject[] gameObjects)

Parameters

gameObjects

The GameObjects to traverse and collect in-scene asset references for.

Returns

Type

Description

InSceneAssetInformation[]Information about the in-scene assets referenced by the provided GameObjects or the GameObjects of the provided scene.

Remarks

Checks the entire hierarchy of each provided GameObject or GameObjects of the provided scene, their respective child GameObjects, and components to collect all in-scene assets referenced by them.
Additional Resources: InSceneAssetInformation.

CollectInSceneAssets(Scene)

Gets information about in-scene assets referenced by the given GameObjects or scene.
public static InSceneAssetInformation[] CollectInSceneAssets(Scene scene)

Parameters

scene

The scene to traverse and collect in-scene asset references for.

Returns

Type

Description

InSceneAssetInformation[]Information about the in-scene assets referenced by the provided GameObjects or the GameObjects of the provided scene.

Remarks

Checks the entire hierarchy of each provided GameObject or GameObjects of the provided scene, their respective child GameObjects, and components to collect all in-scene assets referenced by them.
Additional Resources: InSceneAssetInformation.