Skip to main content

ServerSpawnManager

A class in Root.Township, Alta.Networking.

The server's spawn manager: spawns entities with new identifiers and destroys them.

Constructors​

MemberWhat it is
ServerSpawnManager(NetworkScene networkScene, ILinkProvider linkProvider)Creates a ServerSpawnManager from networkScene and linkProvider.

Methods​

MemberWhat it is
override void Destroy(NetworkEntity entity, bool isUnload)Prepares the entity for destruction and destroys it locally.
override bool SpawnAsClient(uint prefabHash, uint entityIdentifier, uint[] embeddedIdentifiers, TransformSave transformSave, bool isSettingScale, out NetworkEntity entity)Not used on the server: returns the existing entity if there is one, always returning false.
override void SpawnExisting(NetworkPrefab prefab)Registers an existing prefab instance with a new identifier.
override NetworkEntity SpawnInternal(uint prefabHash)Spawns a prefab by hash with a new identifier.
override bool WaitForSpawn(uint entityIdentifier, EntitySpawnedHandler handler)Runs the handler now if the entity exists; otherwise the handler is dropped. Always returns false.