Netick
-------------------------------
A snapshot of the state of a collection. Note this must not be used outside the scope of an OnChanged call or a NetworkRender call.
A networked collection.
Implements this to inform Netick about the size (in 32 bit words) of your connection meta data.
Implements this to inform Netick about the size (in 32 bit words) of your entity meta data.
This is called when a new entity has been added to the simulation.
This is called when an entity has been removed from the simulation.
This is called when an unliked entity has been removed from the simulation.
This is used to populate the user meta data for an entity.
This method is called on the client when it receives new entity meta data. This must be used to create/setup network entities on the client. It can be called many times not only when the data has changed.
Note: user entity meta data can be used for custom user data that might be used in creating entities.
This is called before sending packets to the target connection.
This is called when a full packet has been received.
A script which can be added to Netick internal simulation loop.
Used to initialize the user script and assign Engine.
Called when this script has been added to the simulation.
Called when this script has been removed from the simulation.
Called every frame. Executed before NetworkFixedUpdate.
Called every fixed-time network update/tick. Any changes/updates to the network state must happen here.
On the client, if you are the Input Source or if this Entity.PredictionMode is set to None, it will be called several times in one update/tick during resimulations. To check for resimulations, use [].
Called every frame. Executed after NetworkUpdate and NetworkFixedUpdate.
A network scripts which can have networked properties and rpcs.
Used to initialize the user entity and assign Engine and Entity
Returns true if this OnChanged callback is due to a mismatch between the state of this variable before rollback, and the state after rollback and resimulation.
Gets a snapshot of the previous state of a NetworkDictionary collection.
Gets a snapshot of the previous state of a NetworkHashSet collection.
Gets a snapshot of the previous state of a NetworkLinkedList collection.
Gets a snapshot of the previous state of a NetworkQueue collection.
Gets a snapshot of the previous state of a NetworkStack collection.
Gets previous value for the changed network property.
Note: this must only be used with non-array network properties. For arrays, use instead.
Gets a pointer to the previous value
Gets the index of the changed element of the array.
Gets the value of the changed element of the array. This is an unsafe method, use it carefully and make sure to never go outside range to avoid a crash.
Gets the index of the changed element of the array.
A snapshot of the state of a collection. Note this must not be used outside the scope of an OnChanged call or a NetworkRender call.
A networked collection.
A struct that is used to obtain interpolation data for a network property.
Tries to obtain interpolation data for this frame.
Returns true if there was interpolation data for this frame.
Tries to obtain interpolation data for this frame. This is the array version.
Returns true if there was interpolation data for this frame.
A class representing an abstract interpolation interface, which is implemented by and
A class representing the local interpolation of this instance . This should be used whenever you want to use Predicted Timeline on the client.
Time in seconds.
A class representing the remote interpolation of this instance . This should be used whenever you want to use Remote Timeline on the client.
Interpolation time in seconds.
Time in seconds.
Interpolation time in seconds.
Time in seconds.
Internal method. Never call this.
Internal method. Never call this.
Internal method. Never call this.
Internal method. Never call this.
A rolling sequence counter for ordering values. Repeats indefinitely
with 1022 possible unique values (0 is treated as invalid internally).
Consumes 10 bits when encoded for transmission.
A snapshot of the state of a collection. Note this must not be used outside the scope of an OnChanged call or a NetworkRender call.
A networked collection.
A snapshot of the state of a collection. Note this must not be used outside the scope of an OnChanged call or a NetworkRender call.
A networked collection.
Constructs a NotServerException
Constructs a NotServerException with a message
The exception message
Constructs a NotServerException with a message and a inner exception
The exception message
The inner exception
Constructs a NotClientException
Constructs a NotClientException with a message
The exception message
Constructs a NotClientException with a message and a inner exception
The exception message
The inner exception
Constructs a BadPacketException
A snapshot of the state of a collection. Note this must not be used outside the scope of an OnChanged call or a NetworkRender call.
A networked linked list collection. This is an ordered list meaning that the elements insertion order is maintained when iterating through the collection.
----------------------------------------------------
Represents a network player, which can be either a local player (representing this sandbox) or a remote connection (representing a connected client)).
The networked index of this player.
Note: it returns -1 on the client for the local player when not connected to a server.
Note: the server player always has Id 0.
Use this to associate an object with this player.
A list containing all connected clients currently.
Note: if you want the clients + the server, use .
A list containing all connected clients currently, in addition to the server.
Note: if you only want the clients, use .
[Client Only] The of the server you are connected to. Returns null if you are not connected to any server, or if you are the server.
[Client Only] Returns true if this client is currently connected to a server.
Time period between simulation ticks.
Returns true if we are currently resimulating a previous input/tick of the past. On the server, it always returns false since only the clients resimulate.
Incoming data in kilobytes per second (KBps).
Outgoing data in kilobytes per second (KBps).
[Client Only] Interpolation delay in seconds.
[Client Only] The round-trip time (RTT) of the client in seconds.
[Client Only] Disconnects this client from the server.
Update Netick's logic.
Call this to invoke NetworkRender on simulated entities. This might not be needed if you are running a headless build.
Attachs a to the simulation.
Deattachs a from the simulation.
Sends data to this connection.
Note: the low-level transport must implement for this method to have an effect.
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------
-------------------------------- -------------------------------- -------------------------------- --------------------------------
-------------------------------- -------------------------------- -------------------------------- --------------------------------
A snapshot of the state of a collection. Note this must not be used outside the scope of an OnChanged call or a NetworkRender call.
A networked list collection. This is an unordered list meaning that the order of the elements during iteration is undefined.
Use this attribute on a method you want to call when a specific property value changes. Example: [OnChanged(nameof(PropertyName)]
Use this attribute on any method you want to make an RPC. Should have the return type of void, and not be static.
* Use the parameter "source" to specify who is allowed to send this RPC.
* Use the parameter "target" to specify who is allowed to receive and execute this RPC.
* Use the parameter "isReliable" to specify if this Rpc should be reliable or not, meaning it won't be lost (due to packet loss).
* Use the parameter "localInvoke" to specify if this Rpc should be executed on the machine it was called from.