Click or drag to resize

PoolableObjectT Class

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

A component that will automatically be attached to an instance of a pooled object, to provide notifications when the object is acquired from, or released to, the pool.
Inheritance Hierarchy
SystemObject
  UnityEngineObject
    UnityEngineComponent
      UnityEngineBehaviour
        UnityEngineMonoBehaviour
          Umbrace.Unity.PurePoolPoolableObjectT
            Umbrace.Unity.PurePoolPoolableComponent
            Umbrace.Unity.PurePoolPoolableGameObject

Namespace:  Umbrace.Unity.PurePool
Assembly:  Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public abstract class PoolableObject<T> : MonoBehaviour, 
	ISerializationCallbackReceiver

Type Parameters

T
The type of object being pooled.

The PoolableObjectT type exposes the following members.

Constructors
  NameDescription
Protected methodPoolableObjectT
Initializes a new instance of the PoolableObjectT class
Top
Properties
  NameDescription
Public propertyCachePoolableComponents
Gets or sets a value indicating whether to cache the components found on this GameObject that implement IPoolable.
Public propertyIsInPool
Gets a value indicating whether the pooled object is currently unacquired and contained by the object pool.
Public propertyNotificationMode
Gets or sets the way in which pooled objects are notified about being acquired from, and returned to, the pool.
Public propertySourceObject
Gets the source object that this pooled object is a clone of.
Top
Methods
  NameDescription
Public methodAddToCache(Component)
Adds a poolable component to the cache.
Public methodAddToCache(IPoolable)
Adds a poolable component to the cache.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodOnAcquire
Informs all poolable components that the object has been acquired from the pool.
Public methodOnRelease
Informs all poolable components that the object has been released back to the pool.
Public methodRefreshCache
Refreshes the cache of poolable components.
Public methodRemoveFromCache(Component)
Removes a poolable component from the cache.
Public methodRemoveFromCache(IPoolable)
Removes a poolable component from the cache.
Public methodToString (Inherited from Object.)
Top
Events
  NameDescription
Public eventDestroyed
Occurs when the PoolableObjectT is destroyed.
Top
See Also