UnityEngine.Component クラス

UnityEngine.Component クラス

[APIドキュメント]

public class Component : Object

継承:Object → Component

  • GameObject にアタッチされるすべてのコンポーネントの基底クラスです。
[toc]
目次

フィールド

gameObject

@ [APIドキュメント]

public GameObject gameObject

  • このComponentがアタッチされたGameObjectです。

transform

@ [APIドキュメント]

public Transform transform

  • このComponentがアタッチされたGameObjectのTransformです。

メソッド

GetComponent

@ [APIドキュメント]

public Component GetComponent(Type type)
public T GetComponent()
public Component GetComponent(string type)

  • アタッチされたGameObjectのコンポーネントのうち、指定する型のものを取得します。

コメント

コメントする

nine + four =

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)

目次