Click or drag to resize

SerialisableGameObjectPoolGetObjectFactory Method

[This is preliminary documentation and is subject to change.]

Gets a function used to create new instances of the pooled type. By default, this method uses the public parameterless constructor of type T. This method should be overridden in a subclass if different behaviour is required.

Namespace:  Umbrace.Unity.PurePool
Assembly:  Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
protected override Func<GameObject> GetObjectFactory()

Return Value

Type: FuncGameObject
A function that can be used to create new instances of the pooled type.
Exceptions
ExceptionCondition
InvalidOperationExceptionNo public parameterless constructor could be found on type T.
See Also