INetworkEntityBehaviour
An interface in Root.Township, Alta.Networking.
Implement on a component of a NetworkEntity prefab to get the entity's network lifecycle calls (initialise, server spawn, player connect and disconnect).
- Listed in Networking and servers
- Derived types
FixedImpactor,ImpactDetector,Agent,Babu,GreaterGotera,IAgent,IInteractAgent,Spriggull,RejectDockArea,LandmarkManager,NetworkColliderGroup,NetworkEntityBehaviour,NetworkPrefab,FlyCamPlayer,HandGestureController,MovingPlatform,NetworkedIKBody,PracticeObjectFader,StaticGenerationParent,TwoStepLever
Properties
| Member | What it is |
|---|---|
NetworkEntity Entity { get; } | The entity this behaviour belongs to. |
Methods
| Member | What it is |
|---|---|
void Initialize() | Called on both sides when the entity is set up for networking. Create your message syncs here. |
void InitializeAsServer(SpawnData spawnData) | Server: called when the entity is first spawned, with the spawn data. |
void OnConnected(Player player) | Called when a player starts receiving this entity. |
void OnDisconnected(Player player) | Called when a player stops receiving this entity. |