Click or drag to resize

JsonPrefabInstantiateT Method (IEnumerable, Boolean)

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

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

Parameters

stateObjects
Type: System.CollectionsIEnumerable
List of objects to instantiate MonoBehaviours 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