Urho.Node.GetOrCreateComponent<T> Method

Create a component to this node if it does not exist already.

Syntax

public T GetOrCreateComponent<T> (Boolean recursive)
where T : Component

Type Parameters

T

Parameters

recursive
If true, this performs a recursive search on the child nodes of this node.

Returns

Returns the component of the specified T that was either located, or that was created.

Remarks

This method calls the Node.GetComponent method to perform the search, if the component is not found, then it calls Node.CreateComponent method 

Requirements

Namespace: Urho
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0