Struct InputEvent
This type can be used inside IInput
Inherited Members
Namespace: Unity.NetCode
Assembly: Unity.NetCode.dll
Syntax
public struct InputEvent
Remarks
When this type is used it's ensured that single input events like jumping or triggers will be properly detected exactly once by the server.
Fields
Count
Track if the event has been set for the current frame.
Declaration
public uint Count
Field Value
Type | Description |
---|---|
uint |
Remarks
This could be higher than 1 when the inputs are sampled multiple times before the input is sent to the server. Also if the input is sampled again before being transmitted the set event will not be overridden to the unset state (count=0).
Properties
IsSet
Returns true when a new input event was detected (last known tick this was unset).
Declaration
public bool IsSet { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Set()
Set or enable the input event for current tick.
Declaration
public void Set()
ToFixedString()
Helper.
Declaration
public FixedString32Bytes ToFixedString()
Returns
Type | Description |
---|---|
Fixed |
'InputEvent[Count]' |