Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
using System.IO;
using System.Linq;
using System.Text;
using Unity.Multiplayer.Netcode.Hashing;
using Unity.Multiplayer.Netcode.Messaging;
using Unity.Multiplayer.Netcode.Serialization;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Rocks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
using System.Linq;
using System.Collections.Generic;
using System.Reflection;
using Unity.Multiplayer.Netcode.Logging;
using Unity.Multiplayer.Netcode.Messaging;
using Unity.Multiplayer.Netcode.Serialization;
using Mono.Cecil;
using Mono.Cecil.Cil;
using Mono.Cecil.Rocks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly)
case nameof(NetworkBehaviour):
ProcessNetworkBehaviour(typeDefinition);
break;
case nameof(Messaging.__RpcParams):
case nameof(__RpcParams):
typeDefinition.IsPublic = true;
break;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
{
"name": "Unity.Multiplayer.MLAPI.Editor.CodeGen",
"rootNamespace": "",
"references": [
"Unity.Multiplayer.MLAPI.Runtime"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": true,
"overrideReferences": true,
"precompiledReferences": [
"Mono.Cecil.dll",
"Mono.Cecil.Mdb.dll",
"Mono.Cecil.Pdb.dll",
"Mono.Cecil.Rocks.dll"
],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
"name": "Unity.Multiplayer.MLAPI.Editor.CodeGen",
"rootNamespace": "Unity.Multiplayer.Netcode.Editor.CodeGen",
"references": [
"Unity.Multiplayer.MLAPI.Runtime"
],
"includePlatforms": [
"Editor"
],
"allowUnsafeCode": true,
"overrideReferences": true,
"precompiledReferences": [
"Mono.Cecil.dll",
"Mono.Cecil.Mdb.dll",
"Mono.Cecil.Pdb.dll",
"Mono.Cecil.Rocks.dll"
],
"autoReferenced": false
}
5 changes: 2 additions & 3 deletions com.unity.multiplayer.mlapi/Editor/MLAPIProfiler.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
using System.Collections.Generic;
using System.IO;
using Unity.Multiplayer.Netcode.Profiling;
using Unity.Multiplayer.Netcode.Serialization;
using UnityEditor;
using UnityEngine;

namespace UnityEditor
namespace Unity.Multiplayer.Netcode.Editor
{
public class MLAPIProfiler : EditorWindow
{
Expand Down
3 changes: 1 addition & 2 deletions com.unity.multiplayer.mlapi/Editor/MLAPIProfilerModule.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
using Unity.Multiplayer.Netcode.Profiling;
using Unity.Profiling;
using UnityEditor;
using UnityEngine;

namespace Unity.Multiplayer.Netcode
namespace Unity.Multiplayer.Netcode.Editor
{
[InitializeOnLoad]
internal static class MLAPIProfilerModule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Unity.Multiplayer.Netcode;
using Unity.Multiplayer.Netcode.NetworkVariable;
using UnityEngine;
using UnityEditor;

namespace UnityEditor
namespace Unity.Multiplayer.Netcode.Editor
{
[CustomEditor(typeof(NetworkBehaviour), true)]
[CanEditMultipleObjects]
public class NetworkBehaviourEditor : Editor
public class NetworkBehaviourEditor : UnityEditor.Editor
{
private bool m_Initialized;
private readonly List<string> m_NetworkVariableNames = new List<string>();
Expand Down
2 changes: 0 additions & 2 deletions com.unity.multiplayer.mlapi/Editor/NetworkManagerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
using UnityEditor;
using UnityEngine;
using UnityEditorInternal;
using Unity.Multiplayer.Netcode.Configuration;
using Unity.Multiplayer.Netcode.Transports;

namespace Unity.Multiplayer.Netcode.Editor
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
{
"name": "Unity.Multiplayer.MLAPI.Editor",
"rootNamespace": "",
"rootNamespace": "Unity.Multiplayer.Netcode.Editor",
"references": [
"Unity.Multiplayer.MLAPI.Runtime",
"Unity.Multiplayer.MLAPI.Prototyping"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
]
}
2 changes: 0 additions & 2 deletions com.unity.multiplayer.mlapi/Prototyping/NetworkAnimator.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System.Linq;
using System.Collections.Generic;
using Unity.Multiplayer.Netcode.Messaging;
using Unity.Multiplayer.Netcode.Serialization;
using UnityEngine;

namespace Unity.Multiplayer.Netcode.Prototyping
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
using Unity.Multiplayer.Netcode.Connection;
using Unity.Multiplayer.Netcode.Messaging;

namespace Unity.Multiplayer.Netcode.Prototyping
{
Expand Down
3 changes: 0 additions & 3 deletions com.unity.multiplayer.mlapi/Prototyping/NetworkTransform.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using Unity.Multiplayer.Netcode.NetworkVariable;
using Unity.Multiplayer.Netcode.Serialization;
using Unity.Multiplayer.Netcode.Transports;
using UnityEngine;

namespace Unity.Multiplayer.Netcode.Prototyping
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"name": "Unity.Multiplayer.MLAPI.Prototyping",
"rootNamespace": "MLAPI.Prototyping",
"rootNamespace": "Unity.Multiplayer.Netcode.Prototyping",
"references": [
"Unity.Multiplayer.MLAPI.Runtime"
],
"includePlatforms": [],
"excludePlatforms": []
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Unity.Multiplayer.Netcode.Collections
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// Queue with a fixed size
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Unity.Multiplayer.Netcode.Configuration
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// Represents the length of a var int encoded hash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
using System.Collections.Generic;
using UnityEngine;
using System.Linq;
using Unity.Multiplayer.Netcode.Transports;
using Unity.Multiplayer.Netcode.Hashing;
using Unity.Multiplayer.Netcode.Serialization;
using Unity.Multiplayer.Netcode.Serialization.Pooled;

namespace Unity.Multiplayer.Netcode.Configuration
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// The configuration object used to start server, client and hosts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Unity.Multiplayer.Netcode.Configuration
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// A static class containing MLAPI constants
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using UnityEngine;

namespace Unity.Multiplayer.Netcode.Configuration
namespace Unity.Multiplayer.Netcode
{
internal enum NetworkPrefabOverride
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Collections.Generic;

namespace Unity.Multiplayer.Netcode.Connection
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// A NetworkClient
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Unity.Multiplayer.Netcode.Connection
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// A class representing a client that is currently in the process of connecting
Expand Down
16 changes: 4 additions & 12 deletions com.unity.multiplayer.mlapi/Runtime/Core/NetworkBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
using System.Reflection;
using System.Linq;
using System.IO;
using Unity.Multiplayer.Netcode.Logging;
using Unity.Multiplayer.Netcode.Messaging;
using Unity.Multiplayer.Netcode.NetworkVariable;
using Unity.Multiplayer.Netcode.Profiling;
using Unity.Multiplayer.Netcode.Reflection;
using Unity.Multiplayer.Netcode.Serialization;
using Unity.Multiplayer.Netcode.Serialization.Pooled;
using Unity.Multiplayer.Netcode.Transports;

namespace Unity.Multiplayer.Netcode
{
Expand Down Expand Up @@ -633,7 +625,7 @@ internal static void HandleNetworkVariableDeltas(List<INetworkVariable> networkV
{
if (NetworkLog.CurrentLogLevel <= LogLevel.Normal)
{
NetworkLog.LogWarning($"Client wrote to {nameof(NetworkVariable)} without permission. => {(logInstance != null ? ($"{nameof(NetworkObjectId)}: {logInstance.NetworkObjectId} - {nameof(NetworkObject.GetNetworkBehaviourOrderIndex)}(): {logInstance.NetworkObject.GetNetworkBehaviourOrderIndex(logInstance)} - VariableIndex: {i}") : string.Empty)}");
NetworkLog.LogWarning($"Client wrote to {typeof(NetworkVariable<>).Name} without permission. => {(logInstance != null ? ($"{nameof(NetworkObjectId)}: {logInstance.NetworkObjectId} - {nameof(NetworkObject.GetNetworkBehaviourOrderIndex)}(): {logInstance.NetworkObject.GetNetworkBehaviourOrderIndex(logInstance)} - VariableIndex: {i}") : string.Empty)}");
NetworkLog.LogError($"[{networkVariableList[i].GetType().Name}]");
}

Expand All @@ -651,7 +643,7 @@ internal static void HandleNetworkVariableDeltas(List<INetworkVariable> networkV

if (NetworkLog.CurrentLogLevel <= LogLevel.Error)
{
NetworkLog.LogError($"Client wrote to {nameof(NetworkVariable)} without permission. No more variables can be read. This is critical. => {(logInstance != null ? ($"{nameof(NetworkObjectId)}: {logInstance.NetworkObjectId} - {nameof(NetworkObject.GetNetworkBehaviourOrderIndex)}(): {logInstance.NetworkObject.GetNetworkBehaviourOrderIndex(logInstance)} - VariableIndex: {i}") : string.Empty)}");
NetworkLog.LogError($"Client wrote to {typeof(NetworkVariable<>).Name} without permission. No more variables can be read. This is critical. => {(logInstance != null ? ($"{nameof(NetworkObjectId)}: {logInstance.NetworkObjectId} - {nameof(NetworkObject.GetNetworkBehaviourOrderIndex)}(): {logInstance.NetworkObject.GetNetworkBehaviourOrderIndex(logInstance)} - VariableIndex: {i}") : string.Empty)}");
NetworkLog.LogError($"[{networkVariableList[i].GetType().Name}]");
}

Expand Down Expand Up @@ -723,7 +715,7 @@ internal static void HandleNetworkVariableUpdate(List<INetworkVariable> networkV
{
if (NetworkLog.CurrentLogLevel <= LogLevel.Normal)
{
NetworkLog.LogWarning($"Client wrote to {nameof(NetworkVariable)} without permission. => {(logInstance != null ? ($"{nameof(NetworkObjectId)}: {logInstance.NetworkObjectId} - {nameof(NetworkObject.GetNetworkBehaviourOrderIndex)}(): {logInstance.NetworkObject.GetNetworkBehaviourOrderIndex(logInstance)} - VariableIndex: {i}") : string.Empty)}");
NetworkLog.LogWarning($"Client wrote to {typeof(NetworkVariable<>).Name} without permission. => {(logInstance != null ? ($"{nameof(NetworkObjectId)}: {logInstance.NetworkObjectId} - {nameof(NetworkObject.GetNetworkBehaviourOrderIndex)}(): {logInstance.NetworkObject.GetNetworkBehaviourOrderIndex(logInstance)} - VariableIndex: {i}") : string.Empty)}");
}

stream.Position += varSize;
Expand All @@ -739,7 +731,7 @@ internal static void HandleNetworkVariableUpdate(List<INetworkVariable> networkV
// - TwoTen
if (NetworkLog.CurrentLogLevel <= LogLevel.Error)
{
NetworkLog.LogError($"Client wrote to {nameof(NetworkVariable)} without permission. No more variables can be read. This is critical. => {(logInstance != null ? ($"{nameof(NetworkObjectId)}: {logInstance.NetworkObjectId} - {nameof(NetworkObject.GetNetworkBehaviourOrderIndex)}(): {logInstance.NetworkObject.GetNetworkBehaviourOrderIndex(logInstance)} - VariableIndex: {i}") : string.Empty)}");
NetworkLog.LogError($"Client wrote to {typeof(NetworkVariable<>).Name} without permission. No more variables can be read. This is critical. => {(logInstance != null ? ($"{nameof(NetworkObjectId)}: {logInstance.NetworkObjectId} - {nameof(NetworkObject.GetNetworkBehaviourOrderIndex)}(): {logInstance.NetworkObject.GetNetworkBehaviourOrderIndex(logInstance)} - VariableIndex: {i}") : string.Empty)}");
}

return;
Expand Down
13 changes: 0 additions & 13 deletions com.unity.multiplayer.mlapi/Runtime/Core/NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using Unity.Multiplayer.Netcode.Logging;
using Unity.Multiplayer.Netcode.Configuration;
using Unity.Multiplayer.Netcode.Profiling;
using Unity.Multiplayer.Netcode.Serialization;
using Unity.Multiplayer.Netcode.Transports;
using Unity.Multiplayer.Netcode.Connection;
using Unity.Multiplayer.Netcode.Messaging;
using Unity.Multiplayer.Netcode.SceneManagement;
using Unity.Multiplayer.Netcode.Spawning;
using Unity.Multiplayer.Netcode.Exceptions;
using Unity.Multiplayer.Netcode.Serialization.Pooled;
using Unity.Multiplayer.Netcode.Transports.Tasks;
using Unity.Multiplayer.Netcode.Timing;
Comment on lines -6 to -18
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

using Unity.Profiling;
using Debug = UnityEngine.Debug;

Expand Down
6 changes: 0 additions & 6 deletions com.unity.multiplayer.mlapi/Runtime/Core/NetworkObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using Unity.Multiplayer.Netcode.Exceptions;
using Unity.Multiplayer.Netcode.Hashing;
using Unity.Multiplayer.Netcode.Logging;
using Unity.Multiplayer.Netcode.Messaging;
using Unity.Multiplayer.Netcode.Transports;
using Unity.Multiplayer.Netcode.Serialization;
using UnityEngine;

namespace Unity.Multiplayer.Netcode
Expand Down
6 changes: 0 additions & 6 deletions com.unity.multiplayer.mlapi/Runtime/Core/SnapshotSystem.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using Unity.Multiplayer.Netcode.Messaging;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glad to see there's nothing further than that in this file! :-)

using Unity.Multiplayer.Netcode.NetworkVariable;
using Unity.Multiplayer.Netcode.Serialization;
using Unity.Multiplayer.Netcode.Serialization.Pooled;
using Unity.Multiplayer.Netcode.Timing;
using Unity.Multiplayer.Netcode.Transports;
using UnityEngine;

namespace Unity.Multiplayer.Netcode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Unity.Multiplayer.Netcode.Exceptions
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// Exception thrown when the new parent candidate of the NetworkObject is not valid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Unity.Multiplayer.Netcode.Exceptions
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// Exception thrown when the operation can only be done on the server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Unity.Multiplayer.Netcode.Exceptions
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// Exception thrown when the operation require NetworkManager to be listening.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Unity.Multiplayer.Netcode.Exceptions
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// Exception thrown when the operation can only be done on the server
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Unity.Multiplayer.Netcode.Exceptions
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// Exception thrown when an object is not yet spawned
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Unity.Multiplayer.Netcode.Exceptions
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// Exception thrown when a visibility change fails
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.Text;
using System.Runtime.CompilerServices;

namespace Unity.Multiplayer.Netcode.Hashing
namespace Unity.Multiplayer.Netcode
{
/// <summary>
/// XXHash implementation.
Expand Down
Loading