Click or drag to resize

JsonPrefabInstantiateT Method (String, IEnumerableJObject, Boolean)

Instantiate MonoBehaviours based on a list of JObjects and populate them.

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

Parameters

path
Type: SystemString
Path to the prefab(s). Anything enclosed in {} gets replaced with the value of a property.
jObjects
Type: System.Collections.GenericIEnumerableJObject
List of JObjects to instantiate instances of.
saveOnDestroy (Optional)
Type: SystemBoolean
Should it save back the state when a MonoBehaviour is destroyed?

Type Parameters

T
Type of MonoBehaviours to instantiate.

Return Value

Type: IEnumerableT
List of MonoBehaviours instantiated.
See Also