Table of Contents

Class NetickConfig

Namespace
Netick
Assembly
Netick.dll

Config class for Netick.

public class NetickConfig : ScriptableObject
Inheritance
Object
ScriptableObject
NetickConfig
Inherited Members
ScriptableObject.SetDirty()
ScriptableObject.CreateInstance<T>()
Object.GetInstanceID()
Object.GetHashCode()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectOfType<T>()
Object.ToString()
Object.name
Object.hideFlags

Constructors

NetickConfig()

public NetickConfig()

Fields

AoI

[HideInInspector]
public bool AoI

Field Value

bool

Assemblies

[SerializeField]
public List<string> Assemblies

Field Value

List<string>

CallRenderInHeadless

[Tooltip("Disable this if you want Netick to not invoke Network Render (and thus not calculate interpolation) callbacks in headless builds.")]
public bool CallRenderInHeadless

Field Value

bool

CellSize

[HideInInspector]
public int CellSize

Field Value

int

ClientDivisor

[Range(1, 5)]
[SerializeField]
public int ClientDivisor

Field Value

int

EnableLagCompensation

[Tooltip("Enable this if you want to use the Lag Compensation module.")]
[HideInInspector]
public bool EnableLagCompensation

Field Value

bool

EnableLogging

[Tooltip("Disable this before doing a production build because you don't want Netick to log to the console.")]
public bool EnableLogging

Field Value

bool

InputRedundancy

[Tooltip("This makes Netick pack all unconfirmed inputs (that can be packed in a single packet), thus usually sending duplicate inputs to the server, which is very useful when packet loss occurs because each packet not only has the newest input but also previous potentially-lost inputs. On by default. \n\nWhile programming your game, it's recommended from time to time to disable it and increase the simulated client packet loss (below) to test how robust your Client-Side Prediction logic is.")]
public bool InputRedundancy

Field Value

bool

LAN_DISCOVERY

public const ulong LAN_DISCOVERY = 17392885680301928799

Field Value

ulong

LAN_DISCOVERY_RESPONSE

public const ulong LAN_DISCOVERY_RESPONSE = 1251984615806071114

Field Value

ulong

LagCompensationDebug

[HideInInspector]
public bool LagCompensationDebug

Field Value

bool

MaxPacketsPerUpdate

[Tooltip("Max number of packets per client that can be sent in a single tick/network simulation step.")]
[SerializeField]
[Range(1, 10)]
public int MaxPacketsPerUpdate

Field Value

int

MaxPredicatedTicks

[Tooltip("Max number of ticks the client is allowed to predict.")]
[Range(1, 100)]
public int MaxPredicatedTicks

Field Value

int

PhysicsType

[Tooltip("Type of the physics scene. If you choose None, Netick will not step the simulation. If you want to use Box2D physics (Rigidbody 2D) select Physics 2D. Or if you want to use NVIDIA PhysX (Rigidbody), select 3D Physics.")]
public PhysicsType PhysicsType

Field Value

PhysicsType

PredictedClientPhysics

[Tooltip("Enable this if you want to be able to have client-side prediction over Rigidbody objects. \n\nIt's recommended to keep this disabled if you don't have any predictable rigidbody objects in your game, because it comes at a performance hit due to calling the physics system Simulate method several times per tick.")]
[SerializeField]
public bool PredictedClientPhysics

Field Value

bool

RenderInvokeOrder

[Tooltip("Choose the place where Network Render will be invoked. Update means it will be invoked after all Netick NetworkUpdate callbacks, but before any of Unity LateUpdate callbacks. LateUpdate means it will be invoked after all Unity Update callbacks and all Netick NetworkUpdate callbacks. ")]
public NetworkRenderInvokeOrder RenderInvokeOrder

Field Value

NetworkRenderInvokeOrder

ServerDivisor

[Range(1, 5)]
[SerializeField]
public int ServerDivisor

Field Value

int

SimClientLoss

[Tooltip("Simulated client outward packet loss.")]
[HideInInspector]
public float SimClientLoss

Field Value

float

SimServerLoss

[Tooltip("Simulated server outward packet loss.")]
[HideInInspector]
public float SimServerLoss

Field Value

float

TickRate

[HideInInspector]
[Tooltip("Network simulation rate. It's the inverse of TickPeriod (which is the same as UnityEngine.Time.fixedDeltaTime). To change it, go to Project Settings -> Time -> FixedTimestep. Must not be changed at runtime.")]
public float TickRate

Field Value

float

UseSceneSwitchThread

[HideInInspector]
public bool UseSceneSwitchThread

Field Value

bool

WorldSize

[HideInInspector]
public int WorldSize

Field Value

int

Properties

GetMaxPlayers

public int GetMaxPlayers { get; }

Property Value

int

TickPeriod

[Tooltip("Time period between network simulation steps. Same as UnityEngine.Time.fixedDeltaTime")]
public float TickPeriod { get; }

Property Value

float

Methods

GetTransport()

public NetworkTransport GetTransport()

Returns

NetworkTransport