Skip to content

Commit b776957

Browse files
committed
Merge branch 'develop' into sam/feature/interpolation-for-network-transform
* develop: (32 commits) refactor: calling networkShow(NetworkObject) code in networkshow(List<NetworkObject>) (#1028) feat: snapshot. MTT-685 MTT-822 (#1021) test: adding a multi-instance test checking NetworkShow and NetworkHide on lists of objects (#1036) fix: corrected NetworkVariable WriteField/WriteDelta/ReadField/ReadDelta dropping the last byte if unaligned. (#1008) chore: run standards check over solution files (#1027) chore: replace MLAPI with Netcode in Markdown files (#1025) fix!: added plainly-callable Add() method to NetworkSet [MTT-1005] (#1022) fix: fixing incorrect merge done as part of commit 85842ee (#1023) chore: cleanup/upgrade serialized scenes (#1020) chore: replace MLAPI with Netcode in C# source files (#1019) test: add network collections, struct and class tests MTT-936 (#1000) test: add buildtests to test build pipeline on target platforms (#1018) chore: rename MLAPI types to Netcode (#1017) chore!: rename asmdefs, change top-level namespaces (#1015) Replacing community NetworkManagerHUD with a simpler implementation (#993) test: network prefab pools and INetworkPrefabInstanceHandler (#1004) fix: do not expose Runtime internals to TestProject.ManualTests asmdef (#1014) refactor: snapshot. merge preparation. Removing old acks, removing unused varia… (#1013) chore!: per-asmdef namespaces instead of per-folder (#1009) feat: snapshot. ground work, preparing depedencies. No impact on code behaviour (#1012) ... # Conflicts: # com.unity.multiplayer.mlapi/Prototyping/NetworkTransform.cs # com.unity.multiplayer.mlapi/Runtime/Messaging/InternalMessageHandler.cs
2 parents e7bbd12 + 589882c commit b776957

File tree

357 files changed

+12149
-5202
lines changed

Some content is hidden

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

357 files changed

+12149
-5202
lines changed

.editorconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ indent_size = 4
1414
# formatting rules
1515
dotnet_diagnostic.IDE0001.severity = error # Simplify name
1616
dotnet_diagnostic.IDE0002.severity = error # Simplify member access
17+
dotnet_diagnostic.IDE0005.severity = error # Remove unnecessary import
1718
dotnet_style_qualification_for_field = false:error
1819
dotnet_style_qualification_for_property = false:error
1920
dotnet_style_qualification_for_method = false:error
@@ -26,7 +27,7 @@ csharp_prefer_braces = true:error
2627
csharp_using_directive_placement = outside_namespace:error
2728

2829
# naming rules
29-
# namespace MLAPI { ... }
30+
# namespace Unity.Netcode { ... }
3031
# public class NetworkObject { ... }
3132
# public void Spawn(...) { ... }
3233
dotnet_naming_symbols.usertypes_naming_symbols.applicable_kinds = namespace, class, struct, enum, property, method, field, event, delegate, local_function
@@ -101,4 +102,4 @@ dotnet_naming_style.memberfield_naming_style.required_prefix = m_
101102
dotnet_naming_style.memberfield_naming_style.capitalization = pascal_case
102103
dotnet_naming_rule.memberfield_naming_rule.symbols = memberfield_naming_symbols
103104
dotnet_naming_rule.memberfield_naming_rule.style = memberfield_naming_style
104-
dotnet_naming_rule.memberfield_naming_rule.severity = error
105+
dotnet_naming_rule.memberfield_naming_rule.severity = error

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ If applicable, add screenshots to help explain your problem.
2929
**Environment (please complete the following information):**
3030
- OS: [e.g. Windows 10]
3131
- Unity Version: [e.g. 2019.1]
32-
- MLAPI Version: [e.g. v6.0.1]
33-
- MLAPI Commit: [e.g. https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/commit/c102935df1d7e0928283b48948fe96e5d96dd961]
32+
- Netcode Version: [e.g. v6.0.1]
33+
- Netcode Commit: [e.g. https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/commit/c102935df1d7e0928283b48948fe96e5d96dd961]
3434

3535
**Additional context**
3636
Add any other context about the problem here. Logs, code snippets would be useful here but please also consider attaching a minimal Unity project that reproduces the issue.

.github/ISSUE_TEMPLATE/feedback.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
name: Feedback
3-
about: Provide feedback to the MLAPI team
3+
about: Provide feedback to the Netcode for GameObjects team
44
title: ''
55
labels: stat:awaiting triage, type:feedback
66
assignees: ''
77

88
---
99

1010
**Feedback**
11-
Enter your feedback to the MLAPI team here. Please keep in mind that our teams focus is on multiplayer development. For other non-networking related feedback towards Unity please use the Forums.
11+
Enter your feedback to the Netcode for GameObjects team here. Please keep in mind that our teams focus is on multiplayer development. For other non-networking related feedback towards Unity please use the Forums.
1212

1313
**Suggested Changes**
1414
If you think we could do something better, please let us know here what you would like us to change. Concrete and constructive suggestions are welcome and will help us to prioritize and act on feedback.

.github/ISSUE_TEMPLATE/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ assignees: ''
99

1010
Post your questions or problems here.
1111

12-
For general questions, networking advice or discussions about MLAPI, you can also reach us on our [Discord Community](https://discord.gg/FM8SE9E) or create a post in the [Unity Multiplayer Forum](https://forum.unity.com/forums/multiplayer.26/).
12+
For general questions, networking advice or discussions about the Netcode for GameObjects, you can also reach us on our [Discord Community](https://discord.gg/FM8SE9E) or create a post in the [Unity Multiplayer Forum](https://forum.unity.com/forums/multiplayer.26/).

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Here are our guidlines for contributing:
1414

1515
## <a name="coc"></a> Code of Conduct
1616

17-
Please help us keep MLAPI open and inclusive. Read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
17+
Please help us keep Unity Netcode for GameObjects open and inclusive. Read and follow our [Code of Conduct](CODE_OF_CONDUCT.md).
1818

1919
## <a name="ways"></a> Ways to Contribute
2020

21-
There are many ways in which you can contribute to the MLAPI.
21+
There are many ways in which you can contribute to Netcode for GameObjects.
2222

2323
### <a name="issue"></a> Issues and Bugs
2424

@@ -46,7 +46,7 @@ When you open a pull request, you will be asked to enter into Unity's License Ag
4646

4747
## <a name="submit-pr"></a> Pull Request Submission Guidelines
4848

49-
We use the [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) for the development of MLAPI. This means development happens on the **develop branch** and Pull Requests should be submited to it.
49+
We use the [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) for the development of the Netcode for GameObjects. This means development happens on the **develop branch** and Pull Requests should be submited to it.
5050

5151
### Commit Message Guidelines
5252
We have very precise rules over how our git commit messages can be formatted. This leads to **more
@@ -108,4 +108,4 @@ Always write a clear log message for your commits. One-line messages are fine fo
108108

109109
$ git commit -m "A brief summary of the commit
110110
>
111-
> A paragraph describing what changed and its impact."
111+
> A paragraph describing what changed and its impact."
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
1-
# About MLAPI
1+
# About Netcode for GameObjects
22

3-
Unity MLAPI is a high level networking library built for the Unity game engine to abstract networking. This allows developers to focus on the game rather than low level protocols and networking frameworks.
3+
Unity Netcode for GameObjects is a high-level networking library built to abstract networking. This allows developers to focus on the game rather than low level protocols and networking frameworks.
44

5-
## Unity MLAPI
5+
## Guides
66

7-
See this guide to install Unity MLAPI, set up your project, and get started with your first networked game.
7+
See guides below to install Unity Netcode for GameObjects, set up your project, and get started with your first networked game:
88

9-
* [MLAPI Documentation](https://docs-multiplayer.unity3d.com/docs/getting-started/about-mlapi)
10-
* [Install MLAPI](https://docs-multiplayer.unity3d.com/docs/migration/install)
11-
* [First Steps with Unity MLAPI](https://docs-multiplayer.unity3d.com/docs/tutorials/helloworldintro)
12-
* [MLAPI API Reference](https://docs-multiplayer.unity3d.com/docs/mlapi-api/introduction)
9+
* [Documentation](https://docs-multiplayer.unity3d.com/docs/getting-started/about-mlapi)
10+
* [Installation](https://docs-multiplayer.unity3d.com/docs/migration/install)
11+
* [First Steps](https://docs-multiplayer.unity3d.com/docs/tutorials/helloworldintro)
12+
* [API Reference](https://docs-multiplayer.unity3d.com/docs/mlapi-api/introduction)
1313

1414
# Technical details
1515

1616
## Requirements
1717

18-
This version of MLAPI is compatible with the following versions of the Unity Editor:
18+
This version of Netcode for GameObjects is compatible with the following Unity versions and platforms:
1919

2020
* 2020.3 and later
21-
* Windows, Mac, Linux platforms are supported by MLAPI
21+
* Windows, Mac, Linux platforms
2222

2323
## Document revision history
2424

2525
|Date|Reason|
2626
|---|---|
2727
|March 10, 2021|Document created. Matches package version 0.1.0|
28-
|June 1, 2021| Updated and added links for additional content. Matches patch version 0.1.0 and hotfixes.|
29-
|June 3, 2021| Update document to acknowledge Unity min version change. Matches package version 0.2.0|
28+
|June 1, 2021|Update and add links for additional content. Matches patch version 0.1.0 and hotfixes.|
29+
|June 3, 2021|Update document to acknowledge Unity min version change. Matches package version 0.2.0|
30+
|August 5, 2021|Update product/package name|

com.unity.multiplayer.mlapi/Editor/CodeGen/CodeGenHelpers.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@
33
using System.IO;
44
using System.Linq;
55
using System.Text;
6-
using MLAPI.Hashing;
7-
using MLAPI.Messaging;
8-
using MLAPI.Serialization;
96
using Mono.Cecil;
107
using Mono.Cecil.Cil;
118
using Mono.Cecil.Rocks;
129
using Unity.CompilationPipeline.Common.Diagnostics;
1310
using Unity.CompilationPipeline.Common.ILPostProcessing;
1411
using UnityEngine;
1512

16-
namespace MLAPI.Editor.CodeGen
13+
namespace Unity.Netcode.Editor.CodeGen
1714
{
1815
internal static class CodeGenHelpers
1916
{
20-
public const string RuntimeAssemblyName = "Unity.Multiplayer.MLAPI.Runtime";
17+
public const string RuntimeAssemblyName = "Unity.Netcode.Runtime";
2118

2219
public static readonly string NetworkBehaviour_FullName = typeof(NetworkBehaviour).FullName;
2320
public static readonly string ServerRpcAttribute_FullName = typeof(ServerRpcAttribute).FullName;
@@ -281,10 +278,10 @@ public static AssemblyDefinition AssemblyDefinitionFor(ICompiledAssembly compile
281278

282279
var assemblyDefinition = AssemblyDefinition.ReadAssembly(new MemoryStream(compiledAssembly.InMemoryAssembly.PeData), readerParameters);
283280

284-
//apparently, it will happen that when we ask to resolve a type that lives inside MLAPI.Runtime, and we
285-
//are also postprocessing MLAPI.Runtime, type resolving will fail, because we do not actually try to resolve
281+
//apparently, it will happen that when we ask to resolve a type that lives inside Unity.Netcode.Runtime, and we
282+
//are also postprocessing Unity.Netcode.Runtime, type resolving will fail, because we do not actually try to resolve
286283
//inside the assembly we are processing. Let's make sure we do that, so that we can use postprocessor features inside
287-
//MLAPI.Runtime itself as well.
284+
//Unity.Netcode.Runtime itself as well.
288285
assemblyResolver.AddAssemblyDefinitionBeingOperatedOn(assemblyDefinition);
289286

290287
return assemblyDefinition;

com.unity.multiplayer.mlapi/Editor/CodeGen/NetworkBehaviourILPP.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
using System.Linq;
44
using System.Collections.Generic;
55
using System.Reflection;
6-
using MLAPI.Logging;
7-
using MLAPI.Messaging;
8-
using MLAPI.Serialization;
96
using Mono.Cecil;
107
using Mono.Cecil.Cil;
118
using Mono.Cecil.Rocks;
@@ -16,7 +13,7 @@
1613
using ParameterAttributes = Mono.Cecil.ParameterAttributes;
1714
using ILPPInterface = Unity.CompilationPipeline.Common.ILPostProcessing.ILPostProcessor;
1815

19-
namespace MLAPI.Editor.CodeGen
16+
namespace Unity.Netcode.Editor.CodeGen
2017
{
2118
internal sealed class NetworkBehaviourILPP : ILPPInterface
2219
{

com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorAssemblyResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Mono.Cecil;
77
using Unity.CompilationPipeline.Common.ILPostProcessing;
88

9-
namespace MLAPI.Editor.CodeGen
9+
namespace Unity.Netcode.Editor.CodeGen
1010
{
1111
internal class PostProcessorAssemblyResolver : IAssemblyResolver
1212
{

com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Reflection;
33
using Mono.Cecil;
44

5-
namespace MLAPI.Editor.CodeGen
5+
namespace Unity.Netcode.Editor.CodeGen
66
{
77
internal class PostProcessorReflectionImporter : DefaultReflectionImporter
88
{

com.unity.multiplayer.mlapi/Editor/CodeGen/PostProcessorReflectionImporterProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using Mono.Cecil;
22

3-
namespace MLAPI.Editor.CodeGen
3+
namespace Unity.Netcode.Editor.CodeGen
44
{
55
internal class PostProcessorReflectionImporterProvider : IReflectionImporterProvider
66
{

com.unity.multiplayer.mlapi/Editor/CodeGen/RuntimeAccessModifiersILPP.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Unity.CompilationPipeline.Common.ILPostProcessing;
77
using ILPPInterface = Unity.CompilationPipeline.Common.ILPostProcessing.ILPostProcessor;
88

9-
namespace MLAPI.Editor.CodeGen
9+
namespace Unity.Netcode.Editor.CodeGen
1010
{
1111
internal sealed class RuntimeAccessModifiersILPP : ILPPInterface
1212
{
@@ -29,7 +29,7 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly)
2929
var assemblyDefinition = CodeGenHelpers.AssemblyDefinitionFor(compiledAssembly);
3030
if (assemblyDefinition == null)
3131
{
32-
m_Diagnostics.AddError($"Cannot read MLAPI Runtime assembly definition: {compiledAssembly.Name}");
32+
m_Diagnostics.AddError($"Cannot read Netcode Runtime assembly definition: {compiledAssembly.Name}");
3333
return null;
3434
}
3535

@@ -52,15 +52,15 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly)
5252
case nameof(NetworkBehaviour):
5353
ProcessNetworkBehaviour(typeDefinition);
5454
break;
55-
case nameof(Messaging.__RpcParams):
55+
case nameof(__RpcParams):
5656
typeDefinition.IsPublic = true;
5757
break;
5858
}
5959
}
6060
}
6161
else
6262
{
63-
m_Diagnostics.AddError($"Cannot get main module from MLAPI Runtime assembly definition: {compiledAssembly.Name}");
63+
m_Diagnostics.AddError($"Cannot get main module from Netcode Runtime assembly definition: {compiledAssembly.Name}");
6464
}
6565

6666
// write

com.unity.multiplayer.mlapi/Editor/CodeGen/Unity.Multiplayer.MLAPI.Editor.CodeGen.asmdef

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "Unity.Netcode.Editor.CodeGen",
3+
"rootNamespace": "Unity.Netcode.Editor.CodeGen",
4+
"references": [
5+
"Unity.Netcode.Runtime"
6+
],
7+
"includePlatforms": [
8+
"Editor"
9+
],
10+
"allowUnsafeCode": true,
11+
"overrideReferences": true,
12+
"precompiledReferences": [
13+
"Mono.Cecil.dll",
14+
"Mono.Cecil.Mdb.dll",
15+
"Mono.Cecil.Pdb.dll",
16+
"Mono.Cecil.Rocks.dll"
17+
],
18+
"autoReferenced": false
19+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
using System;
22

3-
namespace MLAPI.Editor
3+
namespace Unity.Netcode.Editor
44
{
55
public class DontShowInTransportDropdownAttribute : Attribute
66
{
7-
87
}
98
}

0 commit comments

Comments
 (0)