Gets the component by its type

C# | Visual Basic | Visual C++ |
public static Component GetComponent<T>( bool instantiateIfNotFound ) where T : Component
Public Shared Function GetComponent(Of T As Component) ( _ instantiateIfNotFound As Boolean _ ) As Component
public: generic<typename T> where T : Component static Component^ GetComponent( bool instantiateIfNotFound )

- T

- instantiateIfNotFound (Boolean)
- If component not found on the framework object, should I instantiate a new component and stick it in?
