浏览代码

Pulled in latest Renames from Plastic Branch

/main
UnityJacob 3 年前
当前提交
5a5209dc
共有 81 个文件被更改,包括 249 次插入1791 次删除
  1. 57
      Assets/Prefabs/UI/GameCanvas.prefab
  2. 12
      Assets/Prefabs/UI/JoinContent.prefab
  3. 14
      Assets/Prefabs/UI/JoinCreateCanvas.prefab
  4. 4
      Assets/Scripts/Auth/Identity.cs
  5. 3
      Assets/Scripts/Auth/SubIdentity_Authentication.cs
  6. 27
      Assets/Scripts/Entities/GameStateManager.cs
  7. 7
      Assets/Scripts/Entities/LobbyData.cs
  8. 7
      Assets/Scripts/Entities/LobbyDataObserver.cs
  9. 5
      Assets/Scripts/Entities/LobbyReadyCheck.cs
  10. 4
      Assets/Scripts/Entities/LobbyServiceData.cs
  11. 6
      Assets/Scripts/Entities/LobbyServiceDataObserver.cs
  12. 6
      Assets/Scripts/Entities/LobbyUser.cs
  13. 7
      Assets/Scripts/Entities/LobbyUserObserver.cs
  14. 5
      Assets/Scripts/Entities/LocalGameState.cs
  15. 6
      Assets/Scripts/Entities/LocalGameStateObserver.cs
  16. 5
      Assets/Scripts/Entities/ServerAddress.cs
  17. 2
      Assets/Scripts/Infrastructure/Observed.cs
  18. 3
      Assets/Scripts/Infrastructure/ObserverBehaviour.cs
  19. 3
      Assets/Scripts/Relay/RelayInterface.cs
  20. 32
      Assets/Scripts/Rooms/RoomsContentHeartbeat.cs
  21. 4
      Assets/Scripts/Rooms/RoomsInterface.cs
  22. 4
      Assets/Scripts/Rooms/RoomsListHeartbeat.cs
  23. 9
      Assets/Scripts/Rooms/RoomsQuery.cs
  24. 25
      Assets/Scripts/Rooms/ToLobbyData.cs
  25. 31
      Assets/Scripts/Tests/Editor/AuthTests.cs
  26. 5
      Assets/Scripts/Tests/Editor/LobbyTests.cs
  27. 3
      Assets/Scripts/Tests/Editor/LoggerTests.cs
  28. 4
      Assets/Scripts/Tests/Editor/MessengerTests.cs
  29. 2
      Assets/Scripts/Tests/Editor/ObserverTests.cs
  30. 17
      Assets/Scripts/Tests/PlayMode/ReadyCheckTests.cs
  31. 17
      Assets/Scripts/Tests/PlayMode/RelayRoundTripTests.cs
  32. 11
      Assets/Scripts/Tests/PlayMode/RoomsRoundtripTests.cs
  33. 2
      Assets/Scripts/Tests/PlayMode/UpdateSlowTests.cs
  34. 6
      Assets/Scripts/UI/BackButtonUI.cs
  35. 25
      Assets/Scripts/UI/CountdownUI.cs
  36. 7
      Assets/Scripts/UI/CreateMenuUI.cs
  37. 6
      Assets/Scripts/UI/EmoteButtonUI.cs
  38. 5
      Assets/Scripts/UI/EndGameButtonUI.cs
  39. 4
      Assets/Scripts/UI/ExitButtonUI.cs
  40. 2
      Assets/Scripts/UI/GameStateVisibilityUI.cs
  41. 6
      Assets/Scripts/UI/JoinCreateRoomUI.cs
  42. 3
      Assets/Scripts/UI/JoinMenuUI.cs
  43. 8
      Assets/Scripts/UI/LobbyButtonUI.cs
  44. 2
      Assets/Scripts/UI/LobbyStateVisibilityUI.cs
  45. 3
      Assets/Scripts/UI/LobbyUserCardUI.cs
  46. 7
      Assets/Scripts/UI/LobbyUsersUI.cs
  47. 5
      Assets/Scripts/UI/MainMenuUI.cs
  48. 5
      Assets/Scripts/UI/NameChangeUI.cs
  49. 8
      Assets/Scripts/UI/ObserverPanel.cs
  50. 7
      Assets/Scripts/UI/PlayerNameUI.cs
  51. 5
      Assets/Scripts/UI/ReadyCheckUI.cs
  52. 4
      Assets/Scripts/UI/RelayCodeUI.cs
  53. 5
      Assets/Scripts/UI/RoomCodeUI.cs
  54. 4
      Assets/Scripts/UI/ServerAddressUI.cs
  55. 4
      Assets/Scripts/UI/ServerNameUI.cs
  56. 4
      Assets/Scripts/UI/SpinnerUI.cs
  57. 5
      Assets/Scripts/UI/StartLobbyButton.cs
  58. 7
      Assets/Scripts/UI/UIPanelBase.cs
  59. 4
      Assets/Scripts/UI/UserStateVisibilityUI.cs
  60. 4
      Assets/Scripts/Utilities/Locator.cs
  61. 2
      Assets/Scripts/Utilities/LogHandler.cs
  62. 2
      Assets/Scripts/Utilities/Messenger.cs
  63. 2
      Assets/Scripts/Utilities/NameGenerator.cs
  64. 2
      Assets/Scripts/Utilities/UpdateSlow.cs
  65. 4
      Assets/TempDeleteAllRooms.cs
  66. 4
      Packages/manifest.json
  67. 38
      Packages/packages-lock.json
  68. 2
      ProjectSettings/EditorBuildSettings.asset
  69. 16
      ProjectSettings/ProjectSettings.asset
  70. 2
      ProjectSettings/UnityConnectSettings.asset
  71. 523
      Assets/Prefabs/UI/DungeonCardUI.prefab
  72. 7
      Assets/Prefabs/UI/DungeonCardUI.prefab.meta
  73. 894
      Assets/Scenes/MVVMUITest.unity
  74. 7
      Assets/Scenes/MVVMUITest.unity.meta
  75. 12
      Assets/Scripts/Infrastructure/ServiceConfig.cs
  76. 11
      Assets/Scripts/Infrastructure/ServiceConfig.cs.meta
  77. 8
      Assets/StreamingAssets.meta
  78. 0
      /Assets/Prefabs/UI/JoinCreateCanvas.prefab.meta
  79. 0
      /Assets/Prefabs/UI/JoinCreateCanvas.prefab
  80. 0
      /Assets/Scenes/mainScene.unity
  81. 0
      /Assets/Scenes/mainScene.unity.meta

57
Assets/Prefabs/UI/GameCanvas.prefab


propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1547097154637997990, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1547097154637997990, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1547097154637997990, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Target
value:
objectReference: {fileID: 4928485776352161055}
- target: {fileID: 1547097154637997990, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_CallState
value: 2
objectReference: {fileID: 0}
- target: {fileID: 1547097154637997990, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName
value: SetActive
objectReference: {fileID: 0}
- target: {fileID: 1547097154637997990, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName
value: LobbyRooms.RoomsListHeartbeat, LobbyRooms
objectReference: {fileID: 0}
- target: {fileID: 1547097154637997990, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_BoolArgument
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1547097154637997990, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName
value: UnityEngine.Object, UnityEngine
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 65b3782fa4600fa4385f4eea3edd9865, type: 3}
--- !u!224 &2637199315599437355 stripped

objectReference: {fileID: 0}
- target: {fileID: 3335058099760921612, guid: 247f79ab5aefc6d40bcbdade4d9467b7, type: 3}
propertyPath: m_fontSize
value: 15.4
value: 12
objectReference: {fileID: 0}
- target: {fileID: 3711939936493401148, guid: 247f79ab5aefc6d40bcbdade4d9467b7, type: 3}
propertyPath: m_AnchorMax.y

objectReference: {fileID: 0}
- target: {fileID: 5713552561910003945, guid: 247f79ab5aefc6d40bcbdade4d9467b7, type: 3}
propertyPath: m_fontSize
value: 37.3
value: 31.3
objectReference: {fileID: 0}
- target: {fileID: 5749901921003950368, guid: 247f79ab5aefc6d40bcbdade4d9467b7, type: 3}
propertyPath: m_AnchorMax.y

objectReference: {fileID: 0}
- target: {fileID: 6281383251298602143, guid: 247f79ab5aefc6d40bcbdade4d9467b7, type: 3}
propertyPath: m_fontSize
value: 53.7
value: 31.3
objectReference: {fileID: 0}
- target: {fileID: 6701676754128905643, guid: 247f79ab5aefc6d40bcbdade4d9467b7, type: 3}
propertyPath: m_AnchorMax.y

objectReference: {fileID: 0}
- target: {fileID: 2828520451782533824, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_Size
value: 0.99999994
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2828520451782533824, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_Value

objectReference: {fileID: 0}
- target: {fileID: 5836614391142406755, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_Name
value: JoinCreateRoomCanvas
value: JoinCreateCanvas
objectReference: {fileID: 0}
- target: {fileID: 5836614391142406755, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_IsActive

objectReference: {fileID: 0}
- target: {fileID: 8314627591180998490, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_fontSize
value: 31.25
value: 26.6
objectReference: {fileID: 0}
- target: {fileID: 8437021287377131492, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchorMax.y

objectReference: {fileID: 0}
- target: {fileID: 8502326957445156609, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_fontSize
value: 31.25
value: 26.6
objectReference: {fileID: 0}
- target: {fileID: 8636295960037856115, guid: 404728f5cffe43940b290121bd31f601, type: 3}
propertyPath: m_AnchorMax.y

m_CorrespondingSourceObject: {fileID: 5836614391142406767, guid: 404728f5cffe43940b290121bd31f601, type: 3}
m_PrefabInstance: {fileID: 8387645425390731067}
m_PrefabAsset: {fileID: 0}
--- !u!114 &4928485776352161055 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 3459776754637410852, guid: 404728f5cffe43940b290121bd31f601, type: 3}
m_PrefabInstance: {fileID: 8387645425390731067}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48ec34a3875818e4690f1bf0be69ccd9, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &8690587081894129692
PrefabInstance:
m_ObjectHideFlags: 0

12
Assets/Prefabs/UI/JoinContent.prefab


- component: {fileID: 3612080823527636284}
- component: {fileID: 1964366387764421678}
m_Layer: 5
m_Name: RoomList
m_Name: LobbyList
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_AnchoredPosition: {x: -3800.4392, y: 1594.6573}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!114 &3612080823527636284

m_HandleRect: {fileID: 7573825319354851387}
m_Direction: 0
m_Value: 0
m_Size: 1
m_Size: 0.4877345
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:

- component: {fileID: 7053976434221716963}
- component: {fileID: 2605713290592748245}
m_Layer: 5
m_Name: RoomScrollView
m_Name: LobbyScrollView
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

m_TargetGraphic: {fileID: 6537579147320774990}
m_HandleRect: {fileID: 7315760059761538639}
m_Direction: 2
m_Value: 0
m_Size: 1
m_Value: 1
m_Size: 0.36052978
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:

14
Assets/Prefabs/UI/JoinCreateCanvas.prefab


m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 35.85
m_fontSize: 26.6
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1

m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 35.85
m_fontSize: 26.6
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 1

- component: {fileID: 5836614390199223661}
- component: {fileID: 6851929216180183212}
m_Layer: 5
m_Name: JoinCreateRoomBG
m_Name: JoinCreateBG
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

- component: {fileID: 6102798993520257211}
- component: {fileID: 1512606419251751951}
m_Layer: 5
m_Name: JoinCreateRoomCanvas
m_Name: JoinCreateCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

objectReference: {fileID: 0}
- target: {fileID: 6554840528482635367, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
propertyPath: m_fontSize
value: 49.25
value: 35.8
objectReference: {fileID: 0}
- target: {fileID: 7315760059761538639, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
propertyPath: m_AnchorMax.x

- target: {fileID: 7824921818678239159, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7824921818678239159, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0.00024414062
objectReference: {fileID: 0}
- target: {fileID: 7824921818678239159, guid: c308ffc2a02e5ab4bbe70a8b2e8108c6, type: 3}
propertyPath: m_AnchoredPosition.y

4
Assets/Scripts/Auth/Identity.cs


using System;
using System.Collections.Generic;
using Utilities;
namespace LobbyRooms.Auth
namespace LobbyRelaySample.Auth
{
/// <summary>
/// Each context will have its own identity needs, so we'll allow each to define whatever parameters it needs.

/// <summary>
/// Our internal representation of a player, wrapping the data required for interfacing with the identities of that player in the services.
/// One will be created for the local player, as well as for each other member of the room.
/// (TODO: If that's the case, reevaluate the usage as a Located service.)
/// </summary>
public class Identity : IIdentity, IDisposable
{

3
Assets/Scripts/Auth/SubIdentity_Authentication.cs


using Unity.Services.Authentication;
using Unity.Services.Core;
namespace LobbyRooms.Auth
namespace LobbyRelaySample.Auth
{
/// <summary>
/// The Authentication package will sign in asynchronously and anonymously. When complete, we will need to store the generated ID.

private async void DoSignIn(Action onSigninComplete)
{
await UnityServices.Initialize();
//Authentication.SetLogLevel(Unity.Services.Authentication.Utilities.LogLevel.Verbose); TODO: Is there a new API for this?
AuthenticationService.Instance.SignedIn += OnSignInChange;
AuthenticationService.Instance.SignedOut += OnSignInChange;

27
Assets/Scripts/Entities/GameStateManager.cs


using LobbyRelaySample.Relay;
using System;
using System;
using LobbyRooms.Relay;
using Player;
using UnityEngine.SceneManagement; // TODO: Definitely shouldn't need this just for logging?
using Utilities;
namespace LobbyRooms
namespace LobbyRelaySample
{
public class GameStateManager : MonoBehaviour, IReceiveMessages
{

var createRoomData = (LobbyData)msg;
RoomsQuery.Instance.CreateRoomAsync(createRoomData.LobbyName, createRoomData.MaxPlayerCount, createRoomData.Private, (r) =>
{
Rooms.ToLobbyData.Convert(r, m_lobbyData, m_localUser);
Lobby.ToLobbyData.Convert(r, m_lobbyData, m_localUser);
}, OnFailedJoin); // TODO: Report failure?
}, OnFailedJoin);
}
else if (type == MessageType.JoinRoomRequest)
{

Rooms.ToLobbyData.Convert(r, m_lobbyData, m_localUser);
Lobby.ToLobbyData.Convert(r, m_lobbyData, m_localUser);
}, OnFailedJoin); // TODO: Report failure?
}, OnFailedJoin);
}
else if (type == MessageType.QueryRooms)
{

{
if (qr != null)
OnRefreshed(Rooms.ToLobbyData.Convert(qr));
OnRefreshed(Lobby.ToLobbyData.Convert(qr));
}, er =>
{
long errorLong = 0;

}
if (m_GameStateObservers.Count < 4)
Debug.LogWarning($"Scene: {SceneManager.GetActiveScene().name} has less than the default expected Game State Observers, ensure all the observers in the scene that need to watch the gameState are registered in the LocalGameStateObservers List.");
Debug.LogWarning($"Scene has less than the default expected Game State Observers, ensure all the observers in the scene that need to watch the gameState are registered in the LocalGameStateObservers List.");
Debug.LogWarning($"Scene: {SceneManager.GetActiveScene().name} has less than the default expected Lobby Data Observers, ensure all the observers in the scene that need to watch the Local Lobby Data are registered in the LobbyDataObservers List.");
Debug.LogWarning($"Scene has less than the default expected Lobby Data Observers, ensure all the observers in the scene that need to watch the Local Lobby Data are registered in the LobbyDataObservers List.");
Debug.LogWarning($"Scene: {SceneManager.GetActiveScene().name} has less than the default expected Local User Observers, ensure all the observers in the scene that need to watch the gameState are registered in the LocalUserObservers List.");
Debug.LogWarning($"Scene has less than the default expected Local User Observers, ensure all the observers in the scene that need to watch the gameState are registered in the LocalUserObservers List.");
Debug.LogWarning($"Scene: {SceneManager.GetActiveScene().name} has less than the default expected Lobby Service Observers, ensure all the observers in the scene that need to watch the lobby service state are registered in the LobbyServiceObservers List.");
Debug.LogWarning($"Scene has less than the default expected Lobby Service Observers, ensure all the observers in the scene that need to watch the lobby service state are registered in the LobbyServiceObservers List.");
}
void InitObservers()

7
Assets/Scripts/Entities/LobbyData.cs


using System.Linq;
using UnityEngine;
namespace LobbyRooms
namespace LobbyRelaySample
{
[Flags]
public enum LobbyState

public bool Private { get; set; }
public int MaxPlayerCount { get; set; }
public LobbyState State { get; set; }
public long? AllPlayersReadyTime { get; set; }
public LobbyInfo(LobbyInfo existing)
{

Private = existing.Private;
MaxPlayerCount = existing.MaxPlayerCount;
State = existing.State;
AllPlayersReadyTime = existing.AllPlayersReadyTime;
}
public LobbyInfo(string roomCode)

Private = false;
MaxPlayerCount = -1;
State = LobbyState.Lobby;
AllPlayersReadyTime = null;
}
}

OnChanged(this);
}
}
public long? AllPlayersReadyTime => m_data.AllPlayersReadyTime;
/// <summary>
/// Checks if we have n players that have the Status.

7
Assets/Scripts/Entities/LobbyDataObserver.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace LobbyRooms
namespace LobbyRelaySample
public class LobbyDataObserver : ObserverBehaviour<LobbyData> { }
}

5
Assets/Scripts/Entities/LobbyReadyCheck.cs


using System;
using System.Collections.Generic;
using System.Linq;
using Utilities;
namespace LobbyRooms
namespace LobbyRelaySample
{
/// <summary>
/// On the host, this will watch for all players to ready, and once they have, it will prepare for a synchronized countdown.

DateTime targetTime = DateTime.Now.AddSeconds(m_ReadyTime);
data.Add("AllPlayersReady", targetTime.Ticks.ToString());
RoomsQuery.Instance.UpdateRoomDataAsync(data, null);
EndCheckingForReady(); // TODO: We'll need to restart checking once we end the relay sequence and return to the room.
EndCheckingForReady();
}
}

4
Assets/Scripts/Entities/LobbyServiceData.cs


using System.Collections.Generic;
namespace LobbyRooms
namespace LobbyRelaySample
{
public enum LobbyServiceState
{

/// Will only trigger if the dictionary is set wholesale. Changes in the size, or contents will not trigger OnChanged
/// string is lobby ID, Key is the Lobby data representation of it
/// </summary>
public Dictionary<string, LobbyData> CurrentLobbies //TODO Copy or Re-implement vivox observableCollections?
public Dictionary<string, LobbyData> CurrentLobbies
{
get { return m_currentLobbies; }
set

6
Assets/Scripts/Entities/LobbyServiceDataObserver.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace LobbyRooms
namespace LobbyRelaySample
{
public class LobbyServiceDataObserver : ObserverBehaviour<LobbyServiceData> { }
}

6
Assets/Scripts/Entities/LobbyUser.cs


using System;
using System.ComponentModel;
using UnityEngine;
using LobbyRooms;
using UnityEngine.Serialization;
namespace LobbyRooms
namespace LobbyRelaySample
{
/// <summary>
/// Current state of the user in the lobby.

7
Assets/Scripts/Entities/LobbyUserObserver.cs


using System;
using LobbyRooms;
using UnityEngine;
using UnityEngine.Serialization;
namespace Player
namespace LobbyRelaySample
{
/// <summary>
/// Holds an instance of a lobbyplayer, and implements hooks for the UI to interact with.

5
Assets/Scripts/Entities/LocalGameState.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace LobbyRooms
namespace LobbyRelaySample
{
/// <summary>
/// Current state of the local Game.

6
Assets/Scripts/Entities/LocalGameStateObserver.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace LobbyRooms
namespace LobbyRelaySample
{
public class LocalGameStateObserver : ObserverBehaviour<LocalGameState> { }
}

5
Assets/Scripts/Entities/ServerAddress.cs


using System.Collections;
using System.Collections.Generic;
using Unity.Services.Relay;
namespace LobbyRooms
namespace LobbyRelaySample
{
/// <summary>
/// This is where your netcode would go, if you had it.

2
Assets/Scripts/Infrastructure/Observed.cs


using System;
namespace LobbyRooms
namespace LobbyRelaySample
{
/// <summary>
/// In your Observed children, be sure to call OnChanged when setting the value of any property.

3
Assets/Scripts/Infrastructure/ObserverBehaviour.cs


using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Serialization;
namespace LobbyRooms
namespace LobbyRelaySample
{
/// <summary>
/// Observes an Observed class, intitializes with Observed State when beginning observation

3
Assets/Scripts/Relay/RelayInterface.cs


using Unity.Services.Relay.Models;
using UnityEngine;
namespace LobbyRooms.Relay
namespace LobbyRelaySample.Relay
{
/// <summary>
/// Does all the interaction with relay.

onComplete?.Invoke(result);
}
}
/// <summary>
/// Creates a Relay Server, and returns the Allocation (Response.Result.Data.Allocation)

32
Assets/Scripts/Rooms/RoomsContentHeartbeat.cs


using System;
using Utilities;
namespace LobbyRooms
namespace LobbyRelaySample
{
/// <summary>
/// Keep updated on changes to a joined room.

if (m_isAwaitingQuery || m_lobbyData == null)
return;
m_isAwaitingQuery = true; // TODO: Recover if we fail? Try-catch? (I.e. if we fail during the update, this might not be reset to false.)
m_isAwaitingQuery = true; // Note that because we make async calls, if one of them fails and doesn't call our callback, this will never be reset to false.
if (m_shouldPushData)
PushDataToRoom();
else

void DoRoomDataPush()
{
RoomsQuery.Instance.UpdateRoomDataAsync(Rooms.ToLobbyData.RetrieveRoomData(m_lobbyData), () => { DoPlayerDataPush(); }); // TODO: This needs not happen as often as player updates, right?
RoomsQuery.Instance.UpdateRoomDataAsync(Lobby.ToLobbyData.RetrieveRoomData(m_lobbyData), () => { DoPlayerDataPush(); });
RoomsQuery.Instance.UpdatePlayerDataAsync(Rooms.ToLobbyData.RetrieveUserData(m_localUser), () => { m_isAwaitingQuery = false; });
RoomsQuery.Instance.UpdatePlayerDataAsync(Lobby.ToLobbyData.RetrieveUserData(m_localUser), () => { m_isAwaitingQuery = false; });
}
void OnRetrieve()

if (room == null) return;
bool prevShouldPush = m_shouldPushData;
var prevState = m_lobbyData.State;
Rooms.ToLobbyData.Convert(room, m_lobbyData, m_localUser);
Lobby.ToLobbyData.Convert(room, m_lobbyData, m_localUser);
CheckForRoomReady(room);
CheckForRoomReady();
if (prevState != LobbyState.Lobby && m_lobbyData.State == LobbyState.Lobby)
Locator.Get.Messenger.OnReceiveMessage(MessageType.ToLobby, null);

void CheckForRoomReady(Room room)
void CheckForRoomReady()
bool areAllPlayersReady = room?.Data?.ContainsKey("AllPlayersReady") == true && !string.IsNullOrWhiteSpace(room.Data["AllPlayersReady"].Value);
bool areAllPlayersReady = m_lobbyData.AllPlayersReadyTime != null;
long targetTimeTicks;
if (long.TryParse(room.Data["AllPlayersReady"].Value, out targetTimeTicks))
{
DateTime targetTime = new DateTime(targetTimeTicks);
if (targetTime.Subtract(DateTime.Now).Seconds < 0)
return;
long targetTimeTicks = m_lobbyData.AllPlayersReadyTime.Value;
DateTime targetTime = new DateTime(targetTimeTicks);
if (targetTime.Subtract(DateTime.Now).Seconds < 0)
return;
Locator.Get.Messenger.OnReceiveMessage(MessageType.Client_EndReadyCountdownAt, targetTime); // Note that this could be called multiple times.
// TODO: Make sure to disable state changes at this point? I guess we'll still have to handle disconnects, at least.
}
// TODO: Report failure?
Locator.Get.Messenger.OnReceiveMessage(MessageType.Client_EndReadyCountdownAt, targetTime); // Note that this could be called multiple times.
}
}
}

4
Assets/Scripts/Rooms/RoomsInterface.cs


using Unity.Services.Rooms.Models;
using Unity.Services.Rooms.Rooms;
namespace LobbyRooms.Rooms
namespace LobbyRelaySample.Lobby
{
/// <summary>
/// Does all the interactions with Rooms.

public static void JoinRoomAsync(string requesterUASId, string roomId, string roomCode, Action<Response<Room>> onComplete)
{
JoinRoomRequest joinRequest = new JoinRoomRequest(new JoinRequest(
player: new Unity.Services.Rooms.Models.Player(requesterUASId), // TODO: Oh, we can supply initial data here.
player: new Unity.Services.Rooms.Models.Player(requesterUASId),
id: roomId,
roomCode: roomCode
));

4
Assets/Scripts/Rooms/RoomsListHeartbeat.cs


using UnityEngine;
using Utilities;
namespace LobbyRooms
namespace LobbyRelaySample
/// TODO: This should only be active while the join menu is visible. Also remove the OnVisibilityChange event when a better solution is introduced.
/// </summary>
public class RoomsListHeartbeat : MonoBehaviour
{

9
Assets/Scripts/Rooms/RoomsQuery.cs


using LobbyRooms.Rooms;
using LobbyRelaySample.Lobby;
using Utilities;
namespace LobbyRooms
namespace LobbyRelaySample
{
/// <summary>
/// An abstraction layer between the direct calls into Rooms and the outcomes you actually want. E.g. you can request to get a readable list of

}
#region We want to cache the room object so we don't query for it every time we need to do a different room operation or view current data.
// TODO: Replace this with just doing the room query update loop here instead of with each other operation.
private Queue<Action> m_pendingOperations = new Queue<Action>();
private string m_currentRoomId = null;
private Room m_lastKnownRoom;

}
#endregion
// TODO: Reify async calls so they can be enqueued if calls are made before outstanding async operations complete?
/// <summary>
/// Attempt to create a new room and then join it.

25
Assets/Scripts/Rooms/ToLobbyData.cs


using System.Collections.Generic;
using Unity.Services.Rooms.Models;
namespace LobbyRooms.Rooms
namespace LobbyRelaySample.Lobby
{
/// <summary>
/// Convert the Room resulting from a Rooms request into a LobbyData for use in the game logic.

public static void Convert(Room room, LobbyData outputToHere, LobbyUser existingLocalUser = null)
{
LobbyInfo info = new LobbyInfo
{ RoomID = room.Id,
RoomCode = room.RoomCode,
Private = room.IsPrivate,
LobbyName = room.Name,
MaxPlayerCount = room.MaxPlayers,
RelayCode = room.Data?.ContainsKey("RelayCode") == true ? room.Data["RelayCode"].Value : null,
State = room.Data?.ContainsKey("State") == true ? (LobbyState) int.Parse(room.Data["State"].Value) : LobbyState.Lobby
// TODO: RelayServer?
{ RoomID = room.Id,
RoomCode = room.RoomCode,
Private = room.IsPrivate,
LobbyName = room.Name,
MaxPlayerCount = room.MaxPlayers,
RelayCode = room.Data?.ContainsKey("RelayCode") == true ? room.Data["RelayCode"].Value : null,
State = room.Data?.ContainsKey("State") == true ? (LobbyState) int.Parse(room.Data["State"].Value) : LobbyState.Lobby,
AllPlayersReadyTime = room.Data?.ContainsKey("AllPlayersReady") == true ? long.Parse(room.Data["AllPlayersReady"].Value) : (long?)null
// TODO: no...we want to edit the underlying data without affecting the instance at all.
// So, perhaps we need to instead take in the LobbyData, which will have created the user instances, and then they will be populated as we go?
// Do consider committing first.
if (existingLocalUser != null && player.Id.Equals(existingLocalUser.ID))
{
existingLocalUser.IsHost = room.HostId.Equals(player.Id);

/// </summary>
public static List<LobbyData> Convert(QueryResponse response)
{
List<LobbyData> retLst = new List<LobbyData>(); // TODO: This needs to not try to register for a bunch of events?
List<LobbyData> retLst = new List<LobbyData>();
foreach (var room in response.Results)
retLst.Add(Convert(room));
return retLst;

Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("RelayCode", room.RelayCode);
data.Add("State", ((int)room.State).ToString());
// We only want the ArePlayersReadyTime to be set when we actually are ready for it, and it's null otherwise. So, don't set that here.
return data;
}

31
Assets/Scripts/Tests/Editor/AuthTests.cs


using LobbyRooms.Auth;
using LobbyRelaySample.Auth;
public class AuthTests
namespace Test
[Test]
public void IdentityBasicSubidentity()
public class AuthTests
string value = null;
int count = 0;
SubIdentity testIdentity = new SubIdentity();
testIdentity.onChanged += (si) => { value = si.GetContent("key1"); count++; };
[Test]
public void IdentityBasicSubidentity()
{
string value = null;
int count = 0;
SubIdentity testIdentity = new SubIdentity();
testIdentity.onChanged += (si) => { value = si.GetContent("key1"); count++; };
testIdentity.SetContent("key1", "newValue1");
Assert.AreEqual(1, count, "Content changed once.");
Assert.AreEqual("newValue1", value, "Should not have to do anything to receive updated content from a set.");
testIdentity.SetContent("key2", "newValue2");
Assert.AreEqual(2, count, "Content changed twice.");
Assert.AreEqual("newValue1", value, "Contents should not affect different keys.");
testIdentity.SetContent("key1", "newValue1");
Assert.AreEqual(1, count, "Content changed once.");
Assert.AreEqual("newValue1", value, "Should not have to do anything to receive updated content from a set.");
testIdentity.SetContent("key2", "newValue2");
Assert.AreEqual(2, count, "Content changed twice.");
Assert.AreEqual("newValue1", value, "Contents should not affect different keys.");
}
}
}

5
Assets/Scripts/Tests/Editor/LobbyTests.cs


using System.Collections;
using LobbyRooms;
using LobbyRelaySample;
using UnityEngine;
using UnityEngine.TestTools;
namespace Test
{

3
Assets/Scripts/Tests/Editor/LoggerTests.cs


using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
using Utilities;
namespace LobbyRooms.Tests
namespace LobbyRelaySample.Tests
{
public class LoggerTest
{

4
Assets/Scripts/Tests/Editor/MessengerTests.cs


using NUnit.Framework;
using LobbyRelaySample;
using NUnit.Framework;
using Utilities;
public class MessengerTests
{

2
Assets/Scripts/Tests/Editor/ObserverTests.cs


using UnityEngine.TestTools;
using Assert = UnityEngine.Assertions.Assert;
namespace LobbyRooms.Tests
namespace LobbyRelaySample.Tests
{
public class ObserverTests
{

17
Assets/Scripts/Tests/PlayMode/ReadyCheckTests.cs


using LobbyRooms;
using LobbyRelaySample;
using NUnit.Framework;
using System.Collections;
using Unity.Services.Rooms;

using Utilities;
using RoomsInterface = LobbyRooms.Rooms.RoomsInterface;
using RoomsInterface = LobbyRelaySample.Lobby.RoomsInterface;
namespace Test
{

private LobbyRooms.Auth.Identity m_auth;
private LobbyRelaySample.Auth.Identity m_auth;
private bool m_didSigninComplete = false;
private GameObject m_updateSlowObj;

m_auth = new LobbyRooms.Auth.Identity(() => { m_didSigninComplete = true; });
m_auth = new LobbyRelaySample.Auth.Identity(() => { m_didSigninComplete = true; });
Locator.Get.Provide(m_auth);
m_updateSlowObj = new GameObject("UpdateSlowTest");
m_updateSlowObj.AddComponent<UpdateSlow>();

[OneTimeTearDown]
public void Teardown()
{
Locator.Get.Provide(new LobbyRooms.Auth.IdentityNoop());
Locator.Get.Provide(new LobbyRelaySample.Auth.IdentityNoop());
m_auth.Dispose();
LogAssert.ignoreFailingMessages = false;
RoomsQuery.Instance.EndTracking();

{
bool hasPushedPlayerData = false;
float timeout = 5;
RoomsQuery.Instance.UpdatePlayerDataAsync(LobbyRooms.Rooms.ToLobbyData.RetrieveUserData(player), () => { hasPushedPlayerData = true; }); // RoomsContentHeartbeat normally does this.
RoomsQuery.Instance.UpdatePlayerDataAsync(LobbyRelaySample.Lobby.ToLobbyData.RetrieveUserData(player), () => { hasPushedPlayerData = true; }); // RoomsContentHeartbeat normally does this.
while (!hasPushedPlayerData && timeout > 0)
{ yield return new WaitForSeconds(0.25f);
timeout -= 0.25f;

[UnityTest]
public IEnumerator SetCountdownTimeSinglePlayer()
{
LogAssert.ignoreFailingMessages = true; // TODO: Not sure why, but when auth logs in, it sometimes generates an error: "A Native Collection has not been disposed[...]." We don't want this to cause test failures, since in practice it *seems* to not negatively impact behavior.
LogAssert.ignoreFailingMessages = true; // Not sure why, but when auth logs in, it sometimes generates an error: "A Native Collection has not been disposed[...]." We don't want this to cause test failures, since in practice it *seems* to not negatively impact behavior.
string userId = m_auth.GetSubIdentity(LobbyRooms.Auth.IIdentityType.Auth).GetContent("id");
string userId = m_auth.GetSubIdentity(LobbyRelaySample.Auth.IIdentityType.Auth).GetContent("id");
yield return CreateRoom("TestReadyRoom1", userId);
RoomsQuery.Instance.BeginTracking(m_workingRoomId);

17
Assets/Scripts/Tests/PlayMode/RelayRoundTripTests.cs


using System;
using System.Collections;
using System.Collections.Generic;
using LobbyRooms.Relay;
using LobbyRelaySample.Relay;
using NUnit.Framework;
using Unity.Services.Relay;
using Unity.Services.Relay.Models;

{
public class RelayRoundTripTests
{
private string roomCode = "";
private LobbyRooms.Auth.SubIdentity_Authentication m_auth;
private LobbyRelaySample.Auth.SubIdentity_Authentication m_auth;
m_auth = new LobbyRooms.Auth.SubIdentity_Authentication(() => { m_didSigninComplete = true; });
m_auth = new LobbyRelaySample.Auth.SubIdentity_Authentication(() => { m_didSigninComplete = true; });
}
[OneTimeTearDown]

public IEnumerator DoBaseRoundTrip()
{
LogAssert.ignoreFailingMessages = true;
if (!m_didSigninComplete)
yield return new WaitForSeconds(1);
if (!m_didSigninComplete)
yield return new WaitForSeconds(2);
if (!m_didSigninComplete)
yield return new WaitForSeconds(3);
if (!m_didSigninComplete)

{
LogAssert.ignoreFailingMessages = true;
if (!m_didSigninComplete)
yield return new WaitForSeconds(1);
if (!m_didSigninComplete)
yield return new WaitForSeconds(2);
if (!m_didSigninComplete)
yield return new WaitForSeconds(1); // To prevent a possible 429 after a previous test.
//Allocation
float timeout = 5;

11
Assets/Scripts/Tests/PlayMode/RoomsRoundtripTests.cs


using Unity.Services.Rooms.Models;
using UnityEngine;
using UnityEngine.TestTools;
using RoomsInterface = LobbyRooms.Rooms.RoomsInterface;
using RoomsInterface = LobbyRelaySample.Lobby.RoomsInterface;
namespace Test
{

public class RoomsRoundtripTests
{
private string m_workingRoomId;
private LobbyRooms.Auth.SubIdentity_Authentication m_auth;
private LobbyRelaySample.Auth.SubIdentity_Authentication m_auth;
m_auth = new LobbyRooms.Auth.SubIdentity_Authentication(() => { m_didSigninComplete = true; });
m_auth = new LobbyRelaySample.Auth.SubIdentity_Authentication(() => { m_didSigninComplete = true; });
}
[UnityTearDown]

[UnityTest]
public IEnumerator DoRoundtrip()
{
LogAssert.ignoreFailingMessages = true; // TODO: Not sure why, but when auth logs in, it sometimes generates an error: "A Native Collection has not been disposed[...]." We don't want this to cause test failures, since in practice it *seems* to not negatively impact behavior.
LogAssert.ignoreFailingMessages = true; // Not sure why, but when auth logs in, it sometimes generates an error: "A Native Collection has not been disposed[...]." We don't want this to cause test failures, since in practice it *seems* to not negatively impact behavior.
// Wait a reasonable amount of time for sign-in to complete.
if (!m_didSigninComplete)

// Since we're signed in through the same pathway as the actual game, the list of rooms will include any that have been made in the game itself, so we should account for those.
// If you want to get around this, consider having a secondary project using the same assets with its own credentials.
yield return new WaitForSeconds(1); // To prevent a possible 429 with the upcoming Query request, in case a previous test had one; Query requests can only occur at a rate of 1 per second.
Response<QueryResponse> queryResponse = null;
float timeout = 5;

}
Assert.Greater(timeout, 0, "Timeout check (query #1)");
Assert.IsTrue(queryResponse.Status >= 200 && queryResponse.Status < 300, "QueryAllRoomsAsync should return a success code. (#1)");
Assert.AreEqual(1 + numRoomsIni, queryResponse.Result.Results.Count, "Queried rooms list should contain just the test room. (Are there rooms you created and did not yet delete?)"); // TODO: Can we get a test account such that having actual rooms open doesn't impact this?
Assert.AreEqual(1 + numRoomsIni, queryResponse.Result.Results.Count, "Queried rooms list should contain the test room.");
Assert.IsTrue(queryResponse.Result.Results.Where(r => r.Name == roomName).Count() == 1, "Checking queried room for name.");
Assert.IsTrue(queryResponse.Result.Results.Where(r => r.Id == m_workingRoomId).Count() == 1, "Checking queried room for ID.");

2
Assets/Scripts/Tests/PlayMode/UpdateSlowTests.cs


using LobbyRelaySample;
using NUnit.Framework;
using System;
using System.Collections;

using UnityEngine.TestTools;
using Utilities;
namespace Test
{

6
Assets/Scripts/UI/BackButtonUI.cs


using System.Collections;
using System.Collections.Generic;
using LobbyRooms;
using Utilities;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class BackButtonUI : MonoBehaviour
{

25
Assets/Scripts/UI/CountdownUI.cs


using System;
using System.Collections;
using LobbyRooms;
using LobbyRooms.UI;
public class CountdownUI : ObserverPanel<LobbyData>
namespace LobbyRelaySample.UI
[SerializeField]
TMP_Text m_CountDownText;
public class CountdownUI : ObserverPanel<LobbyData>
{
[SerializeField]
TMP_Text m_CountDownText;
public override void ObservedUpdated(LobbyData observed)
{
if (observed.CountDownTime <= 0)
return;
m_CountDownText.SetText($"Starting in: {observed.CountDownTime}");
public override void ObservedUpdated(LobbyData observed)
{
if (observed.CountDownTime <= 0)
return;
m_CountDownText.SetText($"Starting in: {observed.CountDownTime}");
}
}
}

7
Assets/Scripts/UI/CreateMenuUI.cs


using System.Collections;
using System.Collections.Generic;
using LobbyRooms.UI;
using TMPro;
using Utilities;
namespace LobbyRooms
namespace LobbyRelaySample.UI
{
public class CreateMenuUI : UIPanelBase
{

6
Assets/Scripts/UI/EmoteButtonUI.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine.Serialization;
using Utilities;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class EmoteButtonUI : MonoBehaviour
{

5
Assets/Scripts/UI/EndGameButtonUI.cs


using System.Collections;
using System.Collections.Generic;
using Utilities;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class EndGameButtonUI : MonoBehaviour
{

4
Assets/Scripts/UI/ExitButtonUI.cs


using System.Collections;
using System.Collections.Generic;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class ExitButtonUI : MonoBehaviour
{

2
Assets/Scripts/UI/GameStateVisibilityUI.cs


using UnityEngine;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
[RequireComponent(typeof(LocalGameStateObserver))]
public class GameStateVisibilityUI : ObserverPanel<LocalGameState>

6
Assets/Scripts/UI/JoinCreateRoomUI.cs


using Utilities;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
/// The panel that holds the room joining and creation panels TODO if we end up not needing this, replace with UIPanelBase on the prefab
/// The panel that holds the room joining and creation panels.
/// </summary>
public class JoinCreateRoomUI : ObserverPanel<LocalGameState>
{

3
Assets/Scripts/UI/JoinMenuUI.cs


using System.Collections.Generic;
using TMPro;
using UnityEngine;
using Utilities;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Handles the list of LobbyButtons and ensures it stays synchronous with the list from the service.

8
Assets/Scripts/UI/LobbyButtonUI.cs


using System;
using System.Collections;
using System.Collections.Generic;
using LobbyRooms;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
[RequireComponent(typeof(LobbyDataObserver))]
public class LobbyButtonUI : MonoBehaviour

public void UpdateLobby(LobbyData lobby)
{
m_DataObserver.observed.CopyObserved(lobby); // TODO: Seems very roundabout.
m_DataObserver.observed.CopyObserved(lobby);
}
public void OnRoomUpdated(LobbyData data)

2
Assets/Scripts/UI/LobbyStateVisibilityUI.cs


using UnityEngine;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class LobbyStateVisibilityUI : ObserverPanel<LobbyData>
{

3
Assets/Scripts/UI/LobbyUserCardUI.cs


using Player;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Shows the player info in-lobby and game

7
Assets/Scripts/UI/LobbyUsersUI.cs


using System.Collections;
using UnityEngine.Serialization;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Watches for changes in the Lobby's player List

/// </summary>
public override void ObservedUpdated(LobbyData observed)
{
// if (observed.PlayerCount == m_CurrentUsers.Count) // TODO: Not a 100% accurate shorthand.
// return;
for (int id = m_CurrentUsers.Count - 1; id >= 0; id--) // We might remove users if they aren't in the new data, so iterate backwards.
{
string userId = m_CurrentUsers[id];

5
Assets/Scripts/UI/MainMenuUI.cs


using System.Collections;
using System.Collections.Generic;
using LobbyRooms.UI;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Watches for Changes in the Game State to/from Menu

5
Assets/Scripts/UI/NameChangeUI.cs


using UnityEngine;
using Utilities;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Sends a message that should change the displayName Data only.

8
Assets/Scripts/UI/ObserverPanel.cs


using System.Collections;
using System.Collections.Generic;
using LobbyRooms.UI;
using UnityEngine;
using LobbyRooms;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Observer UI panel base class, for UI panels that need hiding, and hookup to observerBehaviours

7
Assets/Scripts/UI/PlayerNameUI.cs


using System;
using LobbyRooms;
using LobbyRooms.UI;
using Player;
using UnityEngine.Serialization;
namespace LobbyRooms
namespace LobbyRelaySample.UI
{
public class PlayerNameUI : ObserverPanel<LobbyUser>
{

5
Assets/Scripts/UI/ReadyCheckUI.cs


using System.Collections;
using System.Collections.Generic;
using Utilities;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class ReadyCheckUI : MonoBehaviour
{

4
Assets/Scripts/UI/RelayCodeUI.cs


using System.Collections;
using System.Collections.Generic;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Read Only input field (for copy/paste reasons) Watches for the changes in the lobby's Relay Code

5
Assets/Scripts/UI/RoomCodeUI.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Read Only input field (for copy/paste reasons) Watches for the changes in the lobby's Room Code

4
Assets/Scripts/UI/ServerAddressUI.cs


using System.Collections;
using System.Collections.Generic;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class ServerAddressUI : ObserverPanel<LobbyData>
{

4
Assets/Scripts/UI/ServerNameUI.cs


using System.Collections;
using System.Collections.Generic;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class ServerNameUI : ObserverPanel<LobbyData>
{

4
Assets/Scripts/UI/SpinnerUI.cs


using System.Text;
using TMPro;
using UnityEngine;
using UnityEngine.Serialization;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
public class SpinnerUI : ObserverPanel<LobbyServiceData>
{

5
Assets/Scripts/UI/StartLobbyButton.cs


using System.Collections;
using System.Collections.Generic;
using Utilities;
namespace LobbyRooms
namespace LobbyRelaySample
{
public class StartLobbyButton : MonoBehaviour
{

7
Assets/Scripts/UI/UIPanelBase.cs


using UnityEngine;
using UnityEngine.Events;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
[RequireComponent(typeof(CanvasGroup))]
public class UIPanelBase : MonoBehaviour

[SerializeField]
bool showing;
CanvasGroup m_canvasGroup;

return m_canvasGroup = GetComponent<CanvasGroup>();
}
}
[SerializeField] // TODO: Why serialized? Just for testing?
bool showing;
public void Toggle()
{

4
Assets/Scripts/UI/UserStateVisibilityUI.cs


using System;
using Player;
using UnityEngine.Serialization;
namespace LobbyRooms.UI
namespace LobbyRelaySample.UI
{
/// <summary>
/// Current user statea

4
Assets/Scripts/Utilities/Locator.cs


using LobbyRooms.Auth;
using LobbyRelaySample.Auth;
namespace Utilities
namespace LobbyRelaySample
{
/// <summary>
/// Allows Located services to transfer data to their replacements if needed.

2
Assets/Scripts/Utilities/LogHandler.cs


using UnityEngine;
using Object = UnityEngine.Object;
namespace Utilities
namespace LobbyRelaySample
{
public enum LogMode
{

2
Assets/Scripts/Utilities/Messenger.cs


using UnityEngine;
using Stopwatch = System.Diagnostics.Stopwatch;
namespace Utilities
namespace LobbyRelaySample
{
/// <summary>
/// Ensure that message contents are obvious but not dependent on spelling strings correctly.

2
Assets/Scripts/Utilities/NameGenerator.cs


using System.Text;
using System.Threading.Tasks;
namespace Utilities
namespace LobbyRelaySample
{
/// <summary>
/// Just for fun, give a cute default name if no name is provided.

2
Assets/Scripts/Utilities/UpdateSlow.cs


using UnityEngine;
using Stopwatch = System.Diagnostics.Stopwatch;
namespace Utilities
namespace LobbyRelaySample
{
public delegate void UpdateMethod(float dt);

4
Assets/TempDeleteAllRooms.cs


public void OnButton()
{
LobbyRooms.Rooms.RoomsInterface.QueryAllRoomsAsync((qr) => { DoDeletes(qr); });
LobbyRelaySample.Lobby.RoomsInterface.QueryAllRoomsAsync((qr) => { DoDeletes(qr); });
}
private void DoDeletes(Unity.Services.Rooms.Response<Unity.Services.Rooms.Models.QueryResponse> response)

{
foreach (var room in rooms)
{
LobbyRooms.Rooms.RoomsInterface.DeleteRoomAsync(room.Id, null); // The onComplete callback isn't called in some error cases, e.g. a 403 when we don't have permissions, so don't block on it.
LobbyRelaySample.Lobby.RoomsInterface.DeleteRoomAsync(room.Id, null); // The onComplete callback isn't called in some error cases, e.g. a 403 when we don't have permissions, so don't block on it.
yield return new WaitForSeconds(1); // We need to wait a little to avoid 429's, but we might not run an onComplete depending on how the delete call fails.
}
}

4
Packages/manifest.json


"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.services.authentication": "0.5.0-preview",
"com.unity.services.core": "0.3.0-preview",
"com.unity.services.relay": "0.0.1-preview.5",
"com.unity.services.rooms": "0.1.5",
"com.unity.services.relay": "0.0.1-preview.7",
"com.unity.services.rooms": "0.1.6",
"com.unity.sysroot.linux-x86_64": "0.1.15-preview",
"com.unity.test-framework": "1.1.26",
"com.unity.textmeshpro": "3.0.6",

38
Packages/packages-lock.json


"com.unity.modules.animation": "1.0.0",
"com.unity.modules.uielements": "1.0.0"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.2d.common": {
"version": "6.0.0-pre.2",

"com.unity.modules.uielements": "1.0.0",
"com.unity.burst": "1.5.1"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.2d.path": {
"version": "5.0.0",

"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.2d.pixel-perfect": {
"version": "5.0.0",

"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.2d.psdimporter": {
"version": "6.0.0-pre.2",

"com.unity.2d.common": "6.0.0-pre.2",
"com.unity.2d.sprite": "1.0.0"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.2d.sprite": {
"version": "1.0.0",

"com.unity.2d.path": "5.0.0",
"com.unity.modules.physics2d": "1.0.0"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.2d.tilemap": {
"version": "1.0.0",

"dependencies": {
"com.unity.mathematics": "1.2.1"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "1.5.7",

"com.unity.nuget.newtonsoft-json": "2.0.0"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "1.0.6",

"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.7",

"com.unity.ext.nunit": "1.0.6"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.9",

"com.unity.test-framework": "1.1.9"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
"version": "1.2.3",

"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.mathematics": {
"version": "1.2.1",

"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "2.0.0",

"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.services.authentication": {
"version": "0.5.0-preview",

"url": "https://artifactory.prd.it.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.services.relay": {
"version": "0.0.1-preview.5",
"version": "0.0.1-preview.7",
"depth": 0,
"source": "registry",
"dependencies": {

"url": "https://artifactory.prd.it.unity3d.com/artifactory/api/npm/upm-candidates"
},
"com.unity.services.rooms": {
"version": "0.1.5",
"version": "0.1.6",
"depth": 0,
"source": "registry",
"dependencies": {

"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.textmeshpro": {
"version": "3.0.6",

"com.unity.ugui": "1.0.0"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.6.0-pre.5",

"com.unity.modules.audio": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0"
},
"url": "https://packages-v2-staging.unity.com"
"url": "https://packages.unity.com"
},
"com.unity.toolchain.win-x86_64-linux-x86_64": {
"version": "0.1.20-preview",

2
ProjectSettings/EditorBuildSettings.asset


serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/mainMenu.unity
path: Assets/Scenes/mainScene.unity
guid: ac99f707ce93cff419a804de3a2cc937
m_configObjects: {}

16
ProjectSettings/ProjectSettings.asset


useOnDemandResources: 0
accelerometerFrequency: 60
companyName: Unity
productName: com.unity.services.samples.lobby-rooms
productName: Game-Lobby-Sample
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}

m_SplashScreenLogos: []
m_VirtualRealitySplashScreen: {fileID: 0}
m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1920
defaultScreenHeight: 1080
defaultScreenWidth: 1280
defaultScreenHeight: 720
defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600
m_StereoRenderingPath: 0

xboxEnableFitness: 0
visibleInBackground: 1
allowFullscreenSwitch: 1
fullscreenMode: 1
fullscreenMode: 3
xboxSpeechDB: 0
xboxEnableHeadOrientation: 0
xboxEnableGuest: 0

XboxOneOverrideIdentityPublisher:
vrEditorSettings: {}
cloudServicesEnabled:
Analytics: 0
Analytics: 1
Build: 0
Collab: 0
Game Performance: 0

m_VersionName:
apiCompatibilityLevel: 6
activeInputHandler: 0
cloudProjectId:
cloudProjectId: 0bf0426b-e1fd-4251-82d0-3eea033ef1ad
projectName:
organizationId:
projectName: com.unity.services.samples.lobby-rooms
organizationId: operate-samples
cloudEnabled: 0
legacyClampBlendShapeWeights: 0
playerDataPath:

2
ProjectSettings/UnityConnectSettings.asset


m_Enabled: 0
m_TestMode: 0
UnityAnalyticsSettings:
m_Enabled: 0
m_Enabled: 1
m_TestMode: 0
m_InitializeOnStartup: 1
UnityAdsSettings:

523
Assets/Prefabs/UI/DungeonCardUI.prefab


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &793872655064185919
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4970254552325481724}
- component: {fileID: 2502709462798542419}
- component: {fileID: 1247191063656167547}
m_Layer: 5
m_Name: Challenge
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4970254552325481724
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 793872655064185919}
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: 5197171795663519738}
m_RootOrder: 2
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: -77.5}
m_SizeDelta: {x: 0, y: -155}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2502709462798542419
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 793872655064185919}
m_CullTransparentMesh: 1
--- !u!114 &1247191063656167547
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 793872655064185919}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: 1
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 5, y: 5, z: 5, w: 5}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &2474684040844421784
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5197171795663519738}
- component: {fileID: 7261412709738306257}
- component: {fileID: 7377294181630679737}
- component: {fileID: 8608263192131357907}
- component: {fileID: 4696283301985254680}
m_Layer: 5
m_Name: DungeonCardUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5197171795663519738
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2474684040844421784}
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: 4056964661544288197}
- {fileID: 4353273557182542384}
- {fileID: 4970254552325481724}
m_Father: {fileID: 0}
m_RootOrder: 0
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.5, y: 0.5}
--- !u!222 &7261412709738306257
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2474684040844421784}
m_CullTransparentMesh: 1
--- !u!114 &7377294181630679737
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2474684040844421784}
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: 0.801, g: 0.7598271, b: 0.4940748, 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: 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!114 &8608263192131357907
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2474684040844421784}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 125
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &4696283301985254680
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2474684040844421784}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2b5f381b6cfd6b74092afaf51fa07c5b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_cardName: {fileID: 6889736826674862530}
m_description: {fileID: 8249807709817388778}
m_Difficulty: {fileID: 1247191063656167547}
--- !u!1 &3419574163239947656
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4353273557182542384}
- component: {fileID: 6354091954080201591}
- component: {fileID: 8249807709817388778}
m_Layer: 5
m_Name: Description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4353273557182542384
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3419574163239947656}
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: 5197171795663519738}
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: -22.568}
m_SizeDelta: {x: 0, y: -113.5645}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6354091954080201591
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3419574163239947656}
m_CullTransparentMesh: 1
--- !u!114 &8249807709817388778
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3419574163239947656}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: I am the most powerful card in existance!
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 18.75
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 5, y: 5, z: 5, w: 5}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &5742325261519812252
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4056964661544288197}
- component: {fileID: 2657713052050199270}
- component: {fileID: 6889736826674862530}
m_Layer: 5
m_Name: Name
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4056964661544288197
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5742325261519812252}
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: 5197171795663519738}
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: 56.7822}
m_SizeDelta: {x: 0, y: -113.5645}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2657713052050199270
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5742325261519812252}
m_CullTransparentMesh: 1
--- !u!114 &6889736826674862530
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5742325261519812252}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: CardName
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 21.4
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 5, y: 5, z: 5, w: 5}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

7
Assets/Prefabs/UI/DungeonCardUI.prefab.meta


fileFormatVersion: 2
guid: c80a10fcbcb51f843b79e1e4b743c6eb
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

894
Assets/Scenes/MVVMUITest.unity


%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: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 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, g: 0, b: 0, 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: 0
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: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 500
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 2
m_PVRDenoiserTypeDirect: 0
m_PVRDenoiserTypeIndirect: 0
m_PVRDenoiserTypeAO: 0
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 0
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: 2
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
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &460843220
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 460843224}
- component: {fileID: 460843223}
- component: {fileID: 460843222}
- component: {fileID: 460843221}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &460843221
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 460843220}
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 &460843222
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 460843220}
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 &460843223
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 460843220}
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: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &460843224
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 460843220}
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 980083023}
- {fileID: 1621663069}
- {fileID: 1128480549}
m_Father: {fileID: 0}
m_RootOrder: 1
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 &519420028
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 519420032}
- component: {fileID: 519420031}
- component: {fileID: 519420029}
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 &519420029
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
--- !u!20 &519420031
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
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: 1
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: 0
m_HDR: 1
m_AllowMSAA: 0
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &519420032
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 519420028}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &961732638
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 961732639}
- component: {fileID: 961732641}
- component: {fileID: 961732640}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &961732639
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961732638}
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: 1621663069}
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 &961732640
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961732638}
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_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: 0
m_HorizontalOverflow: 1
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
--- !u!222 &961732641
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 961732638}
m_CullTransparentMesh: 1
--- !u!1 &980083022
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 980083023}
- component: {fileID: 980083026}
- component: {fileID: 980083025}
- component: {fileID: 980083024}
m_Layer: 5
m_Name: PlayerText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &980083023
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980083022}
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: 460843224}
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: 268}
m_SizeDelta: {x: 200, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &980083024
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980083022}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b5764fbc69eca694ca7985188a96b795, type: 3}
m_Name:
m_EditorClassIdentifier:
m_TextField: {fileID: 980083025}
--- !u!114 &980083025
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980083022}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: 'PlayerName
'
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 36
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!222 &980083026
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 980083022}
m_CullTransparentMesh: 1
--- !u!1 &1128480548
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1128480549}
- component: {fileID: 1128480550}
m_Layer: 0
m_Name: PlayerData
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1128480549
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128480548}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -27.066467, y: 127.04703, z: 3.5542836}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 460843224}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1128480550
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1128480548}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a03b37d5b8df06948b36dfbc430a1ea5, type: 3}
m_Name:
m_EditorClassIdentifier:
lobbyPlayerObserver: {fileID: 980083024}
--- !u!1 &1621663068
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1621663069}
- component: {fileID: 1621663072}
- component: {fileID: 1621663071}
- component: {fileID: 1621663070}
m_Layer: 5
m_Name: PlayerNameInput
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1621663069
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1621663068}
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: 2113837822}
- {fileID: 961732639}
m_Father: {fileID: 460843224}
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: -15.440491, y: 49.77481}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1621663070
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1621663068}
m_Enabled: 1
m_EditorHideFlags: 0
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}
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: 1621663071}
m_TextComponent: {fileID: 961732640}
m_Placeholder: {fileID: 2113837823}
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_OnSubmit:
m_PersistentCalls:
m_Calls: []
m_OnDidEndEdit:
m_PersistentCalls:
m_Calls: []
m_OnValueChanged:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1128480550}
m_TargetAssemblyTypeName: Player.PlayerBehaviour, Assembly-CSharp
m_MethodName: SetName
m_Mode: 0
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_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!114 &1621663071
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1621663068}
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_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_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 &1621663072
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1621663068}
m_CullTransparentMesh: 1
--- !u!1 &2113837821
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2113837822}
- component: {fileID: 2113837824}
- component: {fileID: 2113837823}
m_Layer: 5
m_Name: Placeholder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2113837822
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2113837821}
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: 1621663069}
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_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2113837823
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2113837821}
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_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: 2
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: Enter text...
--- !u!222 &2113837824
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2113837821}
m_CullTransparentMesh: 1
--- !u!1 &2130465086
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2130465089}
- component: {fileID: 2130465088}
- component: {fileID: 2130465087}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &2130465087
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2130465086}
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 &2130465088
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2130465086}
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 &2130465089
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2130465086}
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_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

