Skip to content

Commit d77f930

Browse files
committed
Merge branch 'develop' into singleton-removal-network-object
2 parents 2b7aeeb + c876ad9 commit d77f930

File tree

132 files changed

+22116
-783
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+22116
-783
lines changed

.yamato/_triggers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{% metadata_file .yamato/project.metafile %}
22
---
3-
43
develop_nightly_trigger:
54
name: Develop Branch Nightly Trigger
65
triggers:
@@ -20,6 +19,7 @@ develop_nightly_trigger:
2019
pull_request_trigger:
2120
name: Pull Request Trigger on {{ test_editors.first }} (master, develop, & release branches)
2221
dependencies:
22+
- .yamato/project-standards.yml#standards_{{ projects.first.name }}
2323
{% for project in projects -%}
2424
{% for package in project.packages -%}
2525
- .yamato/project-tests.yml#validate_{{ package.name }}_{{ test_platforms.first.name }}_{{ test_editors.first }}

.yamato/project-standards.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
standards_{{ projects.first.name }}:
4+
name: Standards Check {{ projects.first.name }}
5+
agent:
6+
type: Unity::VM
7+
image: desktop/logging-testing-linux:stable
8+
flavor: b1.small
9+
commands:
10+
- dotnet --version
11+
- $HOME/.dotnet/tools/dotnet-format --version
12+
- python3 --version
13+
- pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
14+
- unity-downloader-cli -u {{ test_editors.first }} -c editor --wait --fast
15+
- .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ projects.first.path }} -quit
16+
- ./standards.py --tool-path $HOME/.dotnet/tools/dotnet-format --project-path {{ projects.first.path }} --yamato

com.unity.multiplayer.mlapi/Editor/NetworkManagerEditor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class NetworkManagerEditor : UnityEditor.Editor
3636
private SerializedProperty m_TimeResyncIntervalProperty;
3737
private SerializedProperty m_EnableNetworkVariableProperty;
3838
private SerializedProperty m_EnsureNetworkVariableLengthSafetyProperty;
39-
private SerializedProperty m_ForceSamePrefabsProperty;
39+
private SerializedProperty m_ForceSamePrefabsProperty;
4040
private SerializedProperty m_EnableSceneManagementProperty;
4141
private SerializedProperty m_RecycleNetworkIdsProperty;
4242
private SerializedProperty m_NetworkIdRecycleDelayProperty;
@@ -112,7 +112,7 @@ private void Initialize()
112112
m_EnableTimeResyncProperty = m_NetworkConfigProperty.FindPropertyRelative("EnableTimeResync");
113113
m_TimeResyncIntervalProperty = m_NetworkConfigProperty.FindPropertyRelative("TimeResyncInterval");
114114
m_EnableNetworkVariableProperty = m_NetworkConfigProperty.FindPropertyRelative("EnableNetworkVariable");
115-
m_EnsureNetworkVariableLengthSafetyProperty = m_NetworkConfigProperty.FindPropertyRelative("EnsureNetworkVariableLengthSafety");
115+
m_EnsureNetworkVariableLengthSafetyProperty = m_NetworkConfigProperty.FindPropertyRelative("EnsureNetworkVariableLengthSafety");
116116
m_ForceSamePrefabsProperty = m_NetworkConfigProperty.FindPropertyRelative("ForceSamePrefabs");
117117
m_EnableSceneManagementProperty = m_NetworkConfigProperty.FindPropertyRelative("EnableSceneManagement");
118118
m_RecycleNetworkIdsProperty = m_NetworkConfigProperty.FindPropertyRelative("RecycleNetworkIds");
@@ -133,7 +133,7 @@ private void CheckNullProperties()
133133
m_RunInBackgroundProperty = serializedObject.FindProperty(nameof(NetworkManager.RunInBackground));
134134
m_LogLevelProperty = serializedObject.FindProperty(nameof(NetworkManager.LogLevel));
135135
m_NetworkConfigProperty = serializedObject.FindProperty(nameof(NetworkManager.NetworkConfig));
136-
136+
137137
// NetworkConfig properties
138138
m_PlayerPrefabProperty = m_NetworkConfigProperty.FindPropertyRelative(nameof(NetworkConfig.PlayerPrefab));
139139
m_ProtocolVersionProperty = m_NetworkConfigProperty.FindPropertyRelative("ProtocolVersion");

com.unity.multiplayer.mlapi/Runtime/Core/NetworkBehaviour.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,6 @@ public virtual void OnGainedOwnership() { }
385385
/// </summary>
386386
public virtual void OnLostOwnership() { }
387387

