Namespace Netick
Classes
- NetickConfig
Config class for Netick.
- NetworkAnimator
This component is used to replicate Unity Animator parameters and states.
- NetworkBehaviour
Network Behaviour is the base class for all behaviours that need to be networked.
- NetworkInput
Network Input is the base class for classes containing networked user inputs.
- NetworkObject
Any GameObject which needs to be synced/replicated must have a Network Object component. It’s the component that tells Netick a GameObject is networked. Although not every child GameObject needs it, only the root has to have a Network Object.
- NetworkPlayer
Represents a network player, which can be either a local player (representing this sandbox) or a remote connection (representing a connected client)).
- NetworkRigidbody
This component is used to replicate the position and rotation of an object. Therefore, it’s the same as the Network Transform, the difference is that Network Rigidbody must be used if you want to have client-side prediction over PhysX objects since it replicates several other properties necessary for correct prediction.
- NetworkRigidbody2D
This component is used to replicate the position and rotation of an object. Therefore, it’s the same as the Network Transform, the difference is that Network Rigidbody 2D must be used if you want to have client-side prediction over Box2D objects since it replicates several other properties necessary for correct prediction.
- NetworkSandbox
Network Sandbox is what controls the whole network simulation. It can be thought of as the manager of the simulation. You can have more than one network sandbox in a single Unity game, and that happens when you start both a client and a server on the same project. This can be extremely useful for testing/debugging, because it allows you to run a server and a client(or multiple thereof) in the same project and therefore see what happens at both at the same time, without interference.
- NetworkTransform
This component is used to replicate the position and rotation of an object.
- Networked
Use this attribute on any property you want to replicate/sync.
* If this property is a network array, use the parameter "size" to specify the size of the array.
* (compression) If you want set a precision for this property, use the parameter "precision". Only works on Float/Vector3/Vector2/Quaternion.
* (compression) If you want set a maximum value for this property, use the parameter "max". Only works on Int.
* (compression) If you want set a minimum value for this property, use the parameter "min". Only works on Int.
- OnChanged
Use this attribute on a method you want to call when a specific property value changes. Example: [OnChanged(nameof(PropertyName)]
Note: if used on network array, the method should have one parameter to be used as an index. If not used on an array, it should be parameterless.
- Rpc
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.
- SingleInstanceEnforcer
Add this component to a GameObject to ensure only a single instance of it will exist at the same time, across all sandboxes.
- Smooth
Use this attribute on any property you want to interpolate/smooth. And you would automatically get interpolated values when accessing the property in NetRender.
* If you want to always use server data (snapshots) for interpolation, pass true to parameter "serverDataInterpolation"
- nArray
Base class for all networked arrays.
Structs
Interfaces
Enums
- StartMode
Manages Netick and its sandboxes, and is used to start and shut down Netick.