Click or drag to resize

JsonPrefabInstantiateT Method (String, JObject, Boolean)

Instantiate a MonoBehaviour based on an JObject and populates it.

Namespace:  Kit.Containers
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0
Syntax
C#
public static T Instantiate<T>(
	string path,
	JObject jObject,
	bool saveOnDestroy = true
)
where T : MonoBehaviour
Request Example View Source

Parameters

path
Type: SystemString
Path to the prefab. Anything enclosed in {} gets replaced with the value of a property.
jObject
Type: JObject
The JObject 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