diff --git a/Assets/Mirror/Editor/NetworkBehaviourInspector.cs b/Assets/Mirror/Editor/NetworkBehaviourInspector.cs index 74fef2b2d..228dfdb4d 100644 --- a/Assets/Mirror/Editor/NetworkBehaviourInspector.cs +++ b/Assets/Mirror/Editor/NetworkBehaviourInspector.cs @@ -107,8 +107,8 @@ protected void DrawDefaultSyncSettings() } public class SyncListDrawer { - private readonly UnityEngine.Object targetObject; - private readonly List syncListFields; + readonly UnityEngine.Object targetObject; + readonly List syncListFields; public SyncListDrawer(UnityEngine.Object targetObject) { diff --git a/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs b/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs index 8a9555f0b..d15653b84 100644 --- a/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs +++ b/Assets/Mirror/Editor/Weaver/CompilationFinishedHook.cs @@ -159,7 +159,7 @@ static void OnCompilationFinished(string assemblyPath, CompilerMessage[] message } } - private static HashSet GetDependecyPaths(string assemblyPath) + static HashSet GetDependecyPaths(string assemblyPath) { // build directory list for later asm/symbol resolving using CompilationPipeline refs HashSet dependencyPaths = new HashSet(); diff --git a/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs index d952d591b..82ba84b17 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/MessageClassProcessor.cs @@ -91,7 +91,7 @@ static void GenerateSerialization(TypeDefinition td) } } - private static void CallWriter(ILProcessor serWorker, FieldDefinition field) + static void CallWriter(ILProcessor serWorker, FieldDefinition field) { MethodReference writeFunc = Writers.GetWriteFunc(field.FieldType); if (writeFunc != null) @@ -107,7 +107,7 @@ private static void CallWriter(ILProcessor serWorker, FieldDefinition field) } } - private static void CallBase(TypeDefinition td, ILProcessor serWorker, string name) + static void CallBase(TypeDefinition td, ILProcessor serWorker, string name) { MethodReference method = Resolvers.ResolveMethodInParents(td.BaseType, Weaver.CurrentAssembly, name); if (method != null) @@ -172,7 +172,7 @@ static void GenerateDeSerialization(TypeDefinition td) } } - private static void CallReader(ILProcessor serWorker, FieldDefinition field) + static void CallReader(ILProcessor serWorker, FieldDefinition field) { MethodReference readerFunc = Readers.GetReadFunc(field.FieldType); if (readerFunc != null) diff --git a/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs b/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs index e1fb158bb..9901e0df7 100644 --- a/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs +++ b/Assets/Mirror/Editor/Weaver/Processors/SyncVarProcessor.cs @@ -26,7 +26,7 @@ public static MethodDefinition GetHookMethod(TypeDefinition td, FieldDefinition return GetHookMethod(td, syncVar, hookFunctionName); } - private static MethodDefinition GetHookMethod(TypeDefinition td, FieldDefinition syncVar, string hookFunctionName) + static MethodDefinition GetHookMethod(TypeDefinition td, FieldDefinition syncVar, string hookFunctionName) { MethodDefinition m = td.GetMethod(hookFunctionName); if (m != null) diff --git a/Assets/Mirror/Editor/Weaver/Readers.cs b/Assets/Mirror/Editor/Weaver/Readers.cs index 2a8d529f5..8f48d4ac0 100644 --- a/Assets/Mirror/Editor/Weaver/Readers.cs +++ b/Assets/Mirror/Editor/Weaver/Readers.cs @@ -340,7 +340,7 @@ static MethodDefinition GenerateClassOrStructReadFunction(TypeReference variable } // Initialize the local variable with a new instance - private static void CreateNew(TypeReference variable, ILProcessor worker, TypeDefinition td) + static void CreateNew(TypeReference variable, ILProcessor worker, TypeDefinition td) { if (variable.IsValueType) { @@ -373,7 +373,7 @@ private static void CreateNew(TypeReference variable, ILProcessor worker, TypeDe } } - private static void DeserializeFields(TypeReference variable, int recursionCount, ILProcessor worker) + static void DeserializeFields(TypeReference variable, int recursionCount, ILProcessor worker) { uint fields = 0; foreach (FieldDefinition field in variable.Resolve().Fields) diff --git a/Assets/Mirror/Editor/Weaver/Weaver.cs b/Assets/Mirror/Editor/Weaver/Weaver.cs index a247924af..a55792521 100644 --- a/Assets/Mirror/Editor/Weaver/Weaver.cs +++ b/Assets/Mirror/Editor/Weaver/Weaver.cs @@ -526,7 +526,7 @@ static bool Weave(string assName, IEnumerable dependencies, string unity return true; } - private static bool WeaveModule(ModuleDefinition moduleDefinition) + static bool WeaveModule(ModuleDefinition moduleDefinition) { try { diff --git a/Assets/Mirror/Examples/Chat/Scripts/ChatNetworkManager.cs b/Assets/Mirror/Examples/Chat/Scripts/ChatNetworkManager.cs index b362c671f..d4a836125 100644 --- a/Assets/Mirror/Examples/Chat/Scripts/ChatNetworkManager.cs +++ b/Assets/Mirror/Examples/Chat/Scripts/ChatNetworkManager.cs @@ -33,7 +33,7 @@ public override void OnClientConnect(NetworkConnection conn) conn.Send(new CreatePlayerMessage { name = PlayerName }); } - private void OnCreatePlayer(NetworkConnection connection, CreatePlayerMessage createPlayerMessage) + void OnCreatePlayer(NetworkConnection connection, CreatePlayerMessage createPlayerMessage) { // create a gameobject using the name supplied by client GameObject playergo = Instantiate(playerPrefab); diff --git a/Assets/Mirror/Examples/Chat/Scripts/ChatWindow.cs b/Assets/Mirror/Examples/Chat/Scripts/ChatWindow.cs index 343ee2b2f..a04428f34 100644 --- a/Assets/Mirror/Examples/Chat/Scripts/ChatWindow.cs +++ b/Assets/Mirror/Examples/Chat/Scripts/ChatWindow.cs @@ -15,7 +15,7 @@ public void Awake() Player.OnMessage += OnPlayerMessage; } - private void OnPlayerMessage(Player player, string message) + void OnPlayerMessage(Player player, string message) { string prettyMessage = player.isLocalPlayer ? $"{player.playerName}: {message}" : diff --git a/Assets/Mirror/Tests/Editor/NetworkMatchCheckerTest.cs b/Assets/Mirror/Tests/Editor/NetworkMatchCheckerTest.cs index d030c4ae3..e591f9070 100644 --- a/Assets/Mirror/Tests/Editor/NetworkMatchCheckerTest.cs +++ b/Assets/Mirror/Tests/Editor/NetworkMatchCheckerTest.cs @@ -8,17 +8,17 @@ namespace Mirror.Tests { public class NetworkMatchCheckerTest { - private GameObject player1; - private GameObject player2; - private GameObject player3; - private NetworkMatchChecker player1MatchChecker; - private NetworkMatchChecker player2MatchChecker; - private NetworkConnection player1Connection; - private NetworkConnection player2Connection; - private NetworkConnection player3Connection; - private GameObject transportGO; + GameObject player1; + GameObject player2; + GameObject player3; + NetworkMatchChecker player1MatchChecker; + NetworkMatchChecker player2MatchChecker; + NetworkConnection player1Connection; + NetworkConnection player2Connection; + NetworkConnection player3Connection; + GameObject transportGO; static int nextConnectionId; - private Dictionary> matchPlayers; + Dictionary> matchPlayers; [SetUp] public void Setup() @@ -41,7 +41,7 @@ public void Setup() matchPlayers = g; } - private static Dictionary> GetMatchPlayersDictionary() + static Dictionary> GetMatchPlayersDictionary() { Type type = typeof(NetworkMatchChecker); FieldInfo fieldInfo = type.GetField("matchPlayers", BindingFlags.Static | BindingFlags.NonPublic); diff --git a/Assets/Mirror/Tests/Editor/SyncVarVirtualTest.cs b/Assets/Mirror/Tests/Editor/SyncVarVirtualTest.cs index 63dcdb4a8..a00695c45 100644 --- a/Assets/Mirror/Tests/Editor/SyncVarVirtualTest.cs +++ b/Assets/Mirror/Tests/Editor/SyncVarVirtualTest.cs @@ -47,10 +47,10 @@ public override void onValue2Changed(float old, float newValue) [TestFixture] public class SyncVarVirtualTest { - private SyncVarHookTester serverTester; - private NetworkIdentity netIdServer; - private SyncVarHookTester clientTester; - private NetworkIdentity netIdClient; + SyncVarHookTester serverTester; + NetworkIdentity netIdServer; + SyncVarHookTester clientTester; + NetworkIdentity netIdClient; [SetUp] public void Setup() @@ -71,7 +71,7 @@ public void Setup() SyncValuesWithClient(); } - private void SyncValuesWithClient() + void SyncValuesWithClient() { // serialize all the data as we would for the network NetworkWriter ownerWriter = new NetworkWriter(); diff --git a/Assets/Mirror/Tests/Performance/Editor/NetworkIdentityPerformanceWithMultipleBehaviour.cs b/Assets/Mirror/Tests/Performance/Editor/NetworkIdentityPerformanceWithMultipleBehaviour.cs index 56be901b7..2f747a970 100644 --- a/Assets/Mirror/Tests/Performance/Editor/NetworkIdentityPerformanceWithMultipleBehaviour.cs +++ b/Assets/Mirror/Tests/Performance/Editor/NetworkIdentityPerformanceWithMultipleBehaviour.cs @@ -9,7 +9,7 @@ namespace Mirror.Tests.Performance [Category("Benchmark")] public class NetworkIdentityPerformanceWithMultipleBehaviour { - private const int healthCount = 32; + const int healthCount = 32; GameObject gameObject; NetworkIdentity identity; Health[] health;