Entity.FindComponentOfType メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
FindComponentOfType(ObjectType) |
このエンティティにアタッチされている特定の型のコンポーネントの検索を試みます。 |
FindComponentOfType<T>() |
このエンティティで型のコンポーネントを検索します。 |
FindComponentOfType(ObjectType)
このエンティティにアタッチされている特定の型のコンポーネントの検索を試みます。
public:
Microsoft::Azure::RemoteRendering::ComponentBase ^ FindComponentOfType(Microsoft::Azure::RemoteRendering::ObjectType type);
public Microsoft.Azure.RemoteRendering.ComponentBase FindComponentOfType (Microsoft.Azure.RemoteRendering.ObjectType type);
member this.FindComponentOfType : Microsoft.Azure.RemoteRendering.ObjectType -> Microsoft.Azure.RemoteRendering.ComponentBase
Public Function FindComponentOfType (type As ObjectType) As ComponentBase
パラメーター
- type
- ObjectType
たとえば、MeshComponentなど、検索するコンポーネントの種類。
戻り値
コンポーネントが見つかった場合は null、それ以外の場合は null
注釈
各エンティティにアタッチできるのは、各コンポーネントの種類のインスタンスを 1 つだけです。 したがって、この関数は単一の結果を返すか、見つからない場合は null
します。 完全なエンティティ サブツリーでコンポーネントを検索する必要がある場合は、FindComponentsOfTypeInHierarchy(ObjectType, Int32) 関数を使用します。
適用対象
FindComponentOfType<T>()
このエンティティで型のコンポーネントを検索します。
public:
generic <typename T>
where T : Microsoft::Azure::RemoteRendering::ComponentBase T FindComponentOfType();
public T FindComponentOfType<T> () where T : Microsoft.Azure.RemoteRendering.ComponentBase;
member this.FindComponentOfType : unit -> 'T (requires 'T :> Microsoft.Azure.RemoteRendering.ComponentBase)
Public Function FindComponentOfType(Of T As ComponentBase) () As T
型パラメーター
- T
戻り値
T
コンポーネントが見つかった場合は null、それ以外の場合は null