ドキュメント

Unity Engine

Download Unity

Unity Engine

GetScene

Retrieves the Scene which contains the GameObject with the specified instance ID.
読み終わるまでの所要時間 1 分最終更新 25日前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

GetScene(EntityId)

Retrieves the Scene which contains the GameObject with the specified instance ID.
public static Scene GetScene(EntityId entityId)

Parameters

entityId

EntityId

Returns

Type

Description

SceneThe Scene the GameObject with the specified instance ID is part of.

GetScene(int)

Retrieves the Scene which contains the GameObject with the specified instance ID.
注意
Removed. Obsolete. Please use GameObject.GetScene(EntityId entityId) instead.
public static Scene GetScene(int instanceID)

Parameters

instanceID

The instance ID of the GameObject.

Returns

Type

Description

SceneThe Scene the GameObject with the specified instance ID is part of.