diff --git a/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs b/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs index 864cf7ac..d68bb1a4 100644 --- a/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs +++ b/Assets/FishNet/Runtime/Editor/Configuring/ConfigurationEditor.cs @@ -2,10 +2,10 @@ using FishNet.Editing.PrefabCollectionGenerator; using FishNet.Object; using FishNet.Utility.Extension; -using FishNet.Utility.Performance; using GameKit.Dependencies.Utilities; using System.Collections.Generic; using UnityEditor; +using UnityEditor.SceneManagement; using UnityEngine; using UnityEngine.SceneManagement; @@ -20,7 +20,7 @@ public static void ShowConfiguration() SettingsService.OpenProjectSettings("Project/Fish-Networking/Configuration"); } - } + } public class DeveloperMenu : MonoBehaviour { @@ -103,6 +103,8 @@ private static bool RemoveOrAddDefine(string define, bool removeDefine) } + + public class RebuildSelectedSceneIdsMenu : MonoBehaviour { /// /// Rebuilds sceneIds for open scenes. @@ -111,7 +113,7 @@ public class RebuildSelectedSceneIdsMenu : MonoBehaviour { public static void RebuildSelectedScenesSceneIds() { SceneAsset[] selectedScenes = Selection.GetFiltered(SelectionMode.Assets); - // Debug.Log(selectedScenes.Length); + //Thanks FREEZX for (int i = 0; i < selectedScenes.Length; ++i) { string path = AssetDatabase.GetAssetPath(selectedScenes[i]); Scene scene = EditorSceneManager.OpenScene(path, OpenSceneMode.Single); diff --git a/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs index 871853e8..945a04d1 100644 --- a/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs +++ b/Assets/FishNet/Runtime/Generated/Component/NetworkAnimator/NetworkAnimator.cs @@ -329,19 +329,19 @@ public ParameterDetail(AnimatorControllerParameter controllerParameter, byte typ /// /// All parameter values, excluding triggers. /// - private List _parameterDetails = new(); + private readonly List _parameterDetails = new(); /// /// Last int values. /// - private List _ints = new(); + private readonly List _ints = new(); /// /// Last float values. /// - private List _floats = new(); + private readonly List _floats = new(); /// /// Last bool values. /// - private List _bools = new(); + private readonly List _bools = new(); /// /// Last layer weights. /// @@ -353,11 +353,11 @@ public ParameterDetail(AnimatorControllerParameter controllerParameter, byte typ /// /// Trigger values set by using SetTrigger and ResetTrigger. /// - private List _triggerUpdates = new(); - /// - /// Updates going to clients. - /// - private List _toClientsBuffer = new(); + private readonly List _triggerUpdates = new(); + // /// + // /// Updates going to clients. + // /// + // private List _toClientsBuffer = new(); /// /// Returns if the animator is exist and can be synchronized. /// @@ -365,9 +365,13 @@ private bool _canSynchronizeAnimator { get { - bool enabled = _animator && (_animator.enabled || _synchronizeWhenDisabled); - bool failedChecks = (!_isAnimatorSet || !enabled); - return !failedChecks; + if (!_isAnimatorSet) + return false; + + if (_animator.enabled || _synchronizeWhenDisabled) + return true; + + return false; } } /// @@ -498,14 +502,14 @@ public override void OnStartServer() if (_clientAuthoritative) { _clientAuthoritativeUpdates = new(); - //Expand to clients buffer count to however many buffers can be held. - for (int i = 0; i < ClientAuthoritativeUpdate.MAXIMUM_BUFFER_COUNT; i++) - _toClientsBuffer.Add(new byte[0]); - } - else - { - _toClientsBuffer.Add(new byte[0]); + // //Expand to clients buffer count to however many buffers can be held. + // for (int i = 0; i < ClientAuthoritativeUpdate.MAXIMUM_BUFFER_COUNT; i++) + // _toClientsBuffer.Add(new byte[0]); } + // else + // { + // _toClientsBuffer.Add(new byte[0]); + // } } public override void OnStartClient() diff --git a/Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs b/Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs index a374d7ec..c85c5c08 100644 --- a/Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs +++ b/Assets/FishNet/Runtime/Object/Synchronizing/SyncList.cs @@ -726,8 +726,10 @@ public void Dirty(int index) if (!base.CanNetworkSetValues(true)) return; +// bool asServer = true; T value = Collection[index]; - AddOperation(SyncListOperation.Set, index, value, value); +// if (asServer) + AddOperation(SyncListOperation.Set, index, value, value); } /// /// Sets value at index.