/// <summary> /// 네트워크를 처리함. 유니티의 FixedUpdate 에서 반드시 호출해주세요. /// </summary> /// <param name="unscaledDeltaTime">유니티의 Time.unscaledDeltaTime</param> public void FixedUpdate(float unscaledDeltaTime) { Update((int)(unscaledDeltaTime * 1000f)); _views.Update(unscaledDeltaTime); _syncElapsedTime += unscaledDeltaTime; if (_syncElapsedTime >= SyncInterval) { _syncElapsedTime = 0f; OnViewPeriodicSyncSerialize(); } }
protected override void FixedUpdate() { base.FixedUpdate(); _views.Update(Time.deltaTime); _syncElapsedTime += Time.deltaTime; if (_syncElapsedTime >= _syncInterval) { _syncElapsedTime = 0f; OnViewPeriodicSyncSerialize(); } }