 | 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
Syntaxpublic static T Instantiate<T>(
string path,
JObject jObject,
bool saveOnDestroy = true
)
where T : MonoBehaviour
Request Example
View SourceParameters
- 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:
TMonoBehaviour instance instantiated, or
.
See Also