7
Assets/Scenes/MVVMUITest.unity.meta


fileFormatVersion: 2
guid: 2cda990e2423bbf4892e6590ba056729
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

12
Assets/Scripts/Infrastructure/ServiceConfig.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace LobbyRooms
{
[CreateAssetMenu(order = 0, fileName = "new service Config", menuName = "LobbyRooms/ServiceConfig")]
public class ServiceConfig : ScriptableObject
{
public string targetBasePath;
}
}

11
Assets/Scripts/Infrastructure/ServiceConfig.cs.meta


fileFormatVersion: 2
guid: 1992071f0b81bae4394d3f5f09123b7e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/StreamingAssets.meta


fileFormatVersion: 2
guid: 93006e6c7cc88684f968141b0e6c16c7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

/Assets/Prefabs/UI/JoinCreateRoomCanvas.prefab.meta → /Assets/Prefabs/UI/JoinCreateCanvas.prefab.meta

/Assets/Prefabs/UI/JoinCreateRoomCanvas.prefab → /Assets/Prefabs/UI/JoinCreateCanvas.prefab

/Assets/Scenes/mainMenu.unity → /Assets/Scenes/mainScene.unity

/Assets/Scenes/mainMenu.unity.meta → /Assets/Scenes/mainScene.unity.meta

正在加载...
取消
保存