From 5e7911ff8b951bb039a341726633c70693995a30 Mon Sep 17 00:00:00 2001 From: James Frowen Date: Mon, 2 Oct 2023 23:07:06 +0100 Subject: [PATCH] feat(Example): adding scene per match example --- Assets/Mirage/Samples~/MatchScenes.meta | 8 + .../MatchScenes/MatchScenesNetworkManager.cs | 171 ++++++ .../MatchScenesNetworkManager.cs.meta | 11 + .../Samples~/MatchScenes/MatchScenesPlayer.cs | 20 + .../MatchScenes/MatchScenesPlayer.cs.meta | 11 + .../MatchScenes/MatchScenes_Player.prefab | 230 ++++++++ .../MatchScenes_Player.prefab.meta | 7 + .../MatchScenes/MatchScenes_match.unity | 317 +++++++++++ .../MatchScenes/MatchScenes_match.unity.meta | 7 + .../MatchScenes/MatchScenes_offline.unity | 538 ++++++++++++++++++ .../MatchScenes_offline.unity.meta | 7 + Assets/Mirage/Samples~/MatchScenes/Readme.txt | 1 + .../Samples~/MatchScenes/Readme.txt.meta | 7 + Assets/Mirage/package.json | 5 + 14 files changed, 1340 insertions(+) create mode 100644 Assets/Mirage/Samples~/MatchScenes.meta create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenesNetworkManager.cs create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenesNetworkManager.cs.meta create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenesPlayer.cs create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenesPlayer.cs.meta create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenes_Player.prefab create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenes_Player.prefab.meta create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenes_match.unity create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenes_match.unity.meta create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenes_offline.unity create mode 100644 Assets/Mirage/Samples~/MatchScenes/MatchScenes_offline.unity.meta create mode 100644 Assets/Mirage/Samples~/MatchScenes/Readme.txt create mode 100644 Assets/Mirage/Samples~/MatchScenes/Readme.txt.meta diff --git a/Assets/Mirage/Samples~/MatchScenes.meta b/Assets/Mirage/Samples~/MatchScenes.meta new file mode 100644 index 0000000000..ef6a71f244 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 933ba3f651146344d88d33e41d56987e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenesNetworkManager.cs b/Assets/Mirage/Samples~/MatchScenes/MatchScenesNetworkManager.cs new file mode 100644 index 0000000000..523ce63cd9 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenesNetworkManager.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Cysharp.Threading.Tasks; +using UnityEngine; +using UnityEngine.SceneManagement; + +namespace Mirage.Examples.MatchScenes +{ + internal class Match + { + public List Players = new List(); + public bool Full; + public Scene scene; + + public event Action OnSceneLoad; + + public void SetScene(AsyncOperation _) + { + scene = SceneManager.GetSceneAt(SceneManager.sceneCount - 1); + + // remove extra AudioListener so it doesn't spam unity console... + // todo do this in a better way, like only spawning camera in scene for local player + foreach (var listener in Resources.FindObjectsOfTypeAll().Skip(1)) + { + listener.enabled = false; + } + + OnSceneLoad?.Invoke(); + + } + } + /// + /// Creates a new scene for each match, 2 players per match + /// + public class MatchScenesNetworkManager : NetworkManager + { + [Scene] public string offlineScene; + [Scene] public string matchScene; + + [SerializeField, NetworkedPrefab] private NetworkIdentity _character; + + private List matchList = new List(); + private Dictionary matchLookup = new Dictionary(); + + private void Awake() + { + DontDestroyOnLoad(gameObject); + Server.Started.AddListener(ServerStarted); + Server.Authenticated.AddListener(OnServerConnected); + Server.Disconnected.AddListener(OnServerDisconnected); + + Client.Authenticated.AddListener(OnClientConnected); + Client.Disconnected.AddListener(OnClientDisconnected); + } + + private void ServerStarted() + { + Server.MessageHandler.RegisterHandler(PlayerLoadedScene); + } + + private void OnServerConnected(INetworkPlayer player) + { + Debug.Log("OnServerConnected"); + var match = GetNextMatch(); + + match.Players.Add(player); + if (match.Players.Count == 2) + match.Full = true; + matchLookup.Add(player, match); + } + + private Match GetNextMatch() + { + // get a match that has 1 player, or create a new one + var match = matchList.LastOrDefault(); + // no matches, or last is full + if (match == null || match.Full) + { + // Create new match + match = new Match(); + matchList.Add(match); + + var op = SceneManager.LoadSceneAsync(matchScene, new LoadSceneParameters + { + loadSceneMode = LoadSceneMode.Additive, + localPhysicsMode = LocalPhysicsMode.Physics3D, + }); + // when complete add scene to match, it will be the last scene in GetSceneAt + op.completed += match.SetScene; + } + + return match; + } + + private void OnServerDisconnected(INetworkPlayer player) + { + Debug.Log("OnServerDisconnected"); + if (matchLookup.TryGetValue(player, out var match)) + { + match.Players.Remove(player); + matchLookup.Remove(player); + + // started match, that all players have disconnected from + if (match.Full && match.Players.Count == 0) + { + matchList.Remove(match); + SceneManager.UnloadSceneAsync(match.scene); + } + } + } + + private void PlayerLoadedScene(INetworkPlayer player, SceneLoaded message) + { + Debug.Log("PlayerLoadedScene"); + var match = matchLookup[player]; + + var playerIndex = match.Players.IndexOf(player); + + // add player now if scene is loaded + if (match.scene.IsValid()) + { + AddCharacter(match.scene, player, playerIndex); + } + // or add player after scene has finished loading on server + else + { + match.OnSceneLoad += () => + { + AddCharacter(match.scene, player, playerIndex); + }; + } + } + + private void AddCharacter(Scene scene, INetworkPlayer player, int v) + { + Debug.Log("AddCharacter"); + var clone = Instantiate(_character); + + // make it easier to tell players apart + clone.transform.position = new Vector3(-2 + (4 * v), 0, 0); + clone.GetComponentInChildren().material.color = v == 0 ? Color.red : Color.green; + clone.GetComponent().color = v == 0 ? Color.red : Color.green; + + var sceneChecker = (SceneVisibilityChecker)clone.Visibility; + sceneChecker.MoveToScene(scene); + ServerObjectManager.AddCharacter(player, clone); + } + + private void OnClientConnected(INetworkPlayer player) + { + Debug.Log("OnClientConnected"); + UniTask.Void(async () => + { + await SceneManager.LoadSceneAsync(matchScene).ToUniTask(); + Debug.Log("OnClientConnected.LoadedScene"); + player.Send(new SceneLoaded()); + }); + } + [NetworkMessage] + public struct SceneLoaded { } + + private void OnClientDisconnected(ClientStoppedReason arg0) + { + Debug.Log("OnClientDisconnected"); + _ = SceneManager.LoadSceneAsync(offlineScene); + // destory this object, because we are going back to offline scene where another instance will exist + Destroy(gameObject); + } + } +} diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenesNetworkManager.cs.meta b/Assets/Mirage/Samples~/MatchScenes/MatchScenesNetworkManager.cs.meta new file mode 100644 index 0000000000..dc4cfff84c --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenesNetworkManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c85abdf2568a51d4f901a1850fca80d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenesPlayer.cs b/Assets/Mirage/Samples~/MatchScenes/MatchScenesPlayer.cs new file mode 100644 index 0000000000..71e980ba62 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenesPlayer.cs @@ -0,0 +1,20 @@ +using UnityEngine; + +namespace Mirage.Examples.MatchScenes +{ + public class MatchScenesPlayer : NetworkBehaviour + { + [SyncVar] + public Color color; + + private void Awake() + { + Identity.OnStartClient.AddListener(OnStartClient); + } + + private void OnStartClient() + { + GetComponentInChildren().material.color = color; + } + } +} diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenesPlayer.cs.meta b/Assets/Mirage/Samples~/MatchScenes/MatchScenesPlayer.cs.meta new file mode 100644 index 0000000000..270ff42cd8 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenesPlayer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f812b4fba1fa6bf4cb1b35175bf951f2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenes_Player.prefab b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_Player.prefab new file mode 100644 index 0000000000..5cdc76f361 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_Player.prefab @@ -0,0 +1,230 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2866089670459833869 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8499461534723323116} + - component: {fileID: 4845829010686006643} + - component: {fileID: 1278912910699581556} + - component: {fileID: 7898633079623509392} + m_Layer: 0 + m_Name: MatchScenes_Player + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &8499461534723323116 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2866089670459833869} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 9199060834750247608} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &4845829010686006643 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2866089670459833869} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9b91ecbcc199f4492b9a91e820070131, type: 3} + m_Name: + m_EditorClassIdentifier: + SpawnSettings: + SendPosition: 1 + SendRotation: 1 + SendScale: 0 + SendName: 0 + SendActive: 2 + _sceneId: 0 + ServerObjectManager: {fileID: 0} + ClientObjectManager: {fileID: 0} + _prefabHash: 1038710698 + _onStartServer: + _event: + m_PersistentCalls: + m_Calls: [] + _onStartClient: + _event: + m_PersistentCalls: + m_Calls: [] + _onStartLocalPlayer: + _event: + m_PersistentCalls: + m_Calls: [] + _onAuthorityChanged: + _event: + m_PersistentCalls: + m_Calls: [] + _onOwnerChanged: + _event: + m_PersistentCalls: + m_Calls: [] + _onStopClient: + _event: + m_PersistentCalls: + m_Calls: [] + _onStopServer: + _event: + m_PersistentCalls: + m_Calls: [] + _hasSpawned: 0 +--- !u!114 &1278912910699581556 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2866089670459833869} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b042155288d5f454791cbf81c3a78fc7, type: 3} + m_Name: + m_EditorClassIdentifier: + SyncSettings: + From: 2 + To: 3 + Timing: 0 + Interval: 0.1 +--- !u!114 &7898633079623509392 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2866089670459833869} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f812b4fba1fa6bf4cb1b35175bf951f2, type: 3} + m_Name: + m_EditorClassIdentifier: + SyncSettings: + From: 2 + To: 3 + Timing: 0 + Interval: 0.1 + color: {r: 0, g: 0, b: 0, a: 0} +--- !u!1 &4178312275631961970 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 9199060834750247608} + - component: {fileID: 8187355349745968361} + - component: {fileID: 6130243616669041407} + - component: {fileID: 944651298829588991} + m_Layer: 0 + m_Name: Capsule + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &9199060834750247608 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4178312275631961970} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 8499461534723323116} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &8187355349745968361 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4178312275631961970} + m_Mesh: {fileID: 10208, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6130243616669041407 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4178312275631961970} + 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: 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: 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!136 &944651298829588991 +CapsuleCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4178312275631961970} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Height: 2 + m_Direction: 1 + m_Center: {x: 0, y: 0, z: 0} diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenes_Player.prefab.meta b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_Player.prefab.meta new file mode 100644 index 0000000000..ef9ebb57f6 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_Player.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4edda9ae8a3982b4ebd030861886374e +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenes_match.unity b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_match.unity new file mode 100644 index 0000000000..4971d235e8 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_match.unity @@ -0,0 +1,317 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + 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: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &989247462 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 989247465} + - component: {fileID: 989247464} + - component: {fileID: 989247463} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &989247463 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989247462} + m_Enabled: 1 +--- !u!20 &989247464 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989247462} + m_Enabled: 1 + 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_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + 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 &989247465 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989247462} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1445749916 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1445749918} + - component: {fileID: 1445749917} + 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 &1445749917 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1445749916} + 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 &1445749918 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1445749916} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 989247465} + - {fileID: 1445749918} diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenes_match.unity.meta b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_match.unity.meta new file mode 100644 index 0000000000..45f0d64890 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_match.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 66c923890c0023b4fa332ea66e236e3f +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenes_offline.unity b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_offline.unity new file mode 100644 index 0000000000..a2ceff436a --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_offline.unity @@ -0,0 +1,538 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + 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: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &385850953 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 385850963} + - component: {fileID: 385850962} + - component: {fileID: 385850961} + - component: {fileID: 385850960} + - component: {fileID: 385850958} + - component: {fileID: 385850957} + - component: {fileID: 385850955} + - component: {fileID: 385850954} + - component: {fileID: 385850964} + m_Layer: 0 + m_Name: NetworkManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &385850954 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac6e8eccf4b6f4dc7b24c276ef47fde8, type: 3} + m_Name: + m_EditorClassIdentifier: + _settings: {fileID: 11400000, guid: a32efd20b21c8f84ea7d413961eb7766, type: 2} +--- !u!114 &385850955 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + 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 &385850957 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a2cbc85c1c2f1c249bbe95ae110bbcde, type: 3} + m_Name: + m_EditorClassIdentifier: + spawnPrefabs: + - {fileID: 4845829010686006643, guid: 4edda9ae8a3982b4ebd030861886374e, type: 3} + NetworkPrefabs: {fileID: 0} +--- !u!114 &385850958 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b750203ddb2d9f84abd799a5c2c32cb6, type: 3} + m_Name: + m_EditorClassIdentifier: + OnlySpawnOnAuthenticated: 0 +--- !u!114 &385850960 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: abe6be14204d94224a3e7cd99dd2ea73, type: 3} + m_Name: + m_EditorClassIdentifier: + EnablePeerMetrics: 0 + MetricsSize: 10 + SocketFactory: {fileID: 385850955} + ObjectManager: {fileID: 385850957} + DisconnectOnException: 1 + RethrowException: 0 + RunInBackground: 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: [] + ManualUpdate: 0 +--- !u!114 &385850961 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + 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 + RethrowException: 0 + RunInBackground: 1 + Listening: 1 + SocketFactory: {fileID: 385850955} + ObjectManager: {fileID: 385850958} + 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: [] + ManualUpdate: 0 +--- !u!114 &385850962 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c85abdf2568a51d4f901a1850fca80d2, type: 3} + m_Name: + m_EditorClassIdentifier: + Server: {fileID: 385850961} + Client: {fileID: 385850960} + NetworkSceneManager: {fileID: 0} + ServerObjectManager: {fileID: 385850958} + ClientObjectManager: {fileID: 385850957} + ValidateReferences: 1 + offlineScene: Assets/Examples/MatchScenes/MatchScenes_offline.unity + matchScene: Assets/Examples/MatchScenes/MatchScenes_match.unity + _character: {fileID: 4845829010686006643, guid: 4edda9ae8a3982b4ebd030861886374e, + type: 3} +--- !u!4 &385850963 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &385850964 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 385850953} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 81da5905cb362874ba7cbe36247debba, type: 3} + m_Name: + m_EditorClassIdentifier: + NetworkAddress: localhost + AutoConfigureNetworkManager: 1 + NetworkManager: {fileID: 385850962} + Scale: 1 + GUIAnchor: 0 +--- !u!1 &989247462 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 989247465} + - component: {fileID: 989247464} + - component: {fileID: 989247463} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &989247463 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989247462} + m_Enabled: 1 +--- !u!20 &989247464 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989247462} + m_Enabled: 1 + 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_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + 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 &989247465 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 989247462} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1445749916 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1445749918} + - component: {fileID: 1445749917} + 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 &1445749917 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1445749916} + 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 &1445749918 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1445749916} + serializedVersion: 2 + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 989247465} + - {fileID: 1445749918} + - {fileID: 385850963} diff --git a/Assets/Mirage/Samples~/MatchScenes/MatchScenes_offline.unity.meta b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_offline.unity.meta new file mode 100644 index 0000000000..cdc8b7c656 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/MatchScenes_offline.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3d2289bf1250e3549bda6dc87632df64 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/Samples~/MatchScenes/Readme.txt b/Assets/Mirage/Samples~/MatchScenes/Readme.txt new file mode 100644 index 0000000000..ee817d072c --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/Readme.txt @@ -0,0 +1 @@ +Example using Unity: 2022.3.6 \ No newline at end of file diff --git a/Assets/Mirage/Samples~/MatchScenes/Readme.txt.meta b/Assets/Mirage/Samples~/MatchScenes/Readme.txt.meta new file mode 100644 index 0000000000..2e76953657 --- /dev/null +++ b/Assets/Mirage/Samples~/MatchScenes/Readme.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b86546b97d92d5b4e8ea6740db0ab1f1 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Mirage/package.json b/Assets/Mirage/package.json index 7f5cebec80..c1391aae71 100644 --- a/Assets/Mirage/package.json +++ b/Assets/Mirage/package.json @@ -48,6 +48,11 @@ "displayName": "Tanks", "description": "Shoot each other with tanks", "path": "Samples~/Tanks" + }, + { + "displayName": "MatchScenes", + "description": "Multiple matches on the same server by creating new scenes for each pair of players", + "path": "Samples~/MatchScenes" } ] }