 | JsonPrefabInstantiateT Method (Object, Boolean) |
Instantiate a MonoBehaviour based on an object and populates it.
Namespace:
Kit.Containers
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0
Syntaxpublic static T Instantiate<T>(
Object stateObject,
bool saveOnDestroy = true
)
where T : MonoBehaviour
Request Example
View SourceParameters
- stateObject
- Type: SystemObject
The object to instantiate a MonoBehaviour of. - saveOnDestroy (Optional)
- Type: SystemBoolean
Should it save back the state when the MonoBehaviour is destroyed?
Type Parameters
- T
- Type of MonoBehaviour to instantiate.
Return Value
Type:
TMonoBehaviour instance instantiated, or
.
See Also