388-
#region NetworkVariable
389-
390388
private bool m_VarInit = false;
391389

392390
private readonly List<HashSet<int>> m_ChannelMappedNetworkVariableIndexes = new List<HashSet<int>>();
@@ -999,8 +997,6 @@ internal static void SetNetworkVariableData(List<INetworkVariable> networkVariab
999997
}
1000998
}
1001999

1002-
#endregion
1003-
10041000
/// <summary>
10051001
/// Gets the local instance of a object with a given NetworkId
10061002
/// </summary>

com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,8 +1154,6 @@ internal void HandleIncomingData(ulong clientId, NetworkChannel networkChannel,
11541154
return;
11551155
}
11561156

1157-
#region INTERNAL MESSAGE
1158-
11591157
switch (messageType)
11601158
{
11611159
case NetworkConstants.CONNECTION_REQUEST:
@@ -1312,8 +1310,6 @@ internal void HandleIncomingData(ulong clientId, NetworkChannel networkChannel,
13121310
break;
13131311
}
13141312

1315-
#endregion
1316-
13171313
#if !UNITY_2020_2_OR_NEWER
13181314
NetworkProfiler.EndEvent();
13191315
#endif

com.unity.multiplayer.mlapi/Runtime/Messaging/CustomMessageManager.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ internal CustomMessagingManager(NetworkManager networkManager)
2323
m_NetworkManager = networkManager;
2424
}
2525

26-
#region Unnamed
27-
2826
/// <summary>
2927
/// Delegate used for incoming unnamed messages
3028
/// </summary>
@@ -73,10 +71,6 @@ public void SendUnnamedMessage(ulong clientId, NetworkBuffer buffer, NetworkChan
7371
PerformanceDataManager.Increment(ProfilerConstants.UnnamedMessageSent);
7472
}
7573

76-
#endregion
77-
78-
#region Named
79-
8074
/// <summary>
8175
/// Delegate used to handle named messages
8276
/// </summary>
@@ -215,7 +209,5 @@ public void SendNamedMessage(string name, List<ulong> clientIds, Stream stream,
215209
PerformanceDataManager.Increment(ProfilerConstants.NamedMessageSent);
216210
}
217211
}
218-
219-
#endregion
220212
}
221213
}

com.unity.multiplayer.mlapi/Runtime/Spawning/NetworkSpawnManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ internal NetworkObject CreateLocalNetworkObject(bool softCreate, uint prefabHash
196196
{
197197
// See if there is a valid registered NetworkPrefabOverrideLink associated with the provided prefabHash
198198
GameObject networkPrefabReference = null;
199-
if(NetworkManager.NetworkConfig.NetworkPrefabOverrideLinks.ContainsKey(prefabHash))
199+
if (NetworkManager.NetworkConfig.NetworkPrefabOverrideLinks.ContainsKey(prefabHash))
200200
{
201201
switch (NetworkManager.NetworkConfig.NetworkPrefabOverrideLinks[prefabHash].Override)
202202
{

com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerMessageSenderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void MessageSenderAssigned()
2121
networkManager.NetworkConfig = new NetworkConfig()
2222
{
2323
// Set the current scene to prevent unexpected log messages which would trigger a failure
24-
RegisteredScenes = new List<string>() {SceneManager.GetActiveScene().name}
24+
RegisteredScenes = new List<string>() { SceneManager.GetActiveScene().name }
2525
};
2626

2727
// Set dummy transport that does nothing

com.unity.multiplayer.mlapi/Tests/Editor/NetworkManagerSceneManagerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void SceneManagerAssigned()
2121
networkManager.NetworkConfig = new NetworkConfig()
2222
{
2323
// Set the current scene to prevent unexpected log messages which would trigger a failure
24-
RegisteredScenes = new List<string>() {SceneManager.GetActiveScene().name}
24+
RegisteredScenes = new List<string>() { SceneManager.GetActiveScene().name }
2525
};
2626

2727
// Set dummy transport that does nothing

com.unity.multiplayer.mlapi/Tests/Runtime/NetworkManagerHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static bool StartNetworkManager(out NetworkManager networkManager, Networ
7575
NetworkManagerObject.NetworkConfig = new Configuration.NetworkConfig
7676
{
7777
EnableSceneManagement = false,
78-
RegisteredScenes = new List<string>(){SceneManager.GetActiveScene().name}
78+
RegisteredScenes = new List<string>() { SceneManager.GetActiveScene().name }
7979
};
8080
unetTransport.ConnectAddress = "127.0.0.1";
8181
unetTransport.ConnectPort = 7777;

0 commit comments

Comments
 (0)