Runtime Spawner 1.5.0
Generic Runtime spawn and instance pooling system for spawning random AI agents around a map. Works with ANY AI system easily.
Loading...
Searching...
No Matches
MegaCrush.Spawner.ObjectFactoryAsset Class Referenceabstract

Base class for factory assets that produce IObjectFactory instances at runtime. More...

Inheritance diagram for MegaCrush.Spawner.ObjectFactoryAsset:
MegaCrush.Spawner.FusionAdapter.FusionFactoryAsset MegaCrush.Spawner.PUNFactoryAsset MegaCrush.Spawner.SinglePlayerPoolFactoryAsset

Public Member Functions

IObjectFactory Create ()
 Creates and returns a new IObjectFactory instance.
 

Detailed Description

Base class for factory assets that produce IObjectFactory instances at runtime.

This abstract ScriptableObject serves as a bridge between the Unity editor and runtime spawning systems. Derived classes implement Create to return a concrete IObjectFactory—for example, a pooled factory, a Photon PUN factory, or a Fusion-backed factory.

These assets are typically referenced by the RuntimeSpawner or SpawnProfile, allowing project-wide spawn configuration without hardcoding factory types into scenes.

Implementations should validate any required dependencies (e.g., active runner, pool adapters) inside Create and log meaningful errors if the factory cannot be constructed.

Member Function Documentation

◆ Create()

IObjectFactory MegaCrush.Spawner.ObjectFactoryAsset.Create ( )
abstract

Creates and returns a new IObjectFactory instance.

Returns
A fully configured IObjectFactory ready to handle spawn requests. Implementations may return null if initialization fails.

The documentation for this class was generated from the following file: