-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## [2.2.2] - 2024-09-17 ### *Network Scene Visualization* - Fixed a bug where NetVis stopped working after the NetworkManager was destroyed and recreated. - Fixed an issue where NetVis only assigned colors to a limited subset of Network IDs. - Added custom color setting for host and client ownerships. The custom color settings are synchronized between Multiplayer Play Mode instances. ### *Runtime Network Stats Monitor* - Added support for entering Play Mode without Domain reload
- Loading branch information
Unity Technologies
committed
Sep 17, 2024
1 parent
3093f8f
commit ff124a2
Showing
24 changed files
with
435 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"timestamp":1727388076,"signature":"Jw1cdy6Ky4HbdLmPiF0Fx/DWyWZYP8Szu1alsvHfIf2DYfkwjh15HOeugyCQSdmGh1kwAQUAeBnEMHxeU+i9wrhnKr19LubMUNJeio5entJLoNQWXDx665DOoRp2WYPNlpD6Nuod7pibZTwnmZQ8MRrvjMrFQxrxKstDSRFlzmQ0fCq+Pnidz+sSf9WooPkb6QRuhctHshi4tSgzhQubmvXwJVh6bXszdoyM5zr5tvjx+q1GDDQm23W69QzxTM2XpER+RuBqVJk4g2IufNgk48ROXcqyKKEeuSThIyS4VrStfVdJL/ByjWusqpQp68V4+vwHEw9dp0CFbqD0n2cHRADffrlKJ2azno+NgfxCJXfezj4S2auOAp1mijHey3ngBoAUJ+vcGDXEU47fkLa0NLggBmY1gwlyurRiT1vtWIPfDbbfYE0dWRFz/RZ9sljxSDihs33iuSVT7U44Jgid7MhgxDrOuLqxdhXG8H65GhCVTb81Y55S3MsgWWkAcEoY","publicKey":"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQm9qQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FZOEFNSU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S0tLS0tCg"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
using System.Runtime.CompilerServices; | ||
|
||
// Test assemblies | ||
#if UNITY_INCLUDE_TESTS | ||
[assembly: InternalsVisibleTo("Unity.Multiplayer.Tools.Adapters.Tests.Editor")] | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Changelog | ||
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/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
## [2.2.3] - xxxx-yy-zz |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace Unity.Multiplayer.Tools.Common | ||
{ | ||
[Serializable] | ||
internal class SerializedDictionary<K, V> : SortedDictionary<K, V>, ISerializationCallbackReceiver | ||
{ | ||
[SerializeField] List<K> m_Keys = new List<K>(); | ||
[SerializeField] List<V> m_Values = new List<V>(); | ||
|
||
public SerializedDictionary() {} | ||
public SerializedDictionary(Comparer<K> comparer) : base(comparer) {} | ||
|
||
public void OnBeforeSerialize() | ||
{ | ||
m_Keys.Clear(); | ||
m_Values.Clear(); | ||
foreach (var kvp in this) | ||
{ | ||
m_Keys.Add(kvp.Key); | ||
m_Values.Add(kvp.Value); | ||
} | ||
} | ||
|
||
public void OnAfterDeserialize() | ||
{ | ||
this.Clear(); | ||
|
||
for (int i = 0; i < m_Keys.Count; i++) | ||
this[m_Keys[i]] = m_Values[i]; | ||
|
||
m_Keys.Clear(); | ||
m_Values.Clear(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#if UNITY_EDITOR | ||
using System; | ||
using System.IO; | ||
using UnityEditor; | ||
using UnityEngine; | ||
using UnityEngine.Assertions; | ||
|
||
namespace Unity.Multiplayer.Tools.Common | ||
{ | ||
// SyncedSingleton helps to synchronize data between Multiplayer Play mode instances through a file on the disk. | ||
// One Editor serializes the data to a file and the other Editors are notified about the file change | ||
// and will reload the data from that file. | ||
internal class SyncedSingleton<T> : ScriptableSingleton<T> where T : ScriptableObject | ||
{ | ||
private static bool s_NeedsRegeneration; | ||
public static event Action DataChanged; | ||
|
||
// If the file is updated and the editor is not in focus and entered play mode | ||
// before focus is regained (e.g. multiplayer play mode), then the regeneration | ||
// method --called through delayCall-- could be executed after play mode. | ||
// To avoid this, we reload it on entering play mode state change. It's redundant | ||
// but safer. | ||
private static void OnPlayModeStateChanged(PlayModeStateChange state) | ||
{ | ||
ReloadIfNeeded(); | ||
} | ||
|
||
static SyncedSingleton() | ||
{ | ||
EditorApplication.playModeStateChanged += OnPlayModeStateChanged; | ||
} | ||
|
||
private static void OnFileChanged(object source, FileSystemEventArgs e) | ||
{ | ||
s_NeedsRegeneration = true; | ||
((IDisposable)source).Dispose(); | ||
EditorApplication.delayCall += ReloadIfNeeded; | ||
} | ||
|
||
private static void ReloadIfNeeded() | ||
{ | ||
if (s_NeedsRegeneration) | ||
{ | ||
// By deleting the instance the Editor will reload the data from the file. | ||
DestroyImmediate(instance); | ||
s_NeedsRegeneration = false; | ||
DataChanged?.Invoke(); | ||
} | ||
} | ||
|
||
private FileSystemWatcher m_FileWatcher; | ||
|
||
protected void OnEnable() | ||
{ | ||
Assert.IsNull(m_FileWatcher); | ||
|
||
var directory = Path.GetDirectoryName(ScriptableSingleton<T>.GetFilePath()); | ||
|
||
if (!Directory.Exists(directory)) | ||
Directory.CreateDirectory(directory); | ||
|
||
m_FileWatcher = new FileSystemWatcher(); | ||
m_FileWatcher.Path = directory; | ||
m_FileWatcher.Changed += OnFileChanged; | ||
m_FileWatcher.Created += OnFileChanged; | ||
m_FileWatcher.EnableRaisingEvents = true; | ||
} | ||
} | ||
} | ||
#endif |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.