Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Entity Identifiers

proepkes edited this page Feb 15, 2019 · 3 revisions

There exist two different 'types' of entities in the game-context:

  1. Backup-Entity - used for rollbacks. These entities have a 'Backup'-Component.
  2. Game-Entity - the actual entities in the game that are rendered etc. These entities have the 'LocalId'-Component

A Game-Entity has a total of three ID-Components:

  1. LocalId: This ID is a primary key for every "active" entity in the game. It must only be used to reference entities in the local simulation. It is NOT synchronized for anyone else. For example: this ID is used by Backup-entities to store a reference to it's owner. It can also be used from external services to keep a reference to a game-entity

  2. ActorID + ID: In UNET this would be the 'NetworkID'. It's a composite key of the actor that spawned the entity and a per-actor-unique ID. If, for example, you want to send a selection-command to other players, you'll have to use the ID-field. The framework will add the player's ActorID automatically to the command.

Clone this wiki locally