// IMPORTANT: set script execution order to >1000 to call Transport's // LateUpdate after all others. Fixes race condition where // e.g. in uSurvival Transport would apply Cmds before // ShoulderRotation.LateUpdate, resulting in projectile // spawns at the point before shoulder rotation. public void LateUpdate() { // note: we need to check enabled in case we set it to false // when LateUpdate already started. // (https://github.com/vis2k/Mirror/pull/379) if (!enabled) { return; } server.Tick(); client.Tick(); }
// IMPORTANT: set script execution order to >1000 to call Transport's // LateUpdate after all others. Fixes race condition where // e.g. in uSurvival Transport would apply Cmds before // ShoulderRotation.LateUpdate, resulting in projectile // spawns at the point before shoulder rotation. public void LateUpdate() { // scene change messages disable transports to stop them from // processing while changing the scene. // -> we need to check enabled here // -> and in kcp's internal loops, see Awake() OnCheckEnabled setup! // (see also: https://github.com/vis2k/Mirror/pull/379) if (!enabled) { return; } server.Tick(); client.Tick(); }