INetworkEntity
An interface in Root.Township, Alta.Networking.
The core of a networked entity as seen by the networking code. NetworkEntity implements it.
- Listed in Networking and servers
- Derived types
NetworkEntity,IPlayer,Player
Properties
| Member | What it is |
|---|---|
uint Identifier { get; } | The entity's network identifier. |
bool IsBeingDestroyed { get; set; } | True once destruction has started. |
bool IsSendingMessages { get; set; } | Whether the entity sends its messages. |
EntityMessageHandler MessageHandler { get; } | Handles the entity's messages by EntityMessageType. |
IEnumerable<IPlayer> PlayersSpawnedFor { get; } | Players this entity has been spawned for. |
Chunk PositionChunk { get; } | The chunk its position is written against: the chunking parent's chunk, or its own. |
NetworkPrefab Prefab { get; } | The entity's network prefab. |
string SafeName { get; } | A name for logs that works even if the object is destroyed. |
SpawnIndex SpawnIndex { get; } | Spawn counter used to ignore stale destroy messages. |
Transform Transform { get; } | The entity's transform. |
Events
| Member | What it is |
|---|---|
event EntityDespawnedHandler DestroyedByScene | Raised when the scene destroys or unloads the entity. |
Methods
| Member | What it is |
|---|---|
void OnDestroyedByScene(bool isUnload) | Called when the scene destroys the entity; the flag says if it is an unload. |
AltaCoroutine StartCoroutine(IEnumerator enumerator) | Starts a coroutine tied to the entity. |
Used in
Members of other types that take, return or hold a INetworkEntity:
Chunk.SerializeEntityPosition, BaseSync.BaseSync, BaseSync.entity, ClientSync.ClientSync, EntityMessageHandler.entity, EntityMessageHandler.EntityMessageHandler, InternalMessage.SendToPlayers, InternalMessage.SendToServer, MethodSync.MethodSync, SceneEntityMessage.entity, SceneEntityMessage.Entity, SceneEntityMessage.Set, ServerSync.ServerSync, SpawnManager.DestroyChildPrefabs, SpawnManager.DestroyLocal, SpawnManager.EmptyNetworkEntityLink, Sync.entity, Sync.Sync, SyncFactory.Create.