Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
53d63e5
chore
NoelStephensUnity Feb 10, 2022
c95a6c6
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 10, 2022
b6bcfe0
chore
NoelStephensUnity Feb 10, 2022
6e52663
fix
NoelStephensUnity Feb 11, 2022
390be29
fix
NoelStephensUnity Feb 11, 2022
7e7f211
update
NoelStephensUnity Feb 11, 2022
584d4cd
chore
NoelStephensUnity Feb 11, 2022
8203daa
update
NoelStephensUnity Feb 11, 2022
c9d447b
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 12, 2022
fef818d
update
NoelStephensUnity Feb 12, 2022
950023e
fix
NoelStephensUnity Feb 12, 2022
f28f462
update
NoelStephensUnity Feb 12, 2022
f6ec1d1
chore
NoelStephensUnity Feb 12, 2022
77fa3da
update
NoelStephensUnity Feb 14, 2022
a77e134
test
NoelStephensUnity Feb 14, 2022
809afc3
update
NoelStephensUnity Feb 14, 2022
92d486b
Merge branch 'fix/networkscenemanager-interface-override-backport-dev…
NoelStephensUnity Feb 14, 2022
546ea1c
update
NoelStephensUnity Feb 14, 2022
5738dc9
chore
NoelStephensUnity Feb 14, 2022
c96e782
style
NoelStephensUnity Feb 15, 2022
6a8f01b
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 15, 2022
c201659
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 15, 2022
4881e1b
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 15, 2022
5dad53c
update and fix
NoelStephensUnity Feb 15, 2022
dfd3c0d
Update
NoelStephensUnity Feb 16, 2022
e8139fd
test and update
NoelStephensUnity Feb 16, 2022
c7eb9b0
Update
NoelStephensUnity Feb 16, 2022
3d260c6
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 16, 2022
8352247
fix
NoelStephensUnity Feb 16, 2022
04e84eb
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 16, 2022
8f64a70
update
NoelStephensUnity Feb 16, 2022
bf8237a
style
NoelStephensUnity Feb 16, 2022
f7b4835
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 16, 2022
b3af97b
fix
NoelStephensUnity Feb 16, 2022
66ad260
update
NoelStephensUnity Feb 17, 2022
14b5976
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 17, 2022
84bc6da
fix
NoelStephensUnity Feb 17, 2022
2bc1c5e
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 17, 2022
4558a8d
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 17, 2022
7f46e5e
update
NoelStephensUnity Feb 17, 2022
6a21c03
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 17, 2022
2e44a95
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 17, 2022
22c3688
update
NoelStephensUnity Feb 17, 2022
9735323
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 17, 2022
685a9a3
fix
NoelStephensUnity Feb 17, 2022
69dc998
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 17, 2022
730fbbd
update
NoelStephensUnity Feb 17, 2022
8a23581
Fix
NoelStephensUnity Feb 18, 2022
bc38e6c
style
NoelStephensUnity Feb 18, 2022
2a48733
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 18, 2022
9a0eced
update
NoelStephensUnity Feb 18, 2022
8030db3
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 18, 2022
0d5f10c
update
NoelStephensUnity Feb 18, 2022
3e69152
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 18, 2022
ffcc4f1
style
NoelStephensUnity Feb 18, 2022
64d8551
update
NoelStephensUnity Feb 19, 2022
f83c5fe
update and style
NoelStephensUnity Feb 19, 2022
eb966ec
revert
NoelStephensUnity Feb 19, 2022
dbaf4aa
revert
NoelStephensUnity Feb 20, 2022
a7ef8ce
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 20, 2022
c6ff94d
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 20, 2022
20d5a86
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 20, 2022
c949d5a
update
NoelStephensUnity Feb 20, 2022
6d05bc2
style
NoelStephensUnity Feb 20, 2022
87d37fb
update
NoelStephensUnity Feb 20, 2022
76ab881
update
NoelStephensUnity Feb 21, 2022
0da646a
update
NoelStephensUnity Feb 22, 2022
5d683bb
update
NoelStephensUnity Feb 22, 2022
0f9430f
fix
NoelStephensUnity Feb 22, 2022
5a86ca3
update
NoelStephensUnity Feb 22, 2022
76a13c0
fix and style
NoelStephensUnity Feb 23, 2022
0a15db4
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 23, 2022
095d413
update
NoelStephensUnity Feb 23, 2022
e1484f6
revert and fix
NoelStephensUnity Feb 23, 2022
9ead2c0
style
NoelStephensUnity Feb 23, 2022
071c717
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 23, 2022
0f7f11b
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 23, 2022
4736c2f
update
NoelStephensUnity Feb 23, 2022
e4c6e1d
update manifest
NoelStephensUnity Feb 23, 2022
6fa55bd
update
NoelStephensUnity Feb 23, 2022
ff9968a
update
NoelStephensUnity Feb 23, 2022
e2673ea
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 23, 2022
56ec2f8
update
NoelStephensUnity Feb 23, 2022
d937a40
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 23, 2022
b19497f
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 23, 2022
5954505
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
0xFA11 Feb 24, 2022
481ad98
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 24, 2022
c409112
update and style
NoelStephensUnity Feb 24, 2022
66862fd
style and test
NoelStephensUnity Feb 24, 2022
d74a24b
style
NoelStephensUnity Feb 24, 2022
6101a9c
update
NoelStephensUnity Feb 24, 2022
b815c76
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 24, 2022
dcc70eb
last update
NoelStephensUnity Feb 24, 2022
424addd
style
NoelStephensUnity Feb 25, 2022
52a49ad
Update com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObj…
NoelStephensUnity Feb 25, 2022
814b7cd
Update com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObj…
NoelStephensUnity Feb 25, 2022
a4d5c94
Update com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObj…
NoelStephensUnity Feb 25, 2022
90f9588
Update com.unity.netcode.gameobjects/Tests/Runtime/Metrics/NetworkObj…
NoelStephensUnity Feb 25, 2022
aca170f
update
NoelStephensUnity Feb 25, 2022
451fe82
fix
NoelStephensUnity Feb 25, 2022
d70d84c
fix-revert
NoelStephensUnity Feb 25, 2022
a15a867
fix
NoelStephensUnity Feb 25, 2022
d66437b
update
NoelStephensUnity Feb 25, 2022
dbc3742
update
NoelStephensUnity Feb 25, 2022
edf1e19
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 25, 2022
96429b6
update
NoelStephensUnity Feb 25, 2022
a89a6eb
Merge branch 'develop' into fix/mtt-2435-and-integration-test-cleanup
NoelStephensUnity Feb 25, 2022
deec3d3
style
NoelStephensUnity Feb 25, 2022
880e5cc
style
NoelStephensUnity Feb 25, 2022
94dbecb
style
NoelStephensUnity Feb 25, 2022
9cd5cca
style
NoelStephensUnity Feb 25, 2022
5cd1c16
minor update
0xFA11 Feb 26, 2022
8e85cb9
move serialization unit tests back into editortests
0xFA11 Feb 26, 2022
a04fe6d
update `testproject-tools-integration`'s `manifest.json`
0xFA11 Feb 26, 2022
54d61a3
cleanup asmdefs
0xFA11 Feb 26, 2022
9a08548
update projects & packages
0xFA11 Feb 26, 2022
8f96074
update `manifest.json`
0xFA11 Feb 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .yamato/project.metafile
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ projects:
- 2021.2
- 2020.3
- trunk
# - name: testproject-tools-integration
# path: testproject-tools-integration
# validate: false
# test_editors:
# - 2021.2
# - trunk
- name: testproject-tools-integration
path: testproject-tools-integration
validate: false
test_editors:
- 2021.2
- trunk
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
{
"name": "Unity.Netcode.Adapter.UTP.Editor",
"rootNamespace": "",
"references": [
"Unity.Collections",
"Unity.Jobs",
"Unity.Burst",
"Unity.Netcode.Runtime",
"Unity.Networking.Transport"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": true,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
"name": "Unity.Netcode.Adapter.UTP.Editor",
"rootNamespace": "Unity.Netcode.Adapter.UTP.Editor",
"references": [
"Unity.Collections",
"Unity.Jobs",
"Unity.Burst",
"Unity.Netcode.Runtime",
"Unity.Networking.Transport"
],
"includePlatforms": [
"Editor"
]
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
{
"name": "Unity.Netcode.Adapter.UTP",
"rootNamespace": "Unity.Netcode.UTP",
"rootNamespace": "Unity.Netcode.Adapter.UTP",
"references": [
"Unity.Collections",
"Unity.Jobs",
"Unity.Burst",
"Unity.Netcode.Runtime",
"Unity.Networking.Transport"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.unity.multiplayer.tools",
Expand All @@ -26,6 +20,5 @@
"expression": "1.0.0-pre.4",
"define": "MULTIPLAYER_TOOLS_1_0_0_PRE_4"
}
],
"noEngineReferences": false
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,9 @@
"references": [
"Unity.Netcode.Runtime",
"Unity.Networking.Transport",
"UnityEngine.TestRunner",
"UnityEditor.TestRunner",
"Unity.Netcode.Adapter.UTP"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": true,
"precompiledReferences": [
"nunit.framework.dll"
],
"autoReferenced": false,
"defineConstraints": [
"UNITY_INCLUDE_TESTS",
"UNITY_INCLUDE_TESTS"
],
"versionDefines": [],
"noEngineReferences": false
"optionalUnityReferences": [
"TestAssemblies"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,5 @@
"Unity.Netcode.Runtime",
"Unity.Collections"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
"allowUnsafeCode": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class NetworkManagerHelper : NetworkManager.INetworkManagerHelper
{
internal static NetworkManagerHelper Singleton;

// This is primarily to handle multiInstance scenarios where more than 1 NetworkManager could exist
// This is primarily to handle IntegrationTest scenarios where more than 1 NetworkManager could exist
private static Dictionary<NetworkManager, Transform> s_LastKnownNetworkManagerParents = new Dictionary<NetworkManager, Transform>();

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.unity.multiplayer.tools",
"expression": "",
"define": "MULTIPLAYER_TOOLS"
}
],
"noEngineReferences": false
]
}
3 changes: 2 additions & 1 deletion com.unity.netcode.gameobjects/Runtime/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
[assembly: InternalsVisibleTo("Unity.Netcode.Editor.CodeGen")]
[assembly: InternalsVisibleTo("Unity.Netcode.Editor")]
[assembly: InternalsVisibleTo("TestProject.EditorTests")]
[assembly: InternalsVisibleTo("TestProject.ToolsIntegration.RuntimeTests")]
#endif
[assembly: InternalsVisibleTo("TestProject.ToolsIntegration.RuntimeTests")]
[assembly: InternalsVisibleTo("TestProject.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.TestHelpers.Runtime")]
[assembly: InternalsVisibleTo("Unity.Netcode.Adapter.UTP")]

Original file line number Diff line number Diff line change
Expand Up @@ -1845,7 +1845,7 @@ private void PopulateScenePlacedObjects(Scene sceneToFilterBy, bool clearScenePl
// at the end of scene loading we use this list to soft synchronize all in-scene placed NetworkObjects
foreach (var networkObjectInstance in networkObjects)
{
// We check to make sure the NetworkManager instance is the same one to be "MultiInstanceHelpers" compatible and filter the list on a per scene basis (additive scenes)
// We check to make sure the NetworkManager instance is the same one to be "NetcodeIntegrationTestHelpers" compatible and filter the list on a per scene basis (additive scenes)
if (networkObjectInstance.IsSceneObject == null && networkObjectInstance.NetworkManager == m_NetworkManager && networkObjectInstance.gameObject.scene == sceneToFilterBy &&
networkObjectInstance.gameObject.scene.handle == sceneToFilterBy.handle)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@
"Unity.Multiplayer.Tools.NetworkSolutionInterface",
"Unity.Collections"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.unity.multiplayer.tools",
Expand All @@ -35,6 +29,5 @@
"expression": "1.0.0-pre.4",
"define": "MULTIPLAYER_TOOLS_1_0_0_PRE_4"
}
],
"noEngineReferences": false
]
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("TestProject.EditorTests")]
[assembly: InternalsVisibleTo("TestProject.RuntimeTests")]
[assembly: InternalsVisibleTo("TestProject.ToolsIntegration.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.Netcode.RuntimeTests")]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@

