interface IServerAuthoritativeSpawner (Niantic.ARDK.Networking.ARSim.Spawning.IServerAuthoritativeSpawner)

Overview

Interface for a server authoritative spawner. Raises events when an object is spawned or despawned, and should handle all internal logic related to spawning/despawning. More…

interface IServerAuthoritativeSpawner: IDisposable {
    // events

    event DidSpawnObject();
    event WillDespawnObject();

    // methods

    void LoadPrefabManifest(IAddressablePrefabManifest manifest);
    void SetGameObjectInstantiator(IGameObjectInstantiator instantiator);
    void Spawn(ServerAuthoritativeSpawnerBase.ServerSpawnParams spawnParams);
};

// direct descendants

class ServerAuthoritativeSpawnerBase;

Detailed Documentation

Interface for a server authoritative spawner. Raises events when an object is spawned or despawned, and should handle all internal logic related to spawning/despawning.

Note

Currently in internal development, and not useable

Methods

void SetGameObjectInstantiator(IGameObjectInstantiator instantiator)

Set the instantiator that the spawner will use to create gameobjects. Different IGameObjectInstantiators can be implemented to use custom spawning behaviour, such as dependency injection or object pooling.

Parameters:

instantiator