Click or drag to resize

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
Syntax
C#
public static T Instantiate<T>(
	Object stateObject,
	bool saveOnDestroy = true
)
where T : MonoBehaviour
Request Example View Source

Parameters

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: T
MonoBehaviour instance instantiated, or .
See Also