FactorableBehaviour

Base class for poolable MonoBehaviour objects.

Definition

Namespace: Paragon.Core.ScriptableFactory Assembly: Paragon.dll

public abstract class FactorableBehaviour : ParagonBehaviour, IFactorable

Inheritance: ParagonBehaviourFactorableBehaviour Implements: IFactorable

Properties

Property
Type
Description

IsSpawned

bool

Whether currently active

Lifecycle

Instantiate() → OnInstantiate → (inactive, parented to factory)


   Spawn() → OnSpawn → (active, moved to scene)


  Despawn() → OnDespawn → (inactive, parented to factory)


  Destroy() → OnDestroy → (removed from pool)

Virtual Methods

OnInstantiate()

Called when first created. Set up references here.

OnSpawn()

Called when activated from pool. Reset state here.

OnDespawn()

Called when returned to pool. Clean up here.

Example

See Also

Last updated

Was this helpful?