IUANode.GetByType<T>()

Returns a C# object that matches the first child node of the node on which the method is invoked and of the specified type
T
.
TIP:
In Visual Studio and Visual Studio Code, specifying the exact type (
<T>
) improves the intelligent code completion and makes it easier to identify errors while writing the code.
At runtime, it is evident if the node searched is of the requested type. If the searched node is not of the requested type, the API returns
null
.
T GetByType<T>();

Arguments

T
An
IUANode
C# class that corresponds to the class of the C# object to return.

Returns

T
A C# object that matches the requested node.

Example

The following example shows a returned C# object that corresponds to the first
Motor
node child of the node that contains the NetLogic:
var myMotor = Owner.GetByType<Motor>();
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.