![]() |
Init(args)
Scripting Reference
|
Extensions methods for GameObject that can be used to add components with dependencies injected using reflection.
This can make it easier to create unit tests for MonoBehaviour-derived classes as it allows one to set the values of non-public fields which in normal use-cases might be meant to only be assigned only through the inspector.
Static Public Member Functions | |
static TComponent | AddComponent< TComponent > (this GameObject gameObject, params(string name, object value)[] arguments) |
Adds a component of type TComponent to the gameObject and initializes the component using the provided arguments . More... | |