Skip to content

Commit 5031f9b

Browse files
0xFA11kvassall-unityjeffreyrainyTwoTenPvPmattwalsh-unity
authored
chore: merge release into develop (#657)
* fix: implement warning logs on non-owner invoking ServerRpc that requires ownership (#627) * add todo comments * fix: implement warning logs on non-owner invoking ServerRpc that requires ownership * fix: Correcting the profiler names for network vars to be appropriately named. Should address issue #605 (#632) * test: NetworkTickSystem test (#630) * test: NetworkTickSystem test * test: NetworkTickSystem test, removed unneeded code * fix: Fix object traversal assigning instanceIds to none scene objects (#629) * fix: Fix object traversal assigning instanceIds to none scene objects * comment added Co-authored-by: Matt Walsh <matt.walsh@unity3d.com> * fix: Correcting the profiler names for named messages vars to be appropriately named. Should address issue #604 (#634) * fix: prevent OnPerformanceTickData from sending data on null (#614) If something causes an exception it's possible that the profiler never allocates data. in these cases, there is no point in sending data outside of MLAPI * fix: use specified transport channel instead of hardcoded reliablerpc channel (#638) * docs: added release notes to changelog.md (#569) * Add release notes to changelog * docs: added release notes to changelog * Update com.unity.multiplayer.mlapi/CHANGELOG.md Co-authored-by: Luke Stampfli <43687322+LukeStampfli@users.noreply.github.com> * update per review for bitserializer and networkserializer * revised per feedback - API refactor * update remove bitserializer * renaming * Update com.unity.multiplayer.mlapi/CHANGELOG.md Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * Update com.unity.multiplayer.mlapi/CHANGELOG.md * Update com.unity.multiplayer.mlapi/CHANGELOG.md * added known issues and scene mgmt fix * revisions per review * profiler final - no more updates * format Co-authored-by: Luke Stampfli <43687322+LukeStampfli@users.noreply.github.com> Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> Co-authored-by: M. Fatih MAR <mfatihmar@gmail.com> * docs: Update repository/project docs (#636) - Mirror package readme.md in root readme.md - Add repo directory structure description - Remove contributing and code of conduct from package directory * docs: Add content for mlapi manual.md (#639) resolves #553 resolves MTT-534 * fix: Removed per-tick runtime allocations by reusing memory between ticks (#640) PerformanceDataManager reuses PerformanceTickData by resetting per-frame Replaces deferred linq query in PerformanceTickData loop. * fix: fixed network activity occurring outside the core update getting missed in the profiler (#641) Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> * fix: Resolve an issue where 2019.4 would not properly run ILPP with a clean import (#645) * Add an dummy ILPP to force 2019.4 to proper compilation order * Turning on this test for 2019.4 * Hack -> Workaround rename Co-authored-by: Matt Walsh <matt.walsh@unity3d.com> Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> * build: add Unity module dependencies explicitly (#648) Co-authored-by: kvassall-unity <68920108+kvassall-unity@users.noreply.github.com> Co-authored-by: Jeffrey Rainy <jeffreyrainy@gmail.com> Co-authored-by: Albin Corén <2108U9@gmail.com> Co-authored-by: Matt Walsh <matt.walsh@unity3d.com> Co-authored-by: Lori Krell <76010626+lkrell@users.noreply.github.com> Co-authored-by: Luke Stampfli <43687322+LukeStampfli@users.noreply.github.com> Co-authored-by: Matt Walsh <69258106+mattwalsh-unity@users.noreply.github.com> Co-authored-by: Jesse Olmer <jesseo@unity3d.com> Co-authored-by: becksebenius-unity <74328025+becksebenius-unity@users.noreply.github.com> Co-authored-by: Andrew Spiering <aspiering@gmail.com>
1 parent 5a5fc05 commit 5031f9b

23 files changed

+481
-294
lines changed

README.md

Lines changed: 83 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,84 @@
1-
# Sysroots
2-
Contains the repos for both the MLAPI SDK and the UTP transport library
1+
[![](https://i.imgur.com/d0amtqs.png)](https://mlapi.network/)
32

4-
Contents:
5-
* com.unity.multiplayer.mlapi -- the MLAPI SDK
6-
* com.unity.multiplayer.transport.utp -- the MLAPI wrapper for the UTP transport library
3+
[![GitHub Release](https://img.shields.io/github/release/MidLevel/MLAPI.svg?logo=github)](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/releases/latest)
4+
[![Github All Releases](https://img.shields.io/github/downloads/MidLevel/MLAPI/total.svg?logo=github&color=informational)](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/releases)
5+
6+
[![Forums](https://img.shields.io/badge/unity--forums-multiplayer-blue)](https://forum.unity.com/forums/multiplayer.26/)
7+
[![Discord](https://img.shields.io/discord/449263083769036810.svg?label=discord&logo=discord&color=informational)](https://discord.gg/FM8SE9E)
8+
9+
10+
[![Licence](https://img.shields.io/github/license/midlevel/mlapi.svg?color=informational)](https://github.com/MidLevel/MLAPI/blob/master/LICENSE)
11+
[![Website](https://img.shields.io/badge/docs-website-informational.svg)](https://docs-multiplayer.unity3d.com/)
12+
[![Api](https://img.shields.io/badge/docs-api-informational.svg)](https://docs-multiplayer.unity3d.com/docs/mlapi-api/introduction)
13+
14+
15+
The Unity MLAPI (Mid level API) is a framework that simplifies building networked games in Unity. It offers **low level** access to core networking while at the same time providing **high level** abstractions. The MLAPI aims to remove the repetitive tasks and reduces the network code dramatically, no matter how many of the **modular** features you use.
16+
17+
### Getting Started
18+
To get started, check the [Multiplayer Docs Site](https://docs-multiplayer.unity3d.com/).
19+
20+
### Community and Feedback
21+
For general questions, networking advice or discussions about MLAPI, please join our [Discord Community](https://discord.gg/FM8SE9E) or create a post in the [Unity Multiplayer Forum](https://forum.unity.com/forums/multiplayer.26/).
22+
23+
### Compatibility
24+
The MLAPI supports all major Unity platforms. To use the WebGL platform a custom WebGL transport based on web sockets is needed.
25+
26+
MLAPI is compatible with Unity 2019 and newer versions.
27+
28+
### Development
29+
We follow the [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow). The master branch contains our latest stable release version while the develop branch tracks our current work.
30+
31+
This repository is broken into multiple components, each one implemented as a Unity Package.
32+
```
33+
.
34+
├── com.unity.multiplayer.mlapi # The core netcode SDK unity package (source + tests)
35+
├── com.unity.multiplayer.transport.utp # Transport wrapper for com.unity.transport experimental package (not currently supported)
36+
└── testproject # A Unity project with various test implementations & scenes which exercise the features in the above package(s).
37+
```
38+
39+
### Contributing
40+
The MLAPI is an open-source project and we encourage and welcome
41+
contributions. If you wish to contribute, be sure to review our
42+
[contribution guidelines](CONTRIBUTING.md)
43+
44+
### Issues and missing features
45+
If you have an issue, bug or feature request, please follow the information in our [contribution guidelines](CONTRIBUTING.md) to submit an issue.
46+
47+
### Example
48+
Here is a sample MonoBehaviour showing a chat script where everyone can write and read from. This shows the basis of the MLAPI and the abstractions it adds.
49+
50+
```csharp
51+
public class Chat : NetworkBehaviour
52+
{
53+
private NetworkList<string> ChatMessages = new NetworkList<string>(new MLAPI.NetworkVariable.NetworkVariableSettings()
54+
{
55+
ReadPermission = MLAPI.NetworkVariable.NetworkVariablePermission.Everyone,
56+
WritePermission = MLAPI.NetworkVariable.NetworkVariablePermission.Everyone,
57+
SendTickrate = 5
58+
}, new List<string>());
59+
60+
private string textField = "";
61+
62+
private void OnGUI()
63+
{
64+
if (IsClient)
65+
{
66+
textField = GUILayout.TextField(textField, GUILayout.Width(200));
67+
68+
if (GUILayout.Button("Send") && !string.IsNullOrWhiteSpace(textField))
69+
{
70+
ChatMessages.Add(textField);
71+
textField = "";
72+
}
73+
74+
for (int i = ChatMessages.Count - 1; i >= 0; i--)
75+
{
76+
GUILayout.Label(ChatMessages[i]);
77+
}
78+
}
79+
}
80+
}
81+
```
82+
83+
### License
84+
[MIT License](LICENSE)

com.unity.multiplayer.mlapi/CHANGELOG.md

Lines changed: 103 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,108 @@
11
# Changelog
2-
All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
2+
This file documents all notable changes to this package. Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com).
33

4-
## [0.1.0] - 2020-03-02
5-
This is the initial experimental Unity MLAPI Package.
6-
### Changed
7-
- Rather than performance / convenience RPCs, we now have one performant 'Standard' RPC type
8-
- RPCs are now deferred and queued to support upcoming features and improve bandwidth usage
9-
- A preliminary tick system has been added
10-
- Network variables are tick-based
4+
## [0.1.0] - 2021-03-23
5+
6+
This is the initial experimental Unity MLAPI Package, v0.1.0.
7+
8+
### New Features
9+
10+
- Refactored a new standard for Remote Procedure Call (RPC) in MLAPI which provides increased performance, significantly reduced boilerplate code, and extensibility for future-proofed code. MLAPI RPC includes `ServerRpc` and `ClientRpc` to execute logic on the server and client-side. This provides a single performant unified RPC solution, replacing MLAPI Convenience and Performance RPC (see [here](#removed-features)).
11+
- Added standarized serialization types, including built-in and custom serialization flows. See [RFC #2](https://github.com/Unity-Technologies/com.unity.multiplayer.rfcs/blob/master/text/0002-serializable-types.md) for details.
12+
- `INetworkSerializable` interface replaces `IBitWritable`.
13+
- Added `NetworkSerializer`..., which is the main aggregator that implements serialization code for built-in supported types and holds `NetworkReader` and `NetworkWriter` instances internally.
14+
- Added a Network Update Loop infrastructure that aids Netcode systems to update (such as RPC queue and transport) outside of the standard `MonoBehaviour` event cycle. See [RFC #8](https://github.com/Unity-Technologies/com.unity.multiplayer.rfcs/blob/master/text/0008-network-update-loop.md) and the following details:
15+
16+
- It uses Unity's [low-level Player Loop API](https://docs.unity3d.com/ScriptReference/LowLevel.PlayerLoop.html) and allows for registering `INetworkUpdateSystem`s with `NetworkUpdate` methods to be executed at specific `NetworkUpdateStage`s, which may also be before or after `MonoBehaviour`-driven game logic execution.
17+
- You will typically interact with `NetworkUpdateLoop` for registration and `INetworkUpdateSystem` for implementation.
18+
- `NetworkVariable`s are now tick-based using the `NetworkTickSystem`, tracking time through network interactions and syncs.
19+
20+
- Added message batching to handle consecutive RPC requests sent to the same client. `RpcBatcher` sends batches based on requests from the `RpcQueueProcessing`, by batch size threshold or immediately.
21+
- [GitHub 494](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/494): Added a constraint to allow one `NetworkObject` per `GameObject`, set through the `DisallowMultipleComponent` attribute.
22+
- Integrated MLAPI with the Unity Profiler for versions 2020.2 and later:
23+
24+
- Added new profiler modules for MLAPI that report important network data.
25+
- Attached the profiler to a remote player to view network data over the wire.
26+
27+
- A test project is available for building and experimenting with MLAPI features. This project is available in the MLAPI GitHub [testproject folder](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/tree/release/0.1.0/testproject).
28+
- Added a [MLAPI Community Contributions](https://github.com/Unity-Technologies/mlapi-community-contributions/tree/master/com.mlapi.contrib.extensions) new GitHub repository to accept extensions from the MLAPI community. Current extensions include moved MLAPI features for lag compensation (useful for Server Authoritative actions) and `TrackedObject`.
29+
30+
### Changes
31+
32+
- [GitHub 520](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/520): MLAPI now uses the Unity Package Manager for installation management.
33+
- Added functionality and usability to `NetworkVariable`, previously called `NetworkVar`. Updates enhance options and fully replace the need for `SyncedVar`s.
34+
- [GitHub 507](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/507): Reimplemented `NetworkAnimator`, which synchronizes animation states for networked objects.
35+
- GitHub [444](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/444) and [455](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/455): Channels are now represented as bytes instead of strings.
36+
37+
For users of previous versions of MLAPI, this release renames APIs due to refactoring. All obsolete marked APIs have been removed as per [GitHub 513](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/513) and [GitHub 514](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/514).
38+
39+
| Previous MLAPI Versions | V 0.1.0 Name |
40+
| -- | -- |
41+
| `NetworkingManager` | `NetworkManager` |
42+
| `NetworkedObject` | `NetworkObject` |
43+
| `NetworkedBehaviour` | `NetworkBehaviour` |
44+
| `NetworkedClient` | `NetworkClient` |
45+
| `NetworkedPrefab` | `NetworkPrefab` |
46+
| `NetworkedVar` | `NetworkVariable` |
47+
| `NetworkedTransform` | `NetworkTransform` |
48+
| `NetworkedAnimator` | `NetworkAnimator` |
49+
| `NetworkedAnimatorEditor` | `NetworkAnimatorEditor` |
50+
| `NetworkedNavMeshAgent` | `NetworkNavMeshAgent` |
51+
| `SpawnManager` | `NetworkSpawnManager` |
52+
| `BitStream` | `NetworkBuffer` |
53+
| `BitReader` | `NetworkReader` |
54+
| `BitWriter` | `NetworkWriter` |
55+
| `NetEventType` | `NetworkEventType` |
56+
| `ChannelType` | `NetworkDelivery` |
57+
| `Channel` | `NetworkChannel` |
58+
| `Transport` | `NetworkTransport` |
59+
| `NetworkedDictionary` | `NetworkDictionary` |
60+
| `NetworkedList` | `NetworkList` |
61+
| `NetworkedSet` | `NetworkSet` |
62+
| `MLAPIConstants` | `NetworkConstants` |
63+
| `UnetTransport` | `UNetTransport` |
64+
65+
### Fixes
66+
67+
- [GitHub 460](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/460): Fixed an issue for RPC where the host-server was not receiving RPCs from the host-client and vice versa without the loopback flag set in `NetworkingManager`.
68+
- Fixed an issue where data in the Profiler was incorrectly aggregated and drawn, which caused the profiler data to increment indefinitely instead of resetting each frame.
69+
- Fixed an issue the client soft-synced causing PlayMode client-only scene transition issues, caused when running the client in the editor and the host as a release build. Users may have encountered a soft sync of `NetworkedInstanceId` issues in the `SpawnManager.ClientCollectSoftSyncSceneObjectSweep` method.
70+
- [GitHub 458](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/458): Fixed serialization issues in `NetworkList` and `NetworkDictionary` when running in Server mode.
71+
- [GitHub 498](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/498): Fixed numerical precision issues to prevent not a number (NaN) quaternions.
72+
- [GitHub 438](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/438): Fixed booleans by reaching or writing bytes instead of bits.
73+
- [GitHub 519](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/519): Fixed an issue where calling `Shutdown()` before making `NetworkManager.Singleton = null` is null on `NetworkManager.OnDestroy()`.
74+
75+
### Removed features
76+
77+
With a new release of MLAPI in Unity, some features have been removed:
78+
79+
* SyncVars have been removed from MLAPI. Use `NetworkVariable`s in place of this functionality. <!-- MTT54 -->
80+
* [GitHub 527](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/527): Lag compensation systems and `TrackedObject` have moved to the new [MLAPI Community Contributions](https://github.com/Unity-Technologies/mlapi-community-contributions/tree/master/com.mlapi.contrib.extensions) repo.
81+
* [GitHub 509](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/509): Encryption has been removed from MLAPI. The `Encryption` option in `NetworkConfig` on the `NetworkingManager` is not available in this release. This change will not block game creation or running. A current replacement for this functionality is not available, and may be developed in future releases. See the following changes:
82+
83+
* Removed `SecuritySendFlags` from all APIs.
84+
* Removed encryption, cryptography, and certificate configurations from APIs including `NetworkManager` and `NetworkConfig`.
85+
* Removed "hail handshake", including `NetworkManager` implementation and `NetworkConstants` entries.
86+
* Modified `RpcQueue` and `RpcBatcher` internals to remove encryption and authentication from reading and writing.
87+
88+
* Removed the previous MLAPI Profiler editor window from Unity versions 2020.2 and later.
89+
* Removed previous MLAPI Convenience and Performance RPC APIs with the new standard RPC API. See [RFC #1](https://github.com/Unity-Technologies/com.unity.multiplayer.rfcs/blob/master/text/0001-std-rpc-api.md) for details.
90+
* [GitHub 520](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/pull/520): Removed the MLAPI Installer.
91+
92+
## Known issues
93+
94+
* `NetworkNavMeshAgent` does not synchronize mesh data, Agent Size, Steering, Obstacle Avoidance, or Path Finding settings. It only synchronizes the destination and velocity, not the path to the destination.
95+
* For `RPC`, methods with a `ClientRpc` or `ServerRpc` suffix which are not marked with [ServerRpc] or [ClientRpc] will cause a compiler error.
96+
* For `NetworkAnimator`, Animator Overrides are not supported. Triggers do not work.
97+
* For `NetworkVariable`, the `NetworkDictionary` `List` and `Set` must use the `reliableSequenced` channel.
98+
* `NetworkObjects`s are supported but when spawning a prefab with nested child network objects you have to manually call spawn on them
99+
* `NetworkTransform` have the following issues:
100+
* Replicated objects may have jitter.
101+
* The owner is always authoritative about the object's position.
102+
* Scale is not synchronized.
103+
* Connection Approval is not called on the host client.
104+
* For `NamedMessages`, always use `NetworkBuffer` as the underlying stream for sending named and unnamed messages.
105+
* For `NetworkManager`, connection management is limited. Use `IsServer`, `IsClient`, `IsConnectedClient`, or other code to check if MLAPI connected correctly.
11106

12107
## [0.0.1-preview.1] - 2020-12-20
13108
This was an internally-only-used version of the Unity MLAPI Package
14-

com.unity.multiplayer.mlapi/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 69 deletions
This file was deleted.

com.unity.multiplayer.mlapi/CODE_OF_CONDUCT.md.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)