Entity.FindComponentOfType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
FindComponentOfType(ObjectType) |
Tries to find a component of the given type. |
FindComponentOfType<COMPTYPE>() |
Find a component of a type on this Entity. |
FindComponentOfType(ObjectType)
Tries to find a component of the given type.
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
Parameters
- type
- ObjectType
Component type to search for.
Returns
The component if found, otherwise null
Remarks
Only one instance of each component type can be attached to each entity. Therefore this function either returns a single result, or null
, if none is found.
Applies to
FindComponentOfType<COMPTYPE>()
Find a component of a type on this Entity.
public:
generic <typename COMPTYPE>
where COMPTYPE : Microsoft::Azure::RemoteRendering::ComponentBase COMPTYPE FindComponentOfType();
public COMPTYPE FindComponentOfType<COMPTYPE> () where COMPTYPE : Microsoft.Azure.RemoteRendering.ComponentBase;
member this.FindComponentOfType : unit -> 'COMPTYPE (requires 'COMPTYPE :> Microsoft.Azure.RemoteRendering.ComponentBase)
Public Function FindComponentOfType(Of COMPTYPE As ComponentBase) () As COMPTYPE
Type Parameters
- COMPTYPE
Returns
The component if found, otherwise null