 | 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
Syntaxpublic static IEnumerable<T> Instantiate<T>(
IEnumerable stateObjects,
bool saveOnDestroy = true
)
where T : MonoBehaviour
Request Example
View SourceParameters
- 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:
IEnumerableTList of
MonoBehaviours instantiated.
See Also