Netick is a state transfer Unity netcode. This TickTimer is inspired by Photon Fusion TickTimer
Please Use this version if your netick version is 0.9.7, otherwise use Netick TickTimer 0.1.0
[Networked] private TickTimer DisableTimer { get; set; }
private void NetworkStart()
{
DisableTimer = TickTimer.CreateFromSeconds(_delay);
}
private void NetworkFixedUpdate()
{
if(DisableTimer.IsExpired(Sandbox))
{
_gameObject.SetActive(false);
_disableTimer = TickTimer.None;
}
}
-
TickTimer
Most recommended way to sync timers -
AuthTickTimer
Usessandbox.AuthoritativeTick
instead ofsandbox.Tick
. Should be used only by waiting for authorative ticks instead of predicted ticks. -
PauseableTickTimer
Can be paused accross network