Skip to content

Commit 8619b33

Browse files
Merge pull request #623 from Unity-Technologies/tmp/release-to-develop-mergeback
chore: merge release0.1.0 back to mainline, pt 2
2 parents c81cf51 + ef830ab commit 8619b33

36 files changed

+648
-390
lines changed

.yamato/project-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ publish_{{ project.name }}_{{ package.name }}:
1010
flavor: b1.large
1111
commands:
1212
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
13-
- upm-ci package publish --package-path {{ package.path }} --dry-run
13+
- upm-ci package publish --package-path {{ package.path }}
1414
artifacts:
1515
artifacts:
1616
paths:

.yamato/project.metafile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Editors where tests will happen. The first entry of this array is also used
2-
# for validation
2+
# for validation.
3+
#
4+
# Therefore, **do not** put an older V1-lifecycle ver.
5+
# like 2020.x or 2019.x on top of 'test_editors'
36
test_editors:
47
- 2021.1
8+
- 2021.2
9+
- 2020.3
510
- 2019.4
611
- trunk
712

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace UnityEditor
88
{
99
public class MLAPIProfiler : EditorWindow
1010
{
11-
#if !UNITY_2020_2_OR_LATER
11+
#if !UNITY_2020_2_OR_NEWER
1212
[MenuItem("Window/MLAPI Profiler")]
1313
public static void ShowWindow()
1414
{
@@ -358,4 +358,4 @@ private GUIStyle GetStyleWithTextAlpha(GUIStyle style, float alpha)
358358
return newStyle;
359359
}
360360
}
361-
}
361+
}

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

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ internal static class MLAPIProfilerModule
2121
[Serializable]
2222
private class MLAPIProfilerCounter
2323
{
24+
// Note: These fields are named this way for internal serialization
2425
public string m_Name;
2526
public string m_Category;
2627
}
@@ -31,6 +32,7 @@ private class MLAPIProfilerCounter
3132
[Serializable]
3233
private class MLAPIProfilerModuleData
3334
{
35+
// Note: These fields are named this way for internal serialization
3436
public List<MLAPIProfilerCounter> m_ChartCounters = new List<MLAPIProfilerCounter>();
3537
public List<MLAPIProfilerCounter> m_DetailCounters = new List<MLAPIProfilerCounter>();
3638
public string m_Name;
@@ -39,33 +41,34 @@ private class MLAPIProfilerModuleData
3941
[Serializable]
4042
private class MLAPIModules
4143
{
44+
// Note: These fields are named this way for internal serialization
4245
public List<MLAPIProfilerModuleData> m_Modules;
4346
}
4447

4548
private static List<MLAPIProfilerCounter> CreateRPCCounters() => new List<MLAPIProfilerCounter>()
4649
{
47-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfRPCsSent, m_Category = ProfilerCategory.Network.Name },
48-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfRPCsReceived, m_Category = ProfilerCategory.Network.Name },
49-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfRPCBatchesSent, m_Category = ProfilerCategory.Network.Name },
50-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfRPCBatchesReceived, m_Category = ProfilerCategory.Network.Name },
51-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfRPCQueueProcessed, m_Category = ProfilerCategory.Network.Name },
52-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfRPCsInQueueSize, m_Category = ProfilerCategory.Network.Name },
53-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfRPCsOutQueueSize, m_Category = ProfilerCategory.Network.Name },
50+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RpcSent, m_Category = ProfilerCategory.Network.Name },
51+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RpcReceived, m_Category = ProfilerCategory.Network.Name },
52+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RpcBatchesSent, m_Category = ProfilerCategory.Network.Name },
53+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RpcBatchesReceived, m_Category = ProfilerCategory.Network.Name },
54+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RpcQueueProcessed, m_Category = ProfilerCategory.Network.Name },
55+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RpcInQueueSize, m_Category = ProfilerCategory.Network.Name },
56+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.RpcOutQueueSize, m_Category = ProfilerCategory.Network.Name },
5457
};
5558

5659
private static List<MLAPIProfilerCounter> CreateOperationsCounters() => new List<MLAPIProfilerCounter>()
5760
{
58-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfConnections, m_Category = ProfilerCategory.Network.Name },
61+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.Connections, m_Category = ProfilerCategory.Network.Name },
5962
new MLAPIProfilerCounter { m_Name = ProfilerConstants.ReceiveTickRate, m_Category = ProfilerCategory.Network.Name },
6063
};
6164

6265
private static List<MLAPIProfilerCounter> CreateMessagesCounters() => new List<MLAPIProfilerCounter>()
6366
{
64-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfNamedMessages, m_Category = ProfilerCategory.Network.Name },
65-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberOfUnnamedMessages, m_Category = ProfilerCategory.Network.Name },
66-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberBytesSent, m_Category = ProfilerCategory.Network.Name },
67-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberBytesReceived, m_Category = ProfilerCategory.Network.Name },
68-
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NumberNetworkVarsReceived, m_Category = ProfilerCategory.Network.Name },
67+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NamedMessageReceived, m_Category = ProfilerCategory.Network.Name },
68+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.UnnamedMessageReceived, m_Category = ProfilerCategory.Network.Name },
69+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.ByteSent, m_Category = ProfilerCategory.Network.Name },
70+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.ByteReceived, m_Category = ProfilerCategory.Network.Name },
71+
new MLAPIProfilerCounter { m_Name = ProfilerConstants.NetworkVarReceived, m_Category = ProfilerCategory.Network.Name },
6972
};
7073

7174
private delegate List<MLAPIProfilerCounter> CounterListFactoryDelegate();
@@ -75,10 +78,10 @@ private static bool CreateMLAPIDynamicModule(ref MLAPIModules mlapiModules, stri
7578
var module = mlapiModules.m_Modules.Find(x => x.m_Name == moduleName);
7679
if (module == null)
7780
{
78-
var newModule = new MLAPIProfilerModuleData();
79-
newModule.m_Name = moduleName;
80-
newModule.m_ChartCounters = counterListFactoryDelegate();
81-
newModule.m_DetailCounters = counterListFactoryDelegate();
81+
var newModule = new MLAPIProfilerModuleData
82+
{
83+
m_Name = moduleName, m_ChartCounters = counterListFactoryDelegate(), m_DetailCounters = counterListFactoryDelegate(),
84+
};
8285
mlapiModules.m_Modules.Add(newModule);
8386
return true;
8487
}
@@ -107,4 +110,4 @@ static MLAPIProfilerModule()
107110
#endif
108111
}
109112
}
110-
}
113+
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ private void DrawControls()
3535
if (EditorGUI.EndChangeCheck()) m_Target.ResetTrackedParams();
3636

3737
var animator = m_Target.Animator;
38-
if (ReferenceEquals(animator, null)) return;
38+
if (animator == null) return;
3939

4040
var animatorController = animator.runtimeAnimatorController as AnimatorController;
41-
if (ReferenceEquals(animatorController, null)) return;
41+
if (animatorController == null) return;
4242

4343
EditorGUI.indentLevel += 1;
4444
var showWarning = false;
@@ -75,4 +75,4 @@ public override void OnInspectorGUI()
7575
serializedObject.ApplyModifiedProperties();
7676
}
7777
}
78-
}
78+
}

0 commit comments

Comments
 (0)