namespace Unity.Netcode.TestHelpers.Runtime
{
public class ObjectNameIdentifier : NetworkBehaviour
{
private ulong m_CurrentOwner;
private ulong m_CurrentNetworkObjectId;
private bool m_IsRegistered;

/// <summary>
/// Keep a reference to the assigned NetworkObject
/// <see cref="OnDestroy"/>
/// </summary>
private NetworkObject m_NetworkObject;

public override void OnNetworkSpawn()
{
RegisterAndLabelNetworkObject();
}

protected void RegisterAndLabelNetworkObject()
{
if (!m_IsRegistered)
{
// This is required otherwise it will try to continue to update the NetworkBehaviour even if
// it has been destroyed.
m_NetworkObject = NetworkObject;
m_CurrentOwner = OwnerClientId;
m_CurrentNetworkObjectId = NetworkObjectId;
var objectOriginalName = gameObject.name.Replace("(Clone)", "");
var serverOrClient = IsServer ? "Server" : "Client";
if (NetworkObject.IsPlayerObject)
{
gameObject.name = NetworkManager.LocalClientId == OwnerClientId ? $"{objectOriginalName}({OwnerClientId})-Local{objectOriginalName}" :
$"{objectOriginalName}({OwnerClientId})-On{serverOrClient}({NetworkManager.LocalClientId})";
}
else
{
gameObject.name = $"{objectOriginalName}({NetworkObjectId})-On{serverOrClient}({NetworkManager.LocalClientId})";
}

// Don't add the player objects to the global list of NetworkObjects
if (!NetworkObject.IsPlayerObject)
{
NetcodeIntegrationTest.RegisterNetworkObject(NetworkObject);
}
m_IsRegistered = true;
}
}

protected void DeRegisterNetworkObject()
{
if (m_IsRegistered)
{
NetcodeIntegrationTest.DeregisterNetworkObject(m_CurrentOwner, m_CurrentNetworkObjectId);
m_IsRegistered = false;
}
}

public override void OnLostOwnership()
{
DeRegisterNetworkObject();
RegisterAndLabelNetworkObject();
}

public override void OnGainedOwnership()
{
DeRegisterNetworkObject();
RegisterAndLabelNetworkObject();
}

public override void OnNetworkDespawn()
{
DeRegisterNetworkObject();
}

public override void OnDestroy()
{
if (m_NetworkObject != null)
{
DeRegisterNetworkObject();
// This is required otherwise it will try to continue to update the NetworkBehaviour even if
// it has been destroyed (most likely integration test specific)
if (m_NetworkObject.ChildNetworkBehaviours != null && m_NetworkObject.ChildNetworkBehaviours.Contains(this))
{
NetworkObject.ChildNetworkBehaviours.Remove(this);
}
m_NetworkObject = null;
}
base.OnDestroy();
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading