diff --git a/Assets/Mirage/Components/BaseVisibilityInspector.cs b/Assets/Mirage/Components/BaseVisibilityInspector.cs new file mode 100644 index 00000000000..f76139cfdac --- /dev/null +++ b/Assets/Mirage/Components/BaseVisibilityInspector.cs @@ -0,0 +1,46 @@ +using Mirage.InterestManagement; +using UnityEngine; + +namespace Mirage.Components +{ + public abstract class BaseVisibilityInspector : MonoBehaviour + { + #region Fields + + private protected ServerObjectManager ServerObjectManager; + private protected INetworkVisibility NetworkVisibility; + + #endregion + + #region Mirage Callbacks + + private void OnServerStarted() + { + NetworkVisibility?.Startup(); + } + + private void OnServerStopped() + { + NetworkVisibility?.ShutDown(); + } + + #endregion + + #region Unity Methods + + protected virtual void Awake() + { + ServerObjectManager ??= FindObjectOfType(); + + ServerObjectManager.Server.Started.AddListener(OnServerStarted); + ServerObjectManager.Server.Stopped.AddListener(OnServerStopped); + } + + private void Destroy() + { + NetworkVisibility = null; + } + + #endregion + } +} diff --git a/Assets/Mirage/Components/NetworkSceneChecker.cs.meta b/Assets/Mirage/Components/BaseVisibilityInspector.cs.meta similarity index 86% rename from Assets/Mirage/Components/NetworkSceneChecker.cs.meta rename to Assets/Mirage/Components/BaseVisibilityInspector.cs.meta index b451655a379..c1227103bd2 100644 --- a/Assets/Mirage/Components/NetworkSceneChecker.cs.meta +++ b/Assets/Mirage/Components/BaseVisibilityInspector.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b7fdb599e1359924bad6255660370252 +guid: 04904a9cc716fb64987d604b75a94b77 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Mirage/Components/NetworkMatchChecker.cs b/Assets/Mirage/Components/NetworkMatchChecker.cs deleted file mode 100644 index fa6865da805..00000000000 --- a/Assets/Mirage/Components/NetworkMatchChecker.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace Mirage -{ - /// - /// Component that controls visibility of networked objects based on match id. - /// Any object with this component on it will only be visible to other objects in the same match. - /// This would be used to isolate players to their respective matches within a single game server instance. - /// - [DisallowMultipleComponent] - [AddComponentMenu("Network/NetworkMatchChecker")] - [RequireComponent(typeof(NetworkIdentity))] - [HelpURL("https://mirror-networking.com/docs/Components/NetworkMatchChecker.html")] - public class NetworkMatchChecker : NetworkVisibility - { - static readonly Dictionary> matchPlayers = new Dictionary>(); - - Guid currentMatch = Guid.Empty; - - [Header("Diagnostics")] - [SyncVar] - public string currentMatchDebug; - - /// - /// Set this to the same value on all networked objects that belong to a given match - /// - public Guid MatchId - { - get { return currentMatch; } - set - { - if (currentMatch == value) return; - - // cache previous match so observers in that match can be rebuilt - Guid previousMatch = currentMatch; - - // Set this to the new match this object just entered ... - currentMatch = value; - // ... and copy the string for the inspector because Unity can't show Guid directly - currentMatchDebug = currentMatch.ToString(); - - if (previousMatch != Guid.Empty) - { - // Remove this object from the hashset of the match it just left - matchPlayers[previousMatch].Remove(Identity); - - // RebuildObservers of all NetworkIdentity's in the match this object just left - RebuildMatchObservers(previousMatch); - } - - if (currentMatch != Guid.Empty) - { - // Make sure this new match is in the dictionary - if (!matchPlayers.ContainsKey(currentMatch)) - matchPlayers.Add(currentMatch, new HashSet()); - - // Add this object to the hashset of the new match - matchPlayers[currentMatch].Add(Identity); - - // RebuildObservers of all NetworkIdentity's in the match this object just entered - RebuildMatchObservers(currentMatch); - } - else - { - // Not in any match now...RebuildObservers will clear and add self - Identity.RebuildObservers(false); - } - } - } - - public void Awake() - { - Identity.OnStartServer.AddListener(OnStartServer); - } - - public void OnStartServer() - { - if (currentMatch == Guid.Empty) return; - - if (!matchPlayers.ContainsKey(currentMatch)) - matchPlayers.Add(currentMatch, new HashSet()); - - matchPlayers[currentMatch].Add(Identity); - - // No need to rebuild anything here. - // identity.RebuildObservers is called right after this from NetworkServer.SpawnObject - } - - void RebuildMatchObservers(Guid specificMatch) - { - foreach (NetworkIdentity networkIdentity in matchPlayers[specificMatch]) - if (networkIdentity != null) - networkIdentity.RebuildObservers(false); - } - - #region Observers - - /// - /// Callback used by the visibility system to determine if an observer (player) can see this object. - /// If this function returns true, the network connection will be added as an observer. - /// - /// Network connection of a player. - /// True if the player can see this object. - public override bool OnCheckObserver(INetworkPlayer player) - { - // Not Visible if not in a match - if (MatchId == Guid.Empty) - return false; - - NetworkMatchChecker networkMatchChecker = player.Identity.GetComponent(); - - if (networkMatchChecker == null) - return false; - - return networkMatchChecker.MatchId == MatchId; - } - - /// - /// Callback used by the visibility system to (re)construct the set of observers that can see this object. - /// Implementations of this callback should add network connections of players that can see this object to the observers set. - /// - /// The new set of observers for this object. - /// True if the set of observers is being built for the first time. - public override void OnRebuildObservers(HashSet observers, bool initialize) - { - if (currentMatch == Guid.Empty) return; - - foreach (NetworkIdentity networkIdentity in matchPlayers[currentMatch]) - if (networkIdentity != null && networkIdentity.Owner != null) - observers.Add(networkIdentity.Owner); - } - - #endregion - } -} diff --git a/Assets/Mirage/Components/NetworkMatchChecker.cs.meta b/Assets/Mirage/Components/NetworkMatchChecker.cs.meta deleted file mode 100644 index 7c7d6cfc4f2..00000000000 --- a/Assets/Mirage/Components/NetworkMatchChecker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1020a74962faada4b807ac5dc053a4cf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Mirage/Components/NetworkProximityChecker.cs b/Assets/Mirage/Components/NetworkProximityChecker.cs deleted file mode 100644 index 972beb3d3e0..00000000000 --- a/Assets/Mirage/Components/NetworkProximityChecker.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System.Collections.Generic; -using Mirage.Logging; -using UnityEngine; - -namespace Mirage -{ - /// - /// Component that controls visibility of networked objects for players. - /// Any object with this component on it will not be visible to players more than a (configurable) distance away. - /// - [AddComponentMenu("Network/NetworkProximityChecker")] - [RequireComponent(typeof(NetworkIdentity))] - [HelpURL("https://mirror-networking.com/docs/Components/NetworkProximityChecker.html")] - public class NetworkProximityChecker : NetworkVisibility - { - static readonly ILogger logger = LogFactory.GetLogger(typeof(NetworkProximityChecker)); - - /// - /// The maximim range that objects will be visible at. - /// - [Tooltip("The maximum range that objects will be visible at.")] - public int VisibilityRange = 10; - - /// - /// How often (in seconds) that this object should update the list of observers that can see it. - /// - [Tooltip("How often (in seconds) that this object should update the list of observers that can see it.")] - public float VisibilityUpdateInterval = 1; - - /// - /// Flag to force this object to be hidden for players. - /// If this object is a player object, it will not be hidden for that player. - /// - [Tooltip("Enable to force this object to be hidden from players.")] - public bool ForceHidden; - - public void Awake() - { - Identity.OnStartServer.AddListener(() => - { - InvokeRepeating(nameof(RebuildObservers), 0, VisibilityUpdateInterval); - }); - - Identity.OnStopServer.AddListener(() => - { - CancelInvoke(nameof(RebuildObservers)); - }); - } - - void RebuildObservers() - { - Identity.RebuildObservers(false); - } - - /// - /// Callback used by the visibility system to determine if an observer (player) can see this object. - /// If this function returns true, the network connection will be added as an observer. - /// - - /// Network connection of a player. - /// True if the player can see this object. - public override bool OnCheckObserver(INetworkPlayer player) - { - if (ForceHidden) - return false; - - return Vector3.Distance(player.Identity.transform.position, transform.position) < VisibilityRange; - } - - /// - /// Callback used by the visibility system to (re)construct the set of observers that can see this object. - /// Implementations of this callback should add network connections of players that can see this object to the observers set. - /// - /// The new set of observers for this object. - /// True if the set of observers is being built for the first time. - public override void OnRebuildObservers(HashSet observers, bool initialize) - { - // if force hidden then return without adding any observers. - if (ForceHidden) - return; - - // 'transform.' calls GetComponent, only do it once - Vector3 position = transform.position; - - // brute force distance check - // -> only player connections can be observers, so it's enough if we - // go through all connections instead of all spawned identities. - // -> compared to UNET's sphere cast checking, this one is orders of - // magnitude faster. if we have 10k monsters and run a sphere - // cast 10k times, we will see a noticeable lag even with physics - // layers. but checking to every connection is fast. - foreach (INetworkPlayer player in Server.Players) - { - // check distance - if (player != null && player.HasCharacter && Vector3.Distance(player.Identity.transform.position, position) < VisibilityRange) - { - observers.Add(player); - } - } - } - } -} diff --git a/Assets/Mirage/Components/NetworkProximityChecker.cs.meta b/Assets/Mirage/Components/NetworkProximityChecker.cs.meta deleted file mode 100644 index c5aa1123365..00000000000 --- a/Assets/Mirage/Components/NetworkProximityChecker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1731d8de2d0c84333b08ebe1e79f4118 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Mirage/Components/NetworkSceneChecker.cs b/Assets/Mirage/Components/NetworkSceneChecker.cs deleted file mode 100644 index 6289dd66de6..00000000000 --- a/Assets/Mirage/Components/NetworkSceneChecker.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System.Collections.Generic; -using Mirage.Logging; -using UnityEngine; -using UnityEngine.SceneManagement; - -namespace Mirage -{ - /// - /// Component that controls visibility of networked objects between scenes. - /// Any object with this component on it will only be visible to other objects in the same scene - /// This would be used when the server has multiple additive subscenes loaded to isolate players to their respective subscenes - /// - [DisallowMultipleComponent] - [AddComponentMenu("Network/NetworkSceneChecker")] - [RequireComponent(typeof(NetworkIdentity))] - [HelpURL("https://mirror-networking.com/docs/Components/NetworkSceneChecker.html")] - public class NetworkSceneChecker : NetworkVisibility - { - static readonly ILogger logger = LogFactory.GetLogger(typeof(NetworkSceneChecker)); - - /// - /// Flag to force this object to be hidden from all observers. - /// If this object is a player object, it will not be hidden for that client. - /// - [Tooltip("Enable to force this object to be hidden from all observers.")] - public bool forceHidden; - - // Use Scene instead of string scene.name because when additively loading multiples of a subscene the name won't be unique - static readonly Dictionary> sceneCheckerObjects = new Dictionary>(); - - Scene currentScene; - - void Awake() - { - Identity.OnStartServer.AddListener(OnStartServer); - } - - public void OnStartServer() - { - currentScene = gameObject.scene; - if (logger.LogEnabled()) logger.Log($"NetworkSceneChecker.OnStartServer currentScene: {currentScene}"); - - if (!sceneCheckerObjects.ContainsKey(currentScene)) - sceneCheckerObjects.Add(currentScene, new HashSet()); - - sceneCheckerObjects[currentScene].Add(Identity); - } - - [Server(error = false)] - void Update() - { - if (currentScene == gameObject.scene) - return; - - // This object is in a new scene so observers in the prior scene - // and the new scene need to rebuild their respective observers lists. - - // Remove this object from the hashset of the scene it just left - sceneCheckerObjects[currentScene].Remove(Identity); - - // RebuildObservers of all NetworkIdentity's in the scene this object just left - RebuildSceneObservers(); - - // Set this to the new scene this object just entered - currentScene = gameObject.scene; - - // Make sure this new scene is in the dictionary - if (!sceneCheckerObjects.ContainsKey(currentScene)) - sceneCheckerObjects.Add(currentScene, new HashSet()); - - // Add this object to the hashset of the new scene - sceneCheckerObjects[currentScene].Add(Identity); - - // RebuildObservers of all NetworkIdentity's in the scene this object just entered - RebuildSceneObservers(); - } - - void RebuildSceneObservers() - { - foreach (NetworkIdentity networkIdentity in sceneCheckerObjects[currentScene]) - if (networkIdentity != null) - networkIdentity.RebuildObservers(false); - } - - /// - /// Callback used by the visibility system to determine if an observer (player) can see this object. - /// If this function returns true, the network connection will be added as an observer. - /// - /// Network connection of a player. - /// True if the player can see this object. - public override bool OnCheckObserver(INetworkPlayer player) - { - if (forceHidden) - return false; - - return player.Identity.gameObject.scene == gameObject.scene; - } - - /// - /// Callback used by the visibility system to (re)construct the set of observers that can see this object. - /// Implementations of this callback should add network connections of players that can see this object to the observers set. - /// - /// The new set of observers for this object. - /// True if the set of observers is being built for the first time. - public override void OnRebuildObservers(HashSet observers, bool initialize) - { - // If forceHidden then return without adding any observers. - if (forceHidden) - return; - - // Add everything in the hashset for this object's current scene - foreach (NetworkIdentity networkIdentity in sceneCheckerObjects[currentScene]) - if (networkIdentity != null && networkIdentity.Owner != null) - observers.Add(networkIdentity.Owner); - } - } -} diff --git a/Assets/Mirage/Samples~/InterestManagement/Models.meta b/Assets/Mirage/Components/VisibilitySystems.meta similarity index 77% rename from Assets/Mirage/Samples~/InterestManagement/Models.meta rename to Assets/Mirage/Components/VisibilitySystems.meta index 375679e3e93..6c165a8aec3 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Models.meta +++ b/Assets/Mirage/Components/VisibilitySystems.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5e67935e89cc54b6bb1527c1b26bdc5e +guid: 3e15583cdf606a5418ff91722cfa8f6c folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Mirage/Components/VisibilitySystems/DistanceChecker.meta b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker.meta new file mode 100644 index 00000000000..a2d4f3d3583 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb85744be6513ba48ace55a480312020 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibility.cs b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibility.cs new file mode 100644 index 00000000000..1acf572b6a8 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibility.cs @@ -0,0 +1,157 @@ +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Mirage.InterestManagement; +using UnityEngine; + +namespace Mirage.Components +{ + /// + /// Brute force distance check on all objects, all players have same sight distance + /// + public class DistanceConstantSightVisibility : NetworkVisibility + { + private class NetIdComparer : IEqualityComparer + { + public bool Equals(NetworkIdentity x, NetworkIdentity y) + { + return x.NetId == y.NetId; + } + + public int GetHashCode(NetworkIdentity obj) + { + return (int)obj.NetId; + } + } + + private readonly float _sightDistnace = 10; + private readonly float _updateInterval = 0; + private float _nextUpdate = 0; + + private readonly Dictionary> _lastFrame = new Dictionary>(); + + public DistanceConstantSightVisibility(ServerObjectManager serverObjectManager, float sightDistance, float updateInterval) : base(serverObjectManager) + { + _sightDistnace = sightDistance; + _updateInterval = updateInterval; + } + + private void Rebuild() + { + foreach (NetworkIdentity identity in InterestManager.ServerObjectManager.Server.World.SpawnedIdentities) + { + foreach (INetworkPlayer player in VisibilitySystemData.Keys) + { + if (!VisibilitySystemData.TryGetValue(player, out HashSet nextSet)) + { + nextSet = new HashSet(new NetIdComparer()); + VisibilitySystemData[player] = nextSet; + } + + nextSet.Add(identity); + } + } + + foreach (INetworkPlayer player in InterestManager.ServerObjectManager.Server.Players) + { + if (!_lastFrame.TryGetValue(player, out HashSet lastSet)) + { + lastSet = new HashSet(new NetIdComparer()); + _lastFrame[player] = lastSet; + } + + if (!VisibilitySystemData.TryGetValue(player, out HashSet nextSet)) + { + nextSet = new HashSet(new NetIdComparer()); + VisibilitySystemData[player] = nextSet; + } + + + foreach (NetworkIdentity identity in lastSet) + { + if (!nextSet.Contains(identity)) + { + InterestManager.ServerObjectManager.HideToPlayer(identity, player); + } + } + + foreach (NetworkIdentity identity in nextSet) + { + if (!lastSet.Contains(identity)) + { + InterestManager.ServerObjectManager.ShowToPlayer(identity, player); + } + } + + // reset collections + lastSet.Clear(); + foreach (NetworkIdentity identity in nextSet) + { + lastSet.Add(identity); + } + + nextSet.Clear(); + } + } + + List temp = new List(); + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + static bool fastInDistanceXZ(Vector3 a, Vector3 b, float sqRange) + { + float dx = a.x - b.x; + float dz = a.z - b.z; + float sqDist = dx * dx + dz * dz; + return sqDist < sqRange; + } + + public override void CheckForObservers() + { + if (!(_nextUpdate < Time.time)) return; + + Rebuild(); + _nextUpdate += _updateInterval; + } + + + public override void OnAuthenticated(INetworkPlayer player) + { + // no owned object, nothing to see + if (player.Identity == null) { return; } + + Vector3 b = player.Identity.transform.position; + float sqRange = _sightDistnace * _sightDistnace; + + foreach (NetworkIdentity identity in InterestManager.ServerObjectManager.Server.World.SpawnedIdentities) + { + Vector3 a = identity.transform.position; + + if (fastInDistanceXZ(a, b, sqRange)) + { + InterestManager.ServerObjectManager.ShowToPlayer(identity, player); + } + } + } + + public override void OnSpawned(NetworkIdentity identity) + { + // does object have owner? + if (identity.Owner != null) + { + OnAuthenticated(identity.Owner); + } + + Vector3 a = identity.transform.position; + float sqRange = _sightDistnace * _sightDistnace; + + foreach (INetworkPlayer player in InterestManager.ServerObjectManager.Server.Players) + { + Vector3 b = player.Identity.transform.position; + + if (fastInDistanceXZ(a, b, sqRange)) + { + InterestManager.ServerObjectManager.ShowToPlayer(identity, player); + } + } + } + } +} diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/Tank.cs.meta b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibility.cs.meta similarity index 83% rename from Assets/Mirage/Samples~/InterestManagement/Scripts/Tank.cs.meta rename to Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibility.cs.meta index 3fbfacafd86..9c1e1c1dc13 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Scripts/Tank.cs.meta +++ b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibility.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c0ce312394e7e461eb9a5d909c0e61f6 +guid: 5b3c392394f797745a4530d8bc39a593 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibilityInspector.cs b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibilityInspector.cs new file mode 100644 index 00000000000..def67dbe669 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibilityInspector.cs @@ -0,0 +1,15 @@ +using UnityEngine; + +namespace Mirage.Components +{ + public class DistanceConstantSightVisibilityInspector : BaseVisibilityInspector + { + [SerializeField] private float _sightDistnace = 10; + [SerializeField] private float _updateInterval = 0; + + protected override void Awake() + { + NetworkVisibility = new DistanceConstantSightVisibility(ServerObjectManager, _sightDistnace, _updateInterval); + } + } +} diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/Wander.cs.meta b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibilityInspector.cs.meta similarity index 83% rename from Assets/Mirage/Samples~/InterestManagement/Scripts/Wander.cs.meta rename to Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibilityInspector.cs.meta index 571a08a0cdc..ad87d555d91 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Scripts/Wander.cs.meta +++ b/Assets/Mirage/Components/VisibilitySystems/DistanceChecker/DistanceConstantSightVisibilityInspector.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 281fbc0bc49fb42e4829bc47c8475efd +guid: 7eff4bb6c1875354aa52023239a3b3b6 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem.meta new file mode 100644 index 00000000000..fc30f584c86 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab5206f87fb57cb4c8b120ae5b30db6d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeInterestChecker.cs b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeInterestChecker.cs new file mode 100644 index 00000000000..0b5e4088ffe --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeInterestChecker.cs @@ -0,0 +1,107 @@ +using System; +using Mirage.Logging; +using UnityEngine; + +namespace Mirage.Components +{ + public class OctreeInterestChecker : NetworkBehaviour + { + #region Fields + + static readonly ILogger logger = LogFactory.GetLogger(typeof(OctreeInterestChecker)); + + /// + /// The real player visibility range to process incoming or outgoing data + /// to all player's using this visibility range. + /// + [SyncVar, NonSerialized] protected float CurrentPlayerVisibilityRange; + + [Header("Interest Management Settings")] + [SerializeField, Tooltip("Intended for server to check against hackers.")] private float _minimumVisibilityRange = 1; + [SerializeField, Tooltip("Intended for server to check against hackers.")] private float _maximumVisibilityRange = 10; + [SerializeField, Tooltip("The distance we should wait before making updates"), Range(0.1f, 1f)] private float _distanceUpdateCheck = 0.1f; + [SerializeField, Tooltip("The number of frames we should wait to update also."), Range(10, 1000)] private int _frameUpdateCycle = 100; + + private OctreeVisibilityInspector _octreeVisibilityInspector; + + private Vector3 _colliderSize; + protected internal Bounds CurrentBounds; + private Vector3 _currentPosition; + private Transform _currentTransform; + private float _updateTimer; + + #endregion + + #region Unity Methods + + private void Awake() + { + Identity.OnStartServer.AddListener(OnStartServer); + } + + private void OnStartServer() + { + _octreeVisibilityInspector ??= FindObjectOfType(); + + _colliderSize = GetComponent().bounds.size; + _currentTransform = GetComponent(); + + CurrentPlayerVisibilityRange = Mathf.Max(_minimumVisibilityRange, _maximumVisibilityRange); + } + + private void Update() + { + //if (!IsServer || Identity is null) return; + + if (_updateTimer >= _frameUpdateCycle && Vector3.Distance(_currentPosition, _currentTransform.position) > _distanceUpdateCheck) + { + _updateTimer = 0; + + _octreeVisibilityInspector.OctreeVisibility.Octree.Remove(Identity); + + CurrentBounds = new Bounds(_currentTransform.position, _colliderSize * CurrentPlayerVisibilityRange); + + _octreeVisibilityInspector.OctreeVisibility.Octree.Add(Identity, CurrentBounds); + + _currentPosition = _currentTransform.position; + } + + _updateTimer += Time.deltaTime * 60; + } + + #endregion + + #region Class Specific + + /// + /// Allow end users to change there visibility range for powerful computers. + /// Make it fair tho between powerful and low end users or advantages make occur. + /// + /// + [Server] + public void CmdChangeVisibilityRange(float visibilityRange) + { + // Ignore this change someone tried to hack or error + // in code trying to set higher then maximum visibility range. + if (visibilityRange > _maximumVisibilityRange) + { + if (logger.logEnabled) + logger.LogWarning("Attempt to change visibility range to outside of maximum range set."); + + return; + } + + if (visibilityRange < _minimumVisibilityRange) + { + if (logger.logEnabled) + logger.LogWarning("Attempt to change visibility range to outside of minimum range set."); + + return; + } + + CurrentPlayerVisibilityRange = visibilityRange; + } + + #endregion + } +} diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/Spawner.cs.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeInterestChecker.cs.meta similarity index 83% rename from Assets/Mirage/Samples~/InterestManagement/Scripts/Spawner.cs.meta rename to Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeInterestChecker.cs.meta index 857c1fba9bf..64e5e159616 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Scripts/Spawner.cs.meta +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeInterestChecker.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a166da186771b475ead457d93b2bd81f +guid: 2e2377ca89246784b8255a2def197ad5 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibility.cs b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibility.cs new file mode 100644 index 00000000000..9da31bc2faa --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibility.cs @@ -0,0 +1,113 @@ +using System.Collections.Generic; +using Mirage.InterestManagement; +using UnityEngine; + +namespace Mirage.Components +{ + public class OctreeVisibility : NetworkVisibility + { + #region Fields + + internal BoundsOctree Octree; + private readonly HashSet _octreeObjectsShow = new HashSet(); + + private readonly Dictionary _spawnedPlayers = + new Dictionary(); + + #endregion + + #region Overrides of NetworkVisibility + + public OctreeVisibility(ServerObjectManager interestManager, float initialWorldSize, Vector3 position, + float minimumNodeSize, float looseness) : base(interestManager) + { + Octree = new BoundsOctree(initialWorldSize, position, minimumNodeSize, looseness); + } + + /// + /// Invoked when a player joins the server + /// It should show all objects relevant to that player + /// + /// + public override void OnAuthenticated(INetworkPlayer player) + { + //NOOP + } + + /// + /// Invoked when an object is spawned in the server + /// It should show that object to all relevant players + /// + /// The object just spawned + public override void OnSpawned(NetworkIdentity identity) + { + identity.TryGetComponent(out OctreeInterestChecker colliderComponent); + + // Let's add player to our list to ilerate over later in update. + if (identity.Owner != null && !_spawnedPlayers.ContainsKey(identity.Owner)) + _spawnedPlayers.Add(identity.Owner, colliderComponent); + + if (colliderComponent is null) + { + return; + } + + Octree.Add(identity, + new Bounds(identity.transform.position, colliderComponent.CurrentBounds.size)); + + foreach (INetworkPlayer player in InterestManager.ServerObjectManager.Server.Players) + { + if (!VisibilitySystemData.ContainsKey(player)) + VisibilitySystemData.Add(player, new HashSet()); + else if (VisibilitySystemData.ContainsKey(player) && !VisibilitySystemData[player].Contains(identity)) + VisibilitySystemData[player].Add(identity); + + if (!Octree.IsColliding(colliderComponent.CurrentBounds, player.Identity) && + player.Identity != identity) continue; + + InterestManager.ServerObjectManager.ShowToPlayer(identity, player); + } + } + + /// + /// Find out all the players that can see an object + /// + /// + public override void CheckForObservers() + { + if (InterestManager == null || !InterestManager.ServerObjectManager.Server.Active) return; + + foreach (KeyValuePair player in _spawnedPlayers) + { + _octreeObjectsShow.Clear(); + + Octree.GetColliding(_octreeObjectsShow, player.Value.CurrentBounds); + + VisibilitySystemData.TryGetValue(player.Key, out HashSet spawnedIdentities); + + if (spawnedIdentities != null) + { + foreach (NetworkIdentity identity in spawnedIdentities) + { + if (identity == player.Key.Identity) continue; + + InterestManager.ServerObjectManager.HideToPlayer(identity, player.Key); + } + } + + VisibilitySystemData[player.Key].Clear(); + + // We need to check against our current populated list to make sure + foreach (NetworkIdentity identity in _octreeObjectsShow) + { + + InterestManager.ServerObjectManager.ShowToPlayer(identity, player.Key); + + VisibilitySystemData[player.Key].Add(identity); + } + } + } + + #endregion + } +} diff --git a/Assets/Tests/Runtime/NetworkMatchCheckerTest.cs.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibility.cs.meta similarity index 83% rename from Assets/Tests/Runtime/NetworkMatchCheckerTest.cs.meta rename to Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibility.cs.meta index b3c51cf813f..d2ba4daea74 100644 --- a/Assets/Tests/Runtime/NetworkMatchCheckerTest.cs.meta +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibility.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2fa0a455ab9b4cf47b9eab0f2b03ce0c +guid: 30d08f3b0a3a9034691d40c5cd3cc818 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibilityInspector.cs b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibilityInspector.cs new file mode 100644 index 00000000000..85c53d6b0c7 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibilityInspector.cs @@ -0,0 +1,57 @@ +using UnityEngine; + +namespace Mirage.Components +{ + public class OctreeVisibilityInspector : BaseVisibilityInspector + { + #region Fields + + [Header("Network Interest Manager Settings")] + [SerializeField, Tooltip("World size for main bounding box.")] + private float _initialWorldSize = 1000; + + [SerializeField, Tooltip("Minimum size of each node. Will grow and shrink on its own.")] + private float _minimumNodeSize = 1; + + /// + /// Loose: The octree's nodes can be larger than 1/2 their parent's length and width, so they overlap to some extent. + /// This can alleviate the problem of even tiny objects ending up in large nodes if they're near boundaries. + /// A looseness value of 1.0 will make it a "normal" octree. + /// + [Range(1, 2)] + [SerializeField, + Tooltip("Normal quad tree will be used if 1.0f set, Anything higher will become loose quad tree.")] + private float _looseness = 1.25f; + + [Header("Debug Settings.")] + [SerializeField] + private bool _visualDebug = false; + + public OctreeVisibility OctreeVisibility; + + #endregion + + #region Unity Methods + + protected override void Awake() + { + base.Awake(); + + NetworkVisibility = OctreeVisibility = new OctreeVisibility(ServerObjectManager, _initialWorldSize, + transform.position, _minimumNodeSize, _looseness); + } + + private void OnDrawGizmos() + { + if (!Application.isPlaying || !_visualDebug) return; + +#if UNITY_EDITOR + OctreeVisibility?.Octree.DrawAllBounds(); + OctreeVisibility?.Octree.DrawAllObjects(); + OctreeVisibility?.Octree.DrawCollisionChecks(); +#endif + } + + #endregion + } +} diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibilityInspector.cs.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibilityInspector.cs.meta new file mode 100644 index 00000000000..99ddda9f144 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/OctreeVisibilityInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b7faf9bec5b689f429ad6fb4f08a3205 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree.meta new file mode 100644 index 00000000000..c18cdec38c5 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 42a33c01da22c8c408a33524b68e5dd9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctree.cs b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctree.cs new file mode 100644 index 00000000000..4d78a59d262 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctree.cs @@ -0,0 +1,357 @@ +using System.Collections.Generic; +using UnityEngine; + +// A Dynamic, Loose Octree for storing any objects that can be described with AABB bounds +// See also: PointOctree, where objects are stored as single points and some code can be simplified +// Octree: An octree is a tree data structure which divides 3D space into smaller partitions (nodes) +// and places objects into the appropriate nodes. This allows fast access to objects +// in an area of interest without having to check every object. +// Dynamic: The octree grows or shrinks as required when objects as added or removed +// It also splits and merges nodes as appropriate. There is no maximum depth. +// Nodes have a constant - numObjectsAllowed - which sets the amount of items allowed in a node before it splits. +// Loose: The octree's nodes can be larger than 1/2 their parent's length and width, so they overlap to some extent. +// This can alleviate the problem of even tiny objects ending up in large nodes if they're near boundaries. +// A looseness value of 1.0 will make it a "normal" octree. +// T: The content of the octree can be anything, since the bounds data is supplied separately. + +// Originally written for my game Scraps (http://www.scrapsgame.com) but intended to be general-purpose. +// Copyright 2014 Nition, BSD licence (see LICENCE file). http://nition.co +// Unity-based, but could be adapted to work in pure C# + +namespace Mirage.Components +{ + public struct BoundsOctree + { + // The total amount of objects currently in the tree + public int Count { get; private set; } + + // Root node of the octree + private BoundsOctreeNode _rootNode; + + // Should be a value between 1 and 2. A multiplier for the base size of a node. + // 1.0 is a "normal" octree, while values > 1 have overlap + private readonly float _looseness; + + // Size that the octree was on creation + private readonly float _initialSize; + + // Minimum side length that a node can be - essentially an alternative to having a max depth + private readonly float _minSize; + + // For collision visualisation. Automatically removed in builds. +#if UNITY_EDITOR + + private const int NumCollisionsToSave = 4; + private readonly Queue _lastBoundsCollisionChecks; + private readonly Queue _lastRayCollisionChecks; + +#endif + + /// + /// Constructor for the bounds octree. + /// + /// Size of the sides of the initial node, in metres. The octree will never shrink smaller than this. + /// Position of the centre of the initial node. + /// Nodes will stop splitting if the new nodes would be smaller than this (metres). + /// Clamped between 1 and 2. Values > 1 let nodes overlap. + public BoundsOctree(float initialWorldSize, Vector3 initialWorldPos, float minNodeSize, float loosenessVal) + { + if (minNodeSize > initialWorldSize) + { + Debug.LogWarning("Minimum node size must be at least as big as the initial world size. Was: " + + minNodeSize + " Adjusted to: " + initialWorldSize); + minNodeSize = initialWorldSize; + } + + Count = 0; + _initialSize = initialWorldSize; + _minSize = minNodeSize; + _looseness = Mathf.Clamp(loosenessVal, 1.0f, 2.0f); + _rootNode = new BoundsOctreeNode(_initialSize, _minSize, loosenessVal, initialWorldPos); + +#if UNITY_EDITOR + _lastRayCollisionChecks = new Queue(); + _lastBoundsCollisionChecks = new Queue(); +#endif + } + + /// + /// Add an object. + /// + /// Object to add. + /// 3D bounding box around the object. + public void Add(T obj, Bounds objBounds) + { + // Add object or expand the octree until it can be added + int count = 0; // Safety check against infinite/excessive growth + + if (!_rootNode.Add(obj, objBounds)) + { + Grow(objBounds.center - _rootNode.Center); + + if (++count > 20) + { + Debug.LogError("Aborted Add operation as it seemed to be going on forever (" + (count - 1) + + ") attempts at growing the octree."); + return; + } + } + + Count++; + } + + /// + /// Remove an object. Makes the assumption that the object only exists once in the tree. + /// + /// Object to remove. + /// True if the object was removed successfully. + public bool Remove(T obj) + { + bool removed = _rootNode.Remove(obj); + + // See if we can shrink the octree down now that we've removed the item + if (!removed) + { + return false; + } + + Count--; + + Shrink(); + + return true; + } + + /// + /// Check if the specified bounds intersect with anything in the tree. See also: GetColliding. + /// + /// bounds to check. + /// True if there was a collision. + public bool IsColliding(Bounds checkBounds) + { +#if UNITY_EDITOR + AddCollisionCheck(checkBounds); +#endif + return _rootNode.IsColliding(ref checkBounds); + } + + /// + /// Check if the specified bounds intersect with specific type. + /// + /// bounds to check. + /// The specific type we want to check against. + /// True if there was a collision. + /// + public bool IsColliding(Bounds checkBounds, T obj) + { +#if UNITY_EDITOR + AddCollisionCheck(checkBounds); +#endif + return _rootNode.IsColliding(ref checkBounds, ref obj); + } + + /// + /// Check if the specified ray intersects with anything in the tree. See also: GetColliding. + /// + /// ray to check. + /// distance to check. + /// True if there was a collision. + public bool IsColliding(Ray checkRay, float maxDistance) + { +#if UNITY_EDITOR + AddCollisionCheck(checkRay); +#endif + return _rootNode.IsColliding(ref checkRay, maxDistance); + } + + /// + /// Returns an array of objects that intersect with the specified bounds, if any. Otherwise returns an empty array. See also: IsColliding. + /// + /// list to store intersections. + /// bounds to check. + /// Objects that intersect with the specified bounds. + public void GetColliding(HashSet collidingWith, Bounds checkBounds) + { +#if UNITY_EDITOR + AddCollisionCheck(checkBounds); +#endif + _rootNode.GetColliding(ref checkBounds, collidingWith); + } + + + /// + /// Returns an array of objects that intersect with the specified ray, if any. Otherwise returns an empty array. See also: IsColliding. + /// + /// list to store intersections. + /// ray to check. + /// distance to check. + /// Objects that intersect with the specified ray. + public void GetColliding(HashSet collidingWith, Ray checkRay, float maxDistance = float.PositiveInfinity) + { +#if UNITY_EDITOR + AddCollisionCheck(checkRay); +#endif + _rootNode.GetColliding(ref checkRay, collidingWith, maxDistance); + } + + public Bounds GetMaxBounds() + { + return _rootNode.GetBounds(); + } + + /// + /// Draws node boundaries visually for debugging. + /// Must be called from OnDrawGizmos externally. See also: DrawAllObjects. + /// + public void DrawAllBounds() + { + _rootNode.DrawAllBounds(); + } + + /// + /// Draws the bounds of all objects in the tree visually for debugging. + /// Must be called from OnDrawGizmos externally. See also: DrawAllBounds. + /// + public void DrawAllObjects() + { + _rootNode.DrawAllObjects(); + } + + // Intended for debugging. Must be called from OnDrawGizmos externally + // See also DrawAllBounds and DrawAllObjects + /// + /// Visualises collision checks from IsColliding and GetColliding. + /// Collision visualisation code is automatically removed from builds so that collision checks aren't slowed down. + /// +#if UNITY_EDITOR + public void DrawCollisionChecks() + { + int count = 0; + + foreach (Bounds collisionCheck in _lastBoundsCollisionChecks) + { + Gizmos.color = new Color(1.0f, 1.0f - ((float)count / NumCollisionsToSave), 1.0f); + Gizmos.DrawCube(collisionCheck.center, collisionCheck.size); + count++; + } + + foreach (Ray collisionCheck in _lastRayCollisionChecks) + { + Gizmos.color = new Color(1.0f, 1.0f - ((float)count / NumCollisionsToSave), 1.0f); + Gizmos.DrawRay(collisionCheck.origin, collisionCheck.direction); + count++; + } + + Gizmos.color = Color.white; + } +#endif + + /// + /// Used for visualising collision checks with DrawCollisionChecks. + /// Automatically removed from builds so that collision checks aren't slowed down. + /// + /// bounds that were passed in to check for collisions. +#if UNITY_EDITOR + void AddCollisionCheck(Bounds checkBounds) + { + _lastBoundsCollisionChecks.Enqueue(checkBounds); + + if (_lastBoundsCollisionChecks.Count > NumCollisionsToSave) + { + _lastBoundsCollisionChecks.Dequeue(); + } + } +#endif + + /// + /// Used for visualising collision checks with DrawCollisionChecks. + /// Automatically removed from builds so that collision checks aren't slowed down. + /// + /// ray that was passed in to check for collisions. +#if UNITY_EDITOR + void AddCollisionCheck(Ray checkRay) + { + _lastRayCollisionChecks.Enqueue(checkRay); + + if (_lastRayCollisionChecks.Count > NumCollisionsToSave) + { + _lastRayCollisionChecks.Dequeue(); + } + } +#endif + + /// + /// Grow the octree to fit in all objects. + /// + /// Direction to grow. + private void Grow(Vector3 direction) + { + int xDirection = direction.x >= 0 ? 1 : -1; + int yDirection = direction.y >= 0 ? 1 : -1; + int zDirection = direction.z >= 0 ? 1 : -1; + + BoundsOctreeNode oldRoot = _rootNode; + + float half = _rootNode.BaseLength / 2; + float newLength = _rootNode.BaseLength * 2; + + Vector3 newCenter = _rootNode.Center + new Vector3(xDirection * half, yDirection * half, zDirection * half); + + // Create a new, bigger octree root node + _rootNode = new BoundsOctreeNode(newLength, _minSize, _looseness, newCenter); + + if (!oldRoot.HasAnyObjects()) + { + return; + } + + // Create 7 new octree children to go with the old root as children of the new root + int rootPos = GetRootPosIndex(xDirection, yDirection, zDirection); + + BoundsOctreeNode[] children = new BoundsOctreeNode[8]; + + for (int i = 0; i < 8; i++) + { + if (i == rootPos) + { + children[i] = oldRoot; + } + else + { + xDirection = i % 2 == 0 ? -1 : 1; + yDirection = i > 3 ? -1 : 1; + zDirection = (i < 2 || (i > 3 && i < 6)) ? -1 : 1; + children[i] = new BoundsOctreeNode(_rootNode.BaseLength, _minSize, _looseness, + newCenter + new Vector3(xDirection * half, yDirection * half, zDirection * half)); + } + } + + // Attach the new children to the new root node + _rootNode.SetChildren(children); + } + + /// + /// Shrink the octree if possible, else leave it the same. + /// + private void Shrink() + { + _rootNode = _rootNode.ShrinkIfPossible(_initialSize); + } + + /// + /// Used when growing the octree. Works out where the old root node would fit inside a new, larger root node. + /// + /// X direction of growth. 1 or -1. + /// Y direction of growth. 1 or -1. + /// Z direction of growth. 1 or -1. + /// Octant where the root node should be. + private static int GetRootPosIndex(int xDir, int yDir, int zDir) + { + int result = xDir > 0 ? 1 : 0; + if (yDir < 0) result += 4; + if (zDir > 0) result += 2; + + return result; + } + } +} diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctree.cs.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctree.cs.meta new file mode 100644 index 00000000000..c4a59406b05 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctree.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f7f432192be84874b7182e760916d403 +timeCreated: 1613794583 \ No newline at end of file diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctreeNode.cs b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctreeNode.cs new file mode 100644 index 00000000000..ae57304b73f --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctreeNode.cs @@ -0,0 +1,812 @@ +using System.Collections.Generic; +using UnityEngine; + +// A node in a BoundsOctree +// Copyright 2014 Nition, BSD licence (see LICENCE file). http://nition.co +namespace Mirage.Components +{ + public struct BoundsOctreeNode + { + // Centre of this node + public Vector3 Center { get; private set; } + + // Length of this node if it has a looseness of 1.0 + public float BaseLength { get; private set; } + + // Looseness value for this node + private float _looseness; + + // Minimum size for a node in this octree + private float _minSize; + + // Actual length of sides, taking the looseness value into account + private float _adjLength; + + // Bounding box that represents this node + private Bounds bounds; + + // Objects in this node + private readonly OctreeObject[] _objects; + + // Child nodes, if any + private BoundsOctreeNode[] _children; + + // Bounds of potential children to this node. These are actual size (with looseness taken into account), not base size + private Bounds[] _childBounds; + + // If there are already numObjectsAllowed in a node, we split it into children + // A generally good number seems to be something around 8-15 + private const int NumObjectsAllowed = 8; + + // An object in the octree + private readonly struct OctreeObject + { + public readonly T Obj; + public readonly Bounds Bounds; + + public OctreeObject(T obj, Bounds bounds) + { + Obj = obj; + Bounds = bounds; + } + + public override int GetHashCode() + { + int hashCode = Bounds.GetHashCode(); + + if (Obj != null) + hashCode ^= Obj.GetHashCode(); + + return hashCode; + } + + public override bool Equals(object obj) + { + if (obj == null) + return false; + + if (!(obj is OctreeObject)) + return false; + + var other = (OctreeObject)obj; + if (Bounds != other.Bounds) + return false; + + if (Obj == null && other.Obj == null) + return true; + + return Obj.Equals(other.Obj); + } + } + + /// + /// Constructor. + /// + /// Length of this node, not taking looseness into account. + /// Minimum size of nodes in this octree. + /// Multiplier for baseLengthVal to get the actual size. + /// Centre position of this node. + public BoundsOctreeNode(float baseLengthVal, float minSizeVal, float loosenessVal, Vector3 centerVal) : this() + { + bounds = default; + _objects = new OctreeObject[NumObjectsAllowed]; + + SetValues(baseLengthVal, minSizeVal, loosenessVal, centerVal); + } + + /// + /// Add an object. + /// + /// Object to add. + /// 3D bounding box around the object. + /// True if the object fits entirely within this node. + public bool Add(T obj, Bounds objBounds) + { + if (!Encapsulates(bounds, objBounds)) + { + return false; + } + + SubAdd(obj, objBounds); + + return true; + } + + /// + /// Remove an object. Makes the assumption that the object only exists once in the tree. + /// + /// Object to remove. + /// True if the object was removed successfully. + public bool Remove(T obj) + { + bool removed = false; + + for (int i = 0; i < _objects.Length; i++) + { + if(_objects[i].Obj == null) continue; + + if (!_objects[i].Obj.Equals(obj)) + { + continue; + } + + removed = true; + _objects[i] = default; + break; + } + + if (!removed && _children != null) + { + for (int i = 0; i < 8; i++) + { + removed = _children[i].Remove(obj); + + if (removed) break; + } + } + + if (!removed || _children == null) + { + return removed; + } + + // Check if we should merge nodes now that we've removed an item + if (ShouldMerge()) + { + Merge(); + } + + return true; + } + + /// + /// Check if the specified bounds intersect with anything in the tree. See also: GetColliding. + /// + /// Bounds to check. + /// True if there was a collision. + public bool IsColliding(ref Bounds checkBounds) + { + // Are the input bounds at least partially in this node? + if (!bounds.Intersects(checkBounds)) + { + return false; + } + + // Check against any objects in this node + for (int i = 0; i < _objects.Length; i++) + { + if(_objects[i].Obj == null) continue; + + if (_objects[i].Bounds.Intersects(checkBounds)) + { + return true; + } + } + + // Check children + if (_children == null) + { + return false; + } + + for (int i = 0; i < 8; i++) + { + if (_children[i].IsColliding(ref checkBounds)) + { + return true; + } + } + + return false; + } + + /// + /// Check if the specified bounds intersect with anything in the tree. See also: GetColliding. + /// + /// Bounds to check. + /// True if there was a collision. + public bool IsColliding(ref Bounds checkBounds, ref T obj) + { + // Are the input bounds at least partially in this node? + if (!bounds.Intersects(checkBounds)) + { + return false; + } + + // Check against any objects in this node + for (int i = 0; i < _objects.Length; i++) + { + if (_objects[i].Obj == null) continue; + + if (checkBounds.Intersects(_objects[i].Bounds) && _objects[i].Obj.Equals(obj)) + { + return true; + } + } + + // Check children + if (_children == null) + { + return false; + } + + for (int i = 0; i < 8; i++) + { + if (_children[i].IsColliding(ref checkBounds)) + { + return true; + } + } + + return false; + } + + /// + /// Check if the specified ray intersects with anything in the tree. See also: GetColliding. + /// + /// Ray to check. + /// Distance to check. + /// True if there was a collision. + public bool IsColliding(ref Ray checkRay, float maxDistance = float.PositiveInfinity) + { + // Is the input ray at least partially in this node? + if (!bounds.IntersectRay(checkRay, out float distance) || distance > maxDistance) + { + return false; + } + + // Check against any objects in this node + for (int i = 0; i < _objects.Length; i++) + { + if (_objects[i].Obj == null) continue; + + if (_objects[i].Bounds.IntersectRay(checkRay, out distance) && distance <= maxDistance) + { + return true; + } + } + + // Check children + if (_children == null) + { + return false; + } + + for (int i = 0; i < 8; i++) + { + if (_children[i].IsColliding(ref checkRay, maxDistance)) + { + return true; + } + } + + return false; + } + + /// + /// Returns an array of objects that intersect with the specified bounds, if any. Otherwise returns an empty array. See also: IsColliding. + /// + /// Bounds to check. Passing by ref as it improves performance with structs. + /// List result. + /// Objects that intersect with the specified bounds. + public void GetColliding(ref Bounds checkBounds, HashSet result) + { + // Are the input bounds at least partially in this node? + if (!bounds.Intersects(checkBounds)) + { + return; + } + + // Check against any objects in this node + for (int i = 0; i < _objects.Length; i++) + { + if (_objects[i].Obj == null) continue; + + if (checkBounds.Intersects(_objects[i].Bounds)) + { + result.Add(_objects[i].Obj); + } + } + + // Check children + if (_children == null) + { + return; + } + + for (int i = 0; i < 8; i++) + { + _children[i].GetColliding(ref checkBounds, result); + } + } + + /// + /// Returns an array of objects that intersect with the specified ray, if any. Otherwise returns an empty array. See also: IsColliding. + /// + /// Ray to check. Passing by ref as it improves performance with structs. + /// Distance to check. + /// List result. + /// Objects that intersect with the specified ray. + public void GetColliding(ref Ray checkRay, HashSet result, float maxDistance = float.PositiveInfinity) + { + // Is the input ray at least partially in this node? + if (!bounds.IntersectRay(checkRay, out float distance) || distance > maxDistance) + { + return; + } + + // Check against any objects in this node + for (int i = 0; i < _objects.Length; i++) + { + if (_objects[i].Obj == null) continue; + + if (_objects[i].Bounds.IntersectRay(checkRay, out distance) && distance <= maxDistance) + { + result.Add(_objects[i].Obj); + } + } + + // Check children + if (_children == null) + { + return; + } + + for (int i = 0; i < 8; i++) + { + _children[i].GetColliding(ref checkRay, result, maxDistance); + } + } + + /// + /// Set the 8 children of this octree. + /// + /// The 8 new child nodes. + public void SetChildren(BoundsOctreeNode[] childOctrees) + { + if (childOctrees.Length != 8) + { + Debug.LogError("Child octree array must be length 8. Was length: " + childOctrees.Length); + return; + } + + _children = childOctrees; + } + + public Bounds GetBounds() + { + return bounds; + } + + /// + /// Draws node boundaries visually for debugging. + /// Must be called from OnDrawGizmos externally. See also: DrawAllObjects. + /// + /// Used for recurcive calls to this method. + public void DrawAllBounds(float depth = 0) + { + float tintVal = depth / 7; // Will eventually get values > 1. Color rounds to 1 automatically + Gizmos.color = new Color(tintVal, 0, 1.0f - tintVal); + + Bounds thisBounds = new Bounds(Center, new Vector3(_adjLength, _adjLength, _adjLength)); + Gizmos.DrawWireCube(thisBounds.center, thisBounds.size); + + if (_children != null) + { + depth++; + + for (int i = 0; i < 8; i++) + { + _children[i].DrawAllBounds(depth); + } + } + + Gizmos.color = Color.white; + } + + /// + /// Draws the bounds of all objects in the tree visually for debugging. + /// Must be called from OnDrawGizmos externally. See also: DrawAllBounds. + /// + public void DrawAllObjects() + { + float tintVal = BaseLength / 20; + Gizmos.color = new Color(0, 1.0f - tintVal, tintVal, 0.25f); + + foreach (OctreeObject obj in _objects) + { + if(obj.Obj == null) continue; + + Gizmos.DrawCube(obj.Bounds.center, obj.Bounds.size); + } + + if (_children != null) + { + for (int i = 0; i < 8; i++) + { + _children[i].DrawAllObjects(); + } + } + + Gizmos.color = Color.white; + } + + /// + /// We can shrink the octree if: + /// - This node is >= double minLength in length + /// - All objects in the root node are within one octant + /// - This node doesn't have children, or does but 7/8 children are empty + /// We can also shrink it if there are no objects left at all! + /// + /// Minimum dimensions of a node in this octree. + /// The new root, or the existing one if we didn't shrink. + public BoundsOctreeNode ShrinkIfPossible(float minLength) + { + if (BaseLength < (2 * minLength)) + { + return this; + } + + int totalObjects = 0; + + for (int i = 0; i < _objects.Length; i++) + { + if (_objects[i].Obj == null) continue; + totalObjects++; + } + + int childrenObjects = 0; + + for (int i = 0; i < _children.Length; i++) + { + if (_objects[i].Obj == null) continue; + childrenObjects++; + } + + if (totalObjects == 0 && (_children == null || childrenObjects == 0)) + { + return this; + } + + // Check objects in root + int bestFit = -1; + + for (int i = 0; i < _objects.Length; i++) + { + OctreeObject curObj = _objects[i]; + int newBestFit = BestFitChild(curObj.Bounds); + + if (i == 0 || newBestFit == bestFit) + { + // In same octant as the other(s). Does it fit completely inside that octant? + if (Encapsulates(_childBounds[newBestFit], curObj.Bounds)) + { + if (bestFit < 0) + { + bestFit = newBestFit; + } + } + else + { + // Nope, so we can't reduce. Otherwise we continue + return this; + } + } + else + { + return this; // Can't reduce - objects fit in different octants + } + } + + // Check objects in children if there are any + if (_children != null) + { + bool childHadContent = false; + + for (int i = 0; i < _children.Length; i++) + { + if (!_children[i].HasAnyObjects()) + { + continue; + } + + if (childHadContent) + { + return this; // Can't shrink - another child had content already + } + + if (bestFit >= 0 && bestFit != i) + { + return this; // Can't reduce - objects in root are in a different octant to objects in child + } + + childHadContent = true; + bestFit = i; + } + } + + // Can reduce + if (_children == null) + { + // We don't have any children, so just shrink this node to the new size + // We already know that everything will still fit in it + SetValues(BaseLength / 2, _minSize, _looseness, _childBounds[bestFit].center); + + return this; + } + + // We have children. Use the appropriate child as the new root node + // No objects in entire octree + return bestFit == -1 ? this : _children[bestFit]; + } + + /// + /// Set values for this node. + /// + /// Length of this node, not taking looseness into account. + /// Minimum size of nodes in this octree. + /// Multiplier for baseLengthVal to get the actual size. + /// Centre position of this node. + void SetValues(float baseLengthVal, float minSizeVal, float loosenessVal, Vector3 centerVal) + { + BaseLength = baseLengthVal; + _minSize = minSizeVal; + _looseness = loosenessVal; + Center = centerVal; + _adjLength = _looseness * baseLengthVal; + + // Create the bounding box. + Vector3 size = new Vector3(_adjLength, _adjLength, _adjLength); + bounds = new Bounds(Center, size); + + float quarter = BaseLength / 4f; + float childActualLength = (BaseLength / 2) * _looseness; + + Vector3 childActualSize = new Vector3(childActualLength, childActualLength, childActualLength); + + _childBounds = new Bounds[8]; + _childBounds[0] = new Bounds(Center + new Vector3(-quarter, quarter, -quarter), childActualSize); + _childBounds[1] = new Bounds(Center + new Vector3(quarter, quarter, -quarter), childActualSize); + _childBounds[2] = new Bounds(Center + new Vector3(-quarter, quarter, quarter), childActualSize); + _childBounds[3] = new Bounds(Center + new Vector3(quarter, quarter, quarter), childActualSize); + _childBounds[4] = new Bounds(Center + new Vector3(-quarter, -quarter, -quarter), childActualSize); + _childBounds[5] = new Bounds(Center + new Vector3(quarter, -quarter, -quarter), childActualSize); + _childBounds[6] = new Bounds(Center + new Vector3(-quarter, -quarter, quarter), childActualSize); + _childBounds[7] = new Bounds(Center + new Vector3(quarter, -quarter, quarter), childActualSize); + } + + /// + /// Private counterpart to the public Add method. + /// + /// Object to add. + /// 3D bounding box around the object. + void SubAdd(T obj, Bounds objBounds) + { + int totalObjects = 0; + int emptySlot = -1; + + for (int i = 0; i < _objects.Length; i++) + { + if (_objects[i].Obj == null) + { + emptySlot = i; + continue; + } + + totalObjects++; + } + // We know it fits at this level if we've got this far + // Just add if few objects are here, or children would be below min size + if (totalObjects < NumObjectsAllowed || (BaseLength / 2) < _minSize) + { + OctreeObject newObj = new OctreeObject(obj, objBounds); + + _objects[emptySlot] = newObj; + } + else + { + // Fits at this level, but we can go deeper. Would it fit there? + + // Create the 8 children + int bestFitChild; + + if (_children == null) + { + Split(); + + if (_children == null) + { + Debug.Log("Child creation failed for an unknown reason. Early exit."); + return; + } + + // Now that we have the new children, see if this node's existing objects would fit there + for (int i = _objects.Length - 1; i >= 0; i--) + { + OctreeObject existingObj = _objects[i]; + + if (existingObj.Obj == null) continue; + + // Find which child the object is closest to based on where the + // object's center is located in relation to the octree's center. + bestFitChild = BestFitChild(existingObj.Bounds); + + // Does it fit? + if (!Encapsulates(_children[bestFitChild].bounds, existingObj.Bounds)) + { + continue; + } + + _children[bestFitChild].SubAdd(existingObj.Obj, existingObj.Bounds); // Go a level deeper + _objects[i] = default; // Remove from here + } + } + + // Now handle the new object we're adding now + bestFitChild = BestFitChild(objBounds); + + if (Encapsulates(_children[bestFitChild].bounds, objBounds)) + { + _children[bestFitChild].SubAdd(obj, objBounds); + } + else + { + OctreeObject newObj = new OctreeObject(obj, objBounds); + + for (int i = 0; i < _objects.Length; i++) + { + if(_objects[i].Obj != null) continue; + + _objects[i] = newObj; + + break; + } + } + } + } + + /// + /// Splits the octree into eight children. + /// + void Split() + { + float quarter = BaseLength / 4f; + float newLength = BaseLength / 2; + + _children = new BoundsOctreeNode[8]; + _children[0] = new BoundsOctreeNode(newLength, _minSize, _looseness, + Center + new Vector3(-quarter, quarter, -quarter)); + _children[1] = new BoundsOctreeNode(newLength, _minSize, _looseness, + Center + new Vector3(quarter, quarter, -quarter)); + _children[2] = new BoundsOctreeNode(newLength, _minSize, _looseness, + Center + new Vector3(-quarter, quarter, quarter)); + _children[3] = new BoundsOctreeNode(newLength, _minSize, _looseness, + Center + new Vector3(quarter, quarter, quarter)); + _children[4] = new BoundsOctreeNode(newLength, _minSize, _looseness, + Center + new Vector3(-quarter, -quarter, -quarter)); + _children[5] = new BoundsOctreeNode(newLength, _minSize, _looseness, + Center + new Vector3(quarter, -quarter, -quarter)); + _children[6] = new BoundsOctreeNode(newLength, _minSize, _looseness, + Center + new Vector3(-quarter, -quarter, quarter)); + _children[7] = new BoundsOctreeNode(newLength, _minSize, _looseness, + Center + new Vector3(quarter, -quarter, quarter)); + } + + /// + /// Merge all children into this node - the opposite of Split. + /// Note: We only have to check one level down since a merge will never happen if the children already have children, + /// since THAT won't happen unless there are already too many objects to merge. + /// + void Merge() + { + // Note: We know children != null or we wouldn't be merging + for (int i = 0; i < 8; i++) + { + BoundsOctreeNode curChild = _children[i]; + int numObjects = curChild._objects.Length; + + for (int j = numObjects - 1; j >= 0; j--) + { + OctreeObject curObj = curChild._objects[j]; + + if(curObj.Obj == null) continue; + + _objects[i] = curObj; + } + } + + // Remove the child nodes (and the objects in them - they've been added elsewhere now) + _children = null; + } + + /// + /// Checks if outerBounds encapsulates innerBounds. + /// + /// Outer bounds. + /// Inner bounds. + /// True if innerBounds is fully encapsulated by outerBounds. + static bool Encapsulates(Bounds outerBounds, Bounds innerBounds) + { + return outerBounds.Contains(innerBounds.min) && outerBounds.Contains(innerBounds.max); + } + + /// + /// Find which child node this object would be most likely to fit in. + /// + /// The object's bounds. + /// One of the eight child octants. + int BestFitChild(Bounds objBounds) + { + return (objBounds.center.x <= Center.x ? 0 : 1) + (objBounds.center.y >= Center.y ? 0 : 4) + + (objBounds.center.z <= Center.z ? 0 : 2); + } + + /// + /// Checks if there are few enough objects in this node and its children that the children should all be merged into this. + /// + /// True there are less or the same abount of objects in this and its children than numObjectsAllowed. + bool ShouldMerge() + { + int totalObjects = 0; + + for (int i = 0; i < _objects.Length; i++) + { + if (_objects[i].Obj != null) continue; + totalObjects++; + } + + if (_children == null) + { + return totalObjects <= NumObjectsAllowed; + } + + foreach (BoundsOctreeNode child in _children) + { + if (child._children != null) + { + // If any of the *children* have children, there are definitely too many to merge, + // or the child would have been merged already + return false; + } + + for (int i = 0; i < child._objects.Length; i++) + { + if(child._objects[i].Obj != null) continue; + totalObjects++; + } + } + + return totalObjects <= NumObjectsAllowed; + } + + /// + /// Checks if this node or anything below it has something in it. + /// + /// True if this node or any of its children, grandchildren etc have something in them + internal bool HasAnyObjects() + { + int totalObjects = 0; + + for (int i = 0; i < _objects.Length; i++) + { + if (_objects[i].Obj == null) continue; + + totalObjects++; + } + + if (totalObjects > 0) return true; + + if (_children == null) + { + return false; + } + + for (int i = 0; i < 8; i++) + { + if (_children[i].HasAnyObjects()) return true; + } + + return false; + } + } +} diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctreeNode.cs.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctreeNode.cs.meta new file mode 100644 index 00000000000..4140a7a3741 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/BoundsOctreeNode.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 21335bbf5fa1442d9e29a92046df6dcd +timeCreated: 1613794583 \ No newline at end of file diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/LICENCE b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/LICENCE new file mode 100644 index 00000000000..61bcf0984d2 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/LICENCE @@ -0,0 +1,23 @@ +Copyright (c) 2014, Nition +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Assets/Mirage/Samples~/InterestManagement/Scenes/Scene.unity.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/LICENCE.meta similarity index 74% rename from Assets/Mirage/Samples~/InterestManagement/Scenes/Scene.unity.meta rename to Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/LICENCE.meta index c441a8a3324..3cb90b5d51f 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Scenes/Scene.unity.meta +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/LICENCE.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 013ef80bd575b4750ba2837951e4c1a3 +guid: f3e10b0f609147b2863e609a36a3e6e5 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/README.md b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/README.md new file mode 100644 index 00000000000..d7791cf3235 --- /dev/null +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/README.md @@ -0,0 +1,108 @@ +UnityOctree +=========== + +A dynamic octree implementation for Unity written in C#. +Originally written for my game [Scraps](http://www.scrapsgame.com) but intended to be general-purpose. + +There are two octree implementations here: +**BoundsOctree** stores any type of object, with the object boundaries defined as an axis-aligned bounding box. It's a dynamic octree and can also be a loose octree. +**PointOctree** is the same basic implementation, but stores objects as a point in space instead of bounds. This allows some simplification of the code. It's a dynamic octree as well. + +**Octree:** An octree a tree data structure which divides 3D space into smaller partitions (nodes) and places objects into the appropriate nodes. This allows fast access to objects in an area of interest without having to check every object. + +**Dynamic:** The octree grows or shrinks as required when objects are added or removed. It also splits and merges nodes as appropriate. There is no maximum depth. Nodes have a constant (*numObjectsAllowed*) which sets the amount of items allowed in a node before it splits. + +**Loose:** The octree's nodes can be larger than 1/2 their parent's length and width, so they overlap to some extent. This can alleviate the problem of even tiny objects ending up in large nodes if they're near boundaries. A looseness value of 1.0 will make it a "normal" octree. + +**A few functions are implemented:** + +With BoundsOctree, you can pass in bounds and get a true/false answer for if it's colliding with anything (IsColliding), or get a list of everything it's collising with (GetColliding). +With PointOctree, you can cast a ray and get a list of objects that are within x distance of that ray (GetNearby). You may also get a list of objects that are within x distance from a specified origin point. + +It shouldn't be too hard to implement additional functions if needed. For instance, PointOctree could check for points that fall inside a given bounds. + +**Considerations:** + +Tree searches are recursive, so there is technically the potential for a stack overflow on very large trees. The minNodeSize parameter limits node side and hence the depth of the tree, putting a cap on recursion. + +I tried switching to an iterative solution using my own stack, but creating and manipulating the stack made the results generally slower than the simple recursive solution. However, I wouldn't be surprised it someone smarter than me can come up with a faster solution. + +Another note: You may notice when viewing the bounds visualisation that the child nodes' outer edges are all inside the parent nodes. But loose octrees are meant to make the inner nodes bigger... aren't they? The answer is yes, but the parent nodes are *also* bigger, and e.g. ((1.2 * 10) - 10) is bigger than ((1.2 * 5) - 5), so the parent node ends up being bigger overall. + +This seems to be the standard way that loose octrees are done. I did an experiment: I tried making the child node dimensions looseness * the parent's actual size, instead of looseness * the parent's base size before looseness is applied. This seems more intuitively correct to me, but performance seems to be about the same. + +Example Usage +=========== + +**Create An Octree** + +```C# +// Initial size (metres), initial centre position, minimum node size (metres), looseness +BoundsOctree boundsTree = new BoundsOctree(15, MyContainer.position, 1, 1.25f); +// Initial size (metres), initial centre position, minimum node size (metres) +PointOctree pointTree = new PointOctree(15, MyContainer.position, 1); +``` + +- Here I've used GameObject, but the tree's content can be any type you like (as long as it's all the *same* type +- The initial size should ideally cover an area just encompassing all your objects. If you guess too small, the octree will grow automatically, but it will be eight times the size (double dimensions), which could end up covering a large area unnecessarily. At the same time, the octree will be able to shrink down again if the outlying objects are removed. If you guess an initial size that's too big, it won't be able to shrink down, but that may be the safer option. Don't worry too much: In reality the starting value isn't hugely important for performance. +- The initial position should ideally be in the centre of where your objects are. +- The minimum node size is effectively a depth limit; it limits how many times the tree can divide. If all your objects are e.g. 1m+ wide, you wouldn't want to set it smaller than 1m. +- The best way to choose a looseness value is to try different values (between 1 and maybe 1.5) and check the performance with your particular data. Generally around 1.2 is good. + +**Add And Remove** + +```C# +boundsTree.Add(myObject, myBounds); +boundsTree.Remove(myObject); + +pointTree.Add(myObject, myVector3); +boundsTree.Remove(myObject); +``` +- The object's type depends on the tree's type. +- The bounds or point determine where it's inserted. + +**Built-in Functions** + +```C# +bool isColliding = boundsTree.IsColliding(bounds); +``` + +```C# +List collidingWith = new List(); +boundsTree.GetColliding(collidingWith, bounds); +``` +- Where GameObject is the type of the octree + +```C# +pointTree.GetNearby(myRay, 4); +``` +- Where myRay is a [Ray](http://docs.unity3d.com/Documentation/ScriptReference/Ray.html) +- In this case we're looking for any point within 4m of the closest point on the ray + +```C# +pointTree.GetNearby(myPos, 4); +``` +- Where myPos is a [Vector3](http://docs.unity3d.com/Documentation/ScriptReference/Vector3.html) + +**Debugging Visuals** + +![Visualisation example.](https://raw.github.com/nition/UnityOctree/master/octree-visualisation.jpg) + +```C# +void OnDrawGizmos() { + boundsTree.DrawAllBounds(); // Draw node boundaries + boundsTree.DrawAllObjects(); // Draw object boundaries + boundsTree.DrawCollisionChecks(); // Draw the last *numCollisionsToSave* collision check boundaries + + pointTree.DrawAllBounds(); // Draw node boundaries + pointTree.DrawAllObjects(); // Mark object positions +} +``` +- Must be in Unity's OnDrawGizmos() method in a class that inherits from MonoBehaviour +- Point octrees need the marker.tif file to be in your Unity /Assets/Gizmos subfolder for DrawAllObjects to work + + +**Potential Improvements** + +A significant portion of the octree's time is taken just to traverse through the nodes themselves. There's potential for a performance increase there, maybe by linearising the tree - that is, representing all the nodes as a one-dimensional array lookup. + diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Recon_Tank - License.txt.meta b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/README.md.meta similarity index 75% rename from Assets/Mirage/Samples~/InterestManagement/Models/Recon_Tank - License.txt.meta rename to Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/README.md.meta index 4b5398b2492..0753f160fe5 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Models/Recon_Tank - License.txt.meta +++ b/Assets/Mirage/Components/VisibilitySystems/OctreeSystem/QuadTree/README.md.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 90b1b8f807811430a95f068013e77a2c +guid: 9432e04809bf4855b0c854b584b17d8b TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/Mirage/Editor/NetworkInformationPreview.cs b/Assets/Mirage/Editor/NetworkInformationPreview.cs index 12c116f4b91..e9a9e4cae0e 100644 --- a/Assets/Mirage/Editor/NetworkInformationPreview.cs +++ b/Assets/Mirage/Editor/NetworkInformationPreview.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using Mirage.InterestManagement; using UnityEditor; using UnityEngine; @@ -172,7 +173,7 @@ float DrawNetworkBehaviors(NetworkIdentity identity, float initialX, float Y) float DrawObservers(NetworkIdentity identity, float initialX, float Y) { - if (identity.observers.Count > 0) + if (identity.ServerObjectManager.InterestManager.Observers(identity).Count > 0) { var observerRect = new Rect(initialX, Y + 10, 200, 20); @@ -181,7 +182,7 @@ float DrawObservers(NetworkIdentity identity, float initialX, float Y) observerRect.x += 20; observerRect.y += observerRect.height; - foreach (INetworkPlayer player in identity.observers) + foreach (INetworkPlayer player in identity.ServerObjectManager.InterestManager.Observers(identity)) { GUI.Label(observerRect, player.Connection.EndPoint + ":" + player, styles.ComponentName); observerRect.y += observerRect.height; diff --git a/Assets/Mirage/Mirage.asmdef b/Assets/Mirage/Mirage.asmdef index c54625edba7..70d9ce8a8ad 100644 --- a/Assets/Mirage/Mirage.asmdef +++ b/Assets/Mirage/Mirage.asmdef @@ -1,5 +1,6 @@ { "name": "Mirage", + "rootNamespace": "", "references": [ "UniTask", "UniTask.Linq", diff --git a/Assets/Mirage/Runtime/INetworkPlayer.cs b/Assets/Mirage/Runtime/INetworkPlayer.cs index d57c77f3404..3ea88b9345f 100644 --- a/Assets/Mirage/Runtime/INetworkPlayer.cs +++ b/Assets/Mirage/Runtime/INetworkPlayer.cs @@ -32,17 +32,6 @@ public interface IMessageReceiver void HandleMessage(INetworkPlayer player, ArraySegment packet); } - /// - /// An object that can observe NetworkIdentities. - /// this is useful for interest management - /// - public interface IVisibilityTracker - { - void AddToVisList(NetworkIdentity identity); - void RemoveFromVisList(NetworkIdentity identity); - void RemoveAllVisibleObjects(); - } - /// /// An object that can own networked objects /// @@ -59,7 +48,7 @@ public interface IObjectOwner /// An object owned by a player that can: send/receive messages, have network visibility, be an object owner, authenticated permissions, and load scenes. /// May be from the server to client or from client to server /// - public interface INetworkPlayer : IMessageSender, IVisibilityTracker, IObjectOwner, IAuthenticatedObject, ISceneLoader + public interface INetworkPlayer : IMessageSender, IObjectOwner, IAuthenticatedObject, ISceneLoader { SocketLayer.IConnection Connection { get; } void Disconnect(); diff --git a/Assets/Mirage/Runtime/InterestManagement.meta b/Assets/Mirage/Runtime/InterestManagement.meta new file mode 100644 index 00000000000..0e2ea7780a4 --- /dev/null +++ b/Assets/Mirage/Runtime/InterestManagement.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ea017b10e1a835f4589e539cc34609b4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Runtime/InterestManagement/INetworkVisibility.cs b/Assets/Mirage/Runtime/InterestManagement/INetworkVisibility.cs new file mode 100644 index 00000000000..050855ed232 --- /dev/null +++ b/Assets/Mirage/Runtime/InterestManagement/INetworkVisibility.cs @@ -0,0 +1,27 @@ +namespace Mirage.InterestManagement +{ + public interface INetworkVisibility + { + void Startup(); + + void ShutDown(); + + /// + /// Invoked when an object is spawned in the server + /// It should show that object to all relevant players + /// + /// The object just spawned + void OnSpawned(NetworkIdentity identity); + + /// + /// Invoked when a player has authenticated on server. + /// + /// The player who just authenticated. + void OnAuthenticated(INetworkPlayer player); + + /// + /// + /// + void CheckForObservers(); + } +} diff --git a/Assets/Mirage/Runtime/InterestManagement/INetworkVisibility.cs.meta b/Assets/Mirage/Runtime/InterestManagement/INetworkVisibility.cs.meta new file mode 100644 index 00000000000..7607d1c5d32 --- /dev/null +++ b/Assets/Mirage/Runtime/InterestManagement/INetworkVisibility.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4854800c3d3cbdb40b197ce50e3b7ff4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Runtime/InterestManagement/InterestManager.cs b/Assets/Mirage/Runtime/InterestManagement/InterestManager.cs new file mode 100644 index 00000000000..55042f0ba24 --- /dev/null +++ b/Assets/Mirage/Runtime/InterestManagement/InterestManager.cs @@ -0,0 +1,196 @@ +using System.Collections.Generic; +using Mirage.Logging; +using UnityEngine; + +namespace Mirage.InterestManagement +{ + public class InterestManager + { + static readonly ILogger logger = LogFactory.GetLogger(typeof(InterestManager)); + + #region Fields + + public readonly ServerObjectManager ServerObjectManager; + private readonly List _visibilitySystems = new List(); + private HashSet _observers = new HashSet(); + + #endregion + + #region Properties + + public IReadOnlyCollection ObserverSystems => _visibilitySystems; + + #endregion + + #region Callback Listener's + + internal void Update() + { + if (_visibilitySystems.Count == 0) return; + + foreach (ObserverData observerData in _visibilitySystems) + { + observerData.System.CheckForObservers(); + } + } + + /// + /// When server stops we will un-register and clean up stuff. + /// + protected virtual void OnServerStopped() + { + ServerObjectManager.Server.World.onSpawn -= OnSpawnInWorld; + ServerObjectManager.Server.Authenticated.RemoveListener(OnAuthenticated); + } + + /// + /// When server starts up we will register our event listener's. + /// + protected virtual void OnServerStarted() + { + ServerObjectManager.Server.World.onSpawn += OnSpawnInWorld; + ServerObjectManager.Server.Authenticated.AddListener(OnAuthenticated); + } + + private void OnAuthenticated(INetworkPlayer player) + { + if (_visibilitySystems.Count == 0) + { + foreach (NetworkIdentity identity in ServerObjectManager.Server.World.SpawnedIdentities) + { + ServerObjectManager.ShowToPlayer(identity, player); + } + } + else + { + foreach (ObserverData systemData in _visibilitySystems) + { + systemData.System.OnAuthenticated(player); + } + } + } + + /// + /// Object has spawned in. We should now notify all systems with the intended info so + /// each system can do what they need or want with the info. + /// + /// + private void OnSpawnInWorld(NetworkIdentity identity) + { + if (_visibilitySystems.Count == 0) + { + foreach (INetworkPlayer player in ServerObjectManager.Server.Players) + { + ServerObjectManager.ShowToPlayer(identity, player); + } + } + else + { + foreach (ObserverData systemData in _visibilitySystems) + { + systemData.System.OnSpawned(identity); + } + } + } + + #endregion + + #region Class Specific + + /// + /// Central system to control and maintain checking for data for all observer visibility systems. + /// + /// The server object manager so we can pull info from it or send info from it. + public InterestManager(ServerObjectManager serverObjectManager) + { + ServerObjectManager = serverObjectManager; + + ServerObjectManager.Server.Started.AddListener(OnServerStarted); + ServerObjectManager.Server.Stopped.AddListener(OnServerStopped); + } + + /// + /// Send a message to all observers of an identity + /// + /// + /// + /// + /// + protected internal virtual void Send(NetworkIdentity identity, T msg, int channelId = Channel.Reliable, INetworkPlayer skip = null) + { + _observers = Observers(identity); + + // remove skipped player. No need to send to them. + _observers.Remove(skip); + + if (_observers.Count == 0) + return; + + NetworkServer.SendToMany(_observers, msg, channelId); + } + + /// + /// Register a specific interest management system to the interest manager. + /// + /// The system we want to register in the interest manager. + internal void RegisterVisibilitySystem(ref ObserverData system) + { + if (_visibilitySystems.Contains(system)) + { + logger.LogWarning( + "[InterestManager] - System already register to interest manager. Please check if this was correct."); + + return; + } + + if(logger.logEnabled) + logger.Log($"[Interest Manager] - Registering system {system} to our manager."); + + _visibilitySystems.Add(system); + } + + /// + /// Un-register a specific interest management system from the interest manager. + /// + /// The system we want to un-register from the interest manager. + internal void UnRegisterVisibilitySystem(ref ObserverData system) + { + if(!_visibilitySystems.Contains(system)) + { + if (logger.logEnabled) + logger.Log($"[Interest Manager] - Un-Registering system {system} from our manager."); + return; + } + + logger.LogWarning( + "[InterestManager] - Cannot find system in interest manager. Please check make sure it was registered."); + + _visibilitySystems.Remove(system); + } + + /// + /// Find out all the players that can see an object + /// + /// The identity of the object we want to check if player's can see it or not. + /// + internal HashSet Observers(NetworkIdentity identity) + { + if (_visibilitySystems.Count == 0) + return ServerObjectManager.Server.Players; + + foreach (ObserverData visibilitySystem in _visibilitySystems) + { + foreach (KeyValuePair> observer in visibilitySystem.Observers) + { + if (!observer.Value.Contains(identity)) return _observers; + + _observers.UnionWith(visibilitySystem.Observers.Keys); + } + } + + return _observers; + } + + #endregion + } +} diff --git a/Assets/Mirage/Runtime/InterestManagement/InterestManager.cs.meta b/Assets/Mirage/Runtime/InterestManagement/InterestManager.cs.meta new file mode 100644 index 00000000000..31d1254d644 --- /dev/null +++ b/Assets/Mirage/Runtime/InterestManagement/InterestManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f299ed72287269640baf1fbf20d74959 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Runtime/InterestManagement/NetworkVisibility.cs b/Assets/Mirage/Runtime/InterestManagement/NetworkVisibility.cs new file mode 100644 index 00000000000..aeab554600a --- /dev/null +++ b/Assets/Mirage/Runtime/InterestManagement/NetworkVisibility.cs @@ -0,0 +1,61 @@ +using System.Collections.Generic; + +namespace Mirage.InterestManagement +{ + public abstract class NetworkVisibility : INetworkVisibility + { + #region Fields + + private readonly ServerObjectManager _serverObjectManager; + private ObserverData _visibilitySystemData; + + #endregion + + #region Properties + + public InterestManager InterestManager => _serverObjectManager.InterestManager; + + public Dictionary> VisibilitySystemData => _visibilitySystemData.Observers; + + #endregion + + protected NetworkVisibility(ServerObjectManager serverObjectManager) + { + _serverObjectManager = serverObjectManager; + } + + public void Startup() + { + _visibilitySystemData = new ObserverData(this, new Dictionary>()); + + _serverObjectManager.InterestManager?.RegisterVisibilitySystem(ref _visibilitySystemData); + } + + public void ShutDown() + { + _serverObjectManager.InterestManager?.UnRegisterVisibilitySystem(ref _visibilitySystemData); + } + + #region Implementation of INetworkVisibility + + /// + /// Invoked when an object is spawned in the server + /// It should show that object to all relevant players + /// + /// The object just spawned + public abstract void OnSpawned(NetworkIdentity identity); + + /// + /// + /// + /// + public abstract void OnAuthenticated(INetworkPlayer player); + + /// + /// + /// + public abstract void CheckForObservers(); + + #endregion + } +} diff --git a/Assets/Mirage/Runtime/NetworkVisibility.cs.meta b/Assets/Mirage/Runtime/InterestManagement/NetworkVisibility.cs.meta similarity index 83% rename from Assets/Mirage/Runtime/NetworkVisibility.cs.meta rename to Assets/Mirage/Runtime/InterestManagement/NetworkVisibility.cs.meta index 1e6665899e3..3c98f867404 100644 --- a/Assets/Mirage/Runtime/NetworkVisibility.cs.meta +++ b/Assets/Mirage/Runtime/InterestManagement/NetworkVisibility.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c08f1a030234d49d391d7223a8592f15 +guid: fbd2adb1a8d5c50449ea4ee65991b2be MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Mirage/Runtime/InterestManagement/ObserverData.cs b/Assets/Mirage/Runtime/InterestManagement/ObserverData.cs new file mode 100644 index 00000000000..4cb2cbd15a1 --- /dev/null +++ b/Assets/Mirage/Runtime/InterestManagement/ObserverData.cs @@ -0,0 +1,67 @@ +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Mirage.InterestManagement +{ + public readonly struct ObserverData + { + public sealed class EqualityComparer : IEqualityComparer + { + public bool Equals(ObserverData x, ObserverData y) + { + return x._system == y._system; + } + + public int GetHashCode(ObserverData obj) + { + return obj._system.GetHashCode(); + } + } + + private readonly INetworkVisibility _system; + + private readonly Dictionary> _observers; + + public INetworkVisibility System => _system; + + public Dictionary> Observers => _observers; + + public ObserverData(INetworkVisibility system, Dictionary> observers) + { + _system = system; + _observers = observers; + } + + public bool Equals(ObserverData other) + { + return _system == other._system; + } + + public override bool Equals(object obj) + { + return obj is ObserverData other && Equals(other); + } + + public override int GetHashCode() + { + return _system.GetHashCode(); + } + + public override string ToString() + { + return $"[Visibility System :{nameof(ObserverData)}]"; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator ==(ObserverData x, ObserverData y) + { + return x._system == y._system; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool operator !=(ObserverData x, ObserverData y) + { + return x._system != y._system; + } + } +} diff --git a/Assets/Mirage/Runtime/InterestManagement/ObserverData.cs.meta b/Assets/Mirage/Runtime/InterestManagement/ObserverData.cs.meta new file mode 100644 index 00000000000..923c7e7c7f6 --- /dev/null +++ b/Assets/Mirage/Runtime/InterestManagement/ObserverData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1337294badea58543ad4435caf6c19ff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Runtime/NetworkBehaviour.cs b/Assets/Mirage/Runtime/NetworkBehaviour.cs index 1f00f632eeb..50aa42087fe 100644 --- a/Assets/Mirage/Runtime/NetworkBehaviour.cs +++ b/Assets/Mirage/Runtime/NetworkBehaviour.cs @@ -316,10 +316,7 @@ protected internal void SendRpcInternal(Type invokeClass, string rpcName, Networ payload = writer.ToArraySegment() }; - // The public facing parameter is excludeOwner in [ClientRpc] - // so we negate it here to logically align with SendToReady. - bool includeOwner = !excludeOwner; - Identity.SendToRemoteObservers(message, includeOwner, channelId); + ServerObjectManager.InterestManager.Send(Identity, message, channelId, excludeOwner ? Owner : null); } protected internal void SendTargetRpcInternal(INetworkPlayer player, Type invokeClass, string rpcName, NetworkWriter writer, int channelId) diff --git a/Assets/Mirage/Runtime/NetworkIdentity.cs b/Assets/Mirage/Runtime/NetworkIdentity.cs index 2b348f15d0a..b805636d1b0 100644 --- a/Assets/Mirage/Runtime/NetworkIdentity.cs +++ b/Assets/Mirage/Runtime/NetworkIdentity.cs @@ -7,6 +7,7 @@ using Mirage.Logging; using Mirage.Serialization; using Mirage.Events; +using Mirage.InterestManagement; #if UNITY_EDITOR using UnityEditor; #if UNITY_2018_3_OR_NEWER @@ -143,11 +144,6 @@ public sealed class NetworkIdentity : MonoBehaviour /// public bool HasAuthority { get; internal set; } - /// - /// The set of network connections (players) that can see this object. - /// - public readonly HashSet observers = new HashSet(); - /// /// Unique identifier for this particular object instance, used for tracking objects between networked clients and the server. /// This is a unique identifier for this particular GameObject instance. Use it to track GameObjects between networked clients and the server. @@ -189,6 +185,11 @@ public sealed class NetworkIdentity : MonoBehaviour INetworkPlayer _owner; + /// + /// The visibility systems this network identity is part of. + /// + internal List VisibilitySystems; + /// /// The INetworkPlayer associated with this NetworkIdentity. This property is only valid on server /// Use it to return details such as the connection's identity, IP address and ready status. @@ -219,13 +220,6 @@ public NetworkBehaviour[] NetworkBehaviours NetworkBehaviour[] components = GetComponentsInChildren(true); -#if DEBUG - foreach (NetworkBehaviour item in components) - { - logger.Assert(item.Identity == this, $"Child NetworkBehaviour had a different Identity, this:{name}, Child Identity:{item.Identity.name}"); - } -#endif - if (components.Length > byte.MaxValue) throw new InvalidOperationException("Only 255 NetworkBehaviour per gameobject allowed"); @@ -234,19 +228,6 @@ public NetworkBehaviour[] NetworkBehaviours } } - NetworkVisibility _visibility; - public NetworkVisibility Visibility - { - get - { - if (_visibility is null) - { - _visibility = GetComponent(); - } - return _visibility; - } - } - [SerializeField, HideInInspector] int _prefabHash; /// @@ -307,9 +288,6 @@ internal set } } - - - [Header("Events")] [SerializeField] AddLateEvent _onStartServer = new AddLateEvent(); [SerializeField] AddLateEvent _onStartClient = new AddLateEvent(); [SerializeField] AddLateEvent _onStartLocalPlayer = new AddLateEvent(); @@ -367,6 +345,13 @@ internal set /// Can be used as hook to save player information public IAddLateEvent OnStopServer => _onStopServer; + /// + /// Gets the NetworkIdentity from the sceneIds dictionary with the corresponding id + /// + /// + /// NetworkIdentity from the sceneIds dictionary + public static NetworkIdentity GetSceneIdentity(ulong id) => sceneIds[id]; + /// /// used when adding players /// @@ -398,15 +383,6 @@ internal void SetClientOwner(INetworkPlayer player) /// public static event ClientAuthorityCallback clientAuthorityCallback; - /// - /// this is used when a connection is destroyed, since the "observers" property is read-only - /// - /// - internal void RemoveObserverInternal(INetworkPlayer player) - { - observers.Remove(player); - } - /// /// hasSpawned should always be false before runtime /// @@ -445,10 +421,7 @@ void OnValidate() void AssignAssetID(GameObject prefab) => AssignAssetID(AssetDatabase.GetAssetPath(prefab)); - void AssignAssetID(string path) - { - _prefabHash = path.GetStableHashCode(); - } + void AssignAssetID(string path) => _prefabHash = path.GetStableHashCode(); bool ThisIsAPrefab() => PrefabUtility.IsPartOfPrefabAsset(gameObject); @@ -724,28 +697,6 @@ internal void StopAuthority() _onAuthorityChanged.Invoke(false); } - /// - /// check if observer can be seen by connection. - /// - /// - /// returns visibility.OnCheckObserver - /// - /// - /// returns true if we have no NetworkVisibility, default objects are visible - /// - /// - /// - /// - /// - internal bool OnCheckObserver(INetworkPlayer player) - { - if (Visibility != null) - { - return Visibility.OnCheckObserver(player); - } - return true; - } - internal void StopClient() { _onStopClient.Invoke(); @@ -946,170 +897,8 @@ internal void SetClientValues(ClientObjectManager clientObjectManager, SpawnMess World = Client.World; } - /// - /// Called when NetworkIdentity is destroyed - /// - internal void ClearObservers() - { - foreach (INetworkPlayer player in observers) - { - player.RemoveFromVisList(this); - } - observers.Clear(); - } - - internal void AddObserver(INetworkPlayer player) - { - if (observers.Contains(player)) - { - // if we try to add a connectionId that was already added, then - // we may have generated one that was already in use. - return; - } - - if (logger.LogEnabled()) logger.Log($"Adding [{player.Connection.EndPoint}] as observer for {gameObject}"); - observers.Add(player); - player.AddToVisList(this); - - // spawn identity for this conn - ServerObjectManager.ShowToPlayer(this, player); - } - - /// - /// Helper function to call OnRebuildObservers in all components - /// HashSet is passed in so we can cache it! - /// Returns true if we have a NetworkVisibility, false otherwise - /// Initialize is true on first rebuild, false on consecutive rebuilds - /// - /// - /// - /// - internal bool GetNewObservers(HashSet observersSet, bool initialize) - { - observersSet.Clear(); - - if (Visibility != null) - { - Visibility.OnRebuildObservers(observersSet, initialize); - return true; - } - - // we have no NetworkVisibility. return false to indicate that we - // should use the default implementation. - return false; - } - - /// - /// Helper function to add all server connections as observers. - /// This is used if none of the components provides their own - /// OnRebuildObservers function. - /// - internal void AddAllReadyServerConnectionsToObservers() - { - // add all server connections - foreach (INetworkPlayer player in Server.Players) - { - if (player.SceneIsReady) - AddObserver(player); - } - - // add local host connection (if any) - if (Server.LocalPlayer != null && Server.LocalPlayer.SceneIsReady) - { - AddObserver(Server.LocalPlayer); - } - } - static readonly HashSet newObservers = new HashSet(); - /// - /// This causes the set of players that can see this object to be rebuild. - /// The OnRebuildObservers callback function will be invoked on each NetworkBehaviour. - /// - /// True if this is the first time. - public void RebuildObservers(bool initialize) - { - bool changed = false; - - // call OnRebuildObservers function - bool rebuildOverwritten = GetNewObservers(newObservers, initialize); - - // if player connection: ensure player always see himself no matter what. - // -> fixes https://github.com/vis2k/Mirror/issues/692 where a - // player might teleport out of the ProximityChecker's cast, - // losing the own connection as observer. - if (Owner != null && Owner.SceneIsReady) - { - newObservers.Add(Owner); - } - - // if no NetworkVisibility component, then add all server connections. - if (!rebuildOverwritten) - { - // only add all connections when rebuilding the first time. - // second time we just keep them without rebuilding anything. - if (initialize) - { - AddAllReadyServerConnectionsToObservers(); - } - return; - } - - changed = AddNewObservers(initialize, changed); - - changed = RemoveOldObservers(changed); - - if (changed) - { - observers.Clear(); - foreach (INetworkPlayer player in newObservers) - { - if (player != null && player.SceneIsReady) - observers.Add(player); - } - } - } - - // remove all old .observers that aren't in newObservers anymore - bool RemoveOldObservers(bool changed) - { - foreach (INetworkPlayer player in observers) - { - if (!newObservers.Contains(player)) - { - // removed observer - player.RemoveFromVisList(this); - ServerObjectManager.HideToPlayer(this, player); - - if (logger.LogEnabled()) logger.Log("Removed Observer for " + gameObject + " " + player); - changed = true; - } - } - - return changed; - } - - // add all newObservers that aren't in .observers yet - bool AddNewObservers(bool initialize, bool changed) - { - foreach (INetworkPlayer player in newObservers) - { - // only add ready connections. - // otherwise the player might not be in the world yet or anymore - if (player != null && player.SceneIsReady && (initialize || !observers.Contains(player))) - { - // new observer - player.AddToVisList(this); - // spawn identity for this conn - ServerObjectManager.ShowToPlayer(this, player); - if (logger.LogEnabled()) logger.Log("New Observer for " + gameObject + " " + player); - changed = true; - } - } - - return changed; - } - /// /// Assign control of an object to a client via the client's NetworkConnection. /// This causes hasAuthority to be set on the client that owns the object, and NetworkBehaviour.OnStartAuthority will be called on that client. This object then will be in the NetworkConnection.clientOwnedObjects list for the connection. @@ -1196,7 +985,6 @@ internal void Reset() Owner = null; networkBehavioursCache = null; - ClearObservers(); ResetEvents(); } @@ -1213,16 +1001,7 @@ private void ResetEvents() internal void UpdateVars() { - if (observers.Count > 0) - { - SendUpdateVarsMessage(); - } - else - { - // clear all component's dirty bits. - // it would be spawned on new observers anyway. - ClearAllComponentsDirtyBits(); - } + SendUpdateVarsMessage(); } void SendUpdateVarsMessage() @@ -1256,7 +1035,9 @@ void SendUpdateVarsMessage() if (observersWritten > 0) { varsMessage.payload = observersWriter.ToArraySegment(); - SendToRemoteObservers(varsMessage, false); + + ServerObjectManager.InterestManager.Send(this, varsMessage, Channel.Reliable, + Server.LocalPlayer); } // clear dirty bits only for the components that we serialized @@ -1271,49 +1052,6 @@ void SendUpdateVarsMessage() } } - static readonly List connectionsExcludeSelf = new List(100); - - /// - /// Send a message to all the remote observers - /// - /// The message type - /// the message to deliver to to clients - /// Wether the owner should receive this message too - /// the transport channel that should be used to deliver the message - internal void SendToRemoteObservers(T msg, bool includeOwner = true, int channelId = Channel.Reliable) - { - if (logger.LogEnabled()) logger.Log("Server.SendToObservers id:" + typeof(T)); - - if (observers.Count == 0) - return; - - connectionsExcludeSelf.Clear(); - foreach (INetworkPlayer player in observers) - { - if (player == Server.LocalPlayer) - continue; - - if (includeOwner || Owner != player) - { - connectionsExcludeSelf.Add(player); - } - } - - if (connectionsExcludeSelf.Count > 0) - NetworkServer.SendToMany(connectionsExcludeSelf, msg, channelId); - } - - /// - /// clear all component's dirty bits no matter what - /// - internal void ClearAllComponentsDirtyBits() - { - foreach (NetworkBehaviour comp in NetworkBehaviours) - { - comp.ClearAllDirtyBits(); - } - } - /// /// Clear only dirty component's dirty bits. ignores components which /// may be dirty but not ready to be synced yet (because of syncInterval) diff --git a/Assets/Mirage/Runtime/NetworkPlayer.cs b/Assets/Mirage/Runtime/NetworkPlayer.cs index d5a0b7beb63..0d5e05ebc0c 100644 --- a/Assets/Mirage/Runtime/NetworkPlayer.cs +++ b/Assets/Mirage/Runtime/NetworkPlayer.cs @@ -22,8 +22,6 @@ public sealed class NetworkPlayer : INetworkPlayer, IMessageSender { static readonly ILogger logger = LogFactory.GetLogger(typeof(NetworkPlayer)); - private readonly HashSet visList = new HashSet(); - /// /// Transport level connection /// @@ -165,29 +163,6 @@ public override string ToString() return $"connection({Address})"; } - public void AddToVisList(NetworkIdentity identity) - { - visList.Add(identity); - } - - public void RemoveFromVisList(NetworkIdentity identity) - { - visList.Remove(identity); - } - - /// - /// Removes all objects that this player can see - /// This is called when loading a new scene - /// - public void RemoveAllVisibleObjects() - { - foreach (NetworkIdentity identity in visList) - { - identity.RemoveObserverInternal(this); - } - visList.Clear(); - } - public void AddOwnedObject(NetworkIdentity networkIdentity) { clientOwnedObjects.Add(networkIdentity); diff --git a/Assets/Mirage/Runtime/NetworkSceneManager.cs b/Assets/Mirage/Runtime/NetworkSceneManager.cs index 3cb4ae6df5b..7a8cd0481cb 100644 --- a/Assets/Mirage/Runtime/NetworkSceneManager.cs +++ b/Assets/Mirage/Runtime/NetworkSceneManager.cs @@ -552,7 +552,6 @@ public void SetClientNotReady(INetworkPlayer player) { if (logger.LogEnabled()) logger.Log("PlayerNotReady " + player); player.SceneIsReady = false; - player.RemoveAllVisibleObjects(); player.Send(new SceneNotReadyMessage()); } diff --git a/Assets/Mirage/Runtime/NetworkVisibility.cs b/Assets/Mirage/Runtime/NetworkVisibility.cs deleted file mode 100644 index 1e007569e2d..00000000000 --- a/Assets/Mirage/Runtime/NetworkVisibility.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -namespace Mirage -{ - // the name NetworkProximityCheck implies that it's only about objects in - // proximity to the player. But we might have room based, guild based, - // instanced based checks too, so NetworkVisibility is more fitting. - // - // note: we inherit from NetworkBehaviour so we can reuse .Identity, etc. - // note: unlike UNET, we only allow 1 proximity checker per NetworkIdentity. - [DisallowMultipleComponent] - public abstract class NetworkVisibility : NetworkBehaviour - { - /// - /// Callback used by the visibility system to determine if an observer (player) can see this object. - /// If this function returns true, the network connection will be added as an observer. - /// - /// Network connection of a player. - /// True if the player can see this object. - public abstract bool OnCheckObserver(INetworkPlayer player); - - /// - /// Callback used by the visibility system to (re)construct the set of observers that can see this object. - /// Implementations of this callback should add network connections of players that can see this object to the observers set. - /// - /// NOTE: override this function if you want to optimize this loop in your visibility, - /// for example if you need to call GetComponent on this object you can call it once at the start of the loop - /// - /// - /// The new set of observers for this object. - /// True if the set of observers is being built for the first time. - public virtual void OnRebuildObservers(HashSet observers, bool initialize) - { - foreach (INetworkPlayer player in Server.Players) - { - if (OnCheckObserver(player)) - { - observers.Add(player); - } - } - } - } -} diff --git a/Assets/Mirage/Runtime/ServerObjectManager.cs b/Assets/Mirage/Runtime/ServerObjectManager.cs index 529ad7fb5bc..3100b9fef2e 100644 --- a/Assets/Mirage/Runtime/ServerObjectManager.cs +++ b/Assets/Mirage/Runtime/ServerObjectManager.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Mirage.InterestManagement; using Mirage.Logging; using Mirage.RemoteCalls; using Mirage.Serialization; @@ -46,11 +47,15 @@ public class ServerObjectManager : MonoBehaviour, IServerObjectManager [FormerlySerializedAs("networkSceneManager")] public NetworkSceneManager NetworkSceneManager; + public InterestManager InterestManager { get; private set; } + uint nextNetworkId = 1; uint GetNextNetworkId() => checked(nextNetworkId++); public void Start() { + InterestManager = new InterestManager(this); + if (Server != null) { Server.Started.AddListener(OnServerStarted); @@ -60,11 +65,15 @@ public void Start() if (NetworkSceneManager != null) { NetworkSceneManager.OnServerFinishedSceneChange.AddListener(OnFinishedSceneChange); - NetworkSceneManager.OnPlayerSceneReady.AddListener(SpawnVisibleObjects); } } } + public void Update() + { + InterestManager?.Update(); + } + internal void RegisterMessageHandlers() { Server.MessageHandler.RegisterHandler(OnServerRpcMessage); @@ -201,13 +210,6 @@ public void ReplaceCharacter(INetworkPlayer player, NetworkIdentity identity, bo Server.LocalClient.Player.Identity = identity; } - // add connection to observers AFTER the playerController was set. - // by definition, there is nothing to observe if there is no player - // controller. - // - // IMPORTANT: do this in AddCharacter & ReplaceCharacter! - SpawnVisibleObjectForPlayer(player); - if (logger.LogEnabled()) logger.Log($"Replacing playerGameObject object netId: {identity.NetId} asset ID {identity.PrefabHash}"); Respawn(identity); @@ -216,35 +218,6 @@ public void ReplaceCharacter(INetworkPlayer player, NetworkIdentity identity, bo previousCharacter.RemoveClientAuthority(); } - void SpawnVisibleObjectForPlayer(INetworkPlayer player) - { - if (logger.LogEnabled()) logger.Log($"Checking Observers on {Server.World.SpawnedIdentities.Count} objects for player: {player}"); - - if (!player.SceneIsReady) - { - // client needs to finish loading scene before we can spawn objects - // otherwise it would not find scene objects. - return; - } - - // add connection to each nearby NetworkIdentity's observers, which - // internally sends a spawn message for each one to the connection. - foreach (NetworkIdentity identity in Server.World.SpawnedIdentities) - { - // todo, do we only need to spawn active objects here? or all objects? - if (identity.gameObject.activeSelf) - { - if (logger.LogEnabled()) logger.Log($"Checking Observers on server objects name='{identity.name}' netId={identity.NetId} sceneId={identity.sceneId}"); - - bool visible = identity.OnCheckObserver(player); - if (visible) - { - identity.AddObserver(player); - } - } - } - } - /// /// When an message handler has received a request from a player, the server calls this to associate the player object with the connection. /// When a player is added for a connection, the client for that connection is made ready automatically. The player object is automatically spawned, so you do not need to call NetworkServer.Spawn for that object. This function is used for "adding" a player, not for "replacing" the player on a connection. If there is already a player on this playerControllerId for this connection, this will fail. @@ -304,9 +277,6 @@ public void AddCharacter(INetworkPlayer player, NetworkIdentity identity) Server.LocalClient.Player.Identity = identity; } - // spawn any new visible scene objects - SpawnVisibleObjects(player); - if (logger.LogEnabled()) logger.Log("Adding new playerGameObject object netId: " + identity.NetId + " asset ID " + identity.PrefabHash); Respawn(identity); @@ -331,14 +301,12 @@ void Respawn(NetworkIdentity identity) /// /// /// - internal void ShowToPlayer(NetworkIdentity identity, INetworkPlayer player) + public void ShowToPlayer(NetworkIdentity identity, INetworkPlayer player) { - // dont send if loading scene - if (player.SceneIsReady) - SendSpawnMessage(identity, player); + SendSpawnMessage(identity, player); } - internal void HideToPlayer(NetworkIdentity identity, INetworkPlayer player) + public void HideToPlayer(NetworkIdentity identity, INetworkPlayer player) { player.Send(new ObjectHideMessage { netId = identity.NetId }); } @@ -482,8 +450,6 @@ public void Spawn(NetworkIdentity identity, INetworkPlayer owner) } if (logger.LogEnabled()) logger.Log("SpawnObject instance ID " + identity.NetId + " asset ID " + identity.PrefabHash); - - identity.RebuildObservers(true); } internal void SendSpawnMessage(NetworkIdentity identity, INetworkPlayer player) @@ -592,9 +558,8 @@ void DestroyObject(NetworkIdentity identity, bool destroyServerObject) Server.World.RemoveIdentity(identity); identity.Owner?.RemoveOwnedObject(identity); - identity.SendToRemoteObservers(new ObjectDestroyMessage { netId = identity.NetId }); + InterestManager.Send(identity, new ObjectDestroyMessage { netId = identity.NetId }); - identity.ClearObservers(); if (Server.LocalClientActive) { identity.StopClient(); @@ -660,29 +625,5 @@ public void SpawnObjects() } } } - - /// - /// Sends spawn message for scene objects and other visible objects to the given player if it has a character - /// - /// If there is a then this will be called after the client finishes loading the scene and sends - /// - /// - /// The player to spawn objects for - public void SpawnVisibleObjects(INetworkPlayer player) => SpawnVisibleObjects(player, false); - - /// - /// Sends spawn message for scene objects and other visible objects to the given player if it has a character - /// - /// The player to spawn objects for - /// If true will spawn visibile objects even if player does not have a spawned character yet - // note: can't use optional param here because we need just NetworkPlayer version for event - public void SpawnVisibleObjects(INetworkPlayer player, bool ignoreHasCharacter) - { - if (logger.LogEnabled()) logger.Log("SetClientReadyInternal for conn:" + player); - - // client is ready to start spawning objects - if (ignoreHasCharacter || player.HasCharacter) - SpawnVisibleObjectForPlayer(player); - } } } diff --git a/Assets/Mirage/Samples~/AdditiveScenes/Scripts/ShootingTankBehaviour.cs b/Assets/Mirage/Samples~/AdditiveScenes/Scripts/ShootingTankBehaviour.cs index 8b41aca06a6..4243cba3b34 100644 --- a/Assets/Mirage/Samples~/AdditiveScenes/Scripts/ShootingTankBehaviour.cs +++ b/Assets/Mirage/Samples~/AdditiveScenes/Scripts/ShootingTankBehaviour.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; +using Mirage.InterestManagement; using UnityEngine; namespace Mirage.Examples.Additive @@ -23,7 +25,7 @@ void Start() void Update() { - if (IsServer && Identity.observers.Count > 0) + if (IsServer && Identity.ServerObjectManager.InterestManager.ObserverSystems.Count > 0) ShootNearestPlayer(); if (IsClient) @@ -36,15 +38,19 @@ void ShootNearestPlayer() GameObject target = null; float distance = 100f; - foreach (INetworkPlayer networkConnection in Identity.observers) + foreach (ObserverData observerData in Identity.ServerObjectManager.InterestManager.ObserverSystems) { - GameObject tempTarget = networkConnection.Identity.gameObject; - float tempDistance = Vector3.Distance(tempTarget.transform.position, transform.position); - - if (target == null || distance > tempDistance) + foreach (KeyValuePair> players in observerData.Observers) { - target = tempTarget; - distance = tempDistance; + GameObject tempTarget = players.Key.Identity.gameObject; + + float tempDistance = Vector3.Distance(tempTarget.transform.position, transform.position); + + if (target == null || distance > tempDistance) + { + target = tempTarget; + distance = tempDistance; + } } } diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/BaseColor.png b/Assets/Mirage/Samples~/InterestManagement/Models/BaseColor.png deleted file mode 100644 index bcd4bee1a09..00000000000 Binary files a/Assets/Mirage/Samples~/InterestManagement/Models/BaseColor.png and /dev/null differ diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/BaseColor.png.meta b/Assets/Mirage/Samples~/InterestManagement/Models/BaseColor.png.meta deleted file mode 100644 index cd4582091b1..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Models/BaseColor.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 81437bd8a000249988728cc20542784d -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Controller.controller b/Assets/Mirage/Samples~/InterestManagement/Models/Controller.controller deleted file mode 100644 index e05d28cf351..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Models/Controller.controller +++ /dev/null @@ -1,272 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!91 &9100000 -AnimatorController: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Controller - serializedVersion: 5 - m_AnimatorParameters: - - m_Name: Moving - m_Type: 4 - m_DefaultFloat: 0 - m_DefaultInt: 0 - m_DefaultBool: 0 - m_Controller: {fileID: 0} - - m_Name: Shoot - m_Type: 9 - m_DefaultFloat: 0 - m_DefaultInt: 0 - m_DefaultBool: 0 - m_Controller: {fileID: 0} - m_AnimatorLayers: - - serializedVersion: 5 - m_Name: Base Layer - m_StateMachine: {fileID: 1107772262116321704} - m_Mask: {fileID: 0} - m_Motions: [] - m_Behaviours: [] - m_BlendingMode: 0 - m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 - m_IKPass: 0 - m_SyncedLayerAffectsTiming: 0 - m_Controller: {fileID: 9100000} ---- !u!1101 &1101104249963802978 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: Moving - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1102824315819425342} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.6 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1101 &1101366829127142966 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: Shoot - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1102254808008813326} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0 - m_TransitionOffset: 0 - m_ExitTime: 1 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1101 &1101806660142692138 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 2 - m_ConditionEvent: Moving - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1102207974245764242} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.6 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1101 &1101862483397811748 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 2 - m_ConditionEvent: Moving - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1102207974245764242} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.75 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1101 &1101947542735704306 -AnimatorStateTransition: - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_Conditions: - - m_ConditionMode: 1 - m_ConditionEvent: Moving - m_EventTreshold: 0 - m_DstStateMachine: {fileID: 0} - m_DstState: {fileID: 1102824315819425342} - m_Solo: 0 - m_Mute: 0 - m_IsExit: 0 - serializedVersion: 3 - m_TransitionDuration: 0.25 - m_TransitionOffset: 0 - m_ExitTime: 0.75 - m_HasExitTime: 0 - m_HasFixedDuration: 1 - m_InterruptionSource: 0 - m_OrderedInterruption: 1 - m_CanTransitionToSelf: 1 ---- !u!1102 &1102207974245764242 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Idle - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: - - {fileID: 1101947542735704306} - m_StateMachineBehaviours: [] - m_Position: {x: 50, y: 50, z: 0} - m_IKOnFeet: 0 - m_WriteDefaultValues: 1 - m_Mirror: 0 - m_SpeedParameterActive: 0 - m_MirrorParameterActive: 0 - m_CycleOffsetParameterActive: 0 - m_TimeParameterActive: 0 - m_Motion: {fileID: 0} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!1102 &1102254808008813326 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Shoot - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: - - {fileID: 1101104249963802978} - - {fileID: 1101806660142692138} - m_StateMachineBehaviours: [] - m_Position: {x: 50, y: 50, z: 0} - m_IKOnFeet: 0 - m_WriteDefaultValues: 1 - m_Mirror: 0 - m_SpeedParameterActive: 0 - m_MirrorParameterActive: 0 - m_CycleOffsetParameterActive: 0 - m_TimeParameterActive: 0 - m_Motion: {fileID: 7400006, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!1102 &1102824315819425342 -AnimatorState: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Moving - m_Speed: 1 - m_CycleOffset: 0 - m_Transitions: - - {fileID: 1101862483397811748} - m_StateMachineBehaviours: [] - m_Position: {x: 50, y: 50, z: 0} - m_IKOnFeet: 0 - m_WriteDefaultValues: 1 - m_Mirror: 0 - m_SpeedParameterActive: 0 - m_MirrorParameterActive: 0 - m_CycleOffsetParameterActive: 0 - m_TimeParameterActive: 0 - m_Motion: {fileID: 7400004, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - m_Tag: - m_SpeedParameter: - m_MirrorParameter: - m_CycleOffsetParameter: - m_TimeParameter: ---- !u!1107 &1107772262116321704 -AnimatorStateMachine: - serializedVersion: 5 - m_ObjectHideFlags: 1 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Base Layer - m_ChildStates: - - serializedVersion: 1 - m_State: {fileID: 1102207974245764242} - m_Position: {x: 252, y: 48, z: 0} - - serializedVersion: 1 - m_State: {fileID: 1102824315819425342} - m_Position: {x: 252, y: 204, z: 0} - - serializedVersion: 1 - m_State: {fileID: 1102254808008813326} - m_Position: {x: 420, y: 120, z: 0} - m_ChildStateMachines: [] - m_AnyStateTransitions: - - {fileID: 1101366829127142966} - m_EntryTransitions: [] - m_StateMachineTransitions: {} - m_StateMachineBehaviours: [] - m_AnyStatePosition: {x: 60, y: 132, z: 0} - m_EntryPosition: {x: 60, y: 168, z: 0} - m_ExitPosition: {x: 60, y: 96, z: 0} - m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} - m_DefaultState: {fileID: 1102207974245764242} diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Emissive.png b/Assets/Mirage/Samples~/InterestManagement/Models/Emissive.png deleted file mode 100644 index 61ca0cbaf3c..00000000000 Binary files a/Assets/Mirage/Samples~/InterestManagement/Models/Emissive.png and /dev/null differ diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Emissive.png.meta b/Assets/Mirage/Samples~/InterestManagement/Models/Emissive.png.meta deleted file mode 100644 index 1cde251ae95..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Models/Emissive.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: cf13c719a85e94858981d339517d75c5 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Metallic.png b/Assets/Mirage/Samples~/InterestManagement/Models/Metallic.png deleted file mode 100644 index d5d5559fe82..00000000000 Binary files a/Assets/Mirage/Samples~/InterestManagement/Models/Metallic.png and /dev/null differ diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Metallic.png.meta b/Assets/Mirage/Samples~/InterestManagement/Models/Metallic.png.meta deleted file mode 100644 index ca7ad7ef240..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Models/Metallic.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 400ae8214acb544a190fe96b95a0ac67 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Normal.png b/Assets/Mirage/Samples~/InterestManagement/Models/Normal.png deleted file mode 100644 index f1a448fa26e..00000000000 Binary files a/Assets/Mirage/Samples~/InterestManagement/Models/Normal.png and /dev/null differ diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Normal.png.meta b/Assets/Mirage/Samples~/InterestManagement/Models/Normal.png.meta deleted file mode 100644 index 7a2423ef4aa..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Models/Normal.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: c3cfa9b80a8c74da0952e06369feed86 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 9 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 1 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Recon_Tank - License.txt b/Assets/Mirage/Samples~/InterestManagement/Models/Recon_Tank - License.txt deleted file mode 100644 index ed1000633f4..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Models/Recon_Tank - License.txt +++ /dev/null @@ -1,7 +0,0 @@ -Recon Tank (update), by Mophs -https://opengameart.org/users/mophs - -Based on original work, Recon Tank, By MNDV.ecb, 2018 Eric Buisson -https://opengameart.org/content/recon-tank - -CC-BY 4.0 \ No newline at end of file diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/TankMaterial.mat b/Assets/Mirage/Samples~/InterestManagement/Models/TankMaterial.mat deleted file mode 100644 index 207b1f77e5e..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Models/TankMaterial.mat +++ /dev/null @@ -1,82 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: TankMaterial - m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} - m_ShaderKeywords: _EMISSION _METALLICGLOSSMAP _NORMALMAP _SPECGLOSSMAP - m_LightmapFlags: 0 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 2800000, guid: 2617bfecca4d44805a3a51a7aa215d7c, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 2800000, guid: 9b3e91ab0048a4aa3a17706a349c6bf5, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 2800000, guid: ce00d67f9368944fa8ef4de6ccc77bfa, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 2800000, guid: a7467e18a834e4d1390091c8b1ea562c, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 2800000, guid: a7467e18a834e4d1390091c8b1ea562c, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _BumpScale: 1.75 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _GlossMapScale: 0.09 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _UVSec: 0 - - _ZWrite: 1 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/reconTank.fbx b/Assets/Mirage/Samples~/InterestManagement/Models/reconTank.fbx deleted file mode 100644 index 5877b09457d..00000000000 Binary files a/Assets/Mirage/Samples~/InterestManagement/Models/reconTank.fbx and /dev/null differ diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/reconTank.fbx.meta b/Assets/Mirage/Samples~/InterestManagement/Models/reconTank.fbx.meta deleted file mode 100644 index 4896826033b..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Models/reconTank.fbx.meta +++ /dev/null @@ -1,239 +0,0 @@ -fileFormatVersion: 2 -guid: c65957d478ade4e1393938b70728003a -ModelImporter: - serializedVersion: 23 - fileIDToRecycleName: - 100000: Barrel - 100002: Barrel_end - 100004: Chasis - 100006: Recon_Tank - 100008: Recon_Tank_Rig - 100010: //RootNode - 100012: Root - 100014: Turret - 100016: Wheel_Front_L - 100018: Wheel_Front_L_end - 100020: Wheel_Middle_L - 100022: Wheel_Middle_L_end - 100024: Wheel_Rear_L - 100026: Wheel_Rear_L_end - 400000: Barrel - 400002: Barrel_end - 400004: Chasis - 400006: Recon_Tank - 400008: Recon_Tank_Rig - 400010: //RootNode - 400012: Root - 400014: Turret - 400016: Wheel_Front_L - 400018: Wheel_Front_L_end - 400020: Wheel_Middle_L - 400022: Wheel_Middle_L_end - 400024: Wheel_Rear_L - 400026: Wheel_Rear_L_end - 2100000: Recon_Tank - 4300000: Recon_Tank - 7400000: Recon_Tank_Rig|Drive - 7400002: Recon_Tank_Rig|Forward - 7400004: Recon_Tank_Rig|Idle - 7400006: Recon_Tank_Rig|Shoot - 9500000: //RootNode - 13700000: Recon_Tank - externalObjects: {} - materials: - importMaterials: 1 - materialName: 0 - materialSearch: 1 - materialLocation: 1 - animations: - legacyGenerateAnimations: 4 - bakeSimulation: 0 - resampleCurves: 1 - optimizeGameObjects: 0 - motionNodeName: - rigImportErrors: - rigImportWarnings: - animationImportErrors: - animationImportWarnings: - animationRetargetingWarnings: - animationDoRetargetingWarnings: 0 - importAnimatedCustomProperties: 0 - importConstraints: 0 - animationCompression: 1 - animationRotationError: 0.5 - animationPositionError: 0.5 - animationScaleError: 0.5 - animationWrapMode: 0 - extraExposedTransformPaths: [] - extraUserProperties: [] - clipAnimations: - - serializedVersion: 16 - name: Recon_Tank_Rig|Drive - takeName: Recon_Tank_Rig|Drive - firstFrame: 0 - lastFrame: 1 - wrapMode: 0 - orientationOffsetY: 0 - level: 0 - cycleOffset: 0 - loop: 0 - hasAdditiveReferencePose: 0 - loopTime: 0 - loopBlend: 0 - loopBlendOrientation: 0 - loopBlendPositionY: 0 - loopBlendPositionXZ: 0 - keepOriginalOrientation: 0 - keepOriginalPositionY: 1 - keepOriginalPositionXZ: 0 - heightFromFeet: 0 - mirror: 0 - bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 - curves: [] - events: [] - transformMask: [] - maskType: 3 - maskSource: {instanceID: 0} - additiveReferencePoseFrame: 0 - - serializedVersion: 16 - name: Recon_Tank_Rig|Forward - takeName: Recon_Tank_Rig|Forward - firstFrame: 0 - lastFrame: 25 - wrapMode: 0 - orientationOffsetY: 0 - level: 0 - cycleOffset: 0 - loop: 0 - hasAdditiveReferencePose: 0 - loopTime: 0 - loopBlend: 0 - loopBlendOrientation: 0 - loopBlendPositionY: 0 - loopBlendPositionXZ: 0 - keepOriginalOrientation: 0 - keepOriginalPositionY: 1 - keepOriginalPositionXZ: 0 - heightFromFeet: 0 - mirror: 0 - bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 - curves: [] - events: [] - transformMask: [] - maskType: 3 - maskSource: {instanceID: 0} - additiveReferencePoseFrame: 0 - - serializedVersion: 16 - name: Recon_Tank_Rig|Idle - takeName: Recon_Tank_Rig|Idle - firstFrame: 0 - lastFrame: 11 - wrapMode: 0 - orientationOffsetY: 0 - level: 0 - cycleOffset: 0 - loop: 0 - hasAdditiveReferencePose: 0 - loopTime: 1 - loopBlend: 1 - loopBlendOrientation: 0 - loopBlendPositionY: 0 - loopBlendPositionXZ: 0 - keepOriginalOrientation: 0 - keepOriginalPositionY: 1 - keepOriginalPositionXZ: 0 - heightFromFeet: 0 - mirror: 0 - bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 - curves: [] - events: [] - transformMask: [] - maskType: 3 - maskSource: {instanceID: 0} - additiveReferencePoseFrame: 0 - - serializedVersion: 16 - name: Recon_Tank_Rig|Shoot - takeName: Recon_Tank_Rig|Shoot - firstFrame: 0 - lastFrame: 15 - wrapMode: 0 - orientationOffsetY: 0 - level: 0 - cycleOffset: 0 - loop: 0 - hasAdditiveReferencePose: 0 - loopTime: 0 - loopBlend: 0 - loopBlendOrientation: 0 - loopBlendPositionY: 0 - loopBlendPositionXZ: 0 - keepOriginalOrientation: 0 - keepOriginalPositionY: 1 - keepOriginalPositionXZ: 0 - heightFromFeet: 0 - mirror: 0 - bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 - curves: [] - events: [] - transformMask: [] - maskType: 3 - maskSource: {instanceID: 0} - additiveReferencePoseFrame: 0 - isReadable: 1 - meshes: - lODScreenPercentages: [] - globalScale: 0.15 - meshCompression: 0 - addColliders: 0 - useSRGBMaterialColor: 1 - importVisibility: 1 - importBlendShapes: 1 - importCameras: 1 - importLights: 1 - swapUVChannels: 0 - generateSecondaryUV: 0 - useFileUnits: 1 - optimizeMeshForGPU: 1 - keepQuads: 0 - weldVertices: 1 - preserveHierarchy: 0 - indexFormat: 0 - secondaryUVAngleDistortion: 8 - secondaryUVAreaDistortion: 15.000001 - secondaryUVHardAngle: 88 - secondaryUVPackMargin: 4 - useFileScale: 1 - previousCalculatedGlobalScale: 0.0015 - hasPreviousCalculatedGlobalScale: 1 - tangentSpace: - normalSmoothAngle: 60 - normalImportMode: 0 - tangentImportMode: 3 - normalCalculationMode: 4 - legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 - blendShapeNormalImportMode: 1 - normalSmoothingSource: 0 - importAnimation: 1 - copyAvatar: 0 - humanDescription: - serializedVersion: 2 - human: [] - skeleton: [] - armTwist: 0.5 - foreArmTwist: 0.5 - upperLegTwist: 0.5 - legTwist: 0.5 - armStretch: 0.05 - legStretch: 0.05 - feetSpacing: 0 - rootMotionBoneName: - hasTranslationDoF: 0 - hasExtraRoot: 0 - skeletonHasParents: 1 - lastHumanDescriptionAvatarSource: {instanceID: 0} - animationType: 2 - humanoidOversampling: 1 - additionalBone: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Enemy.prefab b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Enemy.prefab new file mode 100644 index 00000000000..739e8d11cc9 --- /dev/null +++ b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Enemy.prefab @@ -0,0 +1,311 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4415124803507263412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9057824595171805708} + - component: {fileID: 662729490405160656} + - component: {fileID: 3624570427921084598} + m_Layer: 8 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &9057824595171805708 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 3254954141432383832} + m_Father: {fileID: 5328458565928408179} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &662729490405160656 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &3624570427921084598 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 792117fe9a386a8489e8010bec746339, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &5815001218983416211 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3254954141432383832} + - component: {fileID: 1800893346221236401} + - component: {fileID: 136369082707552984} + m_Layer: 8 + m_Name: Visor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3254954141432383832 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.39999998, z: 0.5} + m_LocalScale: {x: 0.5, y: 0.1, z: 0.2} + m_Children: [] + m_Father: {fileID: 9057824595171805708} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1800893346221236401 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &136369082707552984 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &8872462076811691049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5328458565928408179} + - component: {fileID: 8537344390966522168} + - component: {fileID: 887491563423388292} + - component: {fileID: 1143206540915927667} + - component: {fileID: 3175779197224890082} + - component: {fileID: -5485481910938820006} + m_Layer: 8 + m_Name: Enemy + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5328458565928408179 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.08, z: -20} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 9057824595171805708} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8537344390966522168 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + ServerObjectManager: {fileID: 0} + ClientObjectManager: {fileID: 0} + m_AssetId: + _onStartServer: + _event: + m_PersistentCalls: + m_Calls: [] + _onStartClient: + _event: + m_PersistentCalls: + m_Calls: [] + _onStartLocalPlayer: + _event: + m_PersistentCalls: + m_Calls: [] + _onAuthorityChanged: + _event: + m_PersistentCalls: + m_Calls: [] + _onStopClient: + _event: + m_PersistentCalls: + m_Calls: [] + _onStopServer: + _event: + m_PersistentCalls: + m_Calls: [] + hasSpawned: 0 +--- !u!114 &887491563423388292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2f74aedd71d9a4f55b3ce499326d45fb, type: 3} + m_Name: + m_EditorClassIdentifier: + syncMode: 0 + syncInterval: 0 + ClientAuthority: 0 + LocalPositionSensitivity: 0.01 + LocalRotationSensitivity: 0.01 + LocalScaleSensitivity: 0.01 +--- !u!136 &1143206540915927667 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 0.5 + m_Height: 1 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &3175779197224890082 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &-5485481910938820006 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2e2377ca89246784b8255a2def197ad5, type: 3} + m_Name: + m_EditorClassIdentifier: + syncMode: 0 + syncInterval: 0.1 + _minimumVisibilityRange: 1 + _maximumVisibilityRange: 10 + _distanceUpdateCheck: 0.1 + _frameUpdateCycle: 100 + OctreeVisibilityInspector: {fileID: 0} diff --git a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Loot.prefab.meta b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Enemy.prefab.meta similarity index 74% rename from Assets/Mirage/Samples~/InterestManagement/Prefabs/Loot.prefab.meta rename to Assets/Mirage/Samples~/InterestManagement/Prefabs/Enemy.prefab.meta index 471fe19236a..29dfa07949f 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Loot.prefab.meta +++ b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Enemy.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a9185e00d43994d3d937eaa684c53ff2 +guid: 8e8e2d109f733874cb5319e2b29aeae0 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Loot.prefab b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Loot.prefab deleted file mode 100644 index fece55f83f7..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Loot.prefab +++ /dev/null @@ -1,140 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1902385843019246699 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8999729599530353747} - - component: {fileID: 8166229233224018893} - - component: {fileID: 5745257042001409199} - - component: {fileID: 6411109812051327673} - - component: {fileID: 8918006532685550525} - m_Layer: 0 - m_Name: Loot - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &8999729599530353747 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 4.5784225, y: 0.113, z: 0.19971979} - m_LocalScale: {x: 0.2, y: 0.2, z: 0.2} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &8166229233224018893 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &5745257042001409199 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: e32dae99e9b3743fbae651d5da7b2695, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &6411109812051327673 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} - m_Name: - m_EditorClassIdentifier: - sceneId: 0 - ServerObjectManager: {fileID: 0} - ClientObjectManager: {fileID: 0} - m_AssetId: - OnStartServer: - m_PersistentCalls: - m_Calls: [] - OnStartClient: - m_PersistentCalls: - m_Calls: [] - OnStartLocalPlayer: - m_PersistentCalls: - m_Calls: [] - OnStartAuthority: - m_PersistentCalls: - m_Calls: [] - OnStopAuthority: - m_PersistentCalls: - m_Calls: [] - OnStopClient: - m_PersistentCalls: - m_Calls: [] - OnStopServer: - m_PersistentCalls: - m_Calls: [] - hasSpawned: 0 ---- !u!114 &8918006532685550525 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1731d8de2d0c84333b08ebe1e79f4118, type: 3} - m_Name: - m_EditorClassIdentifier: - syncMode: 0 - syncInterval: 0.1 - VisibilityRange: 3 - VisibilityUpdateInterval: 1 - ForceHidden: 0 diff --git a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Npc.prefab b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Npc.prefab deleted file mode 100644 index e0342482461..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Npc.prefab +++ /dev/null @@ -1,223 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1902385843019246699 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8999729599530353747} - - component: {fileID: 8166229233224018893} - - component: {fileID: 5745257042001409199} - - component: {fileID: 6411109812051327673} - - component: {fileID: 8918006532685550525} - - component: {fileID: -5847114806862335758} - - component: {fileID: -5831635982431117221} - - component: {fileID: 1157770445662775453} - m_Layer: 0 - m_Name: Npc - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &8999729599530353747 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 4.5784225, y: 0.113, z: 0.19971979} - m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!33 &8166229233224018893 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} ---- !u!23 &5745257042001409199 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 680fa26e3428a458795f900167753538, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &6411109812051327673 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} - m_Name: - m_EditorClassIdentifier: - sceneId: 0 - ServerObjectManager: {fileID: 0} - ClientObjectManager: {fileID: 0} - m_AssetId: - OnStartServer: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1157770445662775453} - m_TargetAssemblyTypeName: Mirage.Examples.InterestManagement.Wander, Mirage.Examples - m_MethodName: StartMoving - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - - m_Target: {fileID: -5847114806862335758} - m_TargetAssemblyTypeName: UnityEngine.Behaviour, UnityEngine - m_MethodName: set_enabled - m_Mode: 6 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 1 - m_CallState: 2 - OnStartClient: - m_PersistentCalls: - m_Calls: [] - OnStartLocalPlayer: - m_PersistentCalls: - m_Calls: [] - OnStartAuthority: - m_PersistentCalls: - m_Calls: [] - OnStopAuthority: - m_PersistentCalls: - m_Calls: [] - OnStopClient: - m_PersistentCalls: - m_Calls: [] - OnStopServer: - m_PersistentCalls: - m_Calls: [] - hasSpawned: 0 ---- !u!114 &8918006532685550525 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1731d8de2d0c84333b08ebe1e79f4118, type: 3} - m_Name: - m_EditorClassIdentifier: - syncMode: 0 - syncInterval: 0.1 - VisibilityRange: 3 - VisibilityUpdateInterval: 1 - ForceHidden: 0 ---- !u!195 &-5847114806862335758 -NavMeshAgent: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_AgentTypeID: 0 - m_Radius: 0.5 - m_Speed: 2 - m_Acceleration: 8 - avoidancePriority: 50 - m_AngularSpeed: 120 - m_StoppingDistance: 0 - m_AutoTraverseOffMeshLink: 1 - m_AutoBraking: 1 - m_AutoRepath: 1 - m_Height: 1 - m_BaseOffset: 0.5 - m_WalkableMask: 4294967295 - m_ObstacleAvoidanceType: 4 ---- !u!114 &-5831635982431117221 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2f74aedd71d9a4f55b3ce499326d45fb, type: 3} - m_Name: - m_EditorClassIdentifier: - syncMode: 0 - syncInterval: 0.1 - ClientAuthority: 0 - LocalPositionSensitivity: 0.01 - LocalRotationSensitivity: 0.01 - LocalScaleSensitivity: 0.01 ---- !u!114 &1157770445662775453 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1902385843019246699} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 281fbc0bc49fb42e4829bc47c8475efd, type: 3} - m_Name: - m_EditorClassIdentifier: - agent: {fileID: -5847114806862335758} - bounds: - m_Center: {x: 0, y: 0.1, z: 0} - m_Extent: {x: 4.5, y: 0, z: 4.5} diff --git a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Player.prefab b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Player.prefab new file mode 100644 index 00000000000..3de6d651876 --- /dev/null +++ b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Player.prefab @@ -0,0 +1,375 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &4415124803507263412 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9057824595171805708} + - component: {fileID: 662729490405160656} + - component: {fileID: 3624570427921084598} + m_Layer: 8 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &9057824595171805708 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 3254954141432383832} + m_Father: {fileID: 5328458565928408179} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &662729490405160656 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &3624570427921084598 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4415124803507263412} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 792117fe9a386a8489e8010bec746339, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &5815001218983416211 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3254954141432383832} + - component: {fileID: 1800893346221236401} + - component: {fileID: 136369082707552984} + m_Layer: 8 + m_Name: Visor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &3254954141432383832 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0.39999998, z: 0.5} + m_LocalScale: {x: 0.5, y: 0.1, z: 0.2} + m_Children: [] + m_Father: {fileID: 9057824595171805708} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &1800893346221236401 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &136369082707552984 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5815001218983416211} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 4294967295 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &8872462076811691049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5328458565928408179} + - component: {fileID: 8537344390966522168} + - component: {fileID: 887491563423388292} + - component: {fileID: 8993127209816276930} + - component: {fileID: 1143206540915927667} + - component: {fileID: 3175779197224890082} + - component: {fileID: 8704659178864205755} + - component: {fileID: 3086414693581178039} + - component: {fileID: 1979135486776911579} + m_Layer: 8 + m_Name: Player + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5328458565928408179 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.08, z: -20} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 9057824595171805708} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &8537344390966522168 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + sceneId: 0 + ServerObjectManager: {fileID: 0} + ClientObjectManager: {fileID: 0} + m_AssetId: + _onStartServer: + _event: + m_PersistentCalls: + m_Calls: [] + _onStartClient: + _event: + m_PersistentCalls: + m_Calls: [] + _onStartLocalPlayer: + _event: + m_PersistentCalls: + m_Calls: [] + _onAuthorityChanged: + _event: + m_PersistentCalls: + m_Calls: [] + _onStopClient: + _event: + m_PersistentCalls: + m_Calls: [] + _onStopServer: + _event: + m_PersistentCalls: + m_Calls: [] + hasSpawned: 0 +--- !u!114 &887491563423388292 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2f74aedd71d9a4f55b3ce499326d45fb, type: 3} + m_Name: + m_EditorClassIdentifier: + syncMode: 0 + syncInterval: 0 + ClientAuthority: 1 + LocalPositionSensitivity: 0.01 + LocalRotationSensitivity: 0.01 + LocalScaleSensitivity: 0.01 +--- !u!143 &8993127209816276930 +CharacterController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Height: 2 + m_Radius: 0.5 + m_SlopeLimit: 45 + m_StepOffset: 0.3 + m_SkinWidth: 0.08 + m_MinMoveDistance: 0.001 + m_Center: {x: 0, y: 0, z: 0} +--- !u!136 &1143206540915927667 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 0 + m_Radius: 0.5 + m_Height: 1 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} +--- !u!54 &3175779197224890082 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!114 &8704659178864205755 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e8f68561248aaca4fb96847ce24742ee, type: 3} + m_Name: + m_EditorClassIdentifier: + syncMode: 0 + syncInterval: 0 + characterController: {fileID: 8993127209816276930} + capsuleCollider: {fileID: 1143206540915927667} + moveSpeed: 8 + turnSensitivity: 5 + maxTurnSpeed: 150 + horizontal: 0 + vertical: 0 + turn: 0 + jumpSpeed: 0 + isGrounded: 1 + isFalling: 0 + velocity: {x: 0, y: 0, z: 0} +--- !u!114 &3086414693581178039 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 42d1f80407105ee4f960f0b51e89452d, type: 3} + m_Name: + m_EditorClassIdentifier: + syncMode: 0 + syncInterval: 0.1 + color: + serializedVersion: 2 + rgba: 4278190080 +--- !u!114 &1979135486776911579 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8872462076811691049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 2e2377ca89246784b8255a2def197ad5, type: 3} + m_Name: + m_EditorClassIdentifier: + syncMode: 0 + syncInterval: 0.1 + _minimumVisibilityRange: 1 + _maximumVisibilityRange: 10 + _distanceUpdateCheck: 0.1 + _frameUpdateCycle: 100 + OctreeVisibilityInspector: {fileID: 0} diff --git a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Npc.prefab.meta b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Player.prefab.meta similarity index 74% rename from Assets/Mirage/Samples~/InterestManagement/Prefabs/Npc.prefab.meta rename to Assets/Mirage/Samples~/InterestManagement/Prefabs/Player.prefab.meta index 8af51321b20..9a319167069 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Npc.prefab.meta +++ b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Player.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 943ce394f88b5436ca1beb0c643806d0 +guid: 3278e6f989772b244b11585e367587b7 PrefabImporter: externalObjects: {} userData: diff --git a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Tank.prefab b/Assets/Mirage/Samples~/InterestManagement/Prefabs/Tank.prefab deleted file mode 100644 index 8c2a216f821..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Tank.prefab +++ /dev/null @@ -1,489 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &1916082411674582 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 4492442352427800} - - component: {fileID: 114118589361100106} - - component: {fileID: 2240606817507776182} - - component: {fileID: 114250499875391520} - - component: {fileID: 6900008319038825817} - - component: {fileID: 5194388907919410155} - - component: {fileID: 114654712548978148} - - component: {fileID: -5216695118302212130} - m_Layer: 0 - m_Name: Tank - m_TagString: Player - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &4492442352427800 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1916082411674582} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7831918942946891954} - - {fileID: 6564220120147636086} - - {fileID: 5718089106632469514} - - {fileID: 5958005404294327165} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &114118589361100106 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1916082411674582} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} - m_Name: - m_EditorClassIdentifier: - sceneId: 0 - ServerObjectManager: {fileID: 0} - ClientObjectManager: {fileID: 0} - m_AssetId: - OnStartServer: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 114654712548978148} - m_TargetAssemblyTypeName: Mirage.Examples.InterestManagement.Tank, Mirage.Examples - m_MethodName: SetRandomName - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 - OnStartClient: - m_PersistentCalls: - m_Calls: [] - OnStartLocalPlayer: - m_PersistentCalls: - m_Calls: [] - OnStartAuthority: - m_PersistentCalls: - m_Calls: [] - OnStopAuthority: - m_PersistentCalls: - m_Calls: [] - OnStopClient: - m_PersistentCalls: - m_Calls: [] - OnStopServer: - m_PersistentCalls: - m_Calls: [] - hasSpawned: 0 ---- !u!95 &2240606817507776182 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1916082411674582} - m_Enabled: 1 - m_Avatar: {fileID: 9000000, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - m_Controller: {fileID: 9100000, guid: a7211483bbd794b6d85ed88576e7d85c, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 ---- !u!114 &114250499875391520 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1916082411674582} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 2f74aedd71d9a4f55b3ce499326d45fb, type: 3} - m_Name: - m_EditorClassIdentifier: - syncMode: 0 - syncInterval: 0.1 - ClientAuthority: 1 - LocalPositionSensitivity: 0.01 - LocalRotationSensitivity: 0.01 - LocalScaleSensitivity: 0.01 ---- !u!195 &6900008319038825817 -NavMeshAgent: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1916082411674582} - m_Enabled: 1 - m_AgentTypeID: 0 - m_Radius: 0.5 - m_Speed: 1 - m_Acceleration: 1 - avoidancePriority: 50 - m_AngularSpeed: 120 - m_StoppingDistance: 0 - m_AutoTraverseOffMeshLink: 1 - m_AutoBraking: 1 - m_AutoRepath: 1 - m_Height: 0.5 - m_BaseOffset: 0 - m_WalkableMask: 4294967295 - m_ObstacleAvoidanceType: 0 ---- !u!135 &5194388907919410155 -SphereCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1916082411674582} - m_Material: {fileID: 0} - m_IsTrigger: 1 - m_Enabled: 1 - serializedVersion: 2 - m_Radius: 0.5 - m_Center: {x: 0, y: 0.25, z: 0} ---- !u!114 &114654712548978148 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1916082411674582} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c0ce312394e7e461eb9a5d909c0e61f6, type: 3} - m_Name: - m_EditorClassIdentifier: - syncMode: 0 - syncInterval: 0.1 - agent: {fileID: 6900008319038825817} - animator: {fileID: 2240606817507776182} - rotationSpeed: 80 - playerName: - nameText: {fileID: 6763574687443798610} ---- !u!114 &-5216695118302212130 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1916082411674582} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1731d8de2d0c84333b08ebe1e79f4118, type: 3} - m_Name: - m_EditorClassIdentifier: - syncMode: 0 - syncInterval: 0.1 - VisibilityRange: 2 - VisibilityUpdateInterval: 1 - ForceHidden: 0 ---- !u!1 &1794225417093723422 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5958005404294327165} - - component: {fileID: 498336239798896173} - - component: {fileID: 6763574687443798610} - m_Layer: 0 - m_Name: NameText - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &5958005404294327165 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1794225417093723422} - m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} - m_LocalPosition: {x: 0, y: 1, z: 0} - m_LocalScale: {x: 0.25, y: 0.25, z: 1} - m_Children: [] - m_Father: {fileID: 4492442352427800} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} ---- !u!23 &498336239798896173 -MeshRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1794225417093723422} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_AdditionalVertexStreams: {fileID: 0} ---- !u!102 &6763574687443798610 -TextMesh: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1794225417093723422} - m_Text: - m_OffsetZ: 0 - m_CharacterSize: 1 - m_LineSpacing: 1 - m_Anchor: 1 - m_Alignment: 1 - m_TabSize: 4 - m_FontSize: 0 - m_FontStyle: 0 - m_RichText: 1 - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_Color: - serializedVersion: 2 - rgba: 4294967295 ---- !u!1 &4426914200102054949 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 6564220120147636086} - - component: {fileID: 7604806193092689376} - m_Layer: 0 - m_Name: Spot Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &6564220120147636086 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4426914200102054949} - m_LocalRotation: {x: 0.02281505, y: -0, z: -0, w: 0.9997397} - m_LocalPosition: {x: 0.07, y: 0.46, z: 0.126} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 4492442352427800} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 2.615, y: 0, z: 0} ---- !u!108 &7604806193092689376 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4426914200102054949} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 0 - m_Shape: 0 - m_Color: {r: 1, g: 0.9205329, b: 0.7877358, a: 1} - m_Intensity: 3 - m_Range: 15 - m_SpotAngle: 80 - m_InnerSpotAngle: 62.1886 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!1 &4730779867780281009 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 5718089106632469514} - m_Layer: 0 - m_Name: ProjectileMount - m_TagString: Untagged - m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &5718089106632469514 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 4730779867780281009} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0.412, z: 0.936} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 4492442352427800} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &7831918942947279416 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 4492442352427800} - m_Modifications: - - target: {fileID: 100010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_Name - value: 3D Model - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 13700000, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_Mesh - value: - objectReference: {fileID: 4300000, guid: c65957d478ade4e1393938b70728003a, type: 3} - - target: {fileID: 13700000, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - propertyPath: m_Materials.Array.data[0] - value: - objectReference: {fileID: 2100000, guid: 2e67e42170aa64aa9a33424f8045ac89, type: 2} - m_RemovedComponents: - - {fileID: 9500000, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - m_SourcePrefab: {fileID: 100100000, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} ---- !u!4 &7831918942946891954 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 400010, guid: 38b49695fc0a4418bbc350f2366660c5, type: 3} - m_PrefabInstance: {fileID: 7831918942947279416} - m_PrefabAsset: {fileID: 0} diff --git a/Assets/Mirage/Samples~/InterestManagement/Scenes/Scene.unity b/Assets/Mirage/Samples~/InterestManagement/Scenes/AOI.unity similarity index 53% rename from Assets/Mirage/Samples~/InterestManagement/Scenes/Scene.unity rename to Assets/Mirage/Samples~/InterestManagement/Scenes/AOI.unity index 60cd60c3eae..2710d3e9682 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Scenes/Scene.unity +++ b/Assets/Mirage/Samples~/InterestManagement/Scenes/AOI.unity @@ -24,9 +24,9 @@ RenderSettings: m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} m_AmbientIntensity: 1 - m_AmbientMode: 3 + m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} m_HaloStrength: 0.5 m_FlareStrength: 1 m_FlareFadeSpeed: 3 @@ -38,12 +38,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 11 + serializedVersion: 12 m_GIWorkflowMode: 1 m_GISettings: serializedVersion: 2 @@ -51,7 +51,7 @@ LightmapSettings: m_IndirectOutputScale: 1 m_AlbedoBoost: 1 m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 + m_EnableBakedLightmaps: 1 m_EnableRealtimeLightmaps: 0 m_LightmapEditorSettings: serializedVersion: 12 @@ -72,21 +72,21 @@ LightmapSettings: m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 - m_BakeBackend: 0 + m_BakeBackend: 1 m_PVRSampling: 1 m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 + m_PVRSampleCount: 512 m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentSampleCount: 256 m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 m_PVRFilterTypeDirect: 0 m_PVRFilterTypeIndirect: 0 m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 + m_PVREnvironmentMIS: 1 m_PVRCulling: 1 m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusIndirect: 5 @@ -98,7 +98,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 + m_LightingSettings: {fileID: 0} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 @@ -118,10 +118,12 @@ NavMeshSettings: manualTileSize: 0 tileSize: 256 accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 debug: m_Flags: 0 - m_NavMeshData: {fileID: 23800000, guid: 0bc607fa2e315482ebe98797e844e11f, type: 2} ---- !u!1 &20677886 + m_NavMeshData: {fileID: 0} +--- !u!1 &13339578 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -129,28 +131,30 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 20677887} - - component: {fileID: 20677889} - - component: {fileID: 20677888} + - component: {fileID: 13339579} m_Layer: 5 - m_Name: Text + m_Name: Offline m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &20677887 +--- !u!224 &13339579 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 20677886} + m_GameObject: {fileID: 13339578} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 721760295} + m_Children: + - {fileID: 1643848837} + - {fileID: 1255647429} + - {fileID: 112144981} + - {fileID: 1318993881} + m_Father: {fileID: 292297180} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -158,21 +162,40 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &20677888 +--- !u!1 &31908017 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 31908020} + - component: {fileID: 31908019} + - component: {fileID: 31908018} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &31908018 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 20677886} + m_GameObject: {fileID: 31908017} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -180,26 +203,45 @@ MonoBehaviour: m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 - m_FontStyle: 0 + m_FontStyle: 2 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 - m_Alignment: 4 + m_Alignment: 0 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Ready ---- !u!222 &20677889 + m_Text: localhost +--- !u!222 &31908019 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 20677886} + m_GameObject: {fileID: 31908017} m_CullTransparentMesh: 0 ---- !u!1 &88936773 +--- !u!224 &31908020 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 31908017} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1318993881} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -0.49999905} + m_SizeDelta: {x: -20, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &112144980 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -207,91 +249,132 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 88936777} - - component: {fileID: 88936776} - - component: {fileID: 88936775} - - component: {fileID: 88936774} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera + - component: {fileID: 112144981} + - component: {fileID: 112144984} + - component: {fileID: 112144983} + - component: {fileID: 112144982} + m_Layer: 5 + m_Name: StartClientButton + m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!81 &88936774 -AudioListener: +--- !u!224 &112144981 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 88936773} - m_Enabled: 1 ---- !u!124 &88936775 -Behaviour: + m_GameObject: {fileID: 112144980} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1593396976} + m_Father: {fileID: 13339579} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 88, y: -80} + m_SizeDelta: {x: 140, y: 25} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &112144982 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 88936773} + m_GameObject: {fileID: 112144980} m_Enabled: 1 ---- !u!20 &88936776 -Camera: + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 112144983} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 292297181} + m_TargetAssemblyTypeName: + m_MethodName: StartClientButtonHandler + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 1 +--- !u!114 &112144983 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 88936773} + m_GameObject: {fileID: 112144980} m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &88936777 -Transform: + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &112144984 +CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 88936773} - m_LocalRotation: {x: 0, y: 0.92387956, z: -0.38268343, w: 0} - m_LocalPosition: {x: 0, y: 6.5, z: 8} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 45, y: 180, z: 0} ---- !u!1 &251893064 + m_GameObject: {fileID: 112144980} + m_CullTransparentMesh: 0 +--- !u!1 &114156685 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -299,29 +382,113 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 251893065} + - component: {fileID: 114156689} + - component: {fileID: 114156688} + - component: {fileID: 114156687} + - component: {fileID: 114156686} + - component: {fileID: 114156690} m_Layer: 0 - m_Name: Spawn + m_Name: World Floor m_TagString: Untagged - m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &251893065 +--- !u!64 &114156686 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114156685} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 4 + m_Convex: 0 + m_CookingOptions: 30 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &114156687 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114156685} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 29b49c27a74f145918356859bd7af511, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &114156688 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114156685} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &114156689 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 251893064} + m_GameObject: {fileID: 114156685} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: 0, z: 3} - m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 100, y: 1, z: 100} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &472317786 +--- !u!114 &114156690 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 114156685} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d48e0c95e8575fd48a7ee2e75e6c5cc3, type: 3} + m_Name: + m_EditorClassIdentifier: + _enemyPrefab: {fileID: 8537344390966522168, guid: 8e8e2d109f733874cb5319e2b29aeae0, type: 3} + _numberOfEnemiesSpawn: 10000 + _serverObject: {fileID: 1092843210} + _plane: {fileID: 114156689} +--- !u!1 &186169289 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -329,50 +496,51 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 472317787} - - component: {fileID: 472317789} - - component: {fileID: 472317788} + - component: {fileID: 186169290} + - component: {fileID: 186169292} + - component: {fileID: 186169291} m_Layer: 5 - m_Name: Placeholder + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &472317787 +--- !u!224 &186169290 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 472317786} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 186169289} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 1986496790} + m_Father: {fileID: 1643848837} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &472317788 +--- !u!114 &186169291 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 472317786} + m_GameObject: {fileID: 186169289} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -380,26 +548,26 @@ MonoBehaviour: m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 - m_FontStyle: 2 + m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 - m_Alignment: 0 + m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Enter text... ---- !u!222 &472317789 + m_Text: Start Host +--- !u!222 &186169292 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 472317786} + m_GameObject: {fileID: 186169289} m_CullTransparentMesh: 0 ---- !u!1 &535739935 +--- !u!1 &291811936 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -407,78 +575,92 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 535739936} + - component: {fileID: 291811938} + - component: {fileID: 291811937} m_Layer: 0 - m_Name: Spawn + m_Name: Directional Light m_TagString: Untagged - m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} + m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &535739936 -Transform: +--- !u!108 &291811937 +Light: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 535739935} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 3, y: 0, z: -3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &559813745 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 559813746} - - component: {fileID: 559813747} - m_Layer: 0 - m_Name: Mobs - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &559813746 + m_GameObject: {fileID: 291811936} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &291811938 Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 559813745} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_GameObject: {fileID: 291811936} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 10 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &559813747 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 559813745} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a166da186771b475ead457d93b2bd81f, type: 3} - m_Name: - m_EditorClassIdentifier: - count: 50 - bounds: - m_Center: {x: 0, y: 0.1, z: 0} - m_Extent: {x: 4.5, y: 0, z: 4.5} - prefab: {fileID: 6411109812051327673, guid: 943ce394f88b5436ca1beb0c643806d0, type: 3} - serverObjectManager: {fileID: 1282001524} ---- !u!1 &597109994 + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &292297179 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -486,77 +668,96 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 597109995} - - component: {fileID: 597109997} - - component: {fileID: 597109996} + - component: {fileID: 292297180} + - component: {fileID: 292297183} + - component: {fileID: 292297182} + - component: {fileID: 292297181} m_Layer: 5 - m_Name: WinnerText + m_Name: NetworkManagerHUD m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &597109995 +--- !u!224 &292297180 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 597109994} + m_GameObject: {fileID: 292297179} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 607305578} + m_Children: + - {fileID: 13339579} + - {fileID: 1141915038} + m_Father: {fileID: 1538688332} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: -26.06} - m_SizeDelta: {x: 160, y: 30} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 95, y: -80} + m_SizeDelta: {x: 175, y: 150} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &597109996 +--- !u!114 &292297181 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 597109994} + m_GameObject: {fileID: 292297179} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: 6442dc8070ceb41f094e44de0bf87274, type: 3} + m_Name: + m_EditorClassIdentifier: + NetworkManager: {fileID: 1092843212} + NetworkAddress: localhost + DontDestroy: 1 + NetworkAddressInput: {fileID: 1318993880} + OfflineGO: {fileID: 13339578} + OnlineGO: {fileID: 1141915037} + StatusLabel: {fileID: 1113070486} +--- !u!114 &292297182 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 292297179} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 0.078431375} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 20 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 2 - m_MaxSize: 40 - m_Alignment: 1 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &597109997 + m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &292297183 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 597109994} + m_GameObject: {fileID: 292297179} m_CullTransparentMesh: 0 ---- !u!1 &607305577 +--- !u!1 &425841331 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -564,78 +765,82 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 607305578} - - component: {fileID: 607305580} - - component: {fileID: 607305579} - m_Layer: 5 - m_Name: WinnerTextLabel - m_TagString: Untagged + - component: {fileID: 425841334} + - component: {fileID: 425841333} + - component: {fileID: 425841332} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &607305578 -RectTransform: +--- !u!81 &425841332 +AudioListener: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 607305577} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 597109995} - m_Father: {fileID: 1966128035} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 15} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &607305579 -MonoBehaviour: + m_GameObject: {fileID: 425841331} + m_Enabled: 1 +--- !u!20 &425841333 +Camera: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 607305577} + m_GameObject: {fileID: 425841331} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 20 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 2 - m_MaxSize: 40 - m_Alignment: 1 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Winner! ---- !u!222 &607305580 -CanvasRenderer: + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &425841334 +Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 607305577} - m_CullTransparentMesh: 0 ---- !u!1 &637114753 + m_GameObject: {fileID: 425841331} + m_LocalRotation: {x: 0.2164396, y: 0, z: 0, w: 0.97629607} + m_LocalPosition: {x: 0, y: 10, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 25, y: 0, z: 0} +--- !u!1 &614653063 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -643,78 +848,74 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 637114754} - - component: {fileID: 637114756} - - component: {fileID: 637114755} + - component: {fileID: 614653064} + - component: {fileID: 614653066} + - component: {fileID: 614653065} m_Layer: 5 - m_Name: ScoreTextLabel + m_Name: PlayersPanel m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &637114754 + m_IsActive: 1 +--- !u!224 &614653064 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 637114753} + m_GameObject: {fileID: 614653063} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1162041874} - m_Father: {fileID: 1273045296} + m_Children: [] + m_Father: {fileID: 1538688332} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -70} - m_SizeDelta: {x: 60, y: 30} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &637114755 +--- !u!114 &614653065 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 637114753} + m_GameObject: {fileID: 614653063} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 + m_Color: {r: 0, g: 0, b: 0, a: 0} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'Score:' ---- !u!222 &637114756 + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &614653066 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 637114753} + m_GameObject: {fileID: 614653063} m_CullTransparentMesh: 0 ---- !u!1 &721152070 +--- !u!1 &822171096 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -722,78 +923,65 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 721152071} - - component: {fileID: 721152073} - - component: {fileID: 721152072} - m_Layer: 5 - m_Name: HealthTextLabel + - component: {fileID: 822171097} + - component: {fileID: 822171099} + - component: {fileID: 822171098} + m_Layer: 0 + m_Name: EventSystem m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &721152071 -RectTransform: + m_IsActive: 1 +--- !u!4 &822171097 +Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 721152070} + m_GameObject: {fileID: 822171096} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: -640, y: -360, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1278248529} - m_Father: {fileID: 1273045296} + m_Children: [] + m_Father: {fileID: 1538688332} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 1} - m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 0, y: -40} - m_SizeDelta: {x: 60, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &721152072 +--- !u!114 &822171098 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 721152070} + m_GameObject: {fileID: 822171096} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'Health:' ---- !u!222 &721152073 -CanvasRenderer: + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &822171099 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 721152070} - m_CullTransparentMesh: 0 ---- !u!1 &721760294 + m_GameObject: {fileID: 822171096} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!1 &974944475 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -801,129 +989,93 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 721760295} - - component: {fileID: 721760298} - - component: {fileID: 721760297} - - component: {fileID: 721760296} + - component: {fileID: 974944476} + - component: {fileID: 974944479} + - component: {fileID: 974944478} + - component: {fileID: 974944477} m_Layer: 5 - m_Name: ReadyButton + m_Name: Ping m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &721760295 +--- !u!224 &974944476 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 721760294} + m_GameObject: {fileID: 974944475} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 20677887} - m_Father: {fileID: 944343261} + m_Children: [] + m_Father: {fileID: 1141915038} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 80, y: 30} + m_AnchoredPosition: {x: 0, y: 44.2} + m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &721760296 +--- !u!114 &974944477 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 721760294} + m_GameObject: {fileID: 974944475} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Script: {fileID: 11500000, guid: bc654f29862fc2643b948f772ebb9e68, type: 3} m_Name: m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Highlighted - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 721760297} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1273045292} - m_MethodName: ReadyButtonHandler - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 1 ---- !u!114 &721760297 + Client: {fileID: 1092843213} + NetworkPingLabelText: {fileID: 974944478} +--- !u!114 &974944478 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 721760294} + m_GameObject: {fileID: 974944475} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Color: {r: 0.94117653, g: 0.94117653, b: 0.94117653, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &721760298 + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 1 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &974944479 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 721760294} + m_GameObject: {fileID: 974944475} m_CullTransparentMesh: 0 ---- !u!1 &754665786 +--- !u!1 &1092843205 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -931,1304 +1083,309 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 754665787} - - component: {fileID: 754665789} - - component: {fileID: 754665788} - m_Layer: 5 - m_Name: Text + - component: {fileID: 1092843215} + - component: {fileID: 1092843214} + - component: {fileID: 1092843213} + - component: {fileID: 1092843212} + - component: {fileID: 1092843211} + - component: {fileID: 1092843210} + - component: {fileID: 1092843209} + - component: {fileID: 1092843208} + - component: {fileID: 1092843206} + - component: {fileID: 1092843207} + - component: {fileID: 1092843216} + - component: {fileID: 1092843217} + m_Layer: 0 + m_Name: NetworkManager m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &754665787 -RectTransform: +--- !u!114 &1092843206 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 754665786} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 1986496790} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.5} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &754665788 + m_GameObject: {fileID: 1092843205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac6e8eccf4b6f4dc7b24c276ef47fde8, type: 3} + m_Name: + m_EditorClassIdentifier: + settings: {fileID: 0} +--- !u!114 &1092843207 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 754665786} + m_GameObject: {fileID: 1092843205} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: d9f46b2d67d7a054d8c13075473bd4a2, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 1 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &754665789 -CanvasRenderer: + Address: localhost + Port: 7777 + SocketLib: 0 + BufferSize: 262144 +--- !u!114 &1092843208 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 754665786} - m_CullTransparentMesh: 0 ---- !u!1 &944343260 -GameObject: + m_GameObject: {fileID: 1092843205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a7aaac73a16c040fd871cb977b5c557b, type: 3} + m_Name: + m_EditorClassIdentifier: + Client: {fileID: 1092843213} + Server: {fileID: 1092843214} + SceneManager: {fileID: 1092843211} + ClientObjectManager: {fileID: 1092843209} + ServerObjectManager: {fileID: 1092843210} + PlayerPrefab: {fileID: 8537344390966522168, guid: 3278e6f989772b244b11585e367587b7, type: 3} + AutoSpawn: 1 + startPositionIndex: 0 + startPositions: [] + playerSpawnMethod: 0 +--- !u!114 &1092843209 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 944343261} - - component: {fileID: 944343263} - m_Layer: 5 - m_Name: StartPanel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &944343261 -RectTransform: + m_GameObject: {fileID: 1092843205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a2cbc85c1c2f1c249bbe95ae110bbcde, type: 3} + m_Name: + m_EditorClassIdentifier: + Client: {fileID: 1092843213} + NetworkSceneManager: {fileID: 1092843211} + spawnPrefabs: + - {fileID: 8537344390966522168, guid: 3278e6f989772b244b11585e367587b7, type: 3} + - {fileID: 8537344390966522168, guid: 8e8e2d109f733874cb5319e2b29aeae0, type: 3} +--- !u!114 &1092843210 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 944343260} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1117608593} - - {fileID: 1986496790} - - {fileID: 721760295} - m_Father: {fileID: 1273045296} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -1080, y: -520} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &944343263 -CanvasRenderer: + m_GameObject: {fileID: 1092843205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b750203ddb2d9f84abd799a5c2c32cb6, type: 3} + m_Name: + m_EditorClassIdentifier: + Server: {fileID: 1092843214} + NetworkSceneManager: {fileID: 1092843211} +--- !u!114 &1092843211 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 944343260} - m_CullTransparentMesh: 0 ---- !u!1 &1107091652 -GameObject: + m_GameObject: {fileID: 1092843205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 30967dfd80dbb6c46a270a64ebecb951, type: 3} + m_Name: + m_EditorClassIdentifier: + Client: {fileID: 1092843213} + Server: {fileID: 1092843214} + DontDestroy: 1 + _onClientStartedSceneChange: + m_PersistentCalls: + m_Calls: [] + _onClientFinishedSceneChange: + m_PersistentCalls: + m_Calls: [] + _onServerStartedSceneChange: + m_PersistentCalls: + m_Calls: [] + _onServerFinishedSceneChange: + m_PersistentCalls: + m_Calls: [] + _onPlayerSceneReady: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1092843212 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1107091656} - - component: {fileID: 1107091655} - - component: {fileID: 1107091654} - - component: {fileID: 1107091653} - - component: {fileID: 1107091657} - m_Layer: 0 - m_Name: Ground - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 4294967295 - m_IsActive: 1 ---- !u!23 &1107091653 -MeshRenderer: + m_GameObject: {fileID: 1092843205} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8aab4c8111b7c411b9b92cf3dbc5bd4e, type: 3} + m_Name: + m_EditorClassIdentifier: + Server: {fileID: 1092843214} + Client: {fileID: 1092843213} + NetworkSceneManager: {fileID: 1092843211} + ServerObjectManager: {fileID: 1092843210} + ClientObjectManager: {fileID: 1092843209} +--- !u!114 &1092843213 +MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107091652} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 2 - m_RenderingLayerMask: 4294967295 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: 397533f07da1e4cbe8d30aa9ce7207af, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 1 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!64 &1107091654 -MeshCollider: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107091652} - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_Enabled: 1 - serializedVersion: 4 - m_Convex: 0 - m_CookingOptions: 30 - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!33 &1107091655 -MeshFilter: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107091652} - m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1107091656 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107091652} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1107091657 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1107091652} + m_GameObject: {fileID: 1092843205} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a166da186771b475ead457d93b2bd81f, type: 3} + m_Script: {fileID: 11500000, guid: abe6be14204d94224a3e7cd99dd2ea73, type: 3} m_Name: m_EditorClassIdentifier: - count: 500 - bounds: - m_Center: {x: 0, y: 0.1, z: 0} - m_Extent: {x: 4.5, y: 0, z: 4.5} - prefab: {fileID: 6411109812051327673, guid: a9185e00d43994d3d937eaa684c53ff2, type: 3} - serverObjectManager: {fileID: 1282001524} ---- !u!1 &1117608592 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1117608593} - - component: {fileID: 1117608595} - - component: {fileID: 1117608596} - m_Layer: 5 - m_Name: PlayerTextLabel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1117608593 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1117608592} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 944343261} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 36.3} - m_SizeDelta: {x: 90, y: 90} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1117608595 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1117608592} - m_CullTransparentMesh: 0 ---- !u!114 &1117608596 + EnablePeerMetrics: 0 + MetricsSize: 10 + SocketFactory: {fileID: 1092843207} + DisconnectOnException: 1 + authenticator: {fileID: 0} + _started: + _event: + m_PersistentCalls: + m_Calls: [] + _connected: + _event: + m_PersistentCalls: + m_Calls: [] + _authenticated: + _event: + m_PersistentCalls: + m_Calls: [] + _disconnected: + _event: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1092843214 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1117608592} + m_GameObject: {fileID: 1092843205} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: a5f5ec068f5604c32b160bc49ee97b75, type: 3} m_Name: m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: + EnablePeerMetrics: 0 + MetricsSize: 10 + MaxConnections: 4 + DisconnectOnException: 1 + Listening: 1 + SocketFactory: {fileID: 1092843207} + authenticator: {fileID: 0} + _started: + _event: + m_PersistentCalls: + m_Calls: [] + _connected: m_PersistentCalls: m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: 'Player Name:' ---- !u!1 &1162041873 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1162041874} - - component: {fileID: 1162041876} - - component: {fileID: 1162041875} - m_Layer: 5 - m_Name: ScoreText - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1162041874 -RectTransform: + _authenticated: + m_PersistentCalls: + m_Calls: [] + _disconnected: + m_PersistentCalls: + m_Calls: [] + _stopped: + _event: + m_PersistentCalls: + m_Calls: [] + _onStartHost: + _event: + m_PersistentCalls: + m_Calls: [] + _onStopHost: + _event: + m_PersistentCalls: + m_Calls: [] +--- !u!4 &1092843215 +Transform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1162041873} + m_GameObject: {fileID: 1092843205} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 637114754} - m_RootOrder: 0 + m_Father: {fileID: 0} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 60, y: 0} - m_SizeDelta: {x: 60, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1162041875 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1162041873} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &1162041876 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1162041873} - m_CullTransparentMesh: 0 ---- !u!1 &1273045291 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1273045296} - - component: {fileID: 1273045295} - - component: {fileID: 1273045294} - - component: {fileID: 1273045293} - - component: {fileID: 1273045292} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1273045292 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1273045291} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 21139f03d4abf3b4dbeb308fa6c880ef, type: 3} - m_Name: - m_EditorClassIdentifier: - MinimumPlayersForGame: 1 - LocalPlayer: {fileID: 0} - StartPanel: {fileID: 944343260} - GameOverPanel: {fileID: 1966128034} - HealthTextLabel: {fileID: 721152070} - ScoreTextLabel: {fileID: 637114753} - HealthText: {fileID: 1278248530} - ScoreText: {fileID: 1162041875} - PlayerNameText: {fileID: 754665788} - WinnerNameText: {fileID: 597109996} - IsGameReady: 0 - IsGameOver: 0 - players: [] - NetworkManager: {fileID: 1282001520} ---- !u!114 &1273045293 +--- !u!114 &1092843216 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1273045291} + m_GameObject: {fileID: 1092843205} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Script: {fileID: 11500000, guid: b7faf9bec5b689f429ad6fb4f08a3205, type: 3} m_Name: m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &1273045294 + _initialWorldSize: 1000 + _minimumNodeSize: 1 + _looseness: 1.25 + _visualDebug: 1 +--- !u!114 &1092843217 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1273045291} + m_GameObject: {fileID: 1092843205} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Script: {fileID: 11500000, guid: f333c8247442ac84db6c38b8ac66a6ed, type: 3} m_Name: m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 ---- !u!223 &1273045295 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1273045291} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &1273045296 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1273045291} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_Children: - - {fileID: 944343261} - - {fileID: 721152071} - - {fileID: 637114754} - - {fileID: 1966128035} - - {fileID: 7413922469798057160} - m_Father: {fileID: 0} - m_RootOrder: 8 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!1 &1278248528 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1278248529} - - component: {fileID: 1278248531} - - component: {fileID: 1278248530} - m_Layer: 5 - m_Name: HealthText - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1278248529 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1278248528} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 721152071} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 60, y: 0} - m_SizeDelta: {x: 60, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1278248530 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1278248528} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 0 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: ---- !u!222 &1278248531 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1278248528} - m_CullTransparentMesh: 0 ---- !u!1 &1282001517 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1282001518} - - component: {fileID: 1282001520} - - component: {fileID: 1282001523} - - component: {fileID: 1282001521} - - component: {fileID: 1282001525} - - component: {fileID: 1282001526} - - component: {fileID: 1282001522} - - component: {fileID: 1282001524} - - component: {fileID: 1282001519} - m_Layer: 0 - m_Name: NetworkManager - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1282001518 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1282001519 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d9f46b2d67d7a054d8c13075473bd4a2, type: 3} - m_Name: - m_EditorClassIdentifier: - Address: localhost - Port: 7777 - SocketLib: 0 - BufferSize: 262144 ---- !u!114 &1282001520 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 8aab4c8111b7c411b9b92cf3dbc5bd4e, type: 3} - m_Name: - m_EditorClassIdentifier: - Server: {fileID: 1282001523} - Client: {fileID: 1282001525} - NetworkSceneManager: {fileID: 1282001526} - ServerObjectManager: {fileID: 1282001524} - ClientObjectManager: {fileID: 1282001522} ---- !u!114 &1282001521 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a7aaac73a16c040fd871cb977b5c557b, type: 3} - m_Name: - m_EditorClassIdentifier: - Client: {fileID: 1282001525} - Server: {fileID: 1282001523} - SceneManager: {fileID: 1282001526} - ClientObjectManager: {fileID: 1282001522} - ServerObjectManager: {fileID: 1282001524} - PlayerPrefab: {fileID: 114118589361100106, guid: 80382f4d3904f4926bff940b8cb6311a, - type: 3} - AutoSpawn: 1 - startPositionIndex: 0 - startPositions: - - {fileID: 535739936} - - {fileID: 1501912663} - - {fileID: 251893065} - - {fileID: 1458789073} - playerSpawnMethod: 0 ---- !u!114 &1282001522 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a2cbc85c1c2f1c249bbe95ae110bbcde, type: 3} - m_Name: - m_EditorClassIdentifier: - Client: {fileID: 1282001525} - NetworkSceneManager: {fileID: 1282001526} - spawnPrefabs: - - {fileID: 114118589361100106, guid: 80382f4d3904f4926bff940b8cb6311a, type: 3} - - {fileID: 6411109812051327673, guid: a9185e00d43994d3d937eaa684c53ff2, type: 3} - - {fileID: 6411109812051327673, guid: 943ce394f88b5436ca1beb0c643806d0, type: 3} ---- !u!114 &1282001523 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: a5f5ec068f5604c32b160bc49ee97b75, type: 3} - m_Name: - m_EditorClassIdentifier: - EnablePeerMetrics: 0 - MetricsSize: 10 - MaxConnections: 4 - DisconnectOnException: 1 - Listening: 1 - SocketFactory: {fileID: 1282001519} - authenticator: {fileID: 0} - _started: - _event: - m_PersistentCalls: - m_Calls: [] - _connected: - m_PersistentCalls: - m_Calls: [] - _authenticated: - m_PersistentCalls: - m_Calls: [] - _disconnected: - m_PersistentCalls: - m_Calls: [] - _stopped: - _event: - m_PersistentCalls: - m_Calls: [] - _onStartHost: - _event: - m_PersistentCalls: - m_Calls: [] - _onStopHost: - _event: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &1282001524 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: b750203ddb2d9f84abd799a5c2c32cb6, type: 3} - m_Name: - m_EditorClassIdentifier: - Server: {fileID: 1282001523} - NetworkSceneManager: {fileID: 1282001526} ---- !u!114 &1282001525 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: abe6be14204d94224a3e7cd99dd2ea73, type: 3} - m_Name: - m_EditorClassIdentifier: - EnablePeerMetrics: 0 - MetricsSize: 10 - SocketFactory: {fileID: 1282001519} - DisconnectOnException: 1 - authenticator: {fileID: 0} - _started: - _event: - m_PersistentCalls: - m_Calls: [] - _connected: - _event: - m_PersistentCalls: - m_Calls: [] - _authenticated: - _event: - m_PersistentCalls: - m_Calls: [] - _disconnected: - _event: - m_PersistentCalls: - m_Calls: [] ---- !u!114 &1282001526 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1282001517} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 30967dfd80dbb6c46a270a64ebecb951, type: 3} - m_Name: - m_EditorClassIdentifier: - Client: {fileID: 1282001525} - Server: {fileID: 1282001523} - DontDestroy: 1 - _onClientStartedSceneChange: - m_PersistentCalls: - m_Calls: [] - _onClientFinishedSceneChange: - m_PersistentCalls: - m_Calls: [] - _onServerStartedSceneChange: - m_PersistentCalls: - m_Calls: [] - _onServerFinishedSceneChange: - m_PersistentCalls: - m_Calls: [] - _onPlayerSceneReady: - m_PersistentCalls: - m_Calls: [] ---- !u!1 &1458789072 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1458789073} - m_Layer: 0 - m_Name: Spawn - m_TagString: Untagged - m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1458789073 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1458789072} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -3, y: 0, z: 3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1501912662 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1501912663} - m_Layer: 0 - m_Name: Spawn - m_TagString: Untagged - m_Icon: {fileID: -964228994112308473, guid: 0000000000000000d000000000000000, type: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &1501912663 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1501912662} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: -3, y: 0, z: -3} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 5 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1633146726 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1633146729} - - component: {fileID: 1633146728} - - component: {fileID: 1633146727} - m_Layer: 0 - m_Name: EventSystem - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1633146727 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1633146726} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} - m_Name: - m_EditorClassIdentifier: - m_HorizontalAxis: Horizontal - m_VerticalAxis: Vertical - m_SubmitButton: Submit - m_CancelButton: Cancel - m_InputActionsPerSecond: 10 - m_RepeatDelay: 0.5 - m_ForceModuleActive: 0 ---- !u!114 &1633146728 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1633146726} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} - m_Name: - m_EditorClassIdentifier: - m_FirstSelected: {fileID: 0} - m_sendNavigationEvents: 1 - m_DragThreshold: 10 ---- !u!4 &1633146729 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1633146726} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 9 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1966128034 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1966128035} - - component: {fileID: 1966128037} - - component: {fileID: 1966128036} - m_Layer: 5 - m_Name: GameOverPanel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &1966128035 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1966128034} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 607305578} - m_Father: {fileID: 1273045296} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 300, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1966128036 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1966128034} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0.392} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1966128037 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1966128034} - m_CullTransparentMesh: 0 ---- !u!1 &1986496789 -GameObject: + Server: {fileID: 1092843214} + startOnHeadless: 1 +--- !u!1 &1113070485 +GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 1986496790} - - component: {fileID: 1986496793} - - component: {fileID: 1986496792} - - component: {fileID: 1986496791} + - component: {fileID: 1113070488} + - component: {fileID: 1113070487} + - component: {fileID: 1113070486} m_Layer: 5 - m_Name: InputField - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1986496790 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986496789} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 472317787} - - {fileID: 754665787} - m_Father: {fileID: 944343261} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 40} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1986496791 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986496789} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Highlighted - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 1986496792} - m_TextComponent: {fileID: 754665788} - m_Placeholder: {fileID: 472317788} - m_ContentType: 0 - m_InputType: 0 - m_AsteriskChar: 42 - m_KeyboardType: 0 - m_LineType: 0 - m_HideMobileInput: 0 - m_CharacterValidation: 0 - m_CharacterLimit: 0 - m_OnEndEdit: - m_PersistentCalls: - m_Calls: [] - m_OnValueChanged: - m_PersistentCalls: - m_Calls: [] - m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_CustomCaretColor: 0 - m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} - m_Text: - m_CaretBlinkRate: 0.85 - m_CaretWidth: 1 - m_ReadOnly: 0 ---- !u!114 &1986496792 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986496789} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1986496793 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1986496789} - m_CullTransparentMesh: 0 ---- !u!1 &2054208274 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2054208276} - - component: {fileID: 2054208275} - m_Layer: 0 - m_Name: Directional light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &2054208275 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054208274} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.802082 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &2054208276 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2054208274} - m_LocalRotation: {x: 0.10938167, y: 0.8754261, z: -0.40821788, w: 0.23456976} - m_LocalPosition: {x: 0, y: 10, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 50, y: 150, z: 0} ---- !u!114 &695766753322977103 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469798057163} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6442dc8070ceb41f094e44de0bf87274, type: 3} - m_Name: - m_EditorClassIdentifier: - NetworkManager: {fileID: 1282001520} - NetworkAddress: localhost - DontDestroy: 1 - NetworkAddressInput: {fileID: 7413922470766294194} - OfflineGO: {fileID: 7413922471034320681} - OnlineGO: {fileID: 7413922471169038002} - StatusLabel: {fileID: 7413922471197805030} ---- !u!114 &7413922469238954914 + m_Name: StatusText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1113070486 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469238954924} + m_GameObject: {fileID: 1113070485} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 0.94117653, g: 0.94117653, b: 0.94117653, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -2240,80 +1397,41 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 - m_Alignment: 4 + m_Alignment: 1 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: Stop Network ---- !u!222 &7413922469238954915 + m_Text: +--- !u!222 &1113070487 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469238954924} + m_GameObject: {fileID: 1113070485} m_CullTransparentMesh: 0 ---- !u!1 &7413922469238954924 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7413922469238954925} - - component: {fileID: 7413922469238954915} - - component: {fileID: 7413922469238954914} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7413922469238954925 +--- !u!224 &1113070488 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469238954924} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_GameObject: {fileID: 1113070485} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 7413922469884916180} + m_Father: {fileID: 1141915038} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!224 &7413922469798057160 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469798057163} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7413922471034320686} - - {fileID: 7413922471169038003} - m_Father: {fileID: 1273045296} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 95, y: -80} - m_SizeDelta: {x: 175, y: 150} + m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &7413922469798057163 +--- !u!1 &1141915037 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2321,55 +1439,37 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7413922469798057160} - - component: {fileID: 7413922469798057167} - - component: {fileID: 7413922469798057166} - - component: {fileID: 695766753322977103} + - component: {fileID: 1141915038} m_Layer: 5 - m_Name: NetworkManagerHUD + m_Name: Online m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &7413922469798057166 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469798057163} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 0.078431375} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &7413922469798057167 -CanvasRenderer: + m_IsActive: 0 +--- !u!224 &1141915038 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469798057163} - m_CullTransparentMesh: 0 ---- !u!1 &7413922469798861377 + m_GameObject: {fileID: 1141915037} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1113070488} + - {fileID: 1483767777} + - {fileID: 974944476} + m_Father: {fileID: 292297180} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1189836656 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2377,50 +1477,51 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7413922469798861380} - - component: {fileID: 7413922469798861383} - - component: {fileID: 7413922469798861382} + - component: {fileID: 1189836657} + - component: {fileID: 1189836659} + - component: {fileID: 1189836658} m_Layer: 5 - m_Name: Placeholder + m_Name: Text m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &7413922469798861380 +--- !u!224 &1189836657 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469798861377} + m_GameObject: {fileID: 1189836656} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 7413922470766294195} + m_Father: {fileID: 1255647429} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.49999905} - m_SizeDelta: {x: -20, y: -13} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &7413922469798861382 +--- !u!114 &1189836658 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469798861377} + m_GameObject: {fileID: 1189836656} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -2428,86 +1529,26 @@ MonoBehaviour: m_FontData: m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} m_FontSize: 14 - m_FontStyle: 2 + m_FontStyle: 0 m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 - m_Alignment: 0 + m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: localhost ---- !u!222 &7413922469798861383 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469798861377} - m_CullTransparentMesh: 0 ---- !u!222 &7413922469802125730 + m_Text: Start Server Only +--- !u!222 &1189836659 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469802125743} + m_GameObject: {fileID: 1189836656} m_CullTransparentMesh: 0 ---- !u!224 &7413922469802125740 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469802125743} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 7413922470195793858} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &7413922469802125741 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469802125743} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Start Client Only ---- !u!1 &7413922469802125743 +--- !u!1 &1255647428 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2515,80 +1556,44 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7413922469802125740} - - component: {fileID: 7413922469802125730} - - component: {fileID: 7413922469802125741} + - component: {fileID: 1255647429} + - component: {fileID: 1255647432} + - component: {fileID: 1255647431} + - component: {fileID: 1255647430} m_Layer: 5 - m_Name: Text + m_Name: StartServerButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &7413922469884916170 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469884916183} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &7413922469884916171 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469884916183} - m_CullTransparentMesh: 0 ---- !u!224 &7413922469884916180 +--- !u!224 &1255647429 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469884916183} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_GameObject: {fileID: 1255647428} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 7413922469238954925} - m_Father: {fileID: 7413922471169038003} + - {fileID: 1189836657} + m_Father: {fileID: 13339579} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0} - m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: 0, y: 30} - m_SizeDelta: {x: 160, y: 30} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 88, y: -50} + m_SizeDelta: {x: 140, y: 25} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &7413922469884916181 +--- !u!114 &1255647430 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922469884916183} + m_GameObject: {fileID: 1255647428} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} @@ -2596,6 +1601,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -2621,12 +1627,13 @@ MonoBehaviour: m_SelectedTrigger: Selected m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 7413922469884916170} + m_TargetGraphic: {fileID: 1255647431} m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 695766753322977103} - m_MethodName: StopButtonHandler + - m_Target: {fileID: 292297181} + m_TargetAssemblyTypeName: + m_MethodName: StartServerOnlyButtonHandler m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -2636,32 +1643,13 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 1 ---- !u!1 &7413922469884916183 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7413922469884916180} - - component: {fileID: 7413922469884916171} - - component: {fileID: 7413922469884916170} - - component: {fileID: 7413922469884916181} - m_Layer: 5 - m_Name: StopButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &7413922470195793856 +--- !u!114 &1255647431 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470195793869} + m_GameObject: {fileID: 1255647428} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -2670,6 +1658,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -2684,48 +1673,48 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!222 &7413922470195793857 +--- !u!222 &1255647432 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470195793869} + m_GameObject: {fileID: 1255647428} m_CullTransparentMesh: 0 ---- !u!224 &7413922470195793858 -RectTransform: +--- !u!1 &1318993879 +GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470195793869} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7413922469802125740} - m_Father: {fileID: 7413922471034320686} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 88, y: -80} - m_SizeDelta: {x: 140, y: 25} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &7413922470195793859 + serializedVersion: 6 + m_Component: + - component: {fileID: 1318993881} + - component: {fileID: 1318993883} + - component: {fileID: 1318993882} + - component: {fileID: 1318993880} + m_Layer: 5 + m_Name: NetworkAddressInputField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1318993880 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470195793869} + m_GameObject: {fileID: 1318993879} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3} m_Name: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -2751,12 +1740,29 @@ MonoBehaviour: m_SelectedTrigger: Selected m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 7413922470195793856} - m_OnClick: + m_TargetGraphic: {fileID: 1318993882} + m_TextComponent: {fileID: 2106680388} + m_Placeholder: {fileID: 31908018} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_OnSubmit: + m_PersistentCalls: + m_Calls: [] + m_OnValueChanged: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 695766753322977103} - m_MethodName: StartClientButtonHandler + - m_Target: {fileID: 292297181} + m_TargetAssemblyTypeName: + m_MethodName: OnNetworkAddressInputUpdate m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -2766,67 +1772,74 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 1 ---- !u!1 &7413922470195793869 -GameObject: + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 + m_ShouldActivateOnSelect: 1 +--- !u!224 &1318993881 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7413922470195793858} - - component: {fileID: 7413922470195793857} - - component: {fileID: 7413922470195793856} - - component: {fileID: 7413922470195793859} - m_Layer: 5 - m_Name: StartClientButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &7413922470402318324 + m_GameObject: {fileID: 1318993879} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 31908020} + - {fileID: 2106680386} + m_Father: {fileID: 13339579} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 88, y: -120} + m_SizeDelta: {x: 140, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1318993882 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470402318326} + m_GameObject: {fileID: 1318993879} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Start Server Only ---- !u!222 &7413922470402318325 + m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1318993883 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470402318326} + m_GameObject: {fileID: 1318993879} m_CullTransparentMesh: 0 ---- !u!1 &7413922470402318326 +--- !u!1 &1325943442 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2834,9 +1847,9 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7413922470402318327} - - component: {fileID: 7413922470402318325} - - component: {fileID: 7413922470402318324} + - component: {fileID: 1325943443} + - component: {fileID: 1325943445} + - component: {fileID: 1325943444} m_Layer: 5 m_Name: Text m_TagString: Untagged @@ -2844,18 +1857,18 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &7413922470402318327 +--- !u!224 &1325943443 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470402318326} + m_GameObject: {fileID: 1325943442} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 7413922470584677030} + m_Father: {fileID: 1483767777} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -2863,31 +1876,13 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &7413922470484982537 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7413922470484982542} - - component: {fileID: 7413922470484982543} - - component: {fileID: 7413922470484982540} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &7413922470484982540 +--- !u!114 &1325943444 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470484982537} + m_GameObject: {fileID: 1325943442} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} @@ -2896,6 +1891,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -2907,41 +1903,22 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 - m_Alignment: 0 + m_Alignment: 4 m_AlignByGeometry: 0 - m_RichText: 0 - m_HorizontalOverflow: 1 + m_RichText: 1 + m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: ---- !u!224 &7413922470484982542 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470484982537} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 7413922470766294195} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -0.49999905} - m_SizeDelta: {x: -20, y: -13} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7413922470484982543 + m_Text: Stop Network +--- !u!222 &1325943445 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470484982537} + m_GameObject: {fileID: 1325943442} m_CullTransparentMesh: 0 ---- !u!1 &7413922470584677025 +--- !u!1 &1483767776 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -2949,81 +1926,44 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7413922470584677030} - - component: {fileID: 7413922470584677029} - - component: {fileID: 7413922470584677028} - - component: {fileID: 7413922470584677031} + - component: {fileID: 1483767777} + - component: {fileID: 1483767780} + - component: {fileID: 1483767779} + - component: {fileID: 1483767778} m_Layer: 5 - m_Name: StartServerButton + m_Name: StopButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &7413922470584677028 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470584677025} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &7413922470584677029 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470584677025} - m_CullTransparentMesh: 0 ---- !u!224 &7413922470584677030 +--- !u!224 &1483767777 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470584677025} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_GameObject: {fileID: 1483767776} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 7413922470402318327} - m_Father: {fileID: 7413922471034320686} + - {fileID: 1325943443} + m_Father: {fileID: 1141915038} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 88, y: -50} - m_SizeDelta: {x: 140, y: 25} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 30} + m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &7413922470584677031 +--- !u!114 &1483767778 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470584677025} + m_GameObject: {fileID: 1483767776} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} @@ -3031,6 +1971,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -3056,12 +1997,13 @@ MonoBehaviour: m_SelectedTrigger: Selected m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 7413922470584677028} + m_TargetGraphic: {fileID: 1483767779} m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 695766753322977103} - m_MethodName: StartServerOnlyButtonHandler + - m_Target: {fileID: 292297181} + m_TargetAssemblyTypeName: + m_MethodName: StopButtonHandler m_Mode: 1 m_Arguments: m_ObjectArgument: {fileID: 0} @@ -3071,13 +2013,13 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 1 ---- !u!114 &7413922470766294192 +--- !u!114 &1483767779 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470766294205} + m_GameObject: {fileID: 1483767776} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -3086,11 +2028,12 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} m_Type: 1 m_PreserveAspect: 0 m_FillCenter: 1 @@ -3100,110 +2043,196 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!222 &7413922470766294193 +--- !u!222 &1483767780 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470766294205} + m_GameObject: {fileID: 1483767776} m_CullTransparentMesh: 0 ---- !u!114 &7413922470766294194 +--- !u!1 &1538688328 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1538688332} + - component: {fileID: 1538688331} + - component: {fileID: 1538688330} + - component: {fileID: 1538688329} + m_Layer: 5 + m_Name: NetworkManagerHudInCanvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1538688329 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1538688328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1538688330 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1538688328} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1538688331 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1538688328} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1538688332 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1538688328} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 292297180} + - {fileID: 822171097} + - {fileID: 614653064} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1593396975 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1593396976} + - component: {fileID: 1593396978} + - component: {fileID: 1593396977} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1593396976 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1593396975} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 112144981} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1593396977 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470766294205} + m_GameObject: {fileID: 1593396975} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3} + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} m_Name: m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 7413922470766294192} - m_TextComponent: {fileID: 7413922470484982540} - m_Placeholder: {fileID: 7413922469798861382} - m_ContentType: 0 - m_InputType: 0 - m_AsteriskChar: 42 - m_KeyboardType: 0 - m_LineType: 0 - m_HideMobileInput: 0 - m_CharacterValidation: 0 - m_CharacterLimit: 0 - m_OnEndEdit: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_OnValueChanged: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 695766753322977103} - m_MethodName: OnNetworkAddressInputUpdate - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 1 - m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_CustomCaretColor: 0 - m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} - m_Text: - m_CaretBlinkRate: 0.85 - m_CaretWidth: 1 - m_ReadOnly: 0 ---- !u!224 &7413922470766294195 -RectTransform: + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Start Client Only +--- !u!222 &1593396978 +CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470766294205} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7413922469798861380} - - {fileID: 7413922470484982542} - m_Father: {fileID: 7413922471034320686} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 88, y: -120} - m_SizeDelta: {x: 140, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &7413922470766294205 + m_GameObject: {fileID: 1593396975} + m_CullTransparentMesh: 0 +--- !u!1 &1643848836 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -3211,30 +2240,30 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7413922470766294195} - - component: {fileID: 7413922470766294193} - - component: {fileID: 7413922470766294192} - - component: {fileID: 7413922470766294194} + - component: {fileID: 1643848837} + - component: {fileID: 1643848840} + - component: {fileID: 1643848839} + - component: {fileID: 1643848838} m_Layer: 5 - m_Name: NetworkAddressInputField + m_Name: StartHostButton m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &7413922470771695600 +--- !u!224 &1643848837 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470771695603} + m_GameObject: {fileID: 1643848836} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 7413922470911255789} - m_Father: {fileID: 7413922471034320686} + - {fileID: 186169290} + m_Father: {fileID: 13339579} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} @@ -3242,13 +2271,13 @@ RectTransform: m_AnchoredPosition: {x: 88, y: -20} m_SizeDelta: {x: 140, y: 25} m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &7413922470771695601 +--- !u!114 &1643848838 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470771695603} + m_GameObject: {fileID: 1643848836} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} @@ -3256,6 +2285,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -3281,11 +2311,12 @@ MonoBehaviour: m_SelectedTrigger: Selected m_DisabledTrigger: Disabled m_Interactable: 1 - m_TargetGraphic: {fileID: 7413922470771695606} + m_TargetGraphic: {fileID: 1643848839} m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 695766753322977103} + - m_Target: {fileID: 292297181} + m_TargetAssemblyTypeName: m_MethodName: StartHostButtonHandler m_Mode: 1 m_Arguments: @@ -3296,32 +2327,13 @@ MonoBehaviour: m_StringArgument: m_BoolArgument: 0 m_CallState: 1 ---- !u!1 &7413922470771695603 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7413922470771695600} - - component: {fileID: 7413922470771695607} - - component: {fileID: 7413922470771695606} - - component: {fileID: 7413922470771695601} - m_Layer: 5 - m_Name: StartHostButton - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &7413922470771695606 +--- !u!114 &1643848839 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470771695603} + m_GameObject: {fileID: 1643848836} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} @@ -3330,6 +2342,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -3344,56 +2357,15 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 ---- !u!222 &7413922470771695607 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470771695603} - m_CullTransparentMesh: 0 ---- !u!114 &7413922470911255778 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470911255788} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Start Host ---- !u!222 &7413922470911255779 +--- !u!222 &1643848840 CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470911255788} + m_GameObject: {fileID: 1643848836} m_CullTransparentMesh: 0 ---- !u!1 &7413922470911255788 +--- !u!1 &2106680385 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -3401,9 +2373,9 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7413922470911255789} - - component: {fileID: 7413922470911255779} - - component: {fileID: 7413922470911255778} + - component: {fileID: 2106680386} + - component: {fileID: 2106680387} + - component: {fileID: 2106680388} m_Layer: 5 m_Name: Text m_TagString: Untagged @@ -3411,145 +2383,40 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!224 &7413922470911255789 +--- !u!224 &2106680386 RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922470911255788} + m_GameObject: {fileID: 2106680385} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] - m_Father: {fileID: 7413922470771695600} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &7413922471034320681 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7413922471034320686} - m_Layer: 5 - m_Name: Offline - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7413922471034320686 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922471034320681} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7413922470771695600} - - {fileID: 7413922470584677030} - - {fileID: 7413922470195793858} - - {fileID: 7413922470766294195} - m_Father: {fileID: 7413922469798057160} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &7413922471169038002 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7413922471169038003} - m_Layer: 5 - m_Name: Online - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!224 &7413922471169038003 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922471169038002} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 7413922471197805025} - - {fileID: 7413922469884916180} - m_Father: {fileID: 7413922469798057160} + m_Father: {fileID: 1318993881} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: -0.49999905} + m_SizeDelta: {x: -20, y: -13} m_Pivot: {x: 0.5, y: 0.5} ---- !u!1 &7413922471197805024 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7413922471197805025} - - component: {fileID: 7413922471197805031} - - component: {fileID: 7413922471197805030} - m_Layer: 5 - m_Name: StatusText - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7413922471197805025 -RectTransform: +--- !u!222 &2106680387 +CanvasRenderer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922471197805024} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 7413922471169038003} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 160, y: 30} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &7413922471197805030 + m_GameObject: {fileID: 2106680385} + m_CullTransparentMesh: 0 +--- !u!114 &2106680388 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922471197805024} + m_GameObject: {fileID: 2106680385} m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} @@ -3558,6 +2425,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -3569,18 +2437,10 @@ MonoBehaviour: m_BestFit: 0 m_MinSize: 10 m_MaxSize: 40 - m_Alignment: 1 + m_Alignment: 0 m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 m_VerticalOverflow: 0 m_LineSpacing: 1 m_Text: ---- !u!222 &7413922471197805031 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7413922471197805024} - m_CullTransparentMesh: 0 diff --git a/Assets/Mirage/Samples~/InterestManagement/Scenes/AOI.unity.meta b/Assets/Mirage/Samples~/InterestManagement/Scenes/AOI.unity.meta new file mode 100644 index 00000000000..a1d87145bed --- /dev/null +++ b/Assets/Mirage/Samples~/InterestManagement/Scenes/AOI.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b2f08d39804a39048a71e3d919bf30cd +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Scenes/SceneSettings.lighting b/Assets/Mirage/Samples~/InterestManagement/Scenes/SceneSettings.lighting new file mode 100644 index 00000000000..e7ddce86b32 --- /dev/null +++ b/Assets/Mirage/Samples~/InterestManagement/Scenes/SceneSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SceneSettings + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/Controller.controller.meta b/Assets/Mirage/Samples~/InterestManagement/Scenes/SceneSettings.lighting.meta similarity index 60% rename from Assets/Mirage/Samples~/InterestManagement/Models/Controller.controller.meta rename to Assets/Mirage/Samples~/InterestManagement/Scenes/SceneSettings.lighting.meta index 46b8d258fdb..20a6f8c677f 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Models/Controller.controller.meta +++ b/Assets/Mirage/Samples~/InterestManagement/Scenes/SceneSettings.lighting.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 1c4c1b6d2df87468a907635593380db5 +guid: 83722d6d70b6ef74fa4de264202505cd NativeFormatImporter: externalObjects: {} - mainObjectFileID: 9100000 + mainObjectFileID: 4890085278179872738 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/EnemySpawner.cs b/Assets/Mirage/Samples~/InterestManagement/Scripts/EnemySpawner.cs new file mode 100644 index 00000000000..a4ed8f32ea0 --- /dev/null +++ b/Assets/Mirage/Samples~/InterestManagement/Scripts/EnemySpawner.cs @@ -0,0 +1,55 @@ +using System.Collections; +using UnityEngine; +using Random = UnityEngine.Random; + +namespace Mirage.Examples.InterestManagement +{ + public class EnemySpawner : MonoBehaviour + { + [SerializeField] private NetworkIdentity _enemyPrefab; + [SerializeField] private int _numberOfEnemiesSpawn = 100; + [SerializeField] private ServerObjectManager _serverObject; + [SerializeField] private Transform _plane; + + private float _planeX, _planeZ; + + private void Awake() + { + _serverObject.Server.Started.AddListener(OnStartServer); + + Mesh mesh = _plane.GetComponent().mesh; + + _planeX = (mesh.bounds.size.x / 2) * _plane.localScale.x; + _planeZ = (mesh.bounds.size.z / 2) * _plane.localScale.z; + } + + private void OnStartServer() + { + StartCoroutine(nameof(SpawnEnemies)); + } + + private IEnumerator SpawnEnemies() + { + var spawned = 0; + + for (int i = 0; i < _numberOfEnemiesSpawn; i++) + { + float xRand = Random.Range(-_planeX, _planeX); + float zRand = Random.Range(-_planeZ, _planeZ); + + NetworkIdentity enemy = Instantiate(_enemyPrefab, new Vector3(xRand, 1, zRand), Quaternion.identity); + + _serverObject.Spawn(enemy); + + spawned++; + + if(spawned == 100) + { + yield return new WaitForEndOfFrame(); + + spawned = 0; + } + } + } + } +} diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/EnemySpawner.cs.meta b/Assets/Mirage/Samples~/InterestManagement/Scripts/EnemySpawner.cs.meta new file mode 100644 index 00000000000..8369da7737a --- /dev/null +++ b/Assets/Mirage/Samples~/InterestManagement/Scripts/EnemySpawner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d48e0c95e8575fd48a7ee2e75e6c5cc3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/MonsterRandomMovement.cs b/Assets/Mirage/Samples~/InterestManagement/Scripts/MonsterRandomMovement.cs new file mode 100644 index 00000000000..cc91996ea3f --- /dev/null +++ b/Assets/Mirage/Samples~/InterestManagement/Scripts/MonsterRandomMovement.cs @@ -0,0 +1,59 @@ +using UnityEngine; + +namespace Mirage.Examples.OneK +{ + public class MonsterRandomMovement : NetworkBehaviour + { + public float speed = 1; + public float movementProbability = 0.5f; + public float movementDistance = 20; + + bool moving; + Vector3 start; + Vector3 destination; + + public void OnStartServer() + { + start = transform.position; + } + + private void Awake() + { + Identity.OnStartServer.AddListener(OnStartServer); + } + + [Server(error = false)] + void Update() + { + if (moving) + { + if (Vector3.Distance(transform.position, destination) <= 0.01f) + { + moving = false; + } + else + { + transform.position = Vector3.MoveTowards(transform.position, destination, speed * Time.deltaTime); + } + } + else + { + float r = Random.value; + if (r < movementProbability * Time.deltaTime) + { + Vector2 circlePos = Random.insideUnitCircle; + Vector3 dir = new Vector3(circlePos.x, 0, circlePos.y); + Vector3 dest = transform.position + dir * movementDistance; + + // within move dist around start? + // (don't want to wander off) + if (Vector3.Distance(start, dest) <= movementDistance) + { + destination = dest; + moving = true; + } + } + } + } + } +} diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/MonsterRandomMovement.cs.meta b/Assets/Mirage/Samples~/InterestManagement/Scripts/MonsterRandomMovement.cs.meta new file mode 100644 index 00000000000..33c36379dc2 --- /dev/null +++ b/Assets/Mirage/Samples~/InterestManagement/Scripts/MonsterRandomMovement.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4bee3fa414d597f4eb3b9b38c3f0d461 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/Spawner.cs b/Assets/Mirage/Samples~/InterestManagement/Scripts/Spawner.cs deleted file mode 100644 index c3d1c2ae90f..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Scripts/Spawner.cs +++ /dev/null @@ -1,32 +0,0 @@ -using UnityEngine; - -namespace Mirage.Examples.InterestManagement -{ - public class Spawner : MonoBehaviour - { - public int count = 50; - public Bounds bounds; - - public NetworkIdentity prefab; - public ServerObjectManager serverObjectManager; - - public void Spawn() - { - for (int i = 0; i < count; i++) - SpawnPrefab(); - } - - public void SpawnPrefab() - { - var position = new Vector3( - (Random.value - 0.5f) * bounds.size.x + bounds.center.x, - (Random.value - 0.5f) * bounds.size.y + bounds.center.y, - (Random.value - 0.5f) * bounds.size.z + bounds.center.z - ); - - NetworkIdentity newLoot = GameObject.Instantiate(prefab, position, Quaternion.identity, transform); - - serverObjectManager.Spawn(newLoot); - } - } -} \ No newline at end of file diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/Tank.cs b/Assets/Mirage/Samples~/InterestManagement/Scripts/Tank.cs deleted file mode 100644 index 90ab0f9d9f7..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Scripts/Tank.cs +++ /dev/null @@ -1,55 +0,0 @@ -using UnityEngine; -using UnityEngine.AI; - -namespace Mirage.Examples.InterestManagement -{ - public class Tank : NetworkBehaviour - { - [Header("Components")] - public NavMeshAgent agent; - public Animator animator; - - [Header("Movement")] - public float rotationSpeed = 100; - - [Header("Game Stats")] - [SyncVar] - public string playerName; - - public TextMesh nameText; - - [Server] - public void SetRandomName() - { - playerName = "PLAYER" + Random.Range(1, 99); - } - - void Update() - { - if (Camera.main) - { - nameText.text = playerName; - nameText.transform.rotation = Camera.main.transform.rotation; - } - - // movement for local player - if (!IsLocalPlayer) - return; - - //Set local players name color to green - nameText.color = Color.green; - - // rotate - float horizontal = Input.GetAxis("Horizontal"); - transform.Rotate(0, horizontal * rotationSpeed * Time.deltaTime, 0); - - // move - float vertical = Input.GetAxis("Vertical"); - Vector3 forward = transform.TransformDirection(Vector3.forward); - agent.velocity = forward * Mathf.Max(vertical, 0) * agent.speed; - animator.SetBool("Moving", agent.velocity != Vector3.zero); - - } - - } -} diff --git a/Assets/Mirage/Samples~/InterestManagement/Scripts/Wander.cs b/Assets/Mirage/Samples~/InterestManagement/Scripts/Wander.cs deleted file mode 100644 index 24929d5b3ba..00000000000 --- a/Assets/Mirage/Samples~/InterestManagement/Scripts/Wander.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections; -using UnityEngine; -using UnityEngine.AI; - -namespace Mirage.Examples.InterestManagement -{ - public class Wander : MonoBehaviour - { - public NavMeshAgent agent; - - public Bounds bounds; - - // Start is called before the first frame update - public void StartMoving() - { - StartCoroutine(Move()); - } - - public IEnumerator Move() - { - while (true) - { - - var position = new Vector3( - (Random.value - 0.5f) * bounds.size.x + bounds.center.x, - (Random.value - 0.5f) * bounds.size.y + bounds.center.y, - (Random.value - 0.5f) * bounds.size.z + bounds.center.z - ); - - agent.destination = position; - - yield return new WaitForSeconds(Random.Range(1.0f, 5.0f)); - } - } - } -} diff --git a/Assets/Mirage/Samples~/Tanks/Scenes/SceneSettings.lighting b/Assets/Mirage/Samples~/Tanks/Scenes/SceneSettings.lighting new file mode 100644 index 00000000000..e7ddce86b32 --- /dev/null +++ b/Assets/Mirage/Samples~/Tanks/Scenes/SceneSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SceneSettings + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Tank.prefab.meta b/Assets/Mirage/Samples~/Tanks/Scenes/SceneSettings.lighting.meta similarity index 60% rename from Assets/Mirage/Samples~/InterestManagement/Prefabs/Tank.prefab.meta rename to Assets/Mirage/Samples~/Tanks/Scenes/SceneSettings.lighting.meta index e2fe80b4238..2bb08187f1f 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Prefabs/Tank.prefab.meta +++ b/Assets/Mirage/Samples~/Tanks/Scenes/SceneSettings.lighting.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 80382f4d3904f4926bff940b8cb6311a +guid: 8f15b6722d9bf3d44a8eb2556731e393 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 100100000 + mainObjectFileID: 4890085278179872738 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Tests/Editor/NetworkIdentityCallbackTests.cs b/Assets/Tests/Editor/NetworkIdentityCallbackTests.cs index ae170e50b77..5c57fcf61cd 100644 --- a/Assets/Tests/Editor/NetworkIdentityCallbackTests.cs +++ b/Assets/Tests/Editor/NetworkIdentityCallbackTests.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using Mirage.Serialization; using NSubstitute; using NUnit.Framework; @@ -14,41 +13,6 @@ public class NetworkIdentityCallbackTests { #region test components - class CheckObserverExceptionNetworkBehaviour : NetworkVisibility - { - public int called; - public INetworkPlayer valuePassed; - public override void OnRebuildObservers(HashSet observers, bool initialize) { } - public override bool OnCheckObserver(INetworkPlayer player) - { - ++called; - valuePassed = player; - throw new Exception("some exception"); - } - } - - class CheckObserverTrueNetworkBehaviour : NetworkVisibility - { - public int called; - public override void OnRebuildObservers(HashSet observers, bool initialize) { } - public override bool OnCheckObserver(INetworkPlayer player) - { - ++called; - return true; - } - } - - class CheckObserverFalseNetworkBehaviour : NetworkVisibility - { - public int called; - public override void OnRebuildObservers(HashSet observers, bool initialize) { } - public override bool OnCheckObserver(INetworkPlayer player) - { - ++called; - return false; - } - } - class SerializeTest1NetworkBehaviour : NetworkBehaviour { public int value; @@ -105,38 +69,18 @@ public override void OnDeserialize(NetworkReader reader, bool initialState) } } - class RebuildObserversNetworkBehaviour : NetworkVisibility - { - public INetworkPlayer observer; - public override bool OnCheckObserver(INetworkPlayer player) { return true; } - public override void OnRebuildObservers(HashSet observers, bool initialize) - { - observers.Add(observer); - } - } - - class RebuildEmptyObserversNetworkBehaviour : NetworkVisibility - { - public override bool OnCheckObserver(INetworkPlayer player) { return true; } - public override void OnRebuildObservers(HashSet observers, bool initialize) { } - } - #endregion GameObject gameObject; NetworkIdentity identity; - private NetworkServer server; private ServerObjectManager serverObjectManager; private GameObject networkServerGameObject; - INetworkPlayer player1; - INetworkPlayer player2; - [SetUp] public void SetUp() { networkServerGameObject = new GameObject(); - server = networkServerGameObject.AddComponent(); + var server = networkServerGameObject.AddComponent(); serverObjectManager = networkServerGameObject.AddComponent(); serverObjectManager.Server = server; networkServerGameObject.AddComponent(); @@ -146,8 +90,8 @@ public void SetUp() identity.Server = server; identity.ServerObjectManager = serverObjectManager; - player1 = Substitute.For(); - player2 = Substitute.For(); + _ = Substitute.For(); + _ = Substitute.For(); } [TearDown] @@ -262,26 +206,6 @@ public void SetOverrideClientOwner() Assert.That(identity.Owner, Is.EqualTo(original)); } - [Test] - public void RemoveObserverInternal() - { - // call OnStartServer so that observers dict is created - identity.StartServer(); - - // add an observer connection - INetworkPlayer player = Substitute.For(); - identity.observers.Add(player); - - INetworkPlayer player2 = Substitute.For(); - // RemoveObserverInternal with invalid connection should do nothing - identity.RemoveObserverInternal(player2); - Assert.That(identity.observers, Is.EquivalentTo(new[] { player })); - - // RemoveObserverInternal with existing connection should remove it - identity.RemoveObserverInternal(player); - Assert.That(identity.observers, Is.Empty); - } - [Test] public void AssignSceneID() { @@ -448,44 +372,6 @@ public void NotifyAuthorityCallsOnStartStopAuthority() Assert.That(stopAuth, Is.EqualTo(1)); } - [Test] - public void OnCheckObserverCatchesException() - { - // add component - gameObject.AddComponent(); - - // should catch the exception internally and not throw it - Assert.Throws(() => - { - identity.OnCheckObserver(player1); - }); - } - - [Test] - public void OnCheckObserverTrue() - { - // create a networkidentity with a component that returns true - // result should still be true. - var gameObjectTrue = new GameObject(); - NetworkIdentity identityTrue = gameObjectTrue.AddComponent(); - CheckObserverTrueNetworkBehaviour compTrue = gameObjectTrue.AddComponent(); - Assert.That(identityTrue.OnCheckObserver(player1), Is.True); - Assert.That(compTrue.called, Is.EqualTo(1)); - } - - [Test] - public void OnCheckObserverFalse() - { - // create a networkidentity with a component that returns true and - // one component that returns false. - // result should still be false if any one returns false. - var gameObjectFalse = new GameObject(); - NetworkIdentity identityFalse = gameObjectFalse.AddComponent(); - CheckObserverFalseNetworkBehaviour compFalse = gameObjectFalse.AddComponent(); - Assert.That(identityFalse.OnCheckObserver(player1), Is.False); - Assert.That(compFalse.called, Is.EqualTo(1)); - } - [Test] public void OnSerializeAllSafely() { @@ -640,163 +526,5 @@ public void OnStopServerEx() identity.StopServer(); }); } - - [Test] - public void AddObserver() - { - identity.Server = server; - - // call OnStartServer so that observers dict is created - identity.StartServer(); - - // call AddObservers - identity.AddObserver(player1); - identity.AddObserver(player2); - Assert.That(identity.observers, Is.EquivalentTo(new[] { player1, player2 })); - - // adding a duplicate connectionId shouldn't overwrite the original - identity.AddObserver(player1); - Assert.That(identity.observers, Is.EquivalentTo(new[] { player1, player2 })); - } - - [Test] - public void ClearObservers() - { - // call OnStartServer so that observers dict is created - identity.StartServer(); - - // add some observers - identity.observers.Add(player1); - identity.observers.Add(player2); - - // call ClearObservers - identity.ClearObservers(); - Assert.That(identity.observers.Count, Is.EqualTo(0)); - } - - - [Test] - public void Reset() - { - // creates .observers and generates a netId - identity.StartServer(); - identity.Owner = player1; - identity.observers.Add(player1); - - // mark for reset and reset - identity.Reset(); - Assert.That(identity.NetId, Is.EqualTo(0)); - Assert.That(identity.Owner, Is.Null); - } - - [Test] - public void GetNewObservers() - { - // add components - RebuildObserversNetworkBehaviour comp = gameObject.AddComponent(); - comp.observer = player1; - - // get new observers - var observers = new HashSet(); - bool result = identity.GetNewObservers(observers, true); - Assert.That(result, Is.True); - Assert.That(observers.Count, Is.EqualTo(1)); - Assert.That(observers.Contains(comp.observer), Is.True); - } - - [Test] - public void GetNewObserversClearsHashSet() - { - // get new observers. no observer components so it should just clear - // it and not do anything else - var observers = new HashSet - { - player1 - }; - identity.GetNewObservers(observers, true); - Assert.That(observers.Count, Is.EqualTo(0)); - } - - [Test] - public void GetNewObserversFalseIfNoComponents() - { - // get new observers. no observer components so it should be false - var observers = new HashSet(); - bool result = identity.GetNewObservers(observers, true); - Assert.That(result, Is.False); - } - - // RebuildObservers should always add the own ready connection - // (if any). fixes https://github.com/vis2k/Mirror/issues/692 - [Test] - public void RebuildObserversDoesNotAddPlayerIfNotReady() - { - // add at least one observers component, otherwise it will just add - // all server connections - gameObject.AddComponent(); - - // add own player connection that isn't ready - (_, NetworkPlayer connection) = PipedConnections(Substitute.For(), Substitute.For()); - // set not ready (ready is default true now) - connection.SceneIsReady = false; - - identity.Owner = connection; - - // call OnStartServer so that observers dict is created - identity.StartServer(); - - // rebuild shouldn't add own player because conn wasn't set ready - identity.RebuildObservers(true); - Assert.That(identity.observers, Does.Not.Contains(identity.Owner)); - } - - [Test] - public void RebuildObserversAddsReadyConnectionsIfImplemented() - { - - // add a proximity checker - // one with a ready connection, one with no ready connection, one with null connection - RebuildObserversNetworkBehaviour comp = gameObject.AddComponent(); - comp.observer = Substitute.For(); - comp.observer.SceneIsReady.Returns(true); - - // rebuild observers should add all component's ready observers - identity.RebuildObservers(true); - Assert.That(identity.observers, Is.EquivalentTo(new[] { comp.observer })); - } - - - [Test] - public void RebuildObserversDoesntAddNotReadyConnectionsIfImplemented() - { - // add a proximity checker - // one with a ready connection, one with no ready connection, one with null connection - RebuildObserversNetworkBehaviour comp = gameObject.AddComponent(); - comp.observer = Substitute.For(); - comp.observer.SceneIsReady.Returns(false); - - // rebuild observers should add all component's ready observers - identity.RebuildObservers(true); - Assert.That(identity.observers, Is.Empty); - } - - [Test] - public void RebuildObserversAddsReadyServerConnectionsIfNotImplemented() - { - INetworkPlayer readyConnection = Substitute.For(); - readyConnection.SceneIsReady.Returns(true); - INetworkPlayer notReadyConnection = Substitute.For(); - notReadyConnection.SceneIsReady.Returns(false); - - // add some server connections - server.Players.Add(readyConnection); - server.Players.Add(notReadyConnection); - - // rebuild observers should add all ready server connections - // because no component implements OnRebuildObservers - identity.RebuildObservers(true); - Assert.That(identity.observers, Is.EquivalentTo(new[] { readyConnection })); - } - } } diff --git a/Assets/Tests/Performance/Runtime/10K/Scenes/SceneSettings.lighting b/Assets/Tests/Performance/Runtime/10K/Scenes/SceneSettings.lighting new file mode 100644 index 00000000000..e7ddce86b32 --- /dev/null +++ b/Assets/Tests/Performance/Runtime/10K/Scenes/SceneSettings.lighting @@ -0,0 +1,63 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!850595691 &4890085278179872738 +LightingSettings: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: SceneSettings + serializedVersion: 3 + m_GIWorkflowMode: 1 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_RealtimeEnvironmentLighting: 1 + m_BounceScale: 1 + m_AlbedoBoost: 1 + m_IndirectOutputScale: 1 + m_UsingShadowmask: 1 + m_BakeBackend: 0 + m_LightmapMaxSize: 1024 + m_BakeResolution: 40 + m_Padding: 2 + m_TextureCompression: 1 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAO: 0 + m_MixedBakeMode: 2 + m_LightmapsBakeMode: 1 + m_FilterMode: 1 + m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0} + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_RealtimeResolution: 2 + m_ForceWhiteAlbedo: 0 + m_ForceUpdates: 0 + m_FinalGather: 0 + m_FinalGatherRayCount: 256 + m_FinalGatherFiltering: 1 + m_PVRCulling: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_LightProbeSampleCountMultiplier: 4 + m_PVRBounces: 2 + m_PVRMinBounces: 2 + m_PVREnvironmentMIS: 0 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 diff --git a/Assets/Mirage/Samples~/InterestManagement/Models/TankMaterial.mat.meta b/Assets/Tests/Performance/Runtime/10K/Scenes/SceneSettings.lighting.meta similarity index 60% rename from Assets/Mirage/Samples~/InterestManagement/Models/TankMaterial.mat.meta rename to Assets/Tests/Performance/Runtime/10K/Scenes/SceneSettings.lighting.meta index eab7ef042c0..3f892475d86 100644 --- a/Assets/Mirage/Samples~/InterestManagement/Models/TankMaterial.mat.meta +++ b/Assets/Tests/Performance/Runtime/10K/Scenes/SceneSettings.lighting.meta @@ -1,8 +1,8 @@ fileFormatVersion: 2 -guid: 7cc61de96bdfc4604a8c25fa711b4c6a +guid: 303d72ac6a59cb24185de20401cd95c8 NativeFormatImporter: externalObjects: {} - mainObjectFileID: 2100000 + mainObjectFileID: 4890085278179872738 userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Tests/Performance/Runtime/HeadlessBenchmark/Scripts/HeadlessBenchmark.cs b/Assets/Tests/Performance/Runtime/HeadlessBenchmark/Scripts/HeadlessBenchmark.cs index 8bf8be24c9e..117ea7473c3 100644 --- a/Assets/Tests/Performance/Runtime/HeadlessBenchmark/Scripts/HeadlessBenchmark.cs +++ b/Assets/Tests/Performance/Runtime/HeadlessBenchmark/Scripts/HeadlessBenchmark.cs @@ -118,7 +118,6 @@ void ParseForServerMode() spawner.Server = server; server.Started.AddListener(OnServerStarted); - server.Authenticated.AddListener(conn => serverObjectManager.SpawnVisibleObjects(conn, true)); server.StartServer(); Console.WriteLine("Starting Server Only Mode"); } diff --git a/Assets/Tests/Performance/Runtime/InterestManagement.meta b/Assets/Tests/Performance/Runtime/InterestManagement.meta new file mode 100644 index 00000000000..921f5978946 --- /dev/null +++ b/Assets/Tests/Performance/Runtime/InterestManagement.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 01e1a2e6465e87f4bad82f5c05cb73d6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Tests/Performance/Runtime/InterestManagement/InterestManagementPerformanceBase.cs b/Assets/Tests/Performance/Runtime/InterestManagement/InterestManagementPerformanceBase.cs new file mode 100644 index 00000000000..cfbf19341e1 --- /dev/null +++ b/Assets/Tests/Performance/Runtime/InterestManagement/InterestManagementPerformanceBase.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections; +using Mirage.SocketLayer; +using Mirage.Components; +using NUnit.Framework; +using Unity.PerformanceTesting; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEngine.SceneManagement; +using UnityEngine.TestTools; +using static UnityEngine.Object; + +namespace Mirage.Tests.Performance.Runtime +{ + [Ignore("NotImplemented")] + public class SpatialHashInterestManagementPerformanceTest : InterestManagementPerformanceBase + { + protected override IEnumerator SetupInterestManagement(NetworkServer server) + { + throw new NotImplementedException(); + //server.gameObject.AddComponent(); + + // wait frame for setup + yield return null; + } + } + [Ignore("NotImplemented")] + public class GridAndDistanceInterestManagementPerformanceTest : InterestManagementPerformanceBase + { + protected override IEnumerator SetupInterestManagement(NetworkServer server) + { + throw new NotImplementedException(); + //server.gameObject.AddComponent(); + + // wait frame for setup + yield return null; + } + } + + [Ignore("NotImplemented")] + public class QuadTreeInterestManagementPerformanceTest : InterestManagementPerformanceBase + { + protected override IEnumerator SetupInterestManagement(NetworkServer server) + { + throw new NotImplementedException(); + //server.gameObject.AddComponent(); + + // wait frame for setup + yield return null; + } + } + [Category("Performance"), Category("InterestManagement")] + public abstract class InterestManagementPerformanceBase + { + const string testScene = "Assets/Examples/InterestManagement/Scenes/AOI.unity"; + const string NpcSpawnerName = "NpcSpawner"; + const string LootSpawnerName = "LootSpawner"; + const int clientCount = 100; + const int stationaryCount = 3500; + const int movingCount = 500; + + + private NetworkServer server; + private TestSocketFactory transport; + IConnection[] clients; + + [UnitySetUp] + public IEnumerator Setup() + { + yield return EditorSceneManager.LoadSceneAsyncInPlayMode(testScene, new LoadSceneParameters(LoadSceneMode.Single)); + + // wait 1 frame for start to be called + yield return null; + + server = FindObjectOfType(); + transport = server.gameObject.AddComponent(); + server.SocketFactory = transport; + + bool started = false; + server.MaxConnections = clientCount; + + removeExistingIM(); + // wait frame for destroy + yield return null; + + yield return SetupInterestManagement(server); + + server.Started.AddListener(() => started = true); + server.StartServer(); + + // wait for start + while (!started) { yield return null; } + + // connect N clients + clients = new IConnection[clientCount]; + for (int i = 0; i < clientCount; i++) + { + transport.CreateClientSocket().Connect(default); + } + } + + private void removeExistingIM() + { + BaseVisibilityInspector[] existing = server.GetComponents(); + + for (int i = 0; i < existing.Length; i++) + { + Destroy(existing[i]); + } + } + + /// + /// Called before server starts + /// + /// + /// + protected abstract IEnumerator SetupInterestManagement(NetworkServer server); + + + [UnityTearDown] + public IEnumerator TearDown() + { + server.Stop(); + + // open new scene so that old one is destroyed + SceneManager.CreateScene("empty", new CreateSceneParameters(LocalPhysicsMode.None)); + yield return SceneManager.UnloadSceneAsync(testScene); + } + + [UnityTest] + public IEnumerator RunsWithoutErrors() + { + yield return new WaitForSeconds(5); + } + + [UnityTest, Performance] + public IEnumerator FramePerformance() + { + SampleGroup[] sampleGroups = + { + new SampleGroup("Observers", SampleUnit.Microsecond), + new SampleGroup("OnAuthenticated", SampleUnit.Microsecond), + new SampleGroup("OnSpawned", SampleUnit.Microsecond), + }; + + yield return Measure.Frames() + .ProfilerMarkers(sampleGroups) + .WarmupCount(5) + .MeasurementCount(300) + .Run(); + } + + } +} diff --git a/Assets/Tests/Performance/Runtime/InterestManagement/InterestManagementPerformanceBase.cs.meta b/Assets/Tests/Performance/Runtime/InterestManagement/InterestManagementPerformanceBase.cs.meta new file mode 100644 index 00000000000..02a01a9cb8a --- /dev/null +++ b/Assets/Tests/Performance/Runtime/InterestManagement/InterestManagementPerformanceBase.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eaa89a926d1b39e4db40424b13873bf3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Tests/Performance/Runtime/Mirage.Tests.Performance.Runtime.asmdef b/Assets/Tests/Performance/Runtime/Mirage.Tests.Performance.Runtime.asmdef index 6278f6754fa..d3ca03d9d19 100644 --- a/Assets/Tests/Performance/Runtime/Mirage.Tests.Performance.Runtime.asmdef +++ b/Assets/Tests/Performance/Runtime/Mirage.Tests.Performance.Runtime.asmdef @@ -1,5 +1,6 @@ { "name": "Mirage.Tests.Performance.Runtime", + "rootNamespace": "", "references": [ "GUID:c0dd0d10738d4ad4a9de57c559d0ca1b", "GUID:30817c1a0e6d646d99c048fc403f5979", @@ -8,7 +9,9 @@ "GUID:27619889b8ba8c24980f49ee34dbb44a", "GUID:0acc523941302664db1f4e527237feb3", "GUID:f51ebe6a0ceec4240a699833d6309b23", - "GUID:c0b2064c294eb174c9f3f7da398eb677" + "GUID:c0b2064c294eb174c9f3f7da398eb677", + "GUID:ae70f15dce7a4fa4b938107926f64504", + "GUID:96f081f4a0d214ee39e3aa34e9d43109" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/Tests/Performance/Runtime/MultipleClients/MultipleClients.cs b/Assets/Tests/Performance/Runtime/MultipleClients/MultipleClients.cs index c7be7c05200..2eb4a914e18 100644 --- a/Assets/Tests/Performance/Runtime/MultipleClients/MultipleClients.cs +++ b/Assets/Tests/Performance/Runtime/MultipleClients/MultipleClients.cs @@ -44,8 +44,6 @@ public IEnumerator SetUp() => UniTask.ToCoroutine(async () => Server = Object.FindObjectOfType(); ServerObjectManager = Object.FindObjectOfType(); - Server.Authenticated.AddListener(conn => ServerObjectManager.SpawnVisibleObjects(conn, true)); - var started = new UniTaskCompletionSource(); Server.Started.AddListener(() => started.TrySetResult()); diff --git a/Assets/Tests/Performance/Runtime/NetworkWriter/NetworkIdentityPerformance.cs b/Assets/Tests/Performance/Runtime/NetworkWriter/NetworkIdentityPerformance.cs index 4a91127d6d9..5212e7a080a 100644 --- a/Assets/Tests/Performance/Runtime/NetworkWriter/NetworkIdentityPerformance.cs +++ b/Assets/Tests/Performance/Runtime/NetworkWriter/NetworkIdentityPerformance.cs @@ -29,7 +29,6 @@ public void SetUp() gameObject = new GameObject(); identity = gameObject.AddComponent(); identity.Owner = Substitute.For(); - identity.observers.Add(identity.Owner); health = gameObject.AddComponent(); health.syncMode = SyncMode.Owner; health.syncInterval = 0f; diff --git a/Assets/Tests/Performance/Runtime/NetworkWriter/NetworkIdentityPerformanceWithMultipleBehaviour.cs b/Assets/Tests/Performance/Runtime/NetworkWriter/NetworkIdentityPerformanceWithMultipleBehaviour.cs index 3e2d524b82b..bb28124e46d 100644 --- a/Assets/Tests/Performance/Runtime/NetworkWriter/NetworkIdentityPerformanceWithMultipleBehaviour.cs +++ b/Assets/Tests/Performance/Runtime/NetworkWriter/NetworkIdentityPerformanceWithMultipleBehaviour.cs @@ -21,7 +21,6 @@ public void SetUp() gameObject = new GameObject(); identity = gameObject.AddComponent(); identity.Owner = Substitute.For(); - identity.observers.Add(identity.Owner); health = new Health[healthCount]; for (int i = 0; i < healthCount; i++) { diff --git a/Assets/Tests/Runtime/NetworkIdentityCallbackTests.cs b/Assets/Tests/Runtime/NetworkIdentityCallbackTests.cs index 3bd25a8588e..b1696a9e8d4 100644 --- a/Assets/Tests/Runtime/NetworkIdentityCallbackTests.cs +++ b/Assets/Tests/Runtime/NetworkIdentityCallbackTests.cs @@ -1,41 +1,25 @@ -using System.Collections.Generic; using Mirage.Tests.Runtime.ClientServer; using NSubstitute; using NUnit.Framework; using UnityEngine; -using static Mirage.Tests.LocalConnections; using Object = UnityEngine.Object; namespace Mirage.Tests.Runtime { public class NetworkIdentityCallbackTests : ClientServerSetup { - #region test components - class RebuildEmptyObserversNetworkBehaviour : NetworkVisibility - { - public override bool OnCheckObserver(INetworkPlayer player) { return true; } - public override void OnRebuildObservers(HashSet observers, bool initialize) { } - } - - - #endregion - GameObject gameObject; - NetworkIdentity identity; - - INetworkPlayer player1; - INetworkPlayer player2; [SetUp] public override void ExtraSetup() { gameObject = new GameObject(); - identity = gameObject.AddComponent(); + NetworkIdentity identity = gameObject.AddComponent(); identity.Server = server; identity.ServerObjectManager = serverObjectManager; - player1 = Substitute.For(); - player2 = Substitute.For(); + _ = Substitute.For(); + _ = Substitute.For(); } [TearDown] @@ -45,54 +29,5 @@ public override void ExtraTearDown() // DestroyImmediate is called internally, giving an error in Editor Object.DestroyImmediate(gameObject); } - - - [Test] - public void AddAllReadyServerConnectionsToObservers() - { - player1.SceneIsReady.Returns(true); - player2.SceneIsReady.Returns(false); - - // add some server connections - server.Players.Add(player1); - server.Players.Add(player2); - - // add a host connection - server.AddLocalConnection(client, Substitute.For()); - server.InvokeLocalConnected(); - server.LocalPlayer.SceneIsReady = true; - - // call OnStartServer so that observers dict is created - identity.StartServer(); - - // add all to observers. should have the two ready connections then. - identity.AddAllReadyServerConnectionsToObservers(); - Assert.That(identity.observers, Is.EquivalentTo(new[] { player1, server.LocalPlayer, serverPlayer })); - - // clean up - server.Stop(); - } - - // RebuildObservers should always add the own ready connection - // (if any). fixes https://github.com/vis2k/Mirror/issues/692 - [Test] - public void RebuildObserversAddsOwnReadyPlayer() - { - // add at least one observers component, otherwise it will just add - // all server connections - gameObject.AddComponent(); - - // add own player connection - (NetworkPlayer serverPlayer, NetworkPlayer _) = PipedConnections(Substitute.For(), Substitute.For()); - serverPlayer.SceneIsReady = true; - identity.Owner = serverPlayer; - - // call OnStartServer so that observers dict is created - identity.StartServer(); - - // rebuild should at least add own ready player - identity.RebuildObservers(true); - Assert.That(identity.observers, Does.Contain(identity.Owner)); - } } } diff --git a/Assets/Tests/Runtime/NetworkMatchCheckerTest.cs b/Assets/Tests/Runtime/NetworkMatchCheckerTest.cs deleted file mode 100644 index 9f3b9ccc281..00000000000 --- a/Assets/Tests/Runtime/NetworkMatchCheckerTest.cs +++ /dev/null @@ -1,213 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using NSubstitute; -using NUnit.Framework; -using UnityEngine; -using Object = UnityEngine.Object; - -namespace Mirage.Tests.Runtime -{ - public class NetworkMatchCheckerTest - { - private GameObject serverGO; - private NetworkServer server; - private ServerObjectManager serverObjectManager; - private GameObject character1; - private GameObject character2; - private GameObject character3; - private NetworkMatchChecker player1MatchChecker; - private NetworkMatchChecker player2MatchChecker; - private NetworkPlayer player1Connection; - private NetworkPlayer player2Connection; - private NetworkPlayer player3Connection; - private Dictionary> matchPlayers; - - [SetUp] - public void Setup() - { - // todo use Substitute for interfaces instead of gameobjeccts for this test - - serverGO = new GameObject("Network Server", typeof(TestSocketFactory), typeof(NetworkServer), typeof(ServerObjectManager)); - - server = serverGO.GetComponent(); - serverObjectManager = serverGO.GetComponent(); - serverObjectManager.Server = server; - - character1 = new GameObject("TestCharacter1", typeof(NetworkIdentity), typeof(NetworkMatchChecker)); - character2 = new GameObject("TestCharacter2", typeof(NetworkIdentity), typeof(NetworkMatchChecker)); - character3 = new GameObject("TestCharacter3", typeof(NetworkIdentity)); - - - character1.GetComponent().Server = server; - character1.GetComponent().ServerObjectManager = serverObjectManager; - character2.GetComponent().Server = server; - character2.GetComponent().ServerObjectManager = serverObjectManager; - character3.GetComponent().Server = server; - character3.GetComponent().ServerObjectManager = serverObjectManager; - - player1MatchChecker = character1.GetComponent(); - player2MatchChecker = character2.GetComponent(); - - - player1Connection = CreatePlayer(character1); - player2Connection = CreatePlayer(character2); - player3Connection = CreatePlayer(character3); - Dictionary> g = GetMatchPlayersDictionary(); - matchPlayers = g; - } - - static Dictionary> GetMatchPlayersDictionary() - { - Type type = typeof(NetworkMatchChecker); - FieldInfo fieldInfo = type.GetField("matchPlayers", BindingFlags.Static | BindingFlags.NonPublic); - return (Dictionary>)fieldInfo.GetValue(null); - } - - static NetworkPlayer CreatePlayer(GameObject character) - { - var player = new NetworkPlayer(Substitute.For()) - { - Identity = character.GetComponent() - }; - player.Identity.Owner = player; - player.SceneIsReady = true; - return player; - } - - [TearDown] - public void TearDown() - { - Object.DestroyImmediate(character1); - Object.DestroyImmediate(character2); - Object.DestroyImmediate(character3); - - Object.DestroyImmediate(serverGO); - matchPlayers.Clear(); - matchPlayers = null; - } - - static void SetMatchId(NetworkMatchChecker target, Guid guid) - { - // set using reflection so bypass property - FieldInfo field = typeof(NetworkMatchChecker).GetField("currentMatch", BindingFlags.Instance | BindingFlags.NonPublic); - field.SetValue(target, guid); - } - - [Test] - public void OnCheckObserverShouldBeTrueForSameMatchId() - { - string guid = Guid.NewGuid().ToString(); - - SetMatchId(player1MatchChecker, new Guid(guid)); - SetMatchId(player2MatchChecker, new Guid(guid)); - - bool player1Visable = player1MatchChecker.OnCheckObserver(player1Connection); - Assert.IsTrue(player1Visable); - - bool player2Visable = player1MatchChecker.OnCheckObserver(player2Connection); - Assert.IsTrue(player2Visable); - } - - [Test] - public void OnCheckObserverShouldBeFalseForDifferentMatchId() - { - string guid1 = Guid.NewGuid().ToString(); - string guid2 = Guid.NewGuid().ToString(); - - SetMatchId(player1MatchChecker, new Guid(guid1)); - SetMatchId(player2MatchChecker, new Guid(guid2)); - - bool player1VisableToPlayer1 = player1MatchChecker.OnCheckObserver(player1Connection); - Assert.IsTrue(player1VisableToPlayer1); - - bool player2VisableToPlayer1 = player1MatchChecker.OnCheckObserver(player2Connection); - Assert.IsFalse(player2VisableToPlayer1); - - - bool player1VisableToPlayer2 = player2MatchChecker.OnCheckObserver(player1Connection); - Assert.IsFalse(player1VisableToPlayer2); - - bool player2VisableToPlayer2 = player2MatchChecker.OnCheckObserver(player2Connection); - Assert.IsTrue(player2VisableToPlayer2); - } - - [Test] - public void OnCheckObserverShouldBeFalseIfObjectDoesNotHaveNetworkMatchChecker() - { - string guid = Guid.NewGuid().ToString(); - - SetMatchId(player1MatchChecker, new Guid(guid)); - - bool player3Visable = player1MatchChecker.OnCheckObserver(player3Connection); - Assert.IsFalse(player3Visable); - } - - [Test] - public void OnCheckObserverShouldBeFalseForEmptyGuid() - { - string guid = Guid.Empty.ToString(); - - SetMatchId(player1MatchChecker, new Guid(guid)); - SetMatchId(player2MatchChecker, new Guid(guid)); - - bool player1Visable = player1MatchChecker.OnCheckObserver(player1Connection); - Assert.IsFalse(player1Visable); - - bool player2Visable = player1MatchChecker.OnCheckObserver(player2Connection); - Assert.IsFalse(player2Visable); - } - - [Test] - public void SettingMatchIdShouldRebuildObservers() - { - string guidMatch1 = Guid.NewGuid().ToString(); - - // make players join same match - player1MatchChecker.MatchId = new Guid(guidMatch1); - player2MatchChecker.MatchId = new Guid(guidMatch1); - - // check player1's observers contains player 2 - Assert.That(player1MatchChecker.Identity.observers, Contains.Item(player2MatchChecker.Owner)); - // check player2's observers contains player 1 - Assert.That(player2MatchChecker.Identity.observers, Contains.Item(player1MatchChecker.Owner)); - } - - [Test] - public void ChangingMatchIdShouldRebuildObservers() - { - string guidMatch1 = Guid.NewGuid().ToString(); - string guidMatch2 = Guid.NewGuid().ToString(); - - // make players join same match - player1MatchChecker.MatchId = new Guid(guidMatch1); - player2MatchChecker.MatchId = new Guid(guidMatch1); - - // make player2 join different match - player2MatchChecker.MatchId = new Guid(guidMatch2); - - // check player1's observers does NOT contain player 2 - Assert.That(player1MatchChecker.Identity.observers, !Contains.Item(player2MatchChecker.Owner)); - // check player2's observers does NOT contain player 1 - Assert.That(player2MatchChecker.Identity.observers, !Contains.Item(player1MatchChecker.Owner)); - } - - [Test] - public void ClearingMatchIdShouldRebuildObservers() - { - string guidMatch1 = Guid.NewGuid().ToString(); - - // make players join same match - player1MatchChecker.MatchId = new Guid(guidMatch1); - player2MatchChecker.MatchId = new Guid(guidMatch1); - - // make player 2 leave match - player2MatchChecker.MatchId = Guid.Empty; - - // check player1's observers does NOT contain player 2 - Assert.That(player1MatchChecker.Identity.observers, !Contains.Item(player2MatchChecker.Owner)); - // check player2's observers does NOT contain player 1 - Assert.That(player2MatchChecker.Identity.observers, !Contains.Item(player1MatchChecker.Owner)); - } - } -} diff --git a/Assets/Tests/Runtime/SyncVarTest.cs b/Assets/Tests/Runtime/SyncVarTest.cs index 4c4f0c8260c..ef04449e664 100644 --- a/Assets/Tests/Runtime/SyncVarTest.cs +++ b/Assets/Tests/Runtime/SyncVarTest.cs @@ -91,34 +91,6 @@ public void TestSyncIntervalAndClearDirtyComponents() Assert.That(player.IsDirty(), Is.True, "Sync interval met, should be dirty"); } - [Test] - public void TestSyncIntervalAndClearAllComponents() - { - var gameObject = new GameObject("Player", typeof(NetworkIdentity), typeof(MockPlayer)); - - MockPlayer player = gameObject.GetComponent(); - player.lastSyncTime = Time.time; - // synchronize immediately - player.syncInterval = 1f; - - player.guild = new MockPlayer.Guild - { - name = "Back street boys" - }; - - Assert.That(player.IsDirty(), Is.False, "Sync interval not met, so not dirty yet"); - - // ClearAllComponents should clear dirty even if syncInterval not - // elapsed yet - player.Identity.ClearAllComponentsDirtyBits(); - - // set lastSyncTime far enough back to be ready for syncing - player.lastSyncTime = Time.time - player.syncInterval; - - // should be dirty now - Assert.That(player.IsDirty(), Is.False, "Sync interval met, should still not be dirty"); - } - [Test] public void TestSynchronizingObjects() {