ドキュメント

Unity Engine

Unity Engine

GetIconForGameObject(GameObject)

Retrieves the icon for the given GameObject.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static Texture2D GetIconForGameObject(GameObject gameObject)

Parameters

gameObject

The GameObject to get an icon for.

Returns

Type

Description

Texture2DThe icon for the GameObject.

Remarks

This method returns the icon for the GameObject, as it appears in the Hierarchy or Project Browser. Prefab instance or Asset roots have a Prefab, Prefab Mode, or Prefab Variant icon, while other GameObjects have a regular GameObject icon.