diff --git a/Assets/Photon.meta b/Assets/Photon.meta new file mode 100644 index 00000000..06f81093 --- /dev/null +++ b/Assets/Photon.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 98951132346795f438babe7a3183da43 +folderAsset: yes +timeCreated: 1523536679 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat.meta b/Assets/Photon/PhotonChat.meta new file mode 100644 index 00000000..ba251119 --- /dev/null +++ b/Assets/Photon/PhotonChat.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ea05e6479d592944d955c2a5e1a6d6f1 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Code.meta b/Assets/Photon/PhotonChat/Code.meta new file mode 100644 index 00000000..514db0b5 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: af83a98aaa4f7b64eb7fcec95ee7b1ed +folderAsset: yes +timeCreated: 1523525757 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Code/ChannelCreationOptions.cs b/Assets/Photon/PhotonChat/Code/ChannelCreationOptions.cs new file mode 100644 index 00000000..50c791b5 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChannelCreationOptions.cs @@ -0,0 +1,22 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChannelCreationOptions is a parameter used when subscribing to a public channel for the first time. +// Photon Chat Api - Copyright (C) 2018 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +namespace Photon.Chat +{ + public class ChannelCreationOptions + { + /// Default values of channel creation options. + public static ChannelCreationOptions Default = new ChannelCreationOptions(); + /// Whether or not the channel to be created will allow client to keep a list of users. + public bool PublishSubscribers { get; set; } + /// Limit of the number of users subscribed to the channel to be created. + public int MaxSubscribers { get; set; } + + #if CHAT_EXTENDED + public System.Collections.Generic.Dictionary CustomProperties { get; set; } + #endif + } +} diff --git a/Assets/Photon/PhotonChat/Code/ChannelCreationOptions.cs.meta b/Assets/Photon/PhotonChat/Code/ChannelCreationOptions.cs.meta new file mode 100644 index 00000000..5650cd32 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChannelCreationOptions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6c1aa0fceaa2bc14eabdf85976f4e2c8 +timeCreated: 1549546375 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Code/ChannelWellKnownProperties.cs b/Assets/Photon/PhotonChat/Code/ChannelWellKnownProperties.cs new file mode 100644 index 00000000..2627e7ac --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChannelWellKnownProperties.cs @@ -0,0 +1,14 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChannelWellKnownProperties contains the list of well-known channel properties. +// Photon Chat Api - Copyright (C) 2018 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +namespace Photon.Chat +{ + public class ChannelWellKnownProperties + { + public const byte MaxSubscribers = 255; + public const byte PublishSubscribers = 254; + } +} diff --git a/Assets/Photon/PhotonChat/Code/ChannelWellKnownProperties.cs.meta b/Assets/Photon/PhotonChat/Code/ChannelWellKnownProperties.cs.meta new file mode 100644 index 00000000..2c88cb10 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChannelWellKnownProperties.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5eb508ffb7b7b0f47882f0087a668283 +timeCreated: 1547826678 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Code/ChatAppSettings.cs b/Assets/Photon/PhotonChat/Code/ChatAppSettings.cs new file mode 100644 index 00000000..a2255d54 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatAppSettings.cs @@ -0,0 +1,64 @@ +// ----------------------------------------------------------------------- +// +// Chat API for Photon - Copyright (C) 2018 Exit Games GmbH +// +// Settings for Photon Chat application and the server to connect to. +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Chat +{ + using System; + using ExitGames.Client.Photon; + #if SUPPORTED_UNITY + using UnityEngine.Serialization; + #endif + + /// + /// Settings for Photon application(s) and the server to connect to. + /// + /// + /// This is Serializable for Unity, so it can be included in ScriptableObject instances. + /// + #if !NETFX_CORE || SUPPORTED_UNITY + [Serializable] + #endif + public class ChatAppSettings + { + /// AppId for the Chat Api. + public string AppIdChat; + + /// The AppVersion can be used to identify builds and will split the AppId distinct "Virtual AppIds" (important for the users to find each other). + public string AppVersion; + + /// Can be set to any of the Photon Cloud's region names to directly connect to that region. + public string FixedRegion; + + /// The address (hostname or IP) of the server to connect to. + public string Server; + + /// If not null, this sets the port of the first Photon server to connect to (that will "forward" the client as needed). + public ushort Port; + + /// The address (hostname or IP and port) of the proxy server. + public string ProxyServer; + + /// The network level protocol to use. + public ConnectionProtocol Protocol = ConnectionProtocol.Udp; + + /// Enables a fallback to another protocol in case a connect to the Name Server fails. + /// See: LoadBalancingClient.EnableProtocolFallback. + public bool EnableProtocolFallback = true; + + /// Log level for the network lib. + public DebugLevel NetworkLogging = DebugLevel.ERROR; + + /// If true, the default nameserver address for the Photon Cloud should be used. + public bool IsDefaultNameServer { get { return string.IsNullOrEmpty(this.Server); } } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/ChatAppSettings.cs.meta b/Assets/Photon/PhotonChat/Code/ChatAppSettings.cs.meta new file mode 100644 index 00000000..479680ba --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatAppSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 87776a9b1f405644abcc38ecd70c37fb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Code/ChatChannel.cs b/Assets/Photon/PhotonChat/Code/ChatChannel.cs new file mode 100644 index 00000000..6d0885e8 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatChannel.cs @@ -0,0 +1,255 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + +namespace Photon.Chat +{ + using System.Collections.Generic; + using System.Text; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// A channel of communication in Photon Chat, updated by ChatClient and provided as READ ONLY. + /// + /// + /// Contains messages and senders to use (read!) and display by your GUI. + /// Access these by: + /// ChatClient.PublicChannels + /// ChatClient.PrivateChannels + /// + public class ChatChannel + { + /// Name of the channel (used to subscribe and unsubscribe). + public readonly string Name; + + /// Senders of messages in chronological order. Senders and Messages refer to each other by index. Senders[x] is the sender of Messages[x]. + public readonly List Senders = new List(); + + /// Messages in chronological order. Senders and Messages refer to each other by index. Senders[x] is the sender of Messages[x]. + public readonly List Messages = new List(); + + /// If greater than 0, this channel will limit the number of messages, that it caches locally. + public int MessageLimit; + + /// Unique channel ID. + public int ChannelID; + + /// Is this a private 1:1 channel? + public bool IsPrivate { get; protected internal set; } + + /// Count of messages this client still buffers/knows for this channel. + public int MessageCount { get { return this.Messages.Count; } } + + /// + /// ID of the last message received. + /// + public int LastMsgId { get; protected set; } + + private Dictionary properties; + + /// Whether or not this channel keeps track of the list of its subscribers. + public bool PublishSubscribers { get; protected set; } + + /// Maximum number of channel subscribers. 0 means infinite. + public int MaxSubscribers { get; protected set; } + + /// Subscribed users. + public readonly HashSet Subscribers = new HashSet(); + + /// Properties of subscribers + private Dictionary> usersProperties; + + /// Used internally to create new channels. This does NOT create a channel on the server! Use ChatClient.Subscribe. + public ChatChannel(string name) + { + this.Name = name; + } + + /// Used internally to add messages to this channel. + public void Add(string sender, object message, int msgId) + { + this.Senders.Add(sender); + this.Messages.Add(message); + this.LastMsgId = msgId; + this.TruncateMessages(); + } + + /// Used internally to add messages to this channel. + public void Add(string[] senders, object[] messages, int lastMsgId) + { + this.Senders.AddRange(senders); + this.Messages.AddRange(messages); + this.LastMsgId = lastMsgId; + this.TruncateMessages(); + } + + /// Reduces the number of locally cached messages in this channel to the MessageLimit (if set). + public void TruncateMessages() + { + if (this.MessageLimit <= 0 || this.Messages.Count <= this.MessageLimit) + { + return; + } + + int excessCount = this.Messages.Count - this.MessageLimit; + this.Senders.RemoveRange(0, excessCount); + this.Messages.RemoveRange(0, excessCount); + } + + /// Clear the local cache of messages currently stored. This frees memory but doesn't affect the server. + public void ClearMessages() + { + this.Senders.Clear(); + this.Messages.Clear(); + } + + /// Provides a string-representation of all messages in this channel. + /// All known messages in format "Sender: Message", line by line. + public string ToStringMessages() + { + StringBuilder txt = new StringBuilder(); + for (int i = 0; i < this.Messages.Count; i++) + { + txt.AppendLine(string.Format("{0}: {1}", this.Senders[i], this.Messages[i])); + } + return txt.ToString(); + } + + internal void ReadChannelProperties(Dictionary newProperties) + { + if (newProperties != null && newProperties.Count > 0) + { + if (this.properties == null) + { + this.properties = new Dictionary(newProperties.Count); + } + foreach (var pair in newProperties) + { + if (pair.Value == null) + { + this.properties.Remove(pair.Key); + } + else + { + this.properties[pair.Key] = pair.Value; + } + } + object temp; + if (this.properties.TryGetValue(ChannelWellKnownProperties.PublishSubscribers, out temp)) + { + this.PublishSubscribers = (bool)temp; + } + if (this.properties.TryGetValue(ChannelWellKnownProperties.MaxSubscribers, out temp)) + { + this.MaxSubscribers = (int)temp; + } + } + } + + internal bool AddSubscribers(string[] users) + { + if (users == null) + { + return false; + } + bool result = true; + for (int i = 0; i < users.Length; i++) + { + if (!this.Subscribers.Add(users[i])) + { + result = false; + } + } + return result; + } + + internal bool AddSubscriber(string userId) + { + return this.Subscribers.Add(userId); + } + + internal bool RemoveSubscriber(string userId) + { + if (this.usersProperties != null) + { + this.usersProperties.Remove(userId); + } + return this.Subscribers.Remove(userId); + } + + + #if CHAT_EXTENDED + internal void ReadUserProperties(string userId, Dictionary changedProperties) + { + if (this.usersProperties == null) + { + this.usersProperties = new Dictionary>(); + } + Dictionary userProperties; + if (!this.usersProperties.TryGetValue(userId, out userProperties)) + { + userProperties = new Dictionary(); + this.usersProperties.Add(userId, userProperties); + } + foreach (var property in changedProperties) + { + //UnityEngine.Debug.LogFormat("User {0} property {1} = {2}", userId, property.Key, property.Value); + if (property.Value == null) + { + userProperties.Remove(property.Key); + } + else + { + userProperties[property.Key] = property.Value; + } + } + } + + internal bool TryGetChannelProperty(object propertyKey, out T propertyValue) + { + propertyValue = default; + object temp; + if (properties != null && properties.TryGetValue(propertyKey, out temp) && temp is T) + { + propertyValue = (T)temp; + return true; + } + return false; + } + + internal bool TryGetUserProperty(string userId, object propertyKey, out T propertyValue) + { + propertyValue = default; + object temp; + Dictionary userProperties; + if (this.usersProperties != null && usersProperties.TryGetValue(userId, out userProperties) && userProperties.TryGetValue(propertyKey, out temp) && temp is T) + { + propertyValue = (T)temp; + return true; + } + return false; + } + + public bool TryGetCustomChannelProperty(string propertyKey, out T propertyValue) + { + return this.TryGetChannelProperty(propertyKey, out propertyValue); + } + + public bool TryGetCustomUserProperty(string userId, string propertyKey, out T propertyValue) + { + return this.TryGetUserProperty(userId, propertyKey, out propertyValue); + } + #endif + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/ChatChannel.cs.meta b/Assets/Photon/PhotonChat/Code/ChatChannel.cs.meta new file mode 100644 index 00000000..0d739656 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatChannel.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 35b2a4878e5e99e438c97fbe8dbbd863 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/ChatClient.cs b/Assets/Photon/PhotonChat/Code/ChatClient.cs new file mode 100644 index 00000000..c65cb3e0 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatClient.cs @@ -0,0 +1,1856 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + +namespace Photon.Chat +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// Central class of the Photon Chat API to connect, handle channels and messages. + /// + /// This class must be instantiated with a IChatClientListener instance to get the callbacks. + /// Integrate it into your game loop by calling Service regularly. If the target platform supports Threads/Tasks, + /// set UseBackgroundWorkerForSending = true, to let the ChatClient keep the connection by sending from + /// an independent thread. + /// + /// Call Connect with an AppId that is setup as Photon Chat application. Note: Connect covers multiple + /// messages between this client and the servers. A short workflow will connect you to a chat server. + /// + /// Each ChatClient resembles a user in chat (set in Connect). Each user automatically subscribes a channel + /// for incoming private messages and can message any other user privately. + /// Before you publish messages in any non-private channel, that channel must be subscribed. + /// + /// PublicChannels is a list of subscribed channels, containing messages and senders. + /// PrivateChannels contains all incoming and sent private messages. + /// + public class ChatClient : IPhotonPeerListener + { + const int FriendRequestListMax = 1024; + + /// Default maximum value possible for when is enabled + public const int DefaultMaxSubscribers = 100; + + private const byte HttpForwardWebFlag = 0x01; + + /// Enables a fallback to another protocol in case a connect to the Name Server fails. + /// + /// When connecting to the Name Server fails for a first time, the client will select an alternative + /// network protocol and re-try to connect. + /// + /// The fallback will use the default Name Server port as defined by ProtocolToNameServerPort. + /// + /// The fallback for TCP is UDP. All other protocols fallback to TCP. + /// + public bool EnableProtocolFallback { get; set; } + + /// The address of last connected Name Server. + public string NameServerAddress { get; private set; } + + /// The address of the actual chat server assigned from NameServer. Public for read only. + public string FrontendAddress { get; private set; } + + /// Region used to connect to. Currently all chat is done in EU. It can make sense to use only one region for the whole game. + private string chatRegion = "EU"; + + /// Settable only before you connect! Defaults to "EU". + public string ChatRegion + { + get { return this.chatRegion; } + set { this.chatRegion = value; } + } + + /// + /// Defines a proxy URL for WebSocket connections. Can be the proxy or point to a .pac file. + /// + /// + /// This URL supports various definitions: + /// + /// "user:pass@proxyaddress:port"
+ /// "proxyaddress:port"
+ /// "system:"
+ /// "pac:"
+ /// "pac:http://host/path/pacfile.pac"
+ /// + /// Important: Don't define a protocol, except to point to a pac file. the proxy address should not begin with http:// or https://. + ///
+ public string ProxyServerAddress; + + /// Current state of the ChatClient. Also use CanChat. + public ChatState State { get; private set; } + + /// Disconnection cause. Check this inside . + public ChatDisconnectCause DisconnectedCause { get; private set; } + /// + /// Checks if this client is ready to send messages. + /// + public bool CanChat + { + get { return this.State == ChatState.ConnectedToFrontEnd && this.HasPeer; } + } + /// + /// Checks if this client is ready to publish messages inside a public channel. + /// + /// The channel to do the check with. + /// Whether or not this client is ready to publish messages inside the public channel with the specified channelName. + public bool CanChatInChannel(string channelName) + { + return this.CanChat && this.PublicChannels.ContainsKey(channelName) && !this.PublicChannelsUnsubscribing.Contains(channelName); + } + + private bool HasPeer + { + get { return this.chatPeer != null; } + } + + /// The version of your client. A new version also creates a new "virtual app" to separate players from older client versions. + public string AppVersion { get; private set; } + + /// The AppID as assigned from the Photon Cloud. + public string AppId { get; private set; } + + + /// Settable only before you connect! + public AuthenticationValues AuthValues { get; set; } + + /// The unique ID of a user/person, stored in AuthValues.UserId. Set it before you connect. + /// + /// This value wraps AuthValues.UserId. + /// It's not a nickname and we assume users with the same userID are the same person. + public string UserId + { + get + { + return (this.AuthValues != null) ? this.AuthValues.UserId : null; + } + private set + { + if (this.AuthValues == null) + { + this.AuthValues = new AuthenticationValues(); + } + this.AuthValues.UserId = value; + } + } + + /// If greater than 0, new channels will limit the number of messages they cache locally. + /// + /// This can be useful to limit the amount of memory used by chats. + /// You can set a MessageLimit per channel but this value gets applied to new ones. + /// + /// Note: + /// Changing this value, does not affect ChatChannels that are already in use! + /// + public int MessageLimit; + + /// Limits the number of messages from private channel histories. + /// + /// This is applied to all private channels on reconnect, as there is no explicit re-joining private channels.
+ /// Default is -1, which gets available messages up to a maximum set by the server.
+ /// A value of 0 gets you zero messages.
+ /// The server's limit of messages may be lower. If so, the server's value will overrule this.
+ ///
+ public int PrivateChatHistoryLength = -1; + + /// Public channels this client is subscribed to. + public readonly Dictionary PublicChannels; + /// Private channels in which this client has exchanged messages. + public readonly Dictionary PrivateChannels; + + // channels being in unsubscribing process + // items will be removed on successful unsubscription or subscription (the latter required after attempt to unsubscribe from not existing channel) + private readonly HashSet PublicChannelsUnsubscribing; + + private readonly IChatClientListener listener = null; + /// The Chat Peer used by this client. + public ChatPeer chatPeer = null; + private const string ChatAppName = "chat"; + private bool didAuthenticate; + + private int? statusToSetWhenConnected; + private object messageToSetWhenConnected; + + private int msDeltaForServiceCalls = 50; + private int msTimestampOfLastServiceCall; + + /// Defines if a background thread will call SendOutgoingCommands, while your code calls Service to dispatch received messages. + /// + /// The benefit of using a background thread to call SendOutgoingCommands is this: + /// + /// Even if your game logic is being paused, the background thread will keep the connection to the server up. + /// On a lower level, acknowledgements and pings will prevent a server-side timeout while (e.g.) Unity loads assets. + /// + /// Your game logic still has to call Service regularly, or else incoming messages are not dispatched. + /// As this typically triggers UI updates, it's easier to call Service from the main/UI thread. + /// + public bool UseBackgroundWorkerForSending { get; set; } + + /// Exposes the TransportProtocol of the used PhotonPeer. Settable while not connected. + public ConnectionProtocol TransportProtocol + { + get { return this.chatPeer.TransportProtocol; } + set + { + if (this.chatPeer == null || this.chatPeer.PeerState != PeerStateValue.Disconnected) + { + this.listener.DebugReturn(DebugLevel.WARNING, "Can't set TransportProtocol. Disconnect first! " + ((this.chatPeer != null) ? "PeerState: " + this.chatPeer.PeerState : "The chatPeer is null.")); + return; + } + this.chatPeer.TransportProtocol = value; + } + } + + /// Defines which IPhotonSocket class to use per ConnectionProtocol. + /// + /// Several platforms have special Socket implementations and slightly different APIs. + /// To accomodate this, switching the socket implementation for a network protocol was made available. + /// By default, UDP and TCP have socket implementations assigned. + /// + /// You only need to set the SocketImplementationConfig once, after creating a PhotonPeer + /// and before connecting. If you switch the TransportProtocol, the correct implementation is being used. + /// + public Dictionary SocketImplementationConfig + { + get { return this.chatPeer.SocketImplementationConfig; } + } + + /// + /// Chat client constructor. + /// + /// The chat listener implementation. + /// Connection protocol to be used by this client. Default is . + public ChatClient(IChatClientListener listener, ConnectionProtocol protocol = ConnectionProtocol.Udp) + { + this.listener = listener; + this.State = ChatState.Uninitialized; + + this.chatPeer = new ChatPeer(this, protocol); + this.chatPeer.SerializationProtocolType = SerializationProtocol.GpBinaryV18; + + this.PublicChannels = new Dictionary(); + this.PrivateChannels = new Dictionary(); + + this.PublicChannelsUnsubscribing = new HashSet(); + } + + + public bool ConnectUsingSettings(ChatAppSettings appSettings) + { + if (appSettings == null) + { + this.listener.DebugReturn(DebugLevel.ERROR, "ConnectUsingSettings failed. The appSettings can't be null.'"); + return false; + } + + if (!string.IsNullOrEmpty(appSettings.FixedRegion)) + { + this.ChatRegion = appSettings.FixedRegion; + } + + this.DebugOut = appSettings.NetworkLogging; + + this.TransportProtocol = appSettings.Protocol; + this.EnableProtocolFallback = appSettings.EnableProtocolFallback; + + if (!appSettings.IsDefaultNameServer) + { + this.chatPeer.NameServerHost = appSettings.Server; + this.chatPeer.NameServerPortOverride = appSettings.Port; + } + + this.ProxyServerAddress = appSettings.ProxyServer; + + return this.Connect(appSettings.AppIdChat, appSettings.AppVersion, this.AuthValues); + } + + /// + /// Connects this client to the Photon Chat Cloud service, which will also authenticate the user (and set a UserId). + /// + /// + /// The ProxyServerAddress is used to connect. Set it before calling this method or use ConnectUsingSettings. + /// + /// Get your Photon Chat AppId from the Dashboard. + /// Any version string you make up. Used to separate users and variants of your clients, which might be incompatible. + /// Values for authentication. You can leave this null, if you set a UserId before. If you set authValues, they will override any UserId set before. + /// + public bool Connect(string appId, string appVersion, AuthenticationValues authValues) + { + this.chatPeer.TimePingInterval = 3000; + this.DisconnectedCause = ChatDisconnectCause.None; + + if (authValues != null) + { + this.AuthValues = authValues; + } + + this.AppId = appId; + this.AppVersion = appVersion; + this.didAuthenticate = false; + this.chatPeer.QuickResendAttempts = 2; + this.chatPeer.SentCountAllowance = 7; + + // clean all channels + this.PublicChannels.Clear(); + this.PrivateChannels.Clear(); + this.PublicChannelsUnsubscribing.Clear(); + + #if UNITY_WEBGL + if (this.TransportProtocol == ConnectionProtocol.Tcp || this.TransportProtocol == ConnectionProtocol.Udp) + { + this.listener.DebugReturn(DebugLevel.WARNING, "WebGL requires WebSockets. Switching TransportProtocol to WebSocketSecure."); + this.TransportProtocol = ConnectionProtocol.WebSocketSecure; + } + #endif + + this.NameServerAddress = this.chatPeer.NameServerAddress; + + bool isConnecting = this.chatPeer.Connect(this.NameServerAddress, this.ProxyServerAddress, "NameServer", null); + if (isConnecting) + { + this.State = ChatState.ConnectingToNameServer; + } + + if (this.UseBackgroundWorkerForSending) + { + #if UNITY_SWITCH + SupportClass.StartBackgroundCalls(this.SendOutgoingInBackground, this.msDeltaForServiceCalls); // as workaround, we don't name the Thread. + #else + SupportClass.StartBackgroundCalls(this.SendOutgoingInBackground, this.msDeltaForServiceCalls, "ChatClient Service Thread"); + #endif + } + + return isConnecting; + } + + /// + /// Connects this client to the Photon Chat Cloud service, which will also authenticate the user (and set a UserId). + /// This also sets an online status once connected. By default it will set user status to . + /// See for more information. + /// + /// Get your Photon Chat AppId from the Dashboard. + /// Any version string you make up. Used to separate users and variants of your clients, which might be incompatible. + /// Values for authentication. You can leave this null, if you set a UserId before. If you set authValues, they will override any UserId set before. + /// User status to set when connected. Predefined states are in class . Other values can be used at will. + /// Optional status Also sets a status-message which your friends can get. + /// If the connection attempt could be sent at all. + public bool ConnectAndSetStatus(string appId, string appVersion, AuthenticationValues authValues, + int status = ChatUserStatus.Online, object message = null) + { + statusToSetWhenConnected = status; + messageToSetWhenConnected = message; + return Connect(appId, appVersion, authValues); + } + + /// + /// Must be called regularly to keep connection between client and server alive and to process incoming messages. + /// + /// + /// This method limits the effort it does automatically using the private variable msDeltaForServiceCalls. + /// That value is lower for connect and multiplied by 4 when chat-server connection is ready. + /// + public void Service() + { + // Dispatch until every already-received message got dispatched + while (this.HasPeer && this.chatPeer.DispatchIncomingCommands()) + { + } + + // if there is no background thread for sending, Service() will do that as well, in intervals + if (!this.UseBackgroundWorkerForSending) + { + if (Environment.TickCount - this.msTimestampOfLastServiceCall > this.msDeltaForServiceCalls || this.msTimestampOfLastServiceCall == 0) + { + this.msTimestampOfLastServiceCall = Environment.TickCount; + + while (this.HasPeer && this.chatPeer.SendOutgoingCommands()) + { + } + } + } + } + + /// + /// Called by a separate thread, this sends outgoing commands of this peer, as long as it's connected. + /// + /// True as long as the client is not disconnected. + private bool SendOutgoingInBackground() + { + while (this.HasPeer && this.chatPeer.SendOutgoingCommands()) + { + } + + return this.State != ChatState.Disconnected; + } + + /// Obsolete: Better use UseBackgroundWorkerForSending and Service(). + [Obsolete("Better use UseBackgroundWorkerForSending and Service().")] + public void SendAcksOnly() + { + if (this.HasPeer) this.chatPeer.SendAcksOnly(); + } + + + /// + /// Disconnects from the Chat Server by sending a "disconnect command", which prevents a timeout server-side. + /// + public void Disconnect(ChatDisconnectCause cause = ChatDisconnectCause.DisconnectByClientLogic) + { + if (this.HasPeer && this.chatPeer.PeerState != PeerStateValue.Disconnected) + { + this.State = ChatState.Disconnecting; + this.DisconnectedCause = cause; + this.chatPeer.Disconnect(); + } + } + + /// + /// Locally shuts down the connection to the Chat Server. This resets states locally but the server will have to timeout this peer. + /// + public void StopThread() + { + if (this.HasPeer) + { + this.chatPeer.StopThread(); + } + } + + /// Sends operation to subscribe to a list of channels by name. + /// List of channels to subscribe to. Avoid null or empty values. + /// If the operation could be sent at all (Example: Fails if not connected to Chat Server). + public bool Subscribe(string[] channels) + { + return this.Subscribe(channels, 0); + } + + /// + /// Sends operation to subscribe to a list of channels by name and possibly retrieve messages we did not receive while unsubscribed. + /// + /// List of channels to subscribe to. Avoid null or empty values. + /// ID of last message received per channel. Useful when re subscribing to receive only messages we missed. + /// If the operation could be sent at all (Example: Fails if not connected to Chat Server). + public bool Subscribe(string[] channels, int[] lastMsgIds) + { + if (!this.CanChat) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "Subscribe called while not connected to front end server."); + } + return false; + } + + if (channels == null || channels.Length == 0) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "Subscribe can't be called for empty or null channels-list."); + } + return false; + } + + for (int i = 0; i < channels.Length; i++) + { + if (string.IsNullOrEmpty(channels[i])) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, string.Format("Subscribe can't be called with a null or empty channel name at index {0}.", i)); + } + return false; + } + } + + if (lastMsgIds == null || lastMsgIds.Length != channels.Length) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "Subscribe can't be called when \"lastMsgIds\" array is null or does not have the same length as \"channels\" array."); + } + return false; + } + + Dictionary opParameters = new Dictionary + { + { ChatParameterCode.Channels, channels }, + { ChatParameterCode.MsgIds, lastMsgIds}, + { ChatParameterCode.HistoryLength, -1 } // server will decide how many messages to send to client + }; + + return this.chatPeer.SendOperation(ChatOperationCode.Subscribe, opParameters, SendOptions.SendReliable); + } + + /// + /// Sends operation to subscribe client to channels, optionally fetching a number of messages from the cache. + /// + /// + /// Subscribes channels will forward new messages to this user. Use PublishMessage to do so. + /// The messages cache is limited but can be useful to get into ongoing conversations, if that's needed. + /// + /// List of channels to subscribe to. Avoid null or empty values. + /// 0: no history. 1 and higher: number of messages in history. -1: all available history. + /// If the operation could be sent at all (Example: Fails if not connected to Chat Server). + public bool Subscribe(string[] channels, int messagesFromHistory) + { + if (!this.CanChat) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "Subscribe called while not connected to front end server."); + } + return false; + } + + if (channels == null || channels.Length == 0) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "Subscribe can't be called for empty or null channels-list."); + } + return false; + } + + return this.SendChannelOperation(channels, (byte)ChatOperationCode.Subscribe, messagesFromHistory); + } + + /// Unsubscribes from a list of channels, which stops getting messages from those. + /// + /// The client will remove these channels from the PublicChannels dictionary once the server sent a response to this request. + /// + /// The request will be sent to the server and IChatClientListener.OnUnsubscribed gets called when the server + /// actually removed the channel subscriptions. + /// + /// Unsubscribe will fail if you include null or empty channel names. + /// + /// Names of channels to unsubscribe. + /// False, if not connected to a chat server. + public bool Unsubscribe(string[] channels) + { + if (!this.CanChat) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "Unsubscribe called while not connected to front end server."); + } + return false; + } + + if (channels == null || channels.Length == 0) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "Unsubscribe can't be called for empty or null channels-list."); + } + return false; + } + + foreach (string ch in channels) + { + this.PublicChannelsUnsubscribing.Add(ch); + } + return this.SendChannelOperation(channels, ChatOperationCode.Unsubscribe, 0); + } + + /// Sends a message to a public channel which this client subscribed to. + /// + /// Before you publish to a channel, you have to subscribe it. + /// Everyone in that channel will get the message. + /// + /// Name of the channel to publish to. + /// Your message (string or any serializable data). + /// Optionally, public messages can be forwarded as webhooks. Configure webhooks for your Chat app to use this. + /// False if the client is not yet ready to send messages. + public bool PublishMessage(string channelName, object message, bool forwardAsWebhook = false) + { + return this.publishMessage(channelName, message, true, forwardAsWebhook); + } + + internal bool PublishMessageUnreliable(string channelName, object message, bool forwardAsWebhook = false) + { + return this.publishMessage(channelName, message, false, forwardAsWebhook); + } + + private bool publishMessage(string channelName, object message, bool reliable, bool forwardAsWebhook = false) + { + if (!this.CanChat) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "PublishMessage called while not connected to front end server."); + } + return false; + } + + if (string.IsNullOrEmpty(channelName) || message == null) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "PublishMessage parameters must be non-null and not empty."); + } + return false; + } + + Dictionary parameters = new Dictionary + { + { (byte)ChatParameterCode.Channel, channelName }, + { (byte)ChatParameterCode.Message, message } + }; + if (forwardAsWebhook) + { + parameters.Add(ChatParameterCode.WebFlags, (byte)0x1); + } + + return this.chatPeer.SendOperation(ChatOperationCode.Publish, parameters, new SendOptions() { Reliability = reliable }); + } + + /// + /// Sends a private message to a single target user. Calls OnPrivateMessage on the receiving client. + /// + /// Username to send this message to. + /// The message you want to send. Can be a simple string or anything serializable. + /// Optionally, private messages can be forwarded as webhooks. Configure webhooks for your Chat app to use this. + /// True if this clients can send the message to the server. + public bool SendPrivateMessage(string target, object message, bool forwardAsWebhook = false) + { + return this.SendPrivateMessage(target, message, false, forwardAsWebhook); + } + + /// + /// Sends a private message to a single target user. Calls OnPrivateMessage on the receiving client. + /// + /// Username to send this message to. + /// The message you want to send. Can be a simple string or anything serializable. + /// Optionally, private messages can be encrypted. Encryption is not end-to-end as the server decrypts the message. + /// Optionally, private messages can be forwarded as webhooks. Configure webhooks for your Chat app to use this. + /// True if this clients can send the message to the server. + public bool SendPrivateMessage(string target, object message, bool encrypt, bool forwardAsWebhook) + { + return this.sendPrivateMessage(target, message, encrypt, true, forwardAsWebhook); + } + + internal bool SendPrivateMessageUnreliable(string target, object message, bool encrypt, bool forwardAsWebhook = false) + { + return this.sendPrivateMessage(target, message, encrypt, false, forwardAsWebhook); + } + + private bool sendPrivateMessage(string target, object message, bool encrypt, bool reliable, bool forwardAsWebhook = false) + { + if (!this.CanChat) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "SendPrivateMessage called while not connected to front end server."); + } + return false; + } + + if (string.IsNullOrEmpty(target) || message == null) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "SendPrivateMessage parameters must be non-null and not empty."); + } + return false; + } + + Dictionary parameters = new Dictionary + { + { ChatParameterCode.UserId, target }, + { ChatParameterCode.Message, message } + }; + if (forwardAsWebhook) + { + parameters.Add(ChatParameterCode.WebFlags, (byte)0x1); + } + + return this.chatPeer.SendOperation(ChatOperationCode.SendPrivate, parameters, new SendOptions() { Reliability = reliable, Encrypt = encrypt }); + } + + /// Sets the user's status (pre-defined or custom) and an optional message. + /// + /// The predefined status values can be found in class ChatUserStatus. + /// State ChatUserStatus.Invisible will make you offline for everyone and send no message. + /// + /// You can set custom values in the status integer. Aside from the pre-configured ones, + /// all states will be considered visible and online. Else, no one would see the custom state. + /// + /// The message object can be anything that Photon can serialize, including (but not limited to) + /// Hashtable, object[] and string. This value is defined by your own conventions. + /// + /// Predefined states are in class ChatUserStatus. Other values can be used at will. + /// Optional string message or null. + /// If true, the message gets ignored. It can be null but won't replace any current message. + /// True if the operation gets called on the server. + private bool SetOnlineStatus(int status, object message, bool skipMessage) + { + if (!this.CanChat) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "SetOnlineStatus called while not connected to front end server."); + } + return false; + } + + Dictionary parameters = new Dictionary + { + { ChatParameterCode.Status, status }, + }; + + if (skipMessage) + { + parameters[ChatParameterCode.SkipMessage] = true; + } + else + { + parameters[ChatParameterCode.Message] = message; + } + + return this.chatPeer.SendOperation(ChatOperationCode.UpdateStatus, parameters, SendOptions.SendReliable); + } + + /// Sets the user's status without changing your status-message. + /// + /// The predefined status values can be found in class ChatUserStatus. + /// State ChatUserStatus.Invisible will make you offline for everyone and send no message. + /// + /// You can set custom values in the status integer. Aside from the pre-configured ones, + /// all states will be considered visible and online. Else, no one would see the custom state. + /// + /// This overload does not change the set message. + /// + /// Predefined states are in class ChatUserStatus. Other values can be used at will. + /// True if the operation gets called on the server. + public bool SetOnlineStatus(int status) + { + return this.SetOnlineStatus(status, null, true); + } + + /// Sets the user's status without changing your status-message. + /// + /// The predefined status values can be found in class ChatUserStatus. + /// State ChatUserStatus.Invisible will make you offline for everyone and send no message. + /// + /// You can set custom values in the status integer. Aside from the pre-configured ones, + /// all states will be considered visible and online. Else, no one would see the custom state. + /// + /// The message object can be anything that Photon can serialize, including (but not limited to) + /// Hashtable, object[] and string. This value is defined by your own conventions. + /// + /// Predefined states are in class ChatUserStatus. Other values can be used at will. + /// Also sets a status-message which your friends can get. + /// True if the operation gets called on the server. + public bool SetOnlineStatus(int status, object message) + { + return this.SetOnlineStatus(status, message, false); + } + + /// + /// Adds friends to a list on the Chat Server which will send you status updates for those. + /// + /// + /// AddFriends and RemoveFriends enable clients to handle their friend list + /// in the Photon Chat server. Having users on your friends list gives you access + /// to their current online status (and whatever info your client sets in it). + /// + /// Each user can set an online status consisting of an integer and an arbitrary + /// (serializable) object. The object can be null, Hashtable, object[] or anything + /// else Photon can serialize. + /// + /// The status is published automatically to friends (anyone who set your user ID + /// with AddFriends). + /// + /// Photon flushes friends-list when a chat client disconnects, so it has to be + /// set each time. If your community API gives you access to online status already, + /// you could filter and set online friends in AddFriends. + /// + /// Actual friend relations are not persistent and have to be stored outside + /// of Photon. + /// + /// Array of friend userIds. + /// If the operation could be sent. + public bool AddFriends(string[] friends) + { + if (!this.CanChat) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "AddFriends called while not connected to front end server."); + } + return false; + } + + if (friends == null || friends.Length == 0) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "AddFriends can't be called for empty or null list."); + } + return false; + } + if (friends.Length > FriendRequestListMax) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "AddFriends max list size exceeded: " + friends.Length + " > " + FriendRequestListMax); + } + return false; + } + + Dictionary parameters = new Dictionary + { + { ChatParameterCode.Friends, friends }, + }; + + return this.chatPeer.SendOperation(ChatOperationCode.AddFriends, parameters, SendOptions.SendReliable); + } + + /// + /// Removes the provided entries from the list on the Chat Server and stops their status updates. + /// + /// + /// Photon flushes friends-list when a chat client disconnects. Unless you want to + /// remove individual entries, you don't have to RemoveFriends. + /// + /// AddFriends and RemoveFriends enable clients to handle their friend list + /// in the Photon Chat server. Having users on your friends list gives you access + /// to their current online status (and whatever info your client sets in it). + /// + /// Each user can set an online status consisting of an integer and an arbitratry + /// (serializable) object. The object can be null, Hashtable, object[] or anything + /// else Photon can serialize. + /// + /// The status is published automatically to friends (anyone who set your user ID + /// with AddFriends). + /// + /// Photon flushes friends-list when a chat client disconnects, so it has to be + /// set each time. If your community API gives you access to online status already, + /// you could filter and set online friends in AddFriends. + /// + /// Actual friend relations are not persistent and have to be stored outside + /// of Photon. + /// + /// AddFriends and RemoveFriends enable clients to handle their friend list + /// in the Photon Chat server. Having users on your friends list gives you access + /// to their current online status (and whatever info your client sets in it). + /// + /// Each user can set an online status consisting of an integer and an arbitratry + /// (serializable) object. The object can be null, Hashtable, object[] or anything + /// else Photon can serialize. + /// + /// The status is published automatically to friends (anyone who set your user ID + /// with AddFriends). + /// + /// + /// Actual friend relations are not persistent and have to be stored outside + /// of Photon. + /// + /// Array of friend userIds. + /// If the operation could be sent. + public bool RemoveFriends(string[] friends) + { + if (!this.CanChat) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "RemoveFriends called while not connected to front end server."); + } + return false; + } + + if (friends == null || friends.Length == 0) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "RemoveFriends can't be called for empty or null list."); + } + return false; + } + if (friends.Length > FriendRequestListMax) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "RemoveFriends max list size exceeded: " + friends.Length + " > " + FriendRequestListMax); + } + return false; + } + + Dictionary parameters = new Dictionary + { + { ChatParameterCode.Friends, friends }, + }; + + return this.chatPeer.SendOperation(ChatOperationCode.RemoveFriends, parameters, SendOptions.SendReliable); + } + + /// + /// Get you the (locally used) channel name for the chat between this client and another user. + /// + /// Remote user's name or UserId. + /// The (locally used) channel name for a private channel. + /// Do not subscribe to this channel. + /// Private channels do not need to be explicitly subscribed to. + /// Use this for debugging purposes mainly. + public string GetPrivateChannelNameByUser(string userName) + { + return string.Format("{0}:{1}", this.UserId, userName); + } + + /// + /// Simplified access to either private or public channels by name. + /// + /// Name of the channel to get. For private channels, the channel-name is composed of both user's names. + /// Define if you expect a private or public channel. + /// Out parameter gives you the found channel, if any. + /// True if the channel was found. + /// Public channels exist only when subscribed to them. + /// Private channels exist only when at least one message is exchanged with the target user privately. + public bool TryGetChannel(string channelName, bool isPrivate, out ChatChannel channel) + { + if (!isPrivate) + { + return this.PublicChannels.TryGetValue(channelName, out channel); + } + else + { + return this.PrivateChannels.TryGetValue(channelName, out channel); + } + } + + /// + /// Simplified access to all channels by name. Checks public channels first, then private ones. + /// + /// Name of the channel to get. + /// Out parameter gives you the found channel, if any. + /// True if the channel was found. + /// Public channels exist only when subscribed to them. + /// Private channels exist only when at least one message is exchanged with the target user privately. + public bool TryGetChannel(string channelName, out ChatChannel channel) + { + bool found = false; + found = this.PublicChannels.TryGetValue(channelName, out channel); + if (found) return true; + + found = this.PrivateChannels.TryGetValue(channelName, out channel); + return found; + } + + /// + /// Simplified access to private channels by target user. + /// + /// UserId of the target user in the private channel. + /// Out parameter gives you the found channel, if any. + /// True if the channel was found. + public bool TryGetPrivateChannelByUser(string userId, out ChatChannel channel) + { + channel = null; + if (string.IsNullOrEmpty(userId)) + { + return false; + } + string channelName = this.GetPrivateChannelNameByUser(userId); + return this.TryGetChannel(channelName, true, out channel); + } + + /// + /// Sets the level (and amount) of debug output provided by the library. + /// + /// + /// This affects the callbacks to IChatClientListener.DebugReturn. + /// Default Level: Error. + /// + public DebugLevel DebugOut + { + set { this.chatPeer.DebugOut = value; } + get { return this.chatPeer.DebugOut; } + } + + #region Private methods area + + #region IPhotonPeerListener implementation + + void IPhotonPeerListener.DebugReturn(DebugLevel level, string message) + { + this.listener.DebugReturn(level, message); + } + + void IPhotonPeerListener.OnEvent(EventData eventData) + { + switch (eventData.Code) + { + case ChatEventCode.ChatMessages: + this.HandleChatMessagesEvent(eventData); + break; + case ChatEventCode.PrivateMessage: + this.HandlePrivateMessageEvent(eventData); + break; + case ChatEventCode.StatusUpdate: + this.HandleStatusUpdate(eventData); + break; + case ChatEventCode.Subscribe: + this.HandleSubscribeEvent(eventData); + break; + case ChatEventCode.Unsubscribe: + this.HandleUnsubscribeEvent(eventData); + break; + case ChatEventCode.UserSubscribed: + this.HandleUserSubscribedEvent(eventData); + break; + case ChatEventCode.UserUnsubscribed: + this.HandleUserUnsubscribedEvent(eventData); + break; + #if CHAT_EXTENDED + case ChatEventCode.PropertiesChanged: + this.HandlePropertiesChanged(eventData); + break; + case ChatEventCode.ErrorInfo: + this.HandleErrorInfoEvent(eventData); + break; + #endif + } + } + + void IPhotonPeerListener.OnOperationResponse(OperationResponse operationResponse) + { + switch (operationResponse.OperationCode) + { + case (byte)ChatOperationCode.Authenticate: + this.HandleAuthResponse(operationResponse); + break; + + // the following operations usually don't return useful data and no error. + case (byte)ChatOperationCode.Subscribe: + case (byte)ChatOperationCode.Unsubscribe: + case (byte)ChatOperationCode.Publish: + case (byte)ChatOperationCode.SendPrivate: + default: + if ((operationResponse.ReturnCode != 0) && (this.DebugOut >= DebugLevel.ERROR)) + { + if (operationResponse.ReturnCode == -2) + { + this.listener.DebugReturn(DebugLevel.ERROR, string.Format("Chat Operation {0} unknown on server. Check your AppId and make sure it's for a Chat application.", operationResponse.OperationCode)); + } + else + { + this.listener.DebugReturn(DebugLevel.ERROR, string.Format("Chat Operation {0} failed (Code: {1}). Debug Message: {2}", operationResponse.OperationCode, operationResponse.ReturnCode, operationResponse.DebugMessage)); + } + } + break; + } + } + + void IPhotonPeerListener.OnStatusChanged(StatusCode statusCode) + { + switch (statusCode) + { + case StatusCode.Connect: + if (!this.chatPeer.IsProtocolSecure) + { + if (!this.chatPeer.EstablishEncryption()) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "Error establishing encryption"); + } + } + } + else + { + this.TryAuthenticateOnNameServer(); + } + + if (this.State == ChatState.ConnectingToNameServer) + { + this.State = ChatState.ConnectedToNameServer; + this.listener.OnChatStateChange(this.State); + } + else if (this.State == ChatState.ConnectingToFrontEnd) + { + if (!this.AuthenticateOnFrontEnd()) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, string.Format("Error authenticating on frontend! Check log output, AuthValues and if you're connected. State: {0}", this.State)); + } + } + } + break; + case StatusCode.EncryptionEstablished: + // once encryption is available, the client should send one (secure) authenticate. it includes the AppId (which identifies your app on the Photon Cloud) + this.TryAuthenticateOnNameServer(); + break; + case StatusCode.Disconnect: + switch (this.State) + { + case ChatState.ConnectWithFallbackProtocol: + this.EnableProtocolFallback = false; // the client does a fallback only one time + this.chatPeer.NameServerPortOverride = 0; // resets a value in the peer only (as we change the protocol, the port has to change, too) + this.chatPeer.TransportProtocol = (this.chatPeer.TransportProtocol == ConnectionProtocol.Tcp) ? ConnectionProtocol.Udp : ConnectionProtocol.Tcp; + this.Connect(this.AppId, this.AppVersion, null); + + // the client now has to return, instead of break, to avoid further processing of the disconnect call + return; + + case ChatState.Authenticated: + this.ConnectToFrontEnd(); + // client disconnected from nameserver after authentication + // to switch to frontend + return; + case ChatState.Disconnecting: + // expected disconnect + break; + default: + // unexpected disconnect, we log warning and stacktrace + string stacktrace = string.Empty; + #if DEBUG && !NETFX_CORE + stacktrace = new System.Diagnostics.StackTrace(true).ToString(); + #endif + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Got a unexpected Disconnect in ChatState: {0}. Server: {1} Trace: {2}", this.State, this.chatPeer.ServerAddress, stacktrace)); + break; + } + if (this.AuthValues != null) + { + this.AuthValues.Token = null; // when leaving the server, invalidate the secret (but not the auth values) + } + this.State = ChatState.Disconnected; + this.listener.OnChatStateChange(ChatState.Disconnected); + this.listener.OnDisconnected(); + break; + case StatusCode.DisconnectByServerUserLimit: + this.listener.DebugReturn(DebugLevel.ERROR, "This connection was rejected due to the apps CCU limit."); + this.Disconnect(ChatDisconnectCause.MaxCcuReached); + break; + case StatusCode.ExceptionOnConnect: + case StatusCode.SecurityExceptionOnConnect: + case StatusCode.EncryptionFailedToEstablish: + this.DisconnectedCause = ChatDisconnectCause.ExceptionOnConnect; + + // if enabled, the client can attempt to connect with another networking-protocol to check if that connects + if (this.EnableProtocolFallback && this.State == ChatState.ConnectingToNameServer) + { + this.State = ChatState.ConnectWithFallbackProtocol; + } + else + { + this.Disconnect(ChatDisconnectCause.ExceptionOnConnect); + } + + break; + case StatusCode.Exception: + case StatusCode.ExceptionOnReceive: + this.Disconnect(ChatDisconnectCause.Exception); + break; + case StatusCode.DisconnectByServerTimeout: + this.Disconnect(ChatDisconnectCause.ServerTimeout); + break; + case StatusCode.DisconnectByServerLogic: + this.Disconnect(ChatDisconnectCause.DisconnectByServerLogic); + break; + case StatusCode.DisconnectByServerReasonUnknown: + this.Disconnect(ChatDisconnectCause.DisconnectByServerReasonUnknown); + break; + case StatusCode.TimeoutDisconnect: + this.DisconnectedCause = ChatDisconnectCause.ClientTimeout; + + // if enabled, the client can attempt to connect with another networking-protocol to check if that connects + if (this.EnableProtocolFallback && this.State == ChatState.ConnectingToNameServer) + { + this.State = ChatState.ConnectWithFallbackProtocol; + } + else + { + this.Disconnect(ChatDisconnectCause.ClientTimeout); + } + break; + } + } + + #if SDK_V4 + void IPhotonPeerListener.OnMessage(object msg) + { + string channelName = null; + var receivedBytes = (byte[])msg; + var channelId = BitConverter.ToInt32(receivedBytes, 0); + var messageBytes = new byte[receivedBytes.Length - 4]; + Array.Copy(receivedBytes, 4, messageBytes, 0, receivedBytes.Length - 4); + + foreach (var channel in this.PublicChannels) + { + if (channel.Value.ChannelID == channelId) + { + channelName = channel.Key; + break; + } + } + + if (channelName != null) + { + this.listener.DebugReturn(DebugLevel.ALL, string.Format("got OnMessage in channel {0}", channelName)); + } + else + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("got OnMessage in unknown channel {0}", channelId)); + } + + this.listener.OnReceiveBroadcastMessage(channelName, messageBytes); + } + #endif + + #endregion + + private void TryAuthenticateOnNameServer() + { + if (!this.didAuthenticate) + { + this.didAuthenticate = this.chatPeer.AuthenticateOnNameServer(this.AppId, this.AppVersion, this.ChatRegion, this.AuthValues); + if (!this.didAuthenticate) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, string.Format("Error calling OpAuthenticate! Did not work on NameServer. Check log output, AuthValues and if you're connected. State: {0}", this.State)); + } + } + } + } + + private bool SendChannelOperation(string[] channels, byte operation, int historyLength) + { + Dictionary opParameters = new Dictionary { { (byte)ChatParameterCode.Channels, channels } }; + + if (historyLength != 0) + { + opParameters.Add((byte)ChatParameterCode.HistoryLength, historyLength); + } + + return this.chatPeer.SendOperation(operation, opParameters, SendOptions.SendReliable); + } + + private void HandlePrivateMessageEvent(EventData eventData) + { + //Console.WriteLine(SupportClass.DictionaryToString(eventData.Parameters)); + + object message = (object)eventData.Parameters[(byte)ChatParameterCode.Message]; + string sender = (string)eventData.Parameters[(byte)ChatParameterCode.Sender]; + int msgId = (int)eventData.Parameters[ChatParameterCode.MsgId]; + + string channelName; + if (this.UserId != null && this.UserId.Equals(sender)) + { + string target = (string)eventData.Parameters[(byte)ChatParameterCode.UserId]; + channelName = this.GetPrivateChannelNameByUser(target); + } + else + { + channelName = this.GetPrivateChannelNameByUser(sender); + } + + ChatChannel channel; + if (!this.PrivateChannels.TryGetValue(channelName, out channel)) + { + channel = new ChatChannel(channelName); + channel.IsPrivate = true; + channel.MessageLimit = this.MessageLimit; + this.PrivateChannels.Add(channel.Name, channel); + } + + channel.Add(sender, message, msgId); + this.listener.OnPrivateMessage(sender, message, channelName); + } + + private void HandleChatMessagesEvent(EventData eventData) + { + object[] messages = (object[])eventData.Parameters[(byte)ChatParameterCode.Messages]; + string[] senders = (string[])eventData.Parameters[(byte)ChatParameterCode.Senders]; + string channelName = (string)eventData.Parameters[(byte)ChatParameterCode.Channel]; + int lastMsgId = (int)eventData.Parameters[ChatParameterCode.MsgId]; + + ChatChannel channel; + if (!this.PublicChannels.TryGetValue(channelName, out channel)) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "Channel " + channelName + " for incoming message event not found."); + } + return; + } + + channel.Add(senders, messages, lastMsgId); + this.listener.OnGetMessages(channelName, senders, messages); + } + + private void HandleSubscribeEvent(EventData eventData) + { + string[] channelsInResponse = (string[])eventData.Parameters[ChatParameterCode.Channels]; + bool[] results = (bool[])eventData.Parameters[ChatParameterCode.SubscribeResults]; + for (int i = 0; i < channelsInResponse.Length; i++) + { + if (results[i]) + { + string channelName = channelsInResponse[i]; + ChatChannel channel; + if (!this.PublicChannels.TryGetValue(channelName, out channel)) + { + channel = new ChatChannel(channelName); + channel.MessageLimit = this.MessageLimit; + this.PublicChannels.Add(channel.Name, channel); + } + object temp; + if (eventData.Parameters.TryGetValue(ChatParameterCode.Properties, out temp)) + { + Dictionary channelProperties = temp as Dictionary; + channel.ReadChannelProperties(channelProperties); + } + if (channel.PublishSubscribers) // or maybe remove check & always add anyway? + { + channel.AddSubscriber(this.UserId); + } + if (eventData.Parameters.TryGetValue(ChatParameterCode.ChannelSubscribers, out temp)) + { + string[] subscribers = temp as string[]; + channel.AddSubscribers(subscribers); + } + #if CHAT_EXTENDED + if (eventData.Parameters.TryGetValue(ChatParameterCode.UserProperties, out temp)) + { + //UnityEngine.Debug.LogFormat("temp = {0}", temp); + Dictionary userProperties = temp as Dictionary; + foreach (var pair in userProperties) + { + channel.ReadUserProperties(pair.Key, pair.Value as Dictionary); + } + } + #endif + } + } + + this.listener.OnSubscribed(channelsInResponse, results); + } + + + private void HandleUnsubscribeEvent(EventData eventData) + { + string[] channelsInRequest = (string[])eventData[ChatParameterCode.Channels]; + for (int i = 0; i < channelsInRequest.Length; i++) + { + string channelName = channelsInRequest[i]; + this.PublicChannels.Remove(channelName); + this.PublicChannelsUnsubscribing.Remove(channelName); + } + + this.listener.OnUnsubscribed(channelsInRequest); + } + + private void HandleAuthResponse(OperationResponse operationResponse) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.listener.DebugReturn(DebugLevel.INFO, operationResponse.ToStringFull() + " on: " + this.chatPeer.NameServerAddress); + } + + if (operationResponse.ReturnCode == 0) + { + if (this.State == ChatState.ConnectedToNameServer) + { + this.State = ChatState.Authenticated; + this.listener.OnChatStateChange(this.State); + + if (operationResponse.Parameters.ContainsKey(ParameterCode.Secret)) + { + if (this.AuthValues == null) + { + this.AuthValues = new AuthenticationValues(); + } + this.AuthValues.Token = operationResponse[ParameterCode.Secret] as string; + + this.FrontendAddress = (string)operationResponse[ParameterCode.Address]; + + // we disconnect and status handler starts to connect to front end + this.chatPeer.Disconnect(); + } + else + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "No secret in authentication response."); + } + } + if (operationResponse.Parameters.ContainsKey(ParameterCode.UserId)) + { + string incomingId = operationResponse.Parameters[ParameterCode.UserId] as string; + if (!string.IsNullOrEmpty(incomingId)) + { + this.UserId = incomingId; + this.listener.DebugReturn(DebugLevel.INFO, string.Format("Received your UserID from server. Updating local value to: {0}", this.UserId)); + } + } + } + else if (this.State == ChatState.ConnectingToFrontEnd) + { + this.State = ChatState.ConnectedToFrontEnd; + this.listener.OnChatStateChange(this.State); + this.listener.OnConnected(); + if (statusToSetWhenConnected.HasValue) + { + SetOnlineStatus(statusToSetWhenConnected.Value, messageToSetWhenConnected); + statusToSetWhenConnected = null; + } + } + } + else + { + //this.listener.DebugReturn(DebugLevel.INFO, operationResponse.ToStringFull() + " NS: " + this.NameServerAddress + " FrontEnd: " + this.frontEndAddress); + + switch (operationResponse.ReturnCode) + { + case ErrorCode.InvalidAuthentication: + this.DisconnectedCause = ChatDisconnectCause.InvalidAuthentication; + break; + case ErrorCode.CustomAuthenticationFailed: + this.DisconnectedCause = ChatDisconnectCause.CustomAuthenticationFailed; + break; + case ErrorCode.InvalidRegion: + this.DisconnectedCause = ChatDisconnectCause.InvalidRegion; + break; + case ErrorCode.MaxCcuReached: + this.DisconnectedCause = ChatDisconnectCause.MaxCcuReached; + break; + case ErrorCode.OperationNotAllowedInCurrentState: + this.DisconnectedCause = ChatDisconnectCause.OperationNotAllowedInCurrentState; + break; + case ErrorCode.AuthenticationTicketExpired: + this.DisconnectedCause = ChatDisconnectCause.AuthenticationTicketExpired; + break; + } + + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, string.Format("{0} ClientState: {1} ServerAddress: {2}", operationResponse.ToStringFull(), this.State, this.chatPeer.ServerAddress)); + } + + + this.Disconnect(this.DisconnectedCause); + } + } + + private void HandleStatusUpdate(EventData eventData) + { + string user = (string)eventData.Parameters[ChatParameterCode.Sender]; + int status = (int)eventData.Parameters[ChatParameterCode.Status]; + + object message = null; + bool gotMessage = eventData.Parameters.ContainsKey(ChatParameterCode.Message); + if (gotMessage) + { + message = eventData.Parameters[ChatParameterCode.Message]; + } + + this.listener.OnStatusUpdate(user, status, gotMessage, message); + } + + private bool ConnectToFrontEnd() + { + this.State = ChatState.ConnectingToFrontEnd; + + if (this.DebugOut >= DebugLevel.INFO) + { + this.listener.DebugReturn(DebugLevel.INFO, "Connecting to frontend " + this.FrontendAddress); + } + + #if UNITY_WEBGL + if (this.TransportProtocol == ConnectionProtocol.Tcp || this.TransportProtocol == ConnectionProtocol.Udp) + { + this.listener.DebugReturn(DebugLevel.WARNING, "WebGL requires WebSockets. Switching TransportProtocol to WebSocketSecure."); + this.TransportProtocol = ConnectionProtocol.WebSocketSecure; + } + #endif + + if (!this.chatPeer.Connect(this.FrontendAddress, this.ProxyServerAddress, ChatAppName, null)) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, string.Format("Connecting to frontend {0} failed.", this.FrontendAddress)); + } + return false; + } + + return true; + } + + private bool AuthenticateOnFrontEnd() + { + if (this.AuthValues != null) + { + if (this.AuthValues.Token == null) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "Can't authenticate on front end server. Secret (AuthValues.Token) is not set"); + } + return false; + } + else + { + Dictionary opParameters = new Dictionary { { (byte)ChatParameterCode.Secret, this.AuthValues.Token } }; + if (this.PrivateChatHistoryLength > -1) + { + opParameters[(byte)ChatParameterCode.HistoryLength] = this.PrivateChatHistoryLength; + } + + return this.chatPeer.SendOperation(ChatOperationCode.Authenticate, opParameters, SendOptions.SendReliable); + } + } + else + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "Can't authenticate on front end server. Authentication Values are not set"); + } + return false; + } + } + + private void HandleUserUnsubscribedEvent(EventData eventData) + { + string channelName = eventData.Parameters[ChatParameterCode.Channel] as string; + string userId = eventData.Parameters[ChatParameterCode.UserId] as string; + ChatChannel channel; + if (this.PublicChannels.TryGetValue(channelName, out channel)) + { + if (!channel.PublishSubscribers) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Channel \"{0}\" for incoming UserUnsubscribed (\"{1}\") event does not have PublishSubscribers enabled.", channelName, userId)); + } + } + if (!channel.RemoveSubscriber(userId)) // user not found! + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Channel \"{0}\" does not contain unsubscribed user \"{1}\".", channelName, userId)); + } + } + } + else + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Channel \"{0}\" not found for incoming UserUnsubscribed (\"{1}\") event.", channelName, userId)); + } + } + this.listener.OnUserUnsubscribed(channelName, userId); + } + + private void HandleUserSubscribedEvent(EventData eventData) + { + string channelName = eventData.Parameters[ChatParameterCode.Channel] as string; + string userId = eventData.Parameters[ChatParameterCode.UserId] as string; + ChatChannel channel; + if (this.PublicChannels.TryGetValue(channelName, out channel)) + { + if (!channel.PublishSubscribers) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Channel \"{0}\" for incoming UserSubscribed (\"{1}\") event does not have PublishSubscribers enabled.", channelName, userId)); + } + } + if (!channel.AddSubscriber(userId)) // user came back from the dead ? + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Channel \"{0}\" already contains newly subscribed user \"{1}\".", channelName, userId)); + } + } + else if (channel.MaxSubscribers > 0 && channel.Subscribers.Count > channel.MaxSubscribers) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Channel \"{0}\"'s MaxSubscribers exceeded. count={1} > MaxSubscribers={2}.", channelName, channel.Subscribers.Count, channel.MaxSubscribers)); + } + } + #if CHAT_EXTENDED + object temp; + if (eventData.Parameters.TryGetValue(ChatParameterCode.UserProperties, out temp)) + { + Dictionary userProperties = temp as Dictionary; + channel.ReadUserProperties(userId, userProperties); + } + #endif + } + else + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Channel \"{0}\" not found for incoming UserSubscribed (\"{1}\") event.", channelName, userId)); + } + } + this.listener.OnUserSubscribed(channelName, userId); + } + + #endregion + + /// + /// Subscribe to a single channel and optionally sets its well-know channel properties in case the channel is created. + /// + /// name of the channel to subscribe to + /// ID of the last received message from this channel when re subscribing to receive only missed messages, default is 0 + /// how many missed messages to receive from history, default is -1 (available history). 0 will get you no items. Positive values are capped by a server side limit. + /// options to be used in case the channel to subscribe to will be created. + /// + public bool Subscribe(string channel, int lastMsgId = 0, int messagesFromHistory = -1, ChannelCreationOptions creationOptions = null) + { + if (creationOptions == null) + { + creationOptions = ChannelCreationOptions.Default; + } + int maxSubscribers = creationOptions.MaxSubscribers; + bool publishSubscribers = creationOptions.PublishSubscribers; + if (maxSubscribers < 0) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "Cannot set MaxSubscribers < 0."); + } + return false; + } + if (lastMsgId < 0) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, "lastMsgId cannot be < 0."); + } + return false; + } + if (messagesFromHistory < -1) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "messagesFromHistory < -1, setting it to -1"); + } + messagesFromHistory = -1; + } + if (lastMsgId > 0 && messagesFromHistory == 0) + { + if (this.DebugOut >= DebugLevel.WARNING) + { + this.listener.DebugReturn(DebugLevel.WARNING, "lastMsgId will be ignored because messagesFromHistory == 0"); + } + lastMsgId = 0; + } + Dictionary properties = null; + if (publishSubscribers) + { + if (maxSubscribers > DefaultMaxSubscribers) + { + if (this.DebugOut >= DebugLevel.ERROR) + { + this.listener.DebugReturn(DebugLevel.ERROR, + string.Format("Cannot set MaxSubscribers > {0} when PublishSubscribers == true.", DefaultMaxSubscribers)); + } + return false; + } + properties = new Dictionary(); + properties[ChannelWellKnownProperties.PublishSubscribers] = true; + } + if (maxSubscribers > 0) + { + if (properties == null) + { + properties = new Dictionary(); + } + properties[ChannelWellKnownProperties.MaxSubscribers] = maxSubscribers; + } + #if CHAT_EXTENDED + if (creationOptions.CustomProperties != null && creationOptions.CustomProperties.Count > 0) + { + foreach (var pair in creationOptions.CustomProperties) + { + properties.Add(pair.Key, pair.Value); + } + } + #endif + Dictionary opParameters = new Dictionary { { ChatParameterCode.Channels, new[] { channel } } }; + if (messagesFromHistory != 0) + { + opParameters.Add(ChatParameterCode.HistoryLength, messagesFromHistory); + } + if (lastMsgId > 0) + { + opParameters.Add(ChatParameterCode.MsgIds, new[] { lastMsgId }); + } + if (properties != null && properties.Count > 0) + { + opParameters.Add(ChatParameterCode.Properties, properties); + } + + return this.chatPeer.SendOperation(ChatOperationCode.Subscribe, opParameters, SendOptions.SendReliable); + } + + #if CHAT_EXTENDED + + internal bool SetChannelProperties(string channelName, Dictionary channelProperties, Dictionary expectedProperties = null, bool httpForward = false) + { + if (!this.CanChat) + { + this.listener.DebugReturn(DebugLevel.ERROR, "SetChannelProperties called while not connected to front end server."); + return false; + } + + if (string.IsNullOrEmpty(channelName) || channelProperties == null || channelProperties.Count == 0) + { + this.listener.DebugReturn(DebugLevel.WARNING, "SetChannelProperties parameters must be non-null and not empty."); + return false; + } + Dictionary parameters = new Dictionary + { + { ChatParameterCode.Channel, channelName }, + { ChatParameterCode.Properties, channelProperties }, + { ChatParameterCode.Broadcast, true } + }; + if (httpForward) + { + parameters.Add(ChatParameterCode.WebFlags, HttpForwardWebFlag); + } + if (expectedProperties != null && expectedProperties.Count > 0) + { + parameters.Add(ChatParameterCode.ExpectedValues, expectedProperties); + } + return this.chatPeer.SendOperation(ChatOperationCode.SetProperties, parameters, SendOptions.SendReliable); + } + + public bool SetCustomChannelProperties(string channelName, Dictionary channelProperties, Dictionary expectedProperties = null, bool httpForward = false) + { + if (channelProperties != null && channelProperties.Count > 0) + { + Dictionary properties = new Dictionary(channelProperties.Count); + foreach (var pair in channelProperties) + { + properties.Add(pair.Key, pair.Value); + } + Dictionary expected = null; + if (expectedProperties != null && expectedProperties.Count > 0) + { + expected = new Dictionary(expectedProperties.Count); + foreach (var pair in expectedProperties) + { + expected.Add(pair.Key, pair.Value); + } + } + return this.SetChannelProperties(channelName, properties, expected, httpForward); + } + return this.SetChannelProperties(channelName, null); + } + + public bool SetCustomUserProperties(string channelName, string userId, Dictionary userProperties, Dictionary expectedProperties = null, bool httpForward = false) + { + if (userProperties != null && userProperties.Count > 0) + { + Dictionary properties = new Dictionary(userProperties.Count); + foreach (var pair in userProperties) + { + properties.Add(pair.Key, pair.Value); + } + Dictionary expected = null; + if (expectedProperties != null && expectedProperties.Count > 0) + { + expected = new Dictionary(expectedProperties.Count); + foreach (var pair in expectedProperties) + { + expected.Add(pair.Key, pair.Value); + } + } + return this.SetUserProperties(channelName, userId, properties, expected, httpForward); + } + return this.SetUserProperties(channelName, userId, null); + } + + internal bool SetUserProperties(string channelName, string userId, Dictionary channelProperties, Dictionary expectedProperties = null, bool httpForward = false) + { + if (!this.CanChat) + { + this.listener.DebugReturn(DebugLevel.ERROR, "SetUserProperties called while not connected to front end server."); + return false; + } + if (string.IsNullOrEmpty(channelName)) + { + this.listener.DebugReturn(DebugLevel.WARNING, "SetUserProperties \"channelName\" parameter must be non-null and not empty."); + return false; + } + if (channelProperties == null || channelProperties.Count == 0) + { + this.listener.DebugReturn(DebugLevel.WARNING, "SetUserProperties \"channelProperties\" parameter must be non-null and not empty."); + return false; + } + if (string.IsNullOrEmpty(userId)) + { + this.listener.DebugReturn(DebugLevel.WARNING, "SetUserProperties \"userId\" parameter must be non-null and not empty."); + return false; + } + Dictionary parameters = new Dictionary + { + { ChatParameterCode.Channel, channelName }, + { ChatParameterCode.Properties, channelProperties }, + { ChatParameterCode.UserId, userId }, + { ChatParameterCode.Broadcast, true } + }; + if (httpForward) + { + parameters.Add(ChatParameterCode.WebFlags, HttpForwardWebFlag); + } + if (expectedProperties != null && expectedProperties.Count > 0) + { + parameters.Add(ChatParameterCode.ExpectedValues, expectedProperties); + } + return this.chatPeer.SendOperation(ChatOperationCode.SetProperties, parameters, SendOptions.SendReliable); + } + + private void HandlePropertiesChanged(EventData eventData) + { + string channelName = eventData.Parameters[ChatParameterCode.Channel] as string; + ChatChannel channel; + if (!this.PublicChannels.TryGetValue(channelName, out channel)) + { + this.listener.DebugReturn(DebugLevel.WARNING, string.Format("Channel {0} for incoming ChannelPropertiesUpdated event not found.", channelName)); + return; + } + string senderId = eventData.Parameters[ChatParameterCode.Sender] as string; + Dictionary changedProperties = eventData.Parameters[ChatParameterCode.Properties] as Dictionary; + object temp; + if (eventData.Parameters.TryGetValue(ChatParameterCode.UserId, out temp)) + { + string targetUserId = temp as string; + channel.ReadUserProperties(targetUserId, changedProperties); + this.listener.OnUserPropertiesChanged(channelName, targetUserId, senderId, changedProperties); + } + else + { + channel.ReadChannelProperties(changedProperties); + this.listener.OnChannelPropertiesChanged(channelName, senderId, changedProperties); + } + } + + private void HandleErrorInfoEvent(EventData eventData) + { + string channel = eventData.Parameters[ChatParameterCode.Channel] as string; + string msg = eventData.Parameters[ChatParameterCode.DebugMessage] as string; + object data = eventData.Parameters[ChatParameterCode.DebugData]; + this.listener.OnErrorInfo(channel, msg, data); + } + + #endif + } +} diff --git a/Assets/Photon/PhotonChat/Code/ChatClient.cs.meta b/Assets/Photon/PhotonChat/Code/ChatClient.cs.meta new file mode 100644 index 00000000..0a1bea9c --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatClient.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 692e391fa2a297c45b3d530aa85be610 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/ChatDisconnectCause.cs b/Assets/Photon/PhotonChat/Code/ChatDisconnectCause.cs new file mode 100644 index 00000000..47200cfd --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatDisconnectCause.cs @@ -0,0 +1,43 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +namespace Photon.Chat +{ + /// Enumeration of causes for Disconnects (used in ). + /// Read the individual descriptions to find out what to do about this type of disconnect. + public enum ChatDisconnectCause + { + /// No error was tracked. + None, + /// OnStatusChanged: The server is not available or the address is wrong. Make sure the port is provided and the server is up. + ExceptionOnConnect, + /// OnStatusChanged: The server disconnected this client from within the room's logic (the C# code). + DisconnectByServerLogic, + /// OnStatusChanged: The server disconnected this client for unknown reasons. + DisconnectByServerReasonUnknown, + /// OnStatusChanged: The server disconnected this client due to timing out (missing acknowledgement from the client). + ServerTimeout, + + /// OnStatusChanged: This client detected that the server's responses are not received in due time. + ClientTimeout, + /// OnStatusChanged: Some internal exception caused the socket code to fail. Contact Exit Games. + Exception, + /// OnOperationResponse: Authenticate in the Photon Cloud with invalid AppId. Update your subscription or contact Exit Games. + InvalidAuthentication, + /// OnOperationResponse: Authenticate (temporarily) failed when using a Photon Cloud subscription without CCU Burst. Update your subscription. + MaxCcuReached, + /// OnOperationResponse: Authenticate when the app's Photon Cloud subscription is locked to some (other) region(s). Update your subscription or change region. + InvalidRegion, + /// OnOperationResponse: Operation that's (currently) not available for this client (not authorized usually). Only tracked for op Authenticate. + OperationNotAllowedInCurrentState, + /// OnOperationResponse: Authenticate in the Photon Cloud with invalid client values or custom authentication setup in Cloud Dashboard. + CustomAuthenticationFailed, + /// The authentication ticket should provide access to any Photon Cloud server without doing another authentication-service call. However, the ticket expired. + AuthenticationTicketExpired, + /// OnStatusChanged: The client disconnected from within the logic (the C# code). + DisconnectByClientLogic + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/ChatDisconnectCause.cs.meta b/Assets/Photon/PhotonChat/Code/ChatDisconnectCause.cs.meta new file mode 100644 index 00000000..c1f0c5bf --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatDisconnectCause.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b90b85043f1857f43b94fd00edfc1ef1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/ChatEventCode.cs b/Assets/Photon/PhotonChat/Code/ChatEventCode.cs new file mode 100644 index 00000000..07e803e7 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatEventCode.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +namespace Photon.Chat +{ + /// + /// Wraps up internally used constants in Photon Chat events. You don't have to use them directly usually. + /// + public class ChatEventCode + { + /// (0) Event code for messages published in public channels. + public const byte ChatMessages = 0; + /// (1) Not Used. + public const byte Users = 1;// List of users or List of changes for List of users + /// (2) Event code for messages published in private channels + public const byte PrivateMessage = 2; + /// (3) Not Used. + public const byte FriendsList = 3; + /// (4) Event code for status updates. + public const byte StatusUpdate = 4; + /// (5) Event code for subscription acks. + public const byte Subscribe = 5; + /// (6) Event code for unsubscribe acks. + public const byte Unsubscribe = 6; + /// (7) Event code for properties update. + public const byte PropertiesChanged = 7; + + /// (8) Event code for new user subscription to a channel where is enabled. + public const byte UserSubscribed = 8; + /// (9) Event code for when user unsubscribes from a channel where is enabled. + public const byte UserUnsubscribed = 9; + /// (10) Event code for when the server sends an error to the client. + /// This is currently only used by Chat WebHooks. + public const byte ErrorInfo = 10; + } +} diff --git a/Assets/Photon/PhotonChat/Code/ChatEventCode.cs.meta b/Assets/Photon/PhotonChat/Code/ChatEventCode.cs.meta new file mode 100644 index 00000000..4c0b2e68 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatEventCode.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 188e4a680bce12d4cbad8d57a24f7d44 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/ChatOperationCode.cs b/Assets/Photon/PhotonChat/Code/ChatOperationCode.cs new file mode 100644 index 00000000..588bc2bb --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatOperationCode.cs @@ -0,0 +1,38 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +namespace Photon.Chat +{ + /// + /// Wraps up codes for operations used internally in Photon Chat. You don't have to use them directly usually. + /// + public class ChatOperationCode + { + /// (230) Operation Authenticate. + public const byte Authenticate = 230; + + /// (0) Operation to subscribe to chat channels. + public const byte Subscribe = 0; + /// (1) Operation to unsubscribe from chat channels. + public const byte Unsubscribe = 1; + /// (2) Operation to publish a message in a chat channel. + public const byte Publish = 2; + /// (3) Operation to send a private message to some other user. + public const byte SendPrivate = 3; + + /// (4) Not used yet. + public const byte ChannelHistory = 4; + + /// (5) Set your (client's) status. + public const byte UpdateStatus = 5; + /// (6) Add friends the list of friends that should update you of their status. + public const byte AddFriends = 6; + /// (7) Remove friends from list of friends that should update you of their status. + public const byte RemoveFriends = 7; + /// (8) Operation to set properties of public chat channel or users in public chat channels. + public const byte SetProperties = 8; + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/ChatOperationCode.cs.meta b/Assets/Photon/PhotonChat/Code/ChatOperationCode.cs.meta new file mode 100644 index 00000000..03756886 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatOperationCode.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c90a2a73f3ce648409739c724d3e6cef +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/ChatParameterCode.cs b/Assets/Photon/PhotonChat/Code/ChatParameterCode.cs new file mode 100644 index 00000000..7a56e6bc --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatParameterCode.cs @@ -0,0 +1,85 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +namespace Photon.Chat +{ + /// + /// Wraps up codes for parameters (in operations and events) used internally in Photon Chat. You don't have to use them directly usually. + /// + public class ChatParameterCode + { + /// (0) Array of chat channels. + public const byte Channels = 0; + /// (1) Name of a single chat channel. + public const byte Channel = 1; + /// (2) Array of chat messages. + public const byte Messages = 2; + /// (3) A single chat message. + public const byte Message = 3; + /// (4) Array of names of the users who sent the array of chat messages. + public const byte Senders = 4; + /// (5) Name of a the user who sent a chat message. + public const byte Sender = 5; + /// (6) Not used. + public const byte ChannelUserCount = 6; + /// (225) Name of user to send a (private) message to.The code is used in LoadBalancing and copied over here. + public const byte UserId = 225; + /// (8) Id of a message. + public const byte MsgId = 8; + /// (9) Not used. + public const byte MsgIds = 9; + /// (221) Secret token to identify an authorized user.The code is used in LoadBalancing and copied over here. + public const byte Secret = 221; + /// (15) Subscribe operation result parameter. A bool[] with result per channel. + public const byte SubscribeResults = 15; + + /// (10) Status + public const byte Status = 10; + /// (11) Friends + public const byte Friends = 11; + /// (12) SkipMessage is used in SetOnlineStatus and if true, the message is not being broadcast. + public const byte SkipMessage = 12; + + /// (14) Number of message to fetch from history. 0: no history. 1 and higher: number of messages in history. -1: all history. + public const byte HistoryLength = 14; + + public const byte DebugMessage = 17; + + /// (21) WebFlags object for changing behaviour of webhooks from client. + public const byte WebFlags = 21; + + /// (22) WellKnown or custom properties of channel or user. + /// + /// In event it's always channel properties, + /// in event it's always user properties, + /// in event it's channel properties unless parameter value is not null + /// + public const byte Properties = 22; + /// (23) Array of UserIds of users already subscribed to a channel. + /// Used in Subscribe event when PublishSubscribers is enabled. + /// Does not include local user who just subscribed. + /// Maximum length is ( - 1). + public const byte ChannelSubscribers = 23; + /// (24) Optional data sent in ErrorInfo event from Chat WebHooks. + public const byte DebugData = 24; + /// (25) Code for values to be used for "Check And Swap" (CAS) when changing properties. + public const byte ExpectedValues = 25; + /// (26) Code for broadcast parameter of method. + public const byte Broadcast = 26; + /// + /// WellKnown and custom user properties. + /// + /// + /// Used only in event + /// + public const byte UserProperties = 28; + + /// + /// Generated unique reusable room id + /// + public const byte UniqueRoomId = 29; + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/ChatParameterCode.cs.meta b/Assets/Photon/PhotonChat/Code/ChatParameterCode.cs.meta new file mode 100644 index 00000000..b0d8707e --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatParameterCode.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d7a17b60c85fb30448492e397c58c7ce +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/ChatPeer.cs b/Assets/Photon/PhotonChat/Code/ChatPeer.cs new file mode 100644 index 00000000..6f437718 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatPeer.cs @@ -0,0 +1,454 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + +namespace Photon.Chat +{ + using System; + using System.Diagnostics; + using System.Collections.Generic; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// Provides basic operations of the Photon Chat server. This internal class is used by public ChatClient. + /// + public class ChatPeer : PhotonPeer + { + /// Name Server Host Name for Photon Cloud. Without port and without any prefix. + public string NameServerHost = "ns.photonengine.io"; + + /// Name Server port per protocol (the UDP port is different than TCP, etc). + private static readonly Dictionary ProtocolToNameServerPort = new Dictionary() { { ConnectionProtocol.Udp, 5058 }, { ConnectionProtocol.Tcp, 4533 }, { ConnectionProtocol.WebSocket, 9093 }, { ConnectionProtocol.WebSocketSecure, 19093 } }; //, { ConnectionProtocol.RHttp, 6063 } }; + + /// Name Server Address for Photon Cloud (based on current protocol). You can use the default values and usually won't have to set this value. + public string NameServerAddress { get { return this.GetNameServerAddress(); } } + + virtual internal bool IsProtocolSecure { get { return this.UsedProtocol == ConnectionProtocol.WebSocketSecure; } } + + /// Chat Peer constructor. + /// Chat listener implementation. + /// Protocol to be used by the peer. + public ChatPeer(IPhotonPeerListener listener, ConnectionProtocol protocol) : base(listener, protocol) + { + this.ConfigUnitySockets(); + } + + + + // Sets up the socket implementations to use, depending on platform + [System.Diagnostics.Conditional("SUPPORTED_UNITY")] + private void ConfigUnitySockets() + { + Type websocketType = null; + #if (UNITY_XBOXONE || UNITY_GAMECORE) && !UNITY_EDITOR + websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, Assembly-CSharp", false); + if (websocketType == null) + { + websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, Assembly-CSharp-firstpass", false); + } + if (websocketType == null) + { + websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, PhotonRealtime", false); + } + if (websocketType != null) + { + this.SocketImplementationConfig[ConnectionProtocol.Udp] = websocketType; // on Xbox, the native socket plugin supports UDP as well + } + #else + // to support WebGL export in Unity, we find and assign the SocketWebTcp class (if it's in the project). + // alternatively class SocketWebTcp might be in the Photon3Unity3D.dll + websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, PhotonWebSocket", false); + if (websocketType == null) + { + websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp-firstpass", false); + } + if (websocketType == null) + { + websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp", false); + } + #endif + + if (websocketType != null) + { + this.SocketImplementationConfig[ConnectionProtocol.WebSocket] = websocketType; + this.SocketImplementationConfig[ConnectionProtocol.WebSocketSecure] = websocketType; + } + + #if NET_4_6 && (UNITY_EDITOR || !ENABLE_IL2CPP) && !NETFX_CORE + this.SocketImplementationConfig[ConnectionProtocol.Udp] = typeof(SocketUdpAsync); + this.SocketImplementationConfig[ConnectionProtocol.Tcp] = typeof(SocketTcpAsync); + #endif + } + + /// If not zero, this is used for the name server port on connect. Independent of protocol (so this better matches). Set by ChatClient.ConnectUsingSettings. + /// This is reset when the protocol fallback is used. + public ushort NameServerPortOverride; + + /// + /// Gets the NameServer Address (with prefix and port), based on the set protocol (this.UsedProtocol). + /// + /// NameServer Address (with prefix and port). + private string GetNameServerAddress() + { + var protocolPort = 0; + ProtocolToNameServerPort.TryGetValue(this.TransportProtocol, out protocolPort); + + if (this.NameServerPortOverride != 0) + { + this.Listener.DebugReturn(DebugLevel.INFO, string.Format("Using NameServerPortInAppSettings as port for Name Server: {0}", this.NameServerPortOverride)); + protocolPort = this.NameServerPortOverride; + } + + switch (this.TransportProtocol) + { + case ConnectionProtocol.Udp: + case ConnectionProtocol.Tcp: + return string.Format("{0}:{1}", NameServerHost, protocolPort); + case ConnectionProtocol.WebSocket: + return string.Format("ws://{0}:{1}", NameServerHost, protocolPort); + case ConnectionProtocol.WebSocketSecure: + return string.Format("wss://{0}:{1}", NameServerHost, protocolPort); + default: + throw new ArgumentOutOfRangeException(); + } + } + + + /// Authenticates on NameServer. + /// If the authentication operation request could be sent. + public bool AuthenticateOnNameServer(string appId, string appVersion, string region, AuthenticationValues authValues) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpAuthenticate()"); + } + + var opParameters = new Dictionary(); + + opParameters[ParameterCode.AppVersion] = appVersion; + opParameters[ParameterCode.ApplicationId] = appId; + opParameters[ParameterCode.Region] = region; + + if (authValues != null) + { + if (!string.IsNullOrEmpty(authValues.UserId)) + { + opParameters[ParameterCode.UserId] = authValues.UserId; + } + + if (authValues.AuthType != CustomAuthenticationType.None) + { + opParameters[ParameterCode.ClientAuthenticationType] = (byte) authValues.AuthType; + if (authValues.Token != null) + { + opParameters[ParameterCode.Secret] = authValues.Token; + } + else + { + if (!string.IsNullOrEmpty(authValues.AuthGetParameters)) + { + opParameters[ParameterCode.ClientAuthenticationParams] = authValues.AuthGetParameters; + } + if (authValues.AuthPostData != null) + { + opParameters[ParameterCode.ClientAuthenticationData] = authValues.AuthPostData; + } + } + } + } + + return this.SendOperation(ChatOperationCode.Authenticate, opParameters, new SendOptions() { Reliability = true, Encrypt = this.IsEncryptionAvailable }); + } + } + + /// + /// Options for optional "Custom Authentication" services used with Photon. Used by OpAuthenticate after connecting to Photon. + /// + public enum CustomAuthenticationType : byte + { + /// Use a custom authentication service. Currently the only implemented option. + Custom = 0, + + /// Authenticates users by their Steam Account. Set Steam's ticket as "ticket" via AddAuthParameter(). + Steam = 1, + + /// Authenticates users by their Facebook Account. Set Facebooks's tocken as "token" via AddAuthParameter(). + Facebook = 2, + + /// Authenticates users by their Oculus Account and token. Set Oculus' userid as "userid" and nonce as "nonce" via AddAuthParameter(). + Oculus = 3, + + /// Authenticates users by their PSN Account and token on PS4. Set token as "token", env as "env" and userName as "userName" via AddAuthParameter(). + PlayStation4 = 4, + [Obsolete("Use PlayStation4 or PlayStation5 as needed")] + PlayStation = 4, + + /// Authenticates users by their Xbox Account. Pass the XSTS token via SetAuthPostData(). + Xbox = 5, + + /// Authenticates users by their HTC Viveport Account. Set userToken as "userToken" via AddAuthParameter(). + Viveport = 10, + + /// Authenticates users by their NSA ID. Set token as "token" and appversion as "appversion" via AddAuthParameter(). The appversion is optional. + NintendoSwitch = 11, + + /// Authenticates users by their PSN Account and token on PS5. Set token as "token", env as "env" and userName as "userName" via AddAuthParameter(). + PlayStation5 = 12, + [Obsolete("Use PlayStation4 or PlayStation5 as needed")] + Playstation5 = 12, + + /// Authenticates users with Epic Online Services (EOS). Set token as "token" and ownershipToken as "ownershipToken" via AddAuthParameter(). The ownershipToken is optional. + Epic = 13, + + /// Authenticates users with Facebook Gaming api. Set token as "token" via AddAuthParameter(). + FacebookGaming = 15, + + /// Disables custom authentication. Same as not providing any AuthenticationValues for connect (more precisely for: OpAuthenticate). + None = byte.MaxValue + } + + + /// + /// Container for user authentication in Photon. Set AuthValues before you connect - all else is handled. + /// + /// + /// On Photon, user authentication is optional but can be useful in many cases. + /// If you want to FindFriends, a unique ID per user is very practical. + /// + /// There are basically three options for user authentication: None at all, the client sets some UserId + /// or you can use some account web-service to authenticate a user (and set the UserId server-side). + /// + /// Custom Authentication lets you verify end-users by some kind of login or token. It sends those + /// values to Photon which will verify them before granting access or disconnecting the client. + /// + /// The AuthValues are sent in OpAuthenticate when you connect, so they must be set before you connect. + /// If the AuthValues.UserId is null or empty when it's sent to the server, then the Photon Server assigns a UserId! + /// + /// The Photon Cloud Dashboard will let you enable this feature and set important server values for it. + /// https://dashboard.photonengine.com + /// + public class AuthenticationValues + { + /// See AuthType. + private CustomAuthenticationType authType = CustomAuthenticationType.None; + + /// The type of authentication provider that should be used. Defaults to None (no auth whatsoever). + /// Several auth providers are available and CustomAuthenticationType.Custom can be used if you build your own service. + public CustomAuthenticationType AuthType + { + get { return authType; } + set { authType = value; } + } + + /// This string must contain any (http get) parameters expected by the used authentication service. By default, username and token. + /// + /// Maps to operation parameter 216. + /// Standard http get parameters are used here and passed on to the service that's defined in the server (Photon Cloud Dashboard). + /// + public string AuthGetParameters { get; set; } + + /// Data to be passed-on to the auth service via POST. Default: null (not sent). Either string or byte[] (see setters). + /// Maps to operation parameter 214. + public object AuthPostData { get; private set; } + + /// Internal Photon token. After initial authentication, Photon provides a token for this client, subsequently used as (cached) validation. + /// Any token for custom authentication should be set via SetAuthPostData or AddAuthParameter. + public object Token { get; protected internal set; } + + /// The UserId should be a unique identifier per user. This is for finding friends, etc.. + /// See remarks of AuthValues for info about how this is set and used. + public string UserId { get; set; } + + + /// Creates empty auth values without any info. + public AuthenticationValues() + { + } + + /// Creates minimal info about the user. If this is authenticated or not, depends on the set AuthType. + /// Some UserId to set in Photon. + public AuthenticationValues(string userId) + { + this.UserId = userId; + } + + /// Sets the data to be passed-on to the auth service via POST. + /// AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary. + /// String data to be used in the body of the POST request. Null or empty string will set AuthPostData to null. + public virtual void SetAuthPostData(string stringData) + { + this.AuthPostData = (string.IsNullOrEmpty(stringData)) ? null : stringData; + } + + /// Sets the data to be passed-on to the auth service via POST. + /// AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary. + /// Binary token / auth-data to pass on. + public virtual void SetAuthPostData(byte[] byteData) + { + this.AuthPostData = byteData; + } + + /// Sets data to be passed-on to the auth service as Json (Content-Type: "application/json") via Post. + /// AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary. + /// A authentication-data dictionary will be converted to Json and passed to the Auth webservice via HTTP Post. + public virtual void SetAuthPostData(Dictionary dictData) + { + this.AuthPostData = dictData; + } + + /// Adds a key-value pair to the get-parameters used for Custom Auth (AuthGetParameters). + /// This method does uri-encoding for you. + /// Key for the value to set. + /// Some value relevant for Custom Authentication. + public virtual void AddAuthParameter(string key, string value) + { + string ampersand = string.IsNullOrEmpty(this.AuthGetParameters) ? "" : "&"; + this.AuthGetParameters = string.Format("{0}{1}{2}={3}", this.AuthGetParameters, ampersand, System.Uri.EscapeDataString(key), System.Uri.EscapeDataString(value)); + } + + /// + /// Transform this object into string. + /// + /// string representation of this object. + public override string ToString() + { + return string.Format("AuthenticationValues Type: {3} UserId: {0}, GetParameters: {1} Token available: {2}", this.UserId, this.AuthGetParameters, this.Token != null, this.AuthType); + } + + /// + /// Make a copy of the current object. + /// + /// The object to be copied into. + /// The copied object. + public AuthenticationValues CopyTo(AuthenticationValues copy) + { + copy.AuthType = this.AuthType; + copy.AuthGetParameters = this.AuthGetParameters; + copy.AuthPostData = this.AuthPostData; + copy.UserId = this.UserId; + return copy; + } + } + + + /// Class for constants. Codes for parameters of Operations and Events. + public class ParameterCode + { + /// (224) Your application's ID: a name on your own Photon or a GUID on the Photon Cloud + public const byte ApplicationId = 224; + /// (221) Internally used to establish encryption + public const byte Secret = 221; + /// (220) Version of your application + public const byte AppVersion = 220; + /// (217) This key's (byte) value defines the target custom authentication type/service the client connects with. Used in OpAuthenticate + public const byte ClientAuthenticationType = 217; + /// (216) This key's (string) value provides parameters sent to the custom authentication type/service the client connects with. Used in OpAuthenticate + public const byte ClientAuthenticationParams = 216; + /// (214) This key's (string or byte[]) value provides parameters sent to the custom authentication service setup in Photon Dashboard. Used in OpAuthenticate + public const byte ClientAuthenticationData = 214; + /// (210) Used for region values in OpAuth and OpGetRegions. + public const byte Region = 210; + /// (230) Address of a (game) server to use. + public const byte Address = 230; + /// (225) User's ID + public const byte UserId = 225; + } + + /// + /// ErrorCode defines the default codes associated with Photon client/server communication. + /// + public class ErrorCode + { + /// (0) is always "OK", anything else an error or specific situation. + public const int Ok = 0; + + // server - Photon low(er) level: <= 0 + + /// + /// (-3) Operation can't be executed yet (e.g. OpJoin can't be called before being authenticated, RaiseEvent cant be used before getting into a room). + /// + /// + /// Before you call any operations on the Cloud servers, the automated client workflow must complete its authorization. + /// In PUN, wait until State is: JoinedLobby or ConnectedToMaster + /// + public const int OperationNotAllowedInCurrentState = -3; + + /// (-2) The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications. + public const int InvalidOperationCode = -2; + + /// (-1) Something went wrong in the server. Try to reproduce and contact Exit Games. + public const int InternalServerError = -1; + + // server - PhotonNetwork: 0x7FFF and down + // logic-level error codes start with short.max + + /// (32767) Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service). + public const int InvalidAuthentication = 0x7FFF; + + /// (32766) GameId (name) already in use (can't create another). Change name. + public const int GameIdAlreadyExists = 0x7FFF - 1; + + /// (32765) Game is full. This rarely happens when some player joined the room before your join completed. + public const int GameFull = 0x7FFF - 2; + + /// (32764) Game is closed and can't be joined. Join another game. + public const int GameClosed = 0x7FFF - 3; + + /// (32762) Not in use currently. + public const int ServerFull = 0x7FFF - 5; + + /// (32761) Not in use currently. + public const int UserBlocked = 0x7FFF - 6; + + /// (32760) Random matchmaking only succeeds if a room exists that is neither closed nor full. Repeat in a few seconds or create a new room. + public const int NoRandomMatchFound = 0x7FFF - 7; + + /// (32758) Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join. + public const int GameDoesNotExist = 0x7FFF - 9; + + /// (32757) Authorization on the Photon Cloud failed because the concurrent users (CCU) limit of the app's subscription is reached. + /// + /// Unless you have a plan with "CCU Burst", clients might fail the authentication step during connect. + /// Affected client are unable to call operations. Please note that players who end a game and return + /// to the master server will disconnect and re-connect, which means that they just played and are rejected + /// in the next minute / re-connect. + /// This is a temporary measure. Once the CCU is below the limit, players will be able to connect an play again. + /// + /// OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen. + /// Self-hosted Photon servers with a CCU limited license won't let a client connect at all. + /// + public const int MaxCcuReached = 0x7FFF - 10; + + /// (32756) Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server. + /// + /// Some subscription plans for the Photon Cloud are region-bound. Servers of other regions can't be used then. + /// Check your master server address and compare it with your Photon Cloud Dashboard's info. + /// https://cloud.photonengine.com/dashboard + /// + /// OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen. + /// Self-hosted Photon servers with a CCU limited license won't let a client connect at all. + /// + public const int InvalidRegion = 0x7FFF - 11; + + /// + /// (32755) Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token). Check error message for details. + /// + public const int CustomAuthenticationFailed = 0x7FFF - 12; + + /// (32753) The Authentication ticket expired. Usually, this is refreshed behind the scenes. Connect (and authorize) again. + public const int AuthenticationTicketExpired = 0x7FF1; + } + +} diff --git a/Assets/Photon/PhotonChat/Code/ChatPeer.cs.meta b/Assets/Photon/PhotonChat/Code/ChatPeer.cs.meta new file mode 100644 index 00000000..a002c43c --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatPeer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f712805dec728943a668b3bf19dc422 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/ChatState.cs b/Assets/Photon/PhotonChat/Code/ChatState.cs new file mode 100644 index 00000000..2c879747 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatState.cs @@ -0,0 +1,39 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +namespace Photon.Chat +{ + /// Possible states for a Chat Client. + public enum ChatState + { + /// Peer is created but not used yet. + Uninitialized, + /// Connecting to name server. + ConnectingToNameServer, + /// Connected to name server. + ConnectedToNameServer, + /// Authenticating on current server. + Authenticating, + /// Finished authentication on current server. + Authenticated, + /// Disconnecting from name server. This is usually a transition from name server to frontend server. + DisconnectingFromNameServer, + /// Connecting to frontend server. + ConnectingToFrontEnd, + /// Connected to frontend server. + ConnectedToFrontEnd, + /// Disconnecting from frontend server. + DisconnectingFromFrontEnd, + /// Currently not used. + QueuedComingFromFrontEnd, + /// The client disconnects (from any server). + Disconnecting, + /// The client is no longer connected (to any server). + Disconnected, + /// Client was unable to connect to Name Server and will attempt to connect with an alternative network protocol (TCP). + ConnectWithFallbackProtocol + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/ChatState.cs.meta b/Assets/Photon/PhotonChat/Code/ChatState.cs.meta new file mode 100644 index 00000000..e862818d --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatState.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8f482d8c4fe7ade4cbb08eb4a2d83b39 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/ChatUserStatus.cs b/Assets/Photon/PhotonChat/Code/ChatUserStatus.cs new file mode 100644 index 00000000..08d6ef12 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatUserStatus.cs @@ -0,0 +1,35 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + +namespace Photon.Chat +{ + /// Contains commonly used status values for SetOnlineStatus. You can define your own. + /// + /// While "online" (value 2 and up), the status message will be sent to anyone who has you on his friend list. + /// + /// Define custom online status values as you like with these rules: + /// 0: Means "offline". It will be used when you are not connected. In this status, there is no status message. + /// 1: Means "invisible" and is sent to friends as "offline". They see status 0, no message but you can chat. + /// 2: And any higher value will be treated as "online". Status can be set. + /// + public static class ChatUserStatus + { + /// (0) Offline. + public const int Offline = 0; + /// (1) Be invisible to everyone. Sends no message. + public const int Invisible = 1; + /// (2) Online and available. + public const int Online = 2; + /// (3) Online but not available. + public const int Away = 3; + /// (4) Do not disturb. + public const int DND = 4; + /// (5) Looking For Game/Group. Could be used when you want to be invited or do matchmaking. + public const int LFG = 5; + /// (6) Could be used when in a room, playing. + public const int Playing = 6; + } +} diff --git a/Assets/Photon/PhotonChat/Code/ChatUserStatus.cs.meta b/Assets/Photon/PhotonChat/Code/ChatUserStatus.cs.meta new file mode 100644 index 00000000..bfd0c529 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/ChatUserStatus.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7db67e7f5face2e42b6daafcaf4e6c82 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/IChatClientListener.cs b/Assets/Photon/PhotonChat/Code/IChatClientListener.cs new file mode 100644 index 00000000..c711e59e --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/IChatClientListener.cs @@ -0,0 +1,148 @@ +// ---------------------------------------------------------------------------------------------------------------------- +// The Photon Chat Api enables clients to connect to a chat server and communicate with other clients. +// ChatClient is the main class of this api. +// Photon Chat Api - Copyright (C) 2014 Exit Games GmbH +// ---------------------------------------------------------------------------------------------------------------------- + + +namespace Photon.Chat +{ + using System.Collections.Generic; + using ExitGames.Client.Photon; + + /// + /// Callback interface for Chat client side. Contains callback methods to notify your app about updates. + /// Must be provided to new ChatClient in constructor + /// + public interface IChatClientListener + { + /// + /// All debug output of the library will be reported through this method. Print it or put it in a + /// buffer to use it on-screen. + /// + /// DebugLevel (severity) of the message. + /// Debug text. Print to System.Console or screen. + void DebugReturn(DebugLevel level, string message); + + /// + /// Disconnection happened. + /// + void OnDisconnected(); + + /// + /// Client is connected now. + /// + /// + /// Clients have to be connected before they can send their state, subscribe to channels and send any messages. + /// + void OnConnected(); + + /// The ChatClient's state changed. Usually, OnConnected and OnDisconnected are the callbacks to react to. + /// The new state. + void OnChatStateChange(ChatState state); + + /// + /// Notifies app that client got new messages from server + /// Number of senders is equal to number of messages in 'messages'. Sender with number '0' corresponds to message with + /// number '0', sender with number '1' corresponds to message with number '1' and so on + /// + /// channel from where messages came + /// list of users who sent messages + /// list of messages it self + void OnGetMessages(string channelName, string[] senders, object[] messages); + + /// + /// Notifies client about private message + /// + /// user who sent this message + /// message it self + /// channelName for private messages (messages you sent yourself get added to a channel per target username) + void OnPrivateMessage(string sender, object message, string channelName); + + /// + /// Result of Subscribe operation. Returns subscription result for every requested channel name. + /// + /// + /// If multiple channels sent in Subscribe operation, OnSubscribed may be called several times, each call with part of sent array or with single channel in "channels" parameter. + /// Calls order and order of channels in "channels" parameter may differ from order of channels in "channels" parameter of Subscribe operation. + /// + /// Array of channel names. + /// Per channel result if subscribed. + void OnSubscribed(string[] channels, bool[] results); + + /// + /// Result of Unsubscribe operation. Returns for channel name if the channel is now unsubscribed. + /// + /// If multiple channels sent in Unsubscribe operation, OnUnsubscribed may be called several times, each call with part of sent array or with single channel in "channels" parameter. + /// Calls order and order of channels in "channels" parameter may differ from order of channels in "channels" parameter of Unsubscribe operation. + /// Array of channel names that are no longer subscribed. + void OnUnsubscribed(string[] channels); + + /// + /// New status of another user (you get updates for users set in your friends list). + /// + /// Name of the user. + /// New status of that user. + /// True if the status contains a message you should cache locally. False: This status update does not include a message (keep any you have). + /// Message that user set. + void OnStatusUpdate(string user, int status, bool gotMessage, object message); + + /// + /// A user has subscribed to a public chat channel + /// + /// Name of the chat channel + /// UserId of the user who subscribed + void OnUserSubscribed(string channel, string user); + + /// + /// A user has unsubscribed from a public chat channel + /// + /// Name of the chat channel + /// UserId of the user who unsubscribed + void OnUserUnsubscribed(string channel, string user); + + + #if CHAT_EXTENDED + + /// + /// Properties of a public channel has been changed + /// + /// Channel name in which the properties have changed + /// The UserID of the user who changed the properties + /// The properties that have changed + void OnChannelPropertiesChanged(string channel, string senderUserId, Dictionary properties); + + /// + /// Properties of a user in a public channel has been changed + /// + /// Channel name in which the properties have changed + /// The UserID whom properties have changed + /// The UserID of the user who changed the properties + /// The properties that have changed + void OnUserPropertiesChanged(string channel, string targetUserId, string senderUserId, Dictionary properties); + + /// + /// The server uses error events to make the client aware of some issues. + /// + /// + /// This is currently used only in Chat WebHooks. + /// + /// The name of the channel in which this error info has been received + /// The text message of the error info + /// Optional error data + void OnErrorInfo(string channel, string error, object data); + + #endif + + + #if SDK_V4 + /// + /// Received a broadcast message + /// + /// Name of the chat channel + /// Message data + void OnReceiveBroadcastMessage(string channel, byte[] message); + #endif + + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/IChatClientListener.cs.meta b/Assets/Photon/PhotonChat/Code/IChatClientListener.cs.meta new file mode 100644 index 00000000..797bdea7 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/IChatClientListener.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bab7c8053b486e34aa0d4ca99dcbec80 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Code/PhotonChat.asmdef b/Assets/Photon/PhotonChat/Code/PhotonChat.asmdef new file mode 100644 index 00000000..bcabffe9 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/PhotonChat.asmdef @@ -0,0 +1,12 @@ +{ + "name": "PhotonChat", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [] +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/PhotonChat.asmdef.meta b/Assets/Photon/PhotonChat/Code/PhotonChat.asmdef.meta new file mode 100644 index 00000000..99f00af5 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/PhotonChat.asmdef.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 08a110bd598f7604f9519c2d7e1fb3cc +timeCreated: 1537459565 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Code/changes-chat.txt b/Assets/Photon/PhotonChat/Code/changes-chat.txt new file mode 100644 index 00000000..0db7b6fe --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/changes-chat.txt @@ -0,0 +1,146 @@ + +Photon Chat C# Client - Changelog +Exit Games GmbH - www.photonengine.com - forum.photonengine.com + + +Version 4.1.6.17 (02. August 2022) + Note: No notable changes. + +Version 4.1.6.16 (20. June 2022) + Fixed: The ProxyServerAddress is also applied when connecting to the Frontend Server (was missing in previous update). + +Version 4.1.6.15 (02. June 2022) + Added: Proxy support (with WS/WSS) to Chat API. This can be used via ConnectUsingSettings() or by setting ChatClient.ProxyServerAddress before connecting. + +Version 4.1.6.11 (22. November 2021) + Added: CustomAuthenticationType.Epic to authenticate via Epic Online Services (EOS). + Added: CustomAuthenticationType.FacebookGaming to authenticate via Facebook Gaming services. + +Version 4.1.6.10 (21. October 2021 - rev6243) + Fixed: The ChatPeer.ConfigUnitySockets(), which used a surplus typeof() for Xbox configuration. + +Version 4.1.6.6 (21. September 2021 - rev6204) + Changed: For Xbox, order of checked assemblies when getting Type SocketNativeSource. It's more likely to be in Assembly-CSharp. + +Version 4.1.6.5 (24. August 2021 - rev6181) + Updated: The default name server host to "ns.photonengine.io". When using WSS on this, it expects TLS1.2 (Win 7 and old Unity versions may not support this). + +Version 4.1.6.2 (17. June 2021) + Changed: The enumeration CustomAuthenticationType was changed to fix naming inconsistencies. Use PlayStation4 and PlayStation5 respectively. Old variants are available as obsolete. + +Version 4.1.5.2 (12. March 2021) + ADDED: CustomAuthenticationType.Playstation5 (value 12). + +Version 4.1.5.0 (03. March 2021) + Updated: ChatPeer ConfigUnitySockets() to the analog of the Realtime API. + +Version 4.1.5.0 (3. February 2021) + Internal: AuthenticationValues.Token is now an object instead of a string (so some internal code changed). This enables the server to send a byte[], which is more effective than a string. + +Version 4.1.4.6 (16. November 2020) + Added: ChatClient.PrivateChatHistoryLength field. If set before you connect, this can be used to limit the number of private messages when the server (re)subscribes the client to (still alive) a private chat channel. + Added: Protocol Fallback option for Chat. Analog to the Realtime API, Chat can now try another protocol, if the initial connect to the Name Server fails. After the timeout or when an error happened, UDP will fallback to TCP. TCP will fallback to UDP. + Added: EnableProtocolFallback in ChatClient and ChatAppSettings. When using ConnectUsingSettings, the ChatClient's value gets set and used. + Changed: Connect(appid, appversion, authValues) will only apply the authvalues parameter, if that's non-null. + Changed: ChatAppSettings field AppId is now AppIdChat (matching the value in Realtime API AppSettings). The old name is currently just obsolete. + Added: ChatAppSettings.Port to override the Name Server Port if needed. Note: Chat does not support "Alternative Ports" yet (ports pre-defined per server). + Added: ChatPeer.NameServerPortOverride value to replace/override the default per-protocol port value (by the one in the AppSettings, e.g.). + +Version 4.1.4.5 (02. September 2020) + Added: Option for extended features: Channels may send a user list, channels and users can have custom properties and there are web-forwarding flags. Needs compile define CHAT_EXTENDED. This also adds new methods to the IChatClientListener. + Changed: AuthenticationValues has been refined, analog to the changes in the Realtime API. + +Version 4.1.4.2 (8. May 2020 - rev5519) + Added: Broadcast receive and read channel using UniqueRoomID UniqueRoomID read from SubscribeChannel response + +Version 4.1.2.20 + Changed: ChatDisconnectCause enum and OnDisconnected callback usage updated to be in sync. with Realtime. + Added: ChatClient.ConnectUsingSettings(ChatAppSettings appSettings). + Added: more error logs when something fails internally. + +Version 4.1.2.19 (12. November 2019 - rev5266) + Changed: ChatPeer now look for SocketNativeSource instead of SocketWebTcpNativeDynamic when the target platform is XB One. A new Xbox addon is coming up on our SDK page. + +Version 4.1.2.16 (25. June 2019 - rev5168) + Added: ChatClient.TryGetPrivateChannelByUser. + +Version 4.1.2.14 (6. May 2019 - rev5097) + Changed: Chat API changes are now listed in a separate changes file. + +Version 4.1.2.13 (3. May 2019 - rev5086) + Fixed: Properly add local client's UserId to public channels' Subscribers list when applicable. + +Version 4.1.2.11 (15. April 2019 - rev5043) + Added: Feature: PublishSubscribers. Per channel, you can now define if the server broadcasts users joining and leaving. + Fixed: proper way to handle Subscribe event when channel properties are returned. + Added: Viveport Auth Provider enum value. + Added: Switch-related workaround. Setting a Thread.Name was causing a crash in some exports on console. This affects Unity to Nintendo Switch exports. + Added: ChannelCreationOptions class to be used in the new Subscribe overload method. + Changed: Chat to use the same 1.8 serialization as Realtime/PUN. This also now matches the SocketWebTcp.SerializationProtocol default. + +Version 4.1.2.9 (13. February 2019 - rev4985) + Added: Client API for Max Subscribers and Publish Subscribers features inside public channels. + +Version 4.1.2.1 (31. July 2018 - rev4787) + Changed: Namespace from "ExitGames.Client.Photon.Chat" to "Photon.Chat". + Added: ConnectAndSetStatus method. + +Version 4.1.1.17 (11. October 2017 - rev4465) + Fixed: Unity "6" compile define is now UNITY_2017. + +Version 4.1.1.15 (17. July 2017 - rev4232) + Added: ChatClient.TransportProtocol as shortcut to the use PhotonPeer's TransportProtocol value. This enables setting the protocol easily while not connected. + Added: ChatClient.SocketImplementationConfig as shortcut to modify PhotonPeer's SocketImplementationConfig. This enables you to setup which IPhotonSocket implementation to use for which network protocol. + Changed: ChatPeer.ConfigUnitySockets() to try to find our websocket implementations in the assembly, making the SocketWebTcpCoroutine and SocketWebTcpThread classes optional. + Removed: Class "SocketWebTcp" is no longer found by ConfigUnitySockets(). + +Version 4.1.1.14 (5. July 2017 - rev4191) + Added: ChatClient can optionally run a thread to call SendOutgoingCommands in intervals. This makes sure the connection doesn't fail easily (e.g. when Unity is loading scenes, etc.). You still have to call Service to dispatch received messages. + Added: ChatClient.UseBackgroundWorkerForSending. Set this to true, to use the new background thread. Note: Do not use this in WebGL exports from Unity cause Threads are unavailable in them. + +Version 4.1.1.2 (13. September 2016 - rev3652) + Changed: GetNameServerAddress() is the same in Chat and LoadBalancing APIs now. + Changed: ChatPeer now has ConfigUnitySockets(), which defines the SocketImplementationConfig. It's only used in Unity (using UNITY define). + Changed: ChatClient is not setting socket implementations anymore. + Added: Hashtable definition to use Photon's own implementation for Windows Store builds (NETFX_CORE). This must be used but it means you to use the same Hashtable definition in all builds (no matter if 8.1 or 10). + Added: Support for WebGL export in Unity. + +Version 4.0.5.0 (3. December 2015 - rev3144) + Added: A MessageLimit field for ChatClient and ChatChannel to limit the number of messages the client keeps locally. It might be useful to limit memory usage in long running chats. Set ChatClient.MessageLimit to apply the limit to any channel subscribed afterwards or apply a limit individually. + +Version 4.0.0.11 (28. October 2015 - rev3093) + Added: More sanity checks on operations (empty userId or secret, max friends). + Added: Special debug logging when the server returns an error for "Operation Unknown". In this case, it's highly likely that you don't use a Chat AppId. + Added: More helpful error logging. + +Version 4.0.0.10 (14. July 2015 - rev2988) + Added: A Unity 4.6 demo with uGUI. It's missing a few features but should give you a good start to making your own. + Added: Unity/WebGL support (merged from PUN). + Added: Breaking! IChatClientListener.DebugReturn(). Photon lib and chat client log via this method (no logging to console by default). + Changed: ChatClient.CustomAuthenticationValues is now .AuthValues. You can use those values to identify a user, even if you don't setup an external, custom authentication service. + Changed: ChatClient.UserId no longer directly stores the id but puts it into AuthValues. This means, the UserId could also be set via setting AuthValues. + Changed: The API of AuthenticationValues. There is now the UserId and AddAuthParameter() replaces the less general SetAuthParameters() (which only set specific key/values). + Note: All users should have a UserId. You can set chatClient.UserId before you connect, or you can set the AuthenticationValues in Connect(..., authValues) to set a UserId. + Added: ChatChannel.ToStringMessages(), which gets all messages in a single string, line by line. The format is "Sender:Message". + Added: ChatClient.TryGetChannel() to find a channel only by name, no matter if public or private. + +Version 4.0.0.7 (12. January 2015 - rev2763) + Internal: Changed code for UserID from 7 to 225. The latter is used in LoadBalancing, too, so we want to re-use the code here. + +Version 4.0.0.1 (17. June 2014 - rev2663) + Changed: How the server responds to Subscribe and Unsubscribe. Events will now contain success/failure of those. This allows us to send the answer after calling a WebHook if needed and we can even send it to multiple clients (which authenticated with the same userID). + Changed: Handling of subscription responsed. This is done to allow web services to subscribe a client remotely and to be able to prevent joining some channel that a user should not join (the channel of some guild or another team, e.g.). + Changed: Debug loggging. In Unity we can't use Debug.Assert, etc. So we have to log more cleanly. This works in Editor and several platforms (but not all). + Changed: Folder for Chat API. It now begins with "Photon" which provides some context no matter where you copy the files. Easier to find in Unity projects. + Changed: Operation FriendList and method SendFriendList renamed to AddFriends + Added: Operation RemoveFriends and corresponding method in ChatClient.cs + Added: Console Demo has new command 'fr' to remove friends + +Version 4.0.0.0 (23. May 2014 - rev2614) + Added: SendPrivateMessage() overload that has option to encrypt private messages. Public messages don't need encryption. + Removed: lastId and LastMessageIndex from channels. Those were impractical and should be removed from the API. + Changed: UserStatus class to ChatUserStatus. + Changed: Most classes are defined in their own file now. + Removed: Folders "Shared" and their subfolders. This gives a much better overview. + Added: Handling for event SubscribeResponse. This is not actually a response but gives you info about channels that got subscribed (e.g. when you re-login quickly or when a user is logged in in multiple clients). + Added: HandleSubscriptionResults() method to handle the event and proper responses. \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Code/changes-chat.txt.meta b/Assets/Photon/PhotonChat/Code/changes-chat.txt.meta new file mode 100644 index 00000000..e18ac756 --- /dev/null +++ b/Assets/Photon/PhotonChat/Code/changes-chat.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e5c3dda6f11fe7845989297c8a603dc2 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos.meta b/Assets/Photon/PhotonChat/Demos.meta new file mode 100644 index 00000000..9d520456 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 801c62f7d03cb463ba20067deb330234 +folderAsset: yes +timeCreated: 1537874612 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/Common.meta b/Assets/Photon/PhotonChat/Demos/Common.meta new file mode 100644 index 00000000..9661d1ee --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1aab6e4c105054f7e91af2cf027064d1 +folderAsset: yes +timeCreated: 1538395282 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/Common/EventSystemSpawner.cs b/Assets/Photon/PhotonChat/Demos/Common/EventSystemSpawner.cs new file mode 100644 index 00000000..d58b6cd8 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common/EventSystemSpawner.cs @@ -0,0 +1,40 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// +// +// For additive Scene Loading context, eventSystem can't be added to each scene and instead should be instantiated only if necessary. +// https://answers.unity.com/questions/1403002/multiple-eventsystem-in-scene-this-is-not-supporte.html +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using UnityEngine; +using UnityEngine.EventSystems; + +namespace Photon.Chat.UtilityScripts +{ + /// + /// Event system spawner. Will add an EventSystem GameObject with an EventSystem component and a StandaloneInputModule component. + /// Use this in additive scene loading context where you would otherwise get a "Multiple EventSystem in scene... this is not supported" error from Unity. + /// + public class EventSystemSpawner : MonoBehaviour + { + void OnEnable() + { + #if ENABLE_INPUT_SYSTEM && !ENABLE_LEGACY_INPUT_MANAGER + Debug.LogError("PUN Demos are not compatible with the New Input System, unless you enable \"Both\" in: Edit > Project Settings > Player > Active Input Handling. Pausing App."); + Debug.Break(); + return; + #endif + + EventSystem sceneEventSystem = FindObjectOfType(); + if (sceneEventSystem == null) + { + GameObject eventSystem = new GameObject("EventSystem"); + + eventSystem.AddComponent(); + eventSystem.AddComponent(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/Common/EventSystemSpawner.cs.meta b/Assets/Photon/PhotonChat/Demos/Common/EventSystemSpawner.cs.meta new file mode 100644 index 00000000..1fcda3d6 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common/EventSystemSpawner.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bd5ff9965d0784cad8e07f5eb9cb9c06 +timeCreated: 1538396402 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/Common/OnStartDelete.cs b/Assets/Photon/PhotonChat/Demos/Common/OnStartDelete.cs new file mode 100644 index 00000000..46ee2a01 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common/OnStartDelete.cs @@ -0,0 +1,24 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Photon Unity Utilities, +// +// +// This component will destroy the GameObject it is attached to (in Start()). +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using UnityEngine; + +namespace Photon.Chat.UtilityScripts +{ + /// This component will destroy the GameObject it is attached to (in Start()). + public class OnStartDelete : MonoBehaviour + { + // Use this for initialization + private void Start() + { + Destroy(this.gameObject); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/Common/OnStartDelete.cs.meta b/Assets/Photon/PhotonChat/Demos/Common/OnStartDelete.cs.meta new file mode 100644 index 00000000..c1b54284 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common/OnStartDelete.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0b1cdd4de66f84fa1af4cb197e5d901d +timeCreated: 1538396603 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/Common/TextButtonTransition.cs b/Assets/Photon/PhotonChat/Demos/Common/TextButtonTransition.cs new file mode 100644 index 00000000..a6fffebb --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common/TextButtonTransition.cs @@ -0,0 +1,70 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// +// +// Use this on Button texts to have some color transition on the text as well without corrupting button's behaviour. +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace Photon.Chat.UtilityScripts +{ + + /// + /// Use this on Button texts to have some color transition on the text as well without corrupting button's behaviour. + /// + [RequireComponent(typeof(Text))] + public class TextButtonTransition : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler + { + + Text _text; + + /// + /// The selectable Component. + /// + public Selectable Selectable; + + /// + /// The color of the normal of the transition state. + /// + public Color NormalColor= Color.white; + + /// + /// The color of the hover of the transition state. + /// + public Color HoverColor = Color.black; + + public void Awake() + { + _text = GetComponent(); + } + + public void OnEnable() + { + _text.color = NormalColor; + } + + public void OnDisable() + { + _text.color = NormalColor; + } + + public void OnPointerEnter(PointerEventData eventData) + { + if (Selectable == null || Selectable.IsInteractable()) { + _text.color = HoverColor; + } + } + + public void OnPointerExit(PointerEventData eventData) + { + if (Selectable == null || Selectable.IsInteractable()) { + _text.color = NormalColor; + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/Common/TextButtonTransition.cs.meta b/Assets/Photon/PhotonChat/Demos/Common/TextButtonTransition.cs.meta new file mode 100644 index 00000000..460ca081 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common/TextButtonTransition.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 060fe8295761a47268586d33ef5673e0 +timeCreated: 1538395273 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/Common/TextToggleIsOnTransition.cs b/Assets/Photon/PhotonChat/Demos/Common/TextToggleIsOnTransition.cs new file mode 100644 index 00000000..dd2a4769 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common/TextToggleIsOnTransition.cs @@ -0,0 +1,86 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// +// +// Use this on Button texts to have some color transition on the text as well without corrupting button's behaviour. +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + +namespace Photon.Chat.UtilityScripts +{ + + /// + /// Use this on toggles texts to have some color transition on the text depending on the isOn State. + /// + [RequireComponent(typeof(Text))] + public class TextToggleIsOnTransition : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler + { + + /// + /// The toggle Component. + /// + public Toggle toggle; + + Text _text; + + /// + /// The color of the normal on transition state. + /// + public Color NormalOnColor= Color.white; + + /// + /// The color of the normal off transition state. + /// + public Color NormalOffColor = Color.black; + + /// + /// The color of the hover on transition state. + /// + public Color HoverOnColor= Color.black; + + /// + /// The color of the hover off transition state. + /// + public Color HoverOffColor = Color.black; + + bool isHover; + + public void OnEnable() + { + _text = GetComponent(); + + OnValueChanged (toggle.isOn); + + toggle.onValueChanged.AddListener(OnValueChanged); + + } + + public void OnDisable() + { + toggle.onValueChanged.RemoveListener(OnValueChanged); + } + + public void OnValueChanged(bool isOn) + { + _text.color = isOn? (isHover?HoverOnColor:HoverOnColor) : (isHover?NormalOffColor:NormalOffColor) ; + } + + public void OnPointerEnter(PointerEventData eventData) + { + isHover = true; + _text.color = toggle.isOn?HoverOnColor:HoverOffColor; + } + + public void OnPointerExit(PointerEventData eventData) + { + isHover = false; + _text.color = toggle.isOn?NormalOnColor:NormalOffColor; + } + + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/Common/TextToggleIsOnTransition.cs.meta b/Assets/Photon/PhotonChat/Demos/Common/TextToggleIsOnTransition.cs.meta new file mode 100644 index 00000000..a97b21f7 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/Common/TextToggleIsOnTransition.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1e808171e8963498bb1db072a977d750 +timeCreated: 1538395754 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat.meta b/Assets/Photon/PhotonChat/Demos/DemoChat.meta new file mode 100644 index 00000000..40682063 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4e3a46219ebf94310a9f347733f88f31 +folderAsset: yes +timeCreated: 1537874626 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/AppSettingsExtensions.cs b/Assets/Photon/PhotonChat/Demos/DemoChat/AppSettingsExtensions.cs new file mode 100644 index 00000000..22c59f49 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/AppSettingsExtensions.cs @@ -0,0 +1,33 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Demo code for Photon Chat in Unity. +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + + +using Photon.Realtime; + + +namespace Photon.Chat.Demo +{ + public static class AppSettingsExtensions + { + public static ChatAppSettings GetChatSettings(this AppSettings appSettings) + { + return new ChatAppSettings + { + AppIdChat = appSettings.AppIdChat, + AppVersion = appSettings.AppVersion, + FixedRegion = appSettings.IsBestRegion ? null : appSettings.FixedRegion, + NetworkLogging = appSettings.NetworkLogging, + Protocol = appSettings.Protocol, + EnableProtocolFallback = appSettings.EnableProtocolFallback, + Server = appSettings.IsDefaultNameServer ? null : appSettings.Server, + Port = (ushort)appSettings.Port, + ProxyServer = appSettings.ProxyServer + // values not copied from AppSettings class: AuthMode + // values not needed from AppSettings class: EnableLobbyStatistics + }; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/AppSettingsExtensions.cs.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/AppSettingsExtensions.cs.meta new file mode 100644 index 00000000..27b14079 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/AppSettingsExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4fcf4818ecc9abf4e9b7e0c37af9b851 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/ChannelSelector.cs b/Assets/Photon/PhotonChat/Demos/DemoChat/ChannelSelector.cs new file mode 100644 index 00000000..4bf9644a --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/ChannelSelector.cs @@ -0,0 +1,32 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Demo code for Photon Chat in Unity. +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + + +using UnityEngine; +using UnityEngine.EventSystems; +using UnityEngine.UI; + + +namespace Photon.Chat.Demo +{ + public class ChannelSelector : MonoBehaviour, IPointerClickHandler + { + public string Channel; + + public void SetChannel(string channel) + { + this.Channel = channel; + Text t = this.GetComponentInChildren(); + t.text = this.Channel; + } + + public void OnPointerClick(PointerEventData eventData) + { + ChatGui handler = FindObjectOfType(); + handler.ShowChannel(this.Channel); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/ChannelSelector.cs.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/ChannelSelector.cs.meta new file mode 100644 index 00000000..f2739cdb --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/ChannelSelector.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 48caa72710147fc4f9389b0b5ec6137d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/ChatAppIdCheckerUI.cs b/Assets/Photon/PhotonChat/Demos/DemoChat/ChatAppIdCheckerUI.cs new file mode 100644 index 00000000..0bef6116 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/ChatAppIdCheckerUI.cs @@ -0,0 +1,60 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Demo code for Photon Chat in Unity. +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + + +using UnityEngine; + + +using UnityEngine.UI; +#if PHOTON_UNITY_NETWORKING +using Photon.Pun; +#endif + +namespace Photon.Chat.Demo +{ + /// + /// This is used in the Editor Splash to properly inform the developer about the chat AppId requirement. + /// + [ExecuteInEditMode] + public class ChatAppIdCheckerUI : MonoBehaviour + { + public Text Description; + public bool WizardOpenedOnce; // avoid opening the wizard again and again + + // TODO: maybe this can run on Start(), not on Update()?! + public void Update() + { + bool showWarning = false; + string descriptionText = string.Empty; + + #if PHOTON_UNITY_NETWORKING + showWarning = string.IsNullOrEmpty(PhotonNetwork.PhotonServerSettings.AppSettings.AppIdChat); + if (showWarning) + { + descriptionText = "WARNING:\nPlease setup a Chat AppId in the PhotonServerSettings file."; + } + #else + ChatGui cGui = FindObjectOfType(); // TODO: this could be a serialized reference instead of finding this each time + + showWarning = cGui == null || string.IsNullOrEmpty(cGui.chatAppSettings.AppIdChat); + if (showWarning) + { + descriptionText = "Please setup the Chat AppId.\nOpen the setup panel: Window, Photon Chat, Setup."; + + #if UNITY_EDITOR + if (!WizardOpenedOnce) + { + WizardOpenedOnce = true; + UnityEditor.EditorApplication.ExecuteMenuItem("Window/Photon Chat/Setup"); + } + #endif + } + #endif + + this.Description.text = descriptionText; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/ChatAppIdCheckerUI.cs.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/ChatAppIdCheckerUI.cs.meta new file mode 100644 index 00000000..a4a8033b --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/ChatAppIdCheckerUI.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4eb1284704a754507acb17b07b888086 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/ChatGui.cs b/Assets/Photon/PhotonChat/Demos/DemoChat/ChatGui.cs new file mode 100644 index 00000000..6eb444c6 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/ChatGui.cs @@ -0,0 +1,665 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Demo code for Photon Chat in Unity. +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; + +using UnityEngine; +using UnityEngine.UI; + +using Photon.Chat; +using Photon.Realtime; +using AuthenticationValues = Photon.Chat.AuthenticationValues; +#if PHOTON_UNITY_NETWORKING +using Photon.Pun; +#endif + + +namespace Photon.Chat.Demo +{ + /// + /// This simple Chat UI demonstrate basics usages of the Chat Api + /// + /// + /// The ChatClient basically lets you create any number of channels. + /// + /// some friends are already set in the Chat demo "DemoChat-Scene", 'Joe', 'Jane' and 'Bob', simply log with them so that you can see the status changes in the Interface + /// + /// Workflow: + /// Create ChatClient, Connect to a server with your AppID, Authenticate the user (apply a unique name,) + /// and subscribe to some channels. + /// Subscribe a channel before you publish to that channel! + /// + /// + /// Note: + /// Don't forget to call ChatClient.Service() on Update to keep the Chatclient operational. + /// + public class ChatGui : MonoBehaviour, IChatClientListener + { + + public string[] ChannelsToJoinOnConnect; // set in inspector. Demo channels to join automatically. + + public string[] FriendsList; + + public int HistoryLengthToFetch; // set in inspector. Up to a certain degree, previously sent messages can be fetched for context + + public string UserName { get; set; } + + private string selectedChannelName; // mainly used for GUI/input + + public ChatClient chatClient; + + #if !PHOTON_UNITY_NETWORKING + public ChatAppSettings ChatAppSettings + { + get { return this.chatAppSettings; } + } + + [SerializeField] + #endif + protected internal ChatAppSettings chatAppSettings; + + + public GameObject missingAppIdErrorPanel; + public GameObject ConnectingLabel; + + public RectTransform ChatPanel; // set in inspector (to enable/disable panel) + public GameObject UserIdFormPanel; + public InputField InputFieldChat; // set in inspector + public Text CurrentChannelText; // set in inspector + public Toggle ChannelToggleToInstantiate; // set in inspector + + + public GameObject FriendListUiItemtoInstantiate; + + private readonly Dictionary channelToggles = new Dictionary(); + + private readonly Dictionary friendListItemLUT = new Dictionary(); + + public bool ShowState = true; + public GameObject Title; + public Text StateText; // set in inspector + public Text UserIdText; // set in inspector + + // private static string WelcomeText = "Welcome to chat. Type \\help to list commands."; + private static string HelpText = "\n -- HELP --\n" + + "To subscribe to channel(s) (channelnames are case sensitive) : \n" + + "\t\\subscribe \n" + + "\tor\n" + + "\t\\s \n" + + "\n" + + "To leave channel(s):\n" + + "\t\\unsubscribe \n" + + "\tor\n" + + "\t\\u \n" + + "\n" + + "To switch the active channel\n" + + "\t\\join \n" + + "\tor\n" + + "\t\\j \n" + + "\n" + + "To send a private message: (username are case sensitive)\n" + + "\t\\msg \n" + + "\n" + + "To change status:\n" + + "\t\\state \n" + + "0 = Offline " + + "1 = Invisible " + + "2 = Online " + + "3 = Away \n" + + "4 = Do not disturb " + + "5 = Looking For Group " + + "6 = Playing" + + "\n\n" + + "To clear the current chat tab (private chats get closed):\n" + + "\t\\clear"; + + + public void Start() + { + DontDestroyOnLoad(this.gameObject); + + this.UserIdText.text = ""; + this.StateText.text = ""; + this.StateText.gameObject.SetActive(true); + this.UserIdText.gameObject.SetActive(true); + this.Title.SetActive(true); + this.ChatPanel.gameObject.SetActive(false); + this.ConnectingLabel.SetActive(false); + + if (string.IsNullOrEmpty(this.UserName)) + { + this.UserName = "user" + Environment.TickCount%99; //made-up username + } + + #if PHOTON_UNITY_NETWORKING + this.chatAppSettings = PhotonNetwork.PhotonServerSettings.AppSettings.GetChatSettings(); + #endif + + bool appIdPresent = !string.IsNullOrEmpty(this.chatAppSettings.AppIdChat); + + this.missingAppIdErrorPanel.SetActive(!appIdPresent); + this.UserIdFormPanel.gameObject.SetActive(appIdPresent); + + if (!appIdPresent) + { + Debug.LogError("You need to set the chat app ID in the PhotonServerSettings file in order to continue."); + } + } + + public void Connect() + { + this.UserIdFormPanel.gameObject.SetActive(false); + + this.chatClient = new ChatClient(this); + #if !UNITY_WEBGL + this.chatClient.UseBackgroundWorkerForSending = true; + #endif + this.chatClient.AuthValues = new AuthenticationValues(this.UserName); + this.chatClient.ConnectUsingSettings(this.chatAppSettings); + + this.ChannelToggleToInstantiate.gameObject.SetActive(false); + Debug.Log("Connecting as: " + this.UserName); + + this.ConnectingLabel.SetActive(true); + } + + /// To avoid that the Editor becomes unresponsive, disconnect all Photon connections in OnDestroy. + public void OnDestroy() + { + if (this.chatClient != null) + { + this.chatClient.Disconnect(); + } + } + + /// To avoid that the Editor becomes unresponsive, disconnect all Photon connections in OnApplicationQuit. + public void OnApplicationQuit() + { + if (this.chatClient != null) + { + this.chatClient.Disconnect(); + } + } + + public void Update() + { + if (this.chatClient != null) + { + this.chatClient.Service(); // make sure to call this regularly! it limits effort internally, so calling often is ok! + } + + // check if we are missing context, which means we got kicked out to get back to the Photon Demo hub. + if ( this.StateText == null) + { + Destroy(this.gameObject); + return; + } + + this.StateText.gameObject.SetActive(this.ShowState); // this could be handled more elegantly, but for the demo it's ok. + } + + + public void OnEnterSend() + { + if (Input.GetKey(KeyCode.Return) || Input.GetKey(KeyCode.KeypadEnter)) + { + this.SendChatMessage(this.InputFieldChat.text); + this.InputFieldChat.text = ""; + } + } + + public void OnClickSend() + { + if (this.InputFieldChat != null) + { + this.SendChatMessage(this.InputFieldChat.text); + this.InputFieldChat.text = ""; + } + } + + + public int TestLength = 2048; + private byte[] testBytes = new byte[2048]; + + private void SendChatMessage(string inputLine) + { + if (string.IsNullOrEmpty(inputLine)) + { + return; + } + if ("test".Equals(inputLine)) + { + if (this.TestLength != this.testBytes.Length) + { + this.testBytes = new byte[this.TestLength]; + } + + this.chatClient.SendPrivateMessage(this.chatClient.AuthValues.UserId, this.testBytes, true); + } + + + bool doingPrivateChat = this.chatClient.PrivateChannels.ContainsKey(this.selectedChannelName); + string privateChatTarget = string.Empty; + if (doingPrivateChat) + { + // the channel name for a private conversation is (on the client!!) always composed of both user's IDs: "this:remote" + // so the remote ID is simple to figure out + + string[] splitNames = this.selectedChannelName.Split(new char[] { ':' }); + privateChatTarget = splitNames[1]; + } + //UnityEngine.Debug.Log("selectedChannelName: " + selectedChannelName + " doingPrivateChat: " + doingPrivateChat + " privateChatTarget: " + privateChatTarget); + + + if (inputLine[0].Equals('\\')) + { + string[] tokens = inputLine.Split(new char[] {' '}, 2); + if (tokens[0].Equals("\\help")) + { + this.PostHelpToCurrentChannel(); + } + if (tokens[0].Equals("\\state")) + { + int newState = 0; + + + List messages = new List(); + messages.Add ("i am state " + newState); + string[] subtokens = tokens[1].Split(new char[] {' ', ','}); + + if (subtokens.Length > 0) + { + newState = int.Parse(subtokens[0]); + } + + if (subtokens.Length > 1) + { + messages.Add(subtokens[1]); + } + + this.chatClient.SetOnlineStatus(newState,messages.ToArray()); // this is how you set your own state and (any) message + } + else if ((tokens[0].Equals("\\subscribe") || tokens[0].Equals("\\s")) && !string.IsNullOrEmpty(tokens[1])) + { + this.chatClient.Subscribe(tokens[1].Split(new char[] {' ', ','})); + } + else if ((tokens[0].Equals("\\unsubscribe") || tokens[0].Equals("\\u")) && !string.IsNullOrEmpty(tokens[1])) + { + this.chatClient.Unsubscribe(tokens[1].Split(new char[] {' ', ','})); + } + else if (tokens[0].Equals("\\clear")) + { + if (doingPrivateChat) + { + this.chatClient.PrivateChannels.Remove(this.selectedChannelName); + } + else + { + ChatChannel channel; + if (this.chatClient.TryGetChannel(this.selectedChannelName, doingPrivateChat, out channel)) + { + channel.ClearMessages(); + } + } + } + else if (tokens[0].Equals("\\msg") && !string.IsNullOrEmpty(tokens[1])) + { + string[] subtokens = tokens[1].Split(new char[] {' ', ','}, 2); + if (subtokens.Length < 2) return; + + string targetUser = subtokens[0]; + string message = subtokens[1]; + this.chatClient.SendPrivateMessage(targetUser, message); + } + else if ((tokens[0].Equals("\\join") || tokens[0].Equals("\\j")) && !string.IsNullOrEmpty(tokens[1])) + { + string[] subtokens = tokens[1].Split(new char[] { ' ', ',' }, 2); + + // If we are already subscribed to the channel we directly switch to it, otherwise we subscribe to it first and then switch to it implicitly + if (this.channelToggles.ContainsKey(subtokens[0])) + { + this.ShowChannel(subtokens[0]); + } + else + { + this.chatClient.Subscribe(new string[] { subtokens[0] }); + } + } + #if CHAT_EXTENDED + else if ((tokens[0].Equals("\\nickname") || tokens[0].Equals("\\nick") ||tokens[0].Equals("\\n")) && !string.IsNullOrEmpty(tokens[1])) + { + if (!doingPrivateChat) + { + this.chatClient.SetCustomUserProperties(this.selectedChannelName, this.chatClient.UserId, new Dictionary {{"Nickname", tokens[1]}}); + } + + } + #endif + else + { + Debug.Log("The command '" + tokens[0] + "' is invalid."); + } + } + else + { + if (doingPrivateChat) + { + this.chatClient.SendPrivateMessage(privateChatTarget, inputLine); + } + else + { + this.chatClient.PublishMessage(this.selectedChannelName, inputLine); + } + } + } + + public void PostHelpToCurrentChannel() + { + this.CurrentChannelText.text += HelpText; + } + + public void DebugReturn(ExitGames.Client.Photon.DebugLevel level, string message) + { + if (level == ExitGames.Client.Photon.DebugLevel.ERROR) + { + Debug.LogError(message); + } + else if (level == ExitGames.Client.Photon.DebugLevel.WARNING) + { + Debug.LogWarning(message); + } + else + { + Debug.Log(message); + } + } + + public void OnConnected() + { + if (this.ChannelsToJoinOnConnect != null && this.ChannelsToJoinOnConnect.Length > 0) + { + this.chatClient.Subscribe(this.ChannelsToJoinOnConnect, this.HistoryLengthToFetch); + } + + this.ConnectingLabel.SetActive(false); + + this.UserIdText.text = "Connected as "+ this.UserName; + + this.ChatPanel.gameObject.SetActive(true); + + if (this.FriendsList!=null && this.FriendsList.Length>0) + { + this.chatClient.AddFriends(this.FriendsList); // Add some users to the server-list to get their status updates + + // add to the UI as well + foreach(string _friend in this.FriendsList) + { + if (this.FriendListUiItemtoInstantiate != null && _friend!= this.UserName) + { + this.InstantiateFriendButton(_friend); + } + + } + + } + + if (this.FriendListUiItemtoInstantiate != null) + { + this.FriendListUiItemtoInstantiate.SetActive(false); + } + + + this.chatClient.SetOnlineStatus(ChatUserStatus.Online); // You can set your online state (without a mesage). + } + + public void OnDisconnected() + { + Debug.Log("OnDisconnected()"); + this.ConnectingLabel.SetActive(false); + } + + public void OnChatStateChange(ChatState state) + { + // use OnConnected() and OnDisconnected() + // this method might become more useful in the future, when more complex states are being used. + + this.StateText.text = state.ToString(); + } + + public void OnSubscribed(string[] channels, bool[] results) + { + // in this demo, we simply send a message into each channel. This is NOT a must have! + foreach (string channel in channels) + { + this.chatClient.PublishMessage(channel, "says 'hi'."); // you don't HAVE to send a msg on join but you could. + + if (this.ChannelToggleToInstantiate != null) + { + this.InstantiateChannelButton(channel); + + } + } + + Debug.Log("OnSubscribed: " + string.Join(", ", channels)); + + /* + // select first subscribed channel in alphabetical order + if (this.chatClient.PublicChannels.Count > 0) + { + var l = new List(this.chatClient.PublicChannels.Keys); + l.Sort(); + string selected = l[0]; + if (this.channelToggles.ContainsKey(selected)) + { + ShowChannel(selected); + foreach (var c in this.channelToggles) + { + c.Value.isOn = false; + } + this.channelToggles[selected].isOn = true; + AddMessageToSelectedChannel(WelcomeText); + } + } + */ + + // Switch to the first newly created channel + this.ShowChannel(channels[0]); + } + + /// + public void OnSubscribed(string channel, string[] users, Dictionary properties) + { + Debug.LogFormat("OnSubscribed: {0}, users.Count: {1} Channel-props: {2}.", channel, users.Length, properties.ToStringFull()); + } + + private void InstantiateChannelButton(string channelName) + { + if (this.channelToggles.ContainsKey(channelName)) + { + Debug.Log("Skipping creation for an existing channel toggle."); + return; + } + + Toggle cbtn = (Toggle)Instantiate(this.ChannelToggleToInstantiate); + cbtn.gameObject.SetActive(true); + cbtn.GetComponentInChildren().SetChannel(channelName); + cbtn.transform.SetParent(this.ChannelToggleToInstantiate.transform.parent, false); + + this.channelToggles.Add(channelName, cbtn); + } + + private void InstantiateFriendButton(string friendId) + { + GameObject fbtn = (GameObject)Instantiate(this.FriendListUiItemtoInstantiate); + fbtn.gameObject.SetActive(true); + FriendItem _friendItem = fbtn.GetComponent(); + + _friendItem.FriendId = friendId; + + fbtn.transform.SetParent(this.FriendListUiItemtoInstantiate.transform.parent, false); + + this.friendListItemLUT[friendId] = _friendItem; + } + + + public void OnUnsubscribed(string[] channels) + { + foreach (string channelName in channels) + { + if (this.channelToggles.ContainsKey(channelName)) + { + Toggle t = this.channelToggles[channelName]; + Destroy(t.gameObject); + + this.channelToggles.Remove(channelName); + + Debug.Log("Unsubscribed from channel '" + channelName + "'."); + + // Showing another channel if the active channel is the one we unsubscribed from before + if (channelName == this.selectedChannelName && this.channelToggles.Count > 0) + { + IEnumerator> firstEntry = this.channelToggles.GetEnumerator(); + firstEntry.MoveNext(); + + this.ShowChannel(firstEntry.Current.Key); + + firstEntry.Current.Value.isOn = true; + } + } + else + { + Debug.Log("Can't unsubscribe from channel '" + channelName + "' because you are currently not subscribed to it."); + } + } + } + + public void OnGetMessages(string channelName, string[] senders, object[] messages) + { + if (channelName.Equals(this.selectedChannelName)) + { + // update text + this.ShowChannel(this.selectedChannelName); + } + } + + public void OnPrivateMessage(string sender, object message, string channelName) + { + // as the ChatClient is buffering the messages for you, this GUI doesn't need to do anything here + // you also get messages that you sent yourself. in that case, the channelName is determinded by the target of your msg + this.InstantiateChannelButton(channelName); + + byte[] msgBytes = message as byte[]; + if (msgBytes != null) + { + Debug.Log("Message with byte[].Length: "+ msgBytes.Length); + } + if (this.selectedChannelName.Equals(channelName)) + { + this.ShowChannel(channelName); + } + } + + /// + /// New status of another user (you get updates for users set in your friends list). + /// + /// Name of the user. + /// New status of that user. + /// True if the status contains a message you should cache locally. False: This status update does not include a + /// message (keep any you have). + /// Message that user set. + public void OnStatusUpdate(string user, int status, bool gotMessage, object message) + { + + Debug.LogWarning("status: " + string.Format("{0} is {1}. Msg:{2}", user, status, message)); + + if (this.friendListItemLUT.ContainsKey(user)) + { + FriendItem _friendItem = this.friendListItemLUT[user]; + if ( _friendItem!=null) _friendItem.OnFriendStatusUpdate(status,gotMessage,message); + } + } + + public void OnUserSubscribed(string channel, string user) + { + Debug.LogFormat("OnUserSubscribed: channel=\"{0}\" userId=\"{1}\"", channel, user); + } + + public void OnUserUnsubscribed(string channel, string user) + { + Debug.LogFormat("OnUserUnsubscribed: channel=\"{0}\" userId=\"{1}\"", channel, user); + } + + /// + public void OnChannelPropertiesChanged(string channel, string userId, Dictionary properties) + { + Debug.LogFormat("OnChannelPropertiesChanged: {0} by {1}. Props: {2}.", channel, userId, Extensions.ToStringFull(properties)); + } + + public void OnUserPropertiesChanged(string channel, string targetUserId, string senderUserId, Dictionary properties) + { + Debug.LogFormat("OnUserPropertiesChanged: (channel:{0} user:{1}) by {2}. Props: {3}.", channel, targetUserId, senderUserId, Extensions.ToStringFull(properties)); + } + + /// + public void OnErrorInfo(string channel, string error, object data) + { + Debug.LogFormat("OnErrorInfo for channel {0}. Error: {1} Data: {2}", channel, error, data); + } + + public void AddMessageToSelectedChannel(string msg) + { + ChatChannel channel = null; + bool found = this.chatClient.TryGetChannel(this.selectedChannelName, out channel); + if (!found) + { + Debug.Log("AddMessageToSelectedChannel failed to find channel: " + this.selectedChannelName); + return; + } + + if (channel != null) + { + channel.Add("Bot", msg,0); //TODO: how to use msgID? + } + } + + + + public void ShowChannel(string channelName) + { + if (string.IsNullOrEmpty(channelName)) + { + return; + } + + ChatChannel channel = null; + bool found = this.chatClient.TryGetChannel(channelName, out channel); + if (!found) + { + Debug.Log("ShowChannel failed to find channel: " + channelName); + return; + } + + this.selectedChannelName = channelName; + this.CurrentChannelText.text = channel.ToStringMessages(); + Debug.Log("ShowChannel: " + this.selectedChannelName); + + foreach (KeyValuePair pair in this.channelToggles) + { + pair.Value.isOn = pair.Key == channelName ? true : false; + } + } + + public void OpenDashboard() + { + Application.OpenURL("https://dashboard.photonengine.com"); + } + + + + + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/ChatGui.cs.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/ChatGui.cs.meta new file mode 100644 index 00000000..fb899d85 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/ChatGui.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 02d148d0890b2d44dbdf7f1c1b39a499 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/DemoChat-Scene.unity b/Assets/Photon/PhotonChat/Demos/DemoChat/DemoChat-Scene.unity new file mode 100644 index 00000000..574bd7cd --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/DemoChat-Scene.unity @@ -0,0 +1,6540 @@ +%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.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, 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 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + 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: 10 + m_Resolution: 1 + m_BakeResolution: 50 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 0 +--- !u!196 &5 +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.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &48879805 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 48879806} + - component: {fileID: 48879810} + - component: {fileID: 48879809} + - component: {fileID: 48879808} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &48879806 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 48879805} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1127833552} + m_Father: {fileID: 726519996} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &48879808 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 48879805} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 48879809} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 192561278} + m_MethodName: OpenDashboard + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &48879809 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 48879805} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &48879810 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 48879805} + m_CullTransparentMesh: 0 +--- !u!1 &64425121 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 160816, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 64425122} + - component: {fileID: 64425125} + - component: {fileID: 64425124} + - component: {fileID: 64425123} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &64425122 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22460816, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 64425121} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1989416849} + 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: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &64425123 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11460816, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 64425121} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &64425124 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11460818, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 64425121} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.39215687} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &64425125 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22260816, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 64425121} + m_CullTransparentMesh: 0 +--- !u!1 &141587190 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194774, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 141587195} + - component: {fileID: 141587194} + - component: {fileID: 141587193} + - component: {fileID: 141587191} + - component: {fileID: 141587192} + m_Layer: 5 + m_Name: Health + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &141587191 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11490564, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 141587190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &141587192 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 141587190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 060fe8295761a47268586d33ef5673e0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &141587193 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494770, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 141587190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 10 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 16 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 100% +--- !u!222 &141587194 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294774, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 141587190} + m_CullTransparentMesh: 0 +--- !u!224 &141587195 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494774, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 141587190} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 328181931} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -5, y: 0} + m_SizeDelta: {x: 60, y: 0} + m_Pivot: {x: 1, y: 0.5} +--- !u!1 &153676942 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 153676943} + - component: {fileID: 153676945} + - component: {fileID: 153676944} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &153676943 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 153676942} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 770857990} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &153676944 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 153676942} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 2fb83ea89df639b43a22d707d3c22af1, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &153676945 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 153676942} + m_CullTransparentMesh: 0 +--- !u!1 &160598229 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 160598230} + - component: {fileID: 160598233} + - component: {fileID: 160598232} + - component: {fileID: 160598231} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &160598230 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160598229} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 814826292} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &160598231 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160598229} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &160598232 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160598229} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &160598233 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 160598229} + m_CullTransparentMesh: 0 +--- !u!1 &162519640 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 162519641} + - component: {fileID: 162519643} + - component: {fileID: 162519642} + m_Layer: 5 + m_Name: username Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &162519641 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 162519640} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 0.99999994} + m_Children: [] + m_Father: {fileID: 770857990} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 5, y: 0} + m_SizeDelta: {x: 250, y: 35} + m_Pivot: {x: 0, y: 1} +--- !u!114 &162519642 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 162519640} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 4345225956e176043b2f73b9ee1b0f2b, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Username +--- !u!222 &162519643 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 162519640} + m_CullTransparentMesh: 0 +--- !u!1 &192561276 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 192561277} + - component: {fileID: 192561278} + - component: {fileID: 192561279} + m_Layer: 0 + m_Name: Scripts + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &192561277 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 192561276} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &192561278 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 192561276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 02d148d0890b2d44dbdf7f1c1b39a499, type: 3} + m_Name: + m_EditorClassIdentifier: + ChannelsToJoinOnConnect: + - Region + - Guild + FriendsList: + - Joe + - Jane + - Bob + HistoryLengthToFetch: 0 + missingAppIdErrorPanel: {fileID: 1860384066} + ConnectingLabel: {fileID: 1323013538} + ChatPanel: {fileID: 1507568401} + UserIdFormPanel: {fileID: 814826291} + InputFieldChat: {fileID: 1989416850} + CurrentChannelText: {fileID: 1641022483} + ChannelToggleToInstantiate: {fileID: 342400385} + FriendListUiItemtoInstantiate: {fileID: 328181930} + ShowState: 1 + Title: {fileID: 938244445} + StateText: {fileID: 2126670842} + UserIdText: {fileID: 162519642} + TestLength: 2048 +--- !u!114 &192561279 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 192561276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 696a5174ff5e707479b3540eb56d14b7, type: 3} + m_Name: + m_EditorClassIdentifier: + chatNewComponent: {fileID: 192561278} + idInput: {fileID: 1320934697} +--- !u!1 &193452638 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 187090, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 193452639} + - component: {fileID: 193452641} + - component: {fileID: 193452640} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &193452639 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22487090, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 193452638} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1989416849} + 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 &193452640 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11487088, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 193452638} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.5019608} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 12 + m_FontStyle: 2 + m_BestFit: 1 + m_MinSize: 8 + m_MaxSize: 16 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter Chat Message... +--- !u!222 &193452641 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22287090, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 193452638} + m_CullTransparentMesh: 0 +--- !u!1 &217679864 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 217679865} + - component: {fileID: 217679867} + - component: {fileID: 217679866} + m_Layer: 5 + m_Name: Editor SplashScreen Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &217679865 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 217679864} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 517645106} + - {fileID: 241317248} + - {fileID: 915497946} + m_Father: {fileID: 770857990} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &217679866 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 217679864} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0b1cdd4de66f84fa1af4cb197e5d901d, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!225 &217679867 +CanvasGroup: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 217679864} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &239533971 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 239533972} + - component: {fileID: 239533976} + - component: {fileID: 239533975} + - component: {fileID: 239533974} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &239533972 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 239533971} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1880491503} + m_Father: {fileID: 814826292} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 125, y: -75} + m_SizeDelta: {x: 240, y: 40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &239533974 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 239533971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 239533975} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 192561279} + m_MethodName: StartChat + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &239533975 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 239533971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &239533976 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 239533971} + m_CullTransparentMesh: 0 +--- !u!1 &241317247 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 241317248} + - component: {fileID: 241317251} + - component: {fileID: 241317250} + - component: {fileID: 241317249} + - component: {fileID: 241317252} + m_Layer: 5 + m_Name: Chat App Id Feedback + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &241317248 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 241317247} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 217679865} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 100} + m_SizeDelta: {x: -20, y: 75} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &241317249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 241317247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &241317250 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 241317247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.69411767} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 1 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &241317251 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 241317247} + m_CullTransparentMesh: 0 +--- !u!114 &241317252 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 241317247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4eb1284704a754507acb17b07b888086, type: 3} + m_Name: + m_EditorClassIdentifier: + Description: {fileID: 241317250} + WizardOpenedOnce: 1 +--- !u!1 &247629931 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 160816, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 247629932} + - component: {fileID: 247629935} + - component: {fileID: 247629934} + - component: {fileID: 247629933} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &247629932 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22460816, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 247629931} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1320934696} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &247629933 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11460816, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 247629931} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &247629934 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11460818, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 247629931} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.39215687} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &247629935 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22260816, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 247629931} + m_CullTransparentMesh: 0 +--- !u!1 &276589553 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 148466, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 276589554} + - component: {fileID: 276589556} + - component: {fileID: 276589555} + m_Layer: 5 + m_Name: OnToggle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &276589554 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22448466, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 276589553} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 342400384} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &276589555 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11448464, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 276589553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &276589556 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22248466, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 276589553} + m_CullTransparentMesh: 0 +--- !u!1 &328181930 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194772, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 328181931} + - component: {fileID: 328181937} + - component: {fileID: 328181936} + - component: {fileID: 328181935} + - component: {fileID: 328181933} + - component: {fileID: 328181932} + m_Layer: 5 + m_Name: Friends List Item + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &328181931 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494772, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 328181930} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1520067144} + - {fileID: 1754144655} + - {fileID: 141587195} + m_Father: {fileID: 1366707550} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 5, y: -35} + m_SizeDelta: {x: 240, y: 30} + m_Pivot: {x: 0, y: 0} +--- !u!114 &328181932 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11447548, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 328181930} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 660b16ba396d0465b98be14947420288, type: 3} + m_Name: + m_EditorClassIdentifier: + NameLabel: {fileID: 1520067145} + StatusLabel: {fileID: 1754144658} + Health: {fileID: 141587193} +--- !u!114 &328181933 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11465746, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 328181930} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &328181935 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494768, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 328181930} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, a: 1} + m_DisabledColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 0 + m_TargetGraphic: {fileID: 328181936} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: JoinRandomRoom + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &328181936 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494766, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 328181930} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &328181937 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294772, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 328181930} + m_CullTransparentMesh: 0 +--- !u!1 &330710524 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 330710525} + - component: {fileID: 330710528} + - component: {fileID: 330710527} + - component: {fileID: 330710526} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &330710525 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 330710524} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 814826292} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 35} + m_SizeDelta: {x: 230, y: 40} + m_Pivot: {x: 0, y: 1} +--- !u!114 &330710526 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 330710524} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 0 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &330710527 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 330710524} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 22 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: User Id +--- !u!222 &330710528 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 330710524} + m_CullTransparentMesh: 0 +--- !u!1 &342400383 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 148462, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 342400384} + - component: {fileID: 342400388} + - component: {fileID: 342400387} + - component: {fileID: 342400386} + - component: {fileID: 342400385} + - component: {fileID: 342400389} + m_Layer: 5 + m_Name: Toggle Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &342400384 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22448462, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 342400383} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 276589554} + - {fileID: 384316751} + m_Father: {fileID: 1427448790} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 125, y: -20} + m_SizeDelta: {x: 240, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &342400385 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11448462, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 342400383} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 342400387} + toggleTransition: 1 + graphic: {fileID: 276589555} + m_Group: {fileID: 1427448795} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_IsOn: 0 +--- !u!114 &342400386 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11448460, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 342400383} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &342400387 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11448454, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 342400383} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &342400388 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22248462, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 342400383} + m_CullTransparentMesh: 0 +--- !u!114 &342400389 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 342400383} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 48caa72710147fc4f9389b0b5ec6137d, type: 3} + m_Name: + m_EditorClassIdentifier: + Channel: +--- !u!1 &384316750 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 148464, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 384316751} + - component: {fileID: 384316755} + - component: {fileID: 384316754} + - component: {fileID: 384316752} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &384316751 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22448464, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 384316750} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 342400384} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &384316752 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 384316750} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1e808171e8963498bb1db072a977d750, type: 3} + m_Name: + m_EditorClassIdentifier: + toggle: {fileID: 342400385} + NormalOnColor: {r: 0, g: 0, b: 0, a: 1} + NormalOffColor: {r: 1, g: 1, b: 1, a: 1} + HoverOnColor: {r: 0, g: 0, b: 0, a: 1} + HoverOffColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &384316754 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11448458, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 384316750} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Channel +--- !u!222 &384316755 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22248464, guid: 5d91df74039db4d67a68595d5b9bbf4f, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 384316750} + m_CullTransparentMesh: 0 +--- !u!1 &517645105 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 517645106} + - component: {fileID: 517645110} + - component: {fileID: 517645109} + - component: {fileID: 517645108} + - component: {fileID: 517645107} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &517645106 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517645105} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 217679865} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 190.68} + m_SizeDelta: {x: -20, y: 81.37} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &517645107 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517645105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &517645108 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517645105} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &517645109 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517645105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.69411767} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 4345225956e176043b2f73b9ee1b0f2b, type: 3} + m_FontSize: 87 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 100 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Chat Demo +--- !u!222 &517645110 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 517645105} + m_CullTransparentMesh: 0 +--- !u!1 &523050027 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 523050028} + - component: {fileID: 523050032} + - component: {fileID: 523050031} + - component: {fileID: 523050029} + - component: {fileID: 523050030} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &523050028 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 523050027} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 970871620} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &523050029 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 523050027} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &523050030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 523050027} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 060fe8295761a47268586d33ef5673e0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &523050031 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 523050027} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: '?' +--- !u!222 &523050032 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 523050027} + m_CullTransparentMesh: 0 +--- !u!1 &578492557 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 578492558} + - component: {fileID: 578492561} + - component: {fileID: 578492560} + - component: {fileID: 578492559} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &578492558 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 578492557} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1989416849} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &578492559 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 578492557} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &578492560 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 578492557} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &578492561 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 578492557} + m_CullTransparentMesh: 0 +--- !u!1 &589294878 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 187088, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 589294879} + - component: {fileID: 589294881} + - component: {fileID: 589294880} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &589294879 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22487088, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 589294878} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1320934696} + 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: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &589294880 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11487086, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 589294878} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 22 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &589294881 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22287088, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 589294878} + m_CullTransparentMesh: 0 +--- !u!1 &726519995 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 726519996} + - component: {fileID: 726519997} + m_Layer: 5 + m_Name: Button Layout + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &726519996 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 726519995} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 48879806} + m_Father: {fileID: 1014753128} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 100, y: -180} + m_SizeDelta: {x: 190, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &726519997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 726519995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &742235968 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 742235969} + - component: {fileID: 742235972} + - component: {fileID: 742235971} + - component: {fileID: 742235970} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &742235969 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 742235968} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 814826292} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: -220} + m_SizeDelta: {x: 250, y: 200} + m_Pivot: {x: 0, y: 0} +--- !u!114 &742235970 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 742235968} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &742235971 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 742235968} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Unique UserIds guarantee correct behaviour for AddFriends(). Pick Joe,Jane + or Bob usersId as they are predefined +--- !u!222 &742235972 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 742235968} + m_CullTransparentMesh: 0 +--- !u!1 &749398466 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 749398467} + - component: {fileID: 749398471} + - component: {fileID: 749398470} + - component: {fileID: 749398468} + - component: {fileID: 749398469} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &749398467 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 749398466} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1508114938} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &749398468 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 749398466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &749398469 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 749398466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 060fe8295761a47268586d33ef5673e0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &749398470 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 749398466} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Send +--- !u!222 &749398471 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 749398466} + m_CullTransparentMesh: 0 +--- !u!1 &750611066 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 187090, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 750611067} + - component: {fileID: 750611069} + - component: {fileID: 750611068} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &750611067 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22487090, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 750611066} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1320934696} + 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 &750611068 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11487088, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 750611066} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.5019608} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 12 + m_FontStyle: 2 + m_BestFit: 1 + m_MinSize: 8 + m_MaxSize: 16 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter User Id +--- !u!222 &750611069 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22287090, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 750611066} + m_CullTransparentMesh: 0 +--- !u!1 &752115433 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 752115434} + - component: {fileID: 752115437} + - component: {fileID: 752115436} + - component: {fileID: 752115435} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &752115434 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 752115433} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1366707550} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &752115435 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 752115433} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &752115436 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 752115433} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &752115437 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 752115433} + m_CullTransparentMesh: 0 +--- !u!1 &770857986 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 770857990} + - component: {fileID: 770857989} + - component: {fileID: 770857987} + - component: {fileID: 770857991} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &770857987 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770857986} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!223 &770857989 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770857986} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + 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 &770857990 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770857986} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 153676943} + - {fileID: 1163197799} + - {fileID: 938244446} + - {fileID: 2126670841} + - {fileID: 162519641} + - {fileID: 1323013539} + - {fileID: 814826292} + - {fileID: 1507568401} + - {fileID: 217679865} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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!114 &770857991 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 770857986} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0.5 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 94 + m_DefaultSpriteDPI: 94 + m_DynamicPixelsPerUnit: 1 +--- !u!1 &814826291 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 814826292} + - component: {fileID: 814826295} + - component: {fileID: 814826294} + - component: {fileID: 814826293} + m_Layer: 5 + m_Name: User Id Form Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &814826292 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814826291} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 160598230} + - {fileID: 330710525} + - {fileID: 1320934696} + - {fileID: 239533972} + - {fileID: 742235969} + m_Father: {fileID: 770857990} + m_RootOrder: 6 + 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.000030517578, y: 0} + m_SizeDelta: {x: 250, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &814826293 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814826291} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 0 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &814826294 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814826291} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5114619, g: 0.5584751, b: 0.63235295, a: 0.019607844} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &814826295 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814826291} + m_CullTransparentMesh: 0 +--- !u!1 &814846235 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 814846236} + - component: {fileID: 814846239} + - component: {fileID: 814846238} + - component: {fileID: 814846237} + m_Layer: 5 + m_Name: ChatOutput Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &814846236 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814846235} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1555592747} + - {fileID: 1937233793} + - {fileID: 2017670316} + m_Father: {fileID: 1507568401} + 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: 127.5, y: 5} + m_SizeDelta: {x: -255, y: -90} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &814846237 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814846235} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: 1 + m_LayoutPriority: 1 +--- !u!114 &814846238 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814846235} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5114619, g: 0.5584751, b: 0.63235295, a: 0.019607844} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &814846239 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 814846235} + m_CullTransparentMesh: 0 +--- !u!1 &863442299 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 863442300} + - component: {fileID: 863442305} + - component: {fileID: 863442304} + - component: {fileID: 863442303} + - component: {fileID: 863442302} + - component: {fileID: 863442301} + m_Layer: 5 + m_Name: Error Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &863442300 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 863442299} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1014753128} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 30} + m_SizeDelta: {x: 190, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &863442301 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 863442299} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &863442302 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 863442299} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &863442303 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 863442299} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &863442304 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 863442299} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Missing App ID +--- !u!222 &863442305 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 863442299} + m_CullTransparentMesh: 0 +--- !u!1 &915497945 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 915497946} + - component: {fileID: 915497949} + - component: {fileID: 915497948} + - component: {fileID: 915497947} + m_Layer: 5 + m_Name: Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &915497946 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 915497945} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 217679865} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: -90.435} + m_SizeDelta: {x: -20, y: 281.87} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &915497947 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 915497945} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &915497948 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 915497945} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.69411767} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 4345225956e176043b2f73b9ee1b0f2b, type: 3} + m_FontSize: 30 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 3 + m_MaxSize: 30 + m_Alignment: 1 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "This is a simple Photon Chat room demo\nThe Canvas contains multiple Panels + for different context.\nThey are disabled intentionally, so scripts can activate + them.\r\nThe script IgnoreUiRaycastWhenInactive keeps inactive panels from blocking + input.\r\n\r\nAll users should use a UserId (to be found as friend).\r\nThis message + will go away at runtime." +--- !u!222 &915497949 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 915497945} + m_CullTransparentMesh: 0 +--- !u!1 &938244445 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 938244446} + - component: {fileID: 938244448} + - component: {fileID: 938244447} + m_Layer: 5 + m_Name: Demo Name + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &938244446 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 938244445} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 770857990} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 250, y: 35} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &938244447 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 938244445} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Demo Chat +--- !u!222 &938244448 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 938244445} + m_CullTransparentMesh: 0 +--- !u!1 &970871619 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 970871620} + - component: {fileID: 970871624} + - component: {fileID: 970871623} + - component: {fileID: 970871622} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &970871620 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 970871619} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 523050028} + m_Father: {fileID: 1569829900} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 5, y: -5} + m_SizeDelta: {x: 30, y: 35} + m_Pivot: {x: 0, y: 1} +--- !u!114 &970871622 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 970871619} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 970871623} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 192561278} + m_MethodName: PostHelpToCurrentChannel + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &970871623 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 970871619} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &970871624 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 970871619} + m_CullTransparentMesh: 0 +--- !u!1 &1014753127 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1014753128} + - component: {fileID: 1014753131} + - component: {fileID: 1014753130} + - component: {fileID: 1014753129} + m_Layer: 5 + m_Name: Error Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1014753128 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1014753127} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1739446624} + - {fileID: 863442300} + - {fileID: 1734659754} + - {fileID: 1322130499} + - {fileID: 726519996} + m_Father: {fileID: 1860384067} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 200, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1014753129 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1014753127} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &1014753130 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1014753127} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.21323532, g: 0, b: 0, a: 0.8039216} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1014753131 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1014753127} + m_CullTransparentMesh: 0 +--- !u!1 &1079401850 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1079401851} + - component: {fileID: 1079401852} + - component: {fileID: 1079401855} + - component: {fileID: 1079401853} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1079401851 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1079401850} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &1079401852 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1079401850} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.11764706, g: 0.11764706, b: 0.13725491, a: 1} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 100 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!81 &1079401853 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1079401850} + m_Enabled: 1 +--- !u!124 &1079401855 +Behaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1079401850} + m_Enabled: 1 +--- !u!1 &1114666229 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1114666230} + - component: {fileID: 1114666233} + - component: {fileID: 1114666232} + - component: {fileID: 1114666231} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1114666230 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1114666229} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1366707550} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 30} + m_SizeDelta: {x: 230, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1114666231 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1114666229} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 0 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1114666232 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1114666229} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 22 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: Friends +--- !u!222 &1114666233 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1114666229} + m_CullTransparentMesh: 0 +--- !u!1 &1127833551 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1127833552} + - component: {fileID: 1127833556} + - component: {fileID: 1127833555} + - component: {fileID: 1127833553} + - component: {fileID: 1127833554} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1127833552 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1127833551} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 48879806} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1127833553 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1127833551} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1127833554 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1127833551} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 060fe8295761a47268586d33ef5673e0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1127833555 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1127833551} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Dashboard (Online) +--- !u!222 &1127833556 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1127833551} + m_CullTransparentMesh: 0 +--- !u!1 &1140689145 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1140689146} + - component: {fileID: 1140689149} + - component: {fileID: 1140689148} + - component: {fileID: 1140689147} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1140689146 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1140689145} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1427448790} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1140689147 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1140689145} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1140689148 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1140689145} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1140689149 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1140689145} + m_CullTransparentMesh: 0 +--- !u!1 &1163197798 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1163197799} + - component: {fileID: 1163197802} + - component: {fileID: 1163197801} + - component: {fileID: 1163197800} + m_Layer: 5 + m_Name: Watermark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1163197799 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1163197798} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 770857990} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 128, y: 128} + m_Pivot: {x: 1, y: 0} +--- !u!114 &1163197800 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1163197798} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1163197801} + m_OnClick: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &1163197801 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1163197798} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.2784314} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 37b0a18b391c6ae468b5bcc74bba2c1a, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1163197802 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1163197798} + m_CullTransparentMesh: 0 +--- !u!1 &1223575070 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1223575071} + - component: {fileID: 1223575073} + - component: {fileID: 1223575072} + m_Layer: 5 + m_Name: Modal Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1223575071 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1223575070} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1860384067} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1223575072 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1223575070} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.67058825} + m_RaycastTarget: 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 +--- !u!222 &1223575073 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1223575070} + m_CullTransparentMesh: 0 +--- !u!1 &1320934695 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 187092, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1320934696} + - component: {fileID: 1320934699} + - component: {fileID: 1320934698} + - component: {fileID: 1320934697} + m_Layer: 5 + m_Name: InputField Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1320934696 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22487092, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1320934695} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 247629932} + - {fileID: 750611067} + - {fileID: 589294879} + m_Father: {fileID: 814826292} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 125, y: -5} + m_SizeDelta: {x: 240, y: 40} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1320934697 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11487092, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1320934695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1320934698} + m_TextComponent: {fileID: 589294880} + m_Placeholder: {fileID: 750611068} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 192561279} + m_MethodName: EndEditOnEnter + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: set_PlayerName + 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.8784314, g: 0.48235294, b: 0, a: 1} + m_Text: + m_CaretBlinkRate: 1.7 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &1320934698 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11487090, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1320934695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 0.24313726} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1320934699 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22287092, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1320934695} + m_CullTransparentMesh: 0 +--- !u!1 &1322130497 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1322130499} + - component: {fileID: 1322130498} + m_Layer: 5 + m_Name: LayoutElement + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1322130498 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322130497} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 1000 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!224 &1322130499 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322130497} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1014753128} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 100, y: -135} + m_SizeDelta: {x: 190, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1323013538 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1323013539} + - component: {fileID: 1323013543} + - component: {fileID: 1323013542} + - component: {fileID: 1323013541} + - component: {fileID: 1323013540} + m_Layer: 5 + m_Name: Connecting label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1323013539 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1323013538} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 770857990} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1323013540 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1323013538} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1323013541 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1323013538} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1323013542 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1323013538} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.69411767} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 4345225956e176043b2f73b9ee1b0f2b, type: 3} + m_FontSize: 40 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Connecting... +--- !u!222 &1323013543 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1323013538} + m_CullTransparentMesh: 0 +--- !u!1 &1366707549 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1366707550} + - component: {fileID: 1366707555} + - component: {fileID: 1366707554} + - component: {fileID: 1366707553} + - component: {fileID: 1366707552} + - component: {fileID: 1366707551} + m_Layer: 5 + m_Name: Friends Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1366707550 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366707549} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 752115434} + - {fileID: 1114666230} + - {fileID: 328181931} + m_Father: {fileID: 1507568401} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 0, y: 20} + m_SizeDelta: {x: 250, y: -60} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1366707551 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366707549} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &1366707552 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366707549} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1184210157, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AllowSwitchOff: 0 +--- !u!114 &1366707553 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366707549} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1366707554 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366707549} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5114619, g: 0.5584751, b: 0.63235295, a: 0.019607844} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1366707555 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1366707549} + m_CullTransparentMesh: 0 +--- !u!1 &1427448789 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1427448790} + - component: {fileID: 1427448793} + - component: {fileID: 1427448792} + - component: {fileID: 1427448791} + - component: {fileID: 1427448795} + - component: {fileID: 1427448794} + m_Layer: 5 + m_Name: ChannelBar Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1427448790 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1427448789} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1140689146} + - {fileID: 2129492527} + - {fileID: 342400384} + m_Father: {fileID: 1507568401} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: -5} + m_SizeDelta: {x: 250, y: -70} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1427448791 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1427448789} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1427448792 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1427448789} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5114619, g: 0.5584751, b: 0.63235295, a: 0.019607844} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1427448793 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1427448789} + m_CullTransparentMesh: 0 +--- !u!114 &1427448794 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1427448789} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 0 + m_Spacing: 5 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &1427448795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1427448789} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1184210157, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_AllowSwitchOff: 0 +--- !u!1 &1507568400 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1507568401} + - component: {fileID: 1507568405} + m_Layer: 5 + m_Name: Chat Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1507568401 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1507568400} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1427448790} + - {fileID: 1366707550} + - {fileID: 814846236} + - {fileID: 1569829900} + m_Father: {fileID: 770857990} + m_RootOrder: 7 + 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: -15.000061} + m_SizeDelta: {x: -10, y: -40} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1507568405 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1507568400} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4ba4c747f6975ea46bcc0a55ffe3bfe8, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1508114937 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1508114938} + - component: {fileID: 1508114942} + - component: {fileID: 1508114941} + - component: {fileID: 1508114940} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1508114938 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1508114937} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 749398467} + m_Father: {fileID: 1569829900} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -5, y: 0} + m_SizeDelta: {x: 100, y: -10} + m_Pivot: {x: 1, y: 0.5} +--- !u!114 &1508114940 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1508114937} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1508114941} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 192561278} + m_MethodName: OnClickSend + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1508114941 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1508114937} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1508114942 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1508114937} + m_CullTransparentMesh: 0 +--- !u!1 &1520067143 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 111722, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1520067144} + - component: {fileID: 1520067148} + - component: {fileID: 1520067145} + - component: {fileID: 1520067146} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1520067144 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22411722, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1520067143} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 328181931} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1520067145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11411724, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1520067143} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Joe +--- !u!114 &1520067146 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11411726, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1520067143} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!222 &1520067148 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22211722, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1520067143} + m_CullTransparentMesh: 0 +--- !u!1 &1555592746 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1555592747} + - component: {fileID: 1555592750} + - component: {fileID: 1555592749} + - component: {fileID: 1555592748} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1555592747 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1555592746} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 814846236} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1555592748 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1555592746} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1555592749 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1555592746} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1555592750 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1555592746} + m_CullTransparentMesh: 0 +--- !u!1 &1569829899 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1569829900} + - component: {fileID: 1569829903} + - component: {fileID: 1569829902} + m_Layer: 5 + m_Name: InputBar Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1569829900 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1569829899} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1670585027} + - {fileID: 970871620} + - {fileID: 1989416849} + - {fileID: 1508114938} + m_Father: {fileID: 1507568401} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 127.5, y: 0} + m_SizeDelta: {x: -255, y: 45} + m_Pivot: {x: 0.5, y: 0} +--- !u!114 &1569829902 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1569829899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.5114619, g: 0.5584751, b: 0.63235295, a: 0.019607844} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1569829903 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1569829899} + m_CullTransparentMesh: 0 +--- !u!1 &1641022481 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1641022482} + - component: {fileID: 1641022484} + - component: {fileID: 1641022483} + - component: {fileID: 1641022485} + m_Layer: 5 + m_Name: Selected Channel Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1641022482 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1641022481} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2017670316} + 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: 568, y: 17.198803} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1641022483 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1641022481} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 18 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 6 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Not in chat yet +--- !u!222 &1641022484 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1641022481} + m_CullTransparentMesh: 0 +--- !u!114 &1641022485 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1641022481} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 2 +--- !u!1 &1670585026 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1670585027} + - component: {fileID: 1670585030} + - component: {fileID: 1670585029} + - component: {fileID: 1670585028} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1670585027 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1670585026} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1569829900} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1670585028 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1670585026} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1670585029 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1670585026} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1670585030 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1670585026} + m_CullTransparentMesh: 0 +--- !u!1 &1734659753 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1734659754} + - component: {fileID: 1734659757} + - component: {fileID: 1734659756} + - component: {fileID: 1734659755} + m_Layer: 5 + m_Name: 'Message ' + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1734659754 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734659753} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1014753128} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 100, y: -55} + m_SizeDelta: {x: 190, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1734659755 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734659753} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 100 + m_PreferredWidth: -1 + m_PreferredHeight: 100 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1734659756 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734659753} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'To continue, this demo needs a Chat AppId set up. + + + You can create one in the Photon Dashboard to copy and paste it into the demo.' +--- !u!222 &1734659757 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1734659753} + m_CullTransparentMesh: 0 +--- !u!1 &1739446623 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1739446624} + - component: {fileID: 1739446627} + - component: {fileID: 1739446626} + - component: {fileID: 1739446625} + m_Layer: 5 + m_Name: Outline + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1739446624 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1739446623} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1014753128} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1739446625 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1739446623} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1739446626 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1739446623} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: ea7134547a5488b41a6bb5243b4ec2f1, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1739446627 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1739446623} + m_CullTransparentMesh: 0 +--- !u!1 &1754144654 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 146428, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1754144655} + - component: {fileID: 1754144659} + - component: {fileID: 1754144658} + - component: {fileID: 1754144656} + m_Layer: 5 + m_Name: Status + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1754144655 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22446428, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1754144654} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 328181931} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 5, y: 0} + m_SizeDelta: {x: 60, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!114 &1754144656 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11446428, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1754144654} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1754144658 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11446426, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1754144654} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 10 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 16 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Offline +--- !u!222 &1754144659 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22246428, guid: d6318142e396e499796d37501c1a7531, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1754144654} + m_CullTransparentMesh: 0 +--- !u!1 &1809679009 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1809679013} + - component: {fileID: 1809679010} + m_Layer: 0 + m_Name: EventSystem Spawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1809679010 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1809679009} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: bd5ff9965d0784cad8e07f5eb9cb9c06, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1809679013 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1809679009} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1860384066 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1860384067} + - component: {fileID: 1860384070} + - component: {fileID: 1860384069} + - component: {fileID: 1860384068} + m_Layer: 5 + m_Name: Missing App Id Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1860384067 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1860384066} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1223575071} + - {fileID: 1014753128} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1860384068 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1860384066} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 3 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1860384069 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1860384066} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1860384070 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1860384066} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 25 + m_SortingLayerID: 0 + m_SortingOrder: 1000 + m_TargetDisplay: 0 +--- !u!1 &1880491502 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1880491503} + - component: {fileID: 1880491507} + - component: {fileID: 1880491506} + - component: {fileID: 1880491504} + - component: {fileID: 1880491505} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1880491503 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1880491502} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 239533972} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1880491504 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1880491502} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1880491505 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1880491502} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 060fe8295761a47268586d33ef5673e0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1880491506 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1880491502} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Connect +--- !u!222 &1880491507 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1880491502} + m_CullTransparentMesh: 0 +--- !u!1 &1937233792 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1937233793} + - component: {fileID: 1937233796} + - component: {fileID: 1937233795} + - component: {fileID: 1937233794} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1937233793 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1937233792} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 814846236} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 30} + m_SizeDelta: {x: 230, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1937233794 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1937233792} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 0 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1937233795 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1937233792} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 22 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: Chat +--- !u!222 &1937233796 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1937233792} + m_CullTransparentMesh: 0 +--- !u!1 &1954920730 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 187088, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1954920731} + - component: {fileID: 1954920733} + - component: {fileID: 1954920732} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1954920731 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22487088, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1954920730} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1989416849} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1954920732 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11487086, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1954920730} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 22 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1954920733 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22287088, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1954920730} + m_CullTransparentMesh: 0 +--- !u!1 &1989416848 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 187092, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1989416849} + - component: {fileID: 1989416852} + - component: {fileID: 1989416851} + - component: {fileID: 1989416850} + m_Layer: 5 + m_Name: InputField Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1989416849 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22487092, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1989416848} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 578492558} + - {fileID: 193452639} + - {fileID: 64425122} + - {fileID: 1954920731} + m_Father: {fileID: 1569829900} + 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: -35, y: 0} + m_SizeDelta: {x: -150, y: -10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1989416850 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11487092, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1989416848} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1989416851} + m_TextComponent: {fileID: 1954920732} + m_Placeholder: {fileID: 193452640} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 192561278} + m_MethodName: OnEnterSend + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: set_PlayerName + 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.8784314, g: 0.48235294, b: 0, a: 1} + m_Text: + m_CaretBlinkRate: 1.7 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &1989416851 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 11487090, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1989416848} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 0.24313726} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 +--- !u!222 &1989416852 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 22287092, guid: 3028bc57b884945d5aef896428ae1521, + type: 2} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1989416848} + m_CullTransparentMesh: 0 +--- !u!1 &2017670315 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2017670316} + - component: {fileID: 2017670319} + - component: {fileID: 2017670318} + - component: {fileID: 2017670317} + - component: {fileID: 2017670320} + m_Layer: 5 + m_Name: Scroll Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2017670316 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017670315} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1641022482} + m_Father: {fileID: 814846236} + 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: 0} + m_SizeDelta: {x: -10, y: -10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2017670317 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017670315} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 1641022482} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 1 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 0} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 0} + m_HorizontalScrollbarVisibility: 0 + m_VerticalScrollbarVisibility: 0 + m_HorizontalScrollbarSpacing: 0 + m_VerticalScrollbarSpacing: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!114 &2017670318 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017670315} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_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 +--- !u!222 &2017670319 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017670315} + m_CullTransparentMesh: 0 +--- !u!114 &2017670320 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2017670315} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &2126670840 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2126670841} + - component: {fileID: 2126670843} + - component: {fileID: 2126670842} + m_Layer: 5 + m_Name: Status Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &2126670841 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2126670840} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 770857990} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -5, y: 0} + m_SizeDelta: {x: 250, y: 35} + m_Pivot: {x: 1, y: 1} +--- !u!114 &2126670842 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2126670840} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 4345225956e176043b2f73b9ee1b0f2b, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Status Text +--- !u!222 &2126670843 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2126670840} + m_CullTransparentMesh: 0 +--- !u!1 &2129492526 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2129492527} + - component: {fileID: 2129492530} + - component: {fileID: 2129492529} + - component: {fileID: 2129492528} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2129492527 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129492526} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1427448790} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 30} + m_SizeDelta: {x: 230, y: 30} + m_Pivot: {x: 0, y: 1} +--- !u!114 &2129492528 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129492526} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 0 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &2129492529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129492526} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 5abfb0a229c98b3499cffa6c59c2ffb4, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 22 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: 'Channels + +' +--- !u!222 &2129492530 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2129492526} + m_CullTransparentMesh: 0 diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/DemoChat-Scene.unity.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/DemoChat-Scene.unity.meta new file mode 100644 index 00000000..071ca86f --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/DemoChat-Scene.unity.meta @@ -0,0 +1,6 @@ +fileFormatVersion: 2 +guid: ec07267f6a28fb044ac89845274e79af +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Editor.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Editor.meta new file mode 100644 index 00000000..2a662134 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c33037d6755b1134db073d59feb6f7d9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Editor/ChatEditor.cs b/Assets/Photon/PhotonChat/Demos/DemoChat/Editor/ChatEditor.cs new file mode 100644 index 00000000..b69eb34e --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Editor/ChatEditor.cs @@ -0,0 +1,279 @@ +#if !PHOTON_UNITY_NETWORKING +using System; +using Photon.Chat; +using Photon.Chat.Demo; +using Photon.Realtime; +using UnityEditor; +using UnityEngine; + +[InitializeOnLoad] +public class ChatEditor : EditorWindow +{ + static ChatEditor() + { + EditorApplication.update += OnEditorUpdate; + } + + private static void OnEditorUpdate() + { + EditorApplication.update -= OnEditorUpdate; + + //ChatSettings settings = ChatSettings.Load(); + //if (settings != null && !settings.WizardDone && string.IsNullOrEmpty(settings.AppId)) + //{ + // OpenWizard(); + //} + } + + + [MenuItem("Window/Photon Chat/Setup")] + public static void OpenWizard() + { + //currentSettings = ChatSettings.Load(); + //currentSettings.WizardDone = true; + //EditorUtility.SetDirty(currentSettings); + + ChatEditor editor = (ChatEditor)EditorWindow.GetWindow(typeof (ChatEditor), false, "Photon Chat"); + editor.minSize = editor.preferredSize; + } + + + private ChatGui cGui; + internal string mailOrAppId; + internal bool showDashboardLink = false; + internal bool showRegistrationDone = false; + internal bool showRegistrationError = false; + private readonly Vector2 preferredSize = new Vector2(350, 400); + + internal static string UrlCloudDashboard = "https://dashboard.photonengine.com/en-US/"; + + public string WelcomeText = "Thanks for importing Photon Chat.\nThis window should set you up.\n\nYou will need a free Photon Account to setup a Photon Chat application.\nOpen the Photon Dashboard (webpage) to access your account (see button below).\n\nCopy and paste a Chat AppId into the field and click \"Setup\"."; + //public string AlreadyRegisteredInfo = "The email is registered so we can't fetch your AppId (without password).\n\nPlease login online to get your AppId and paste it above."; + //public string RegisteredNewAccountInfo = "We created a (free) account and fetched you an AppId.\nWelcome. Your Photon Chat project is setup."; + //public string FailedToRegisterAccount = "This wizard failed to register an account right now. Please check your mail address or try via the Dashboard."; + //public string AppliedToSettingsInfo = "Your AppId is now applied to this project."; + public string SetupCompleteInfo = "Done!\nYour Chat AppId is now stored in the Scripts object, Chat App Settings."; + public string CloseWindowButton = "Close"; + public string OpenCloudDashboardText = "Photon Dashboard Login"; + public string OpenCloudDashboardTooltip = "Review Cloud App information and statistics."; + + + public void OnGUI() + { + if (this.cGui == null) + { + cGui = FindObjectOfType(); + } + + GUI.skin.label.wordWrap = true; + GUI.skin.label.richText = true; + if (string.IsNullOrEmpty(mailOrAppId)) + { + mailOrAppId = string.Empty; + } + + GUILayout.Label("Chat Settings", EditorStyles.boldLabel); + GUILayout.Label(this.WelcomeText); + GUILayout.Space(15); + + + GUILayout.Label("Chat AppId"); + string input = EditorGUILayout.TextField(this.mailOrAppId); + + + if (GUI.changed) + { + this.mailOrAppId = input.Trim(); + } + + //bool isMail = false; + bool minimumInput = false; + bool isAppId = false; + + if (IsValidEmail(this.mailOrAppId)) + { + // this should be a mail address + minimumInput = true; + //isMail = true; + } + else if (IsAppId(this.mailOrAppId)) + { + // this should be an appId + minimumInput = true; + isAppId = true; + } + + + EditorGUI.BeginDisabledGroup(!minimumInput); + + + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + bool setupBtn = GUILayout.Button("Setup", GUILayout.Width(205)); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + + + if (setupBtn) + { + this.showDashboardLink = false; + this.showRegistrationDone = false; + this.showRegistrationError = false; + + //if (isMail) + //{ + // EditorUtility.DisplayProgressBar("Fetching Account", "Trying to register a Photon Cloud Account.", 0.5f); + // AccountService service = new AccountService(); + // //service.RegisterByEmail(this.mailOrAppId, AccountService.Origin.Pun); + // //EditorUtility.ClearProgressBar(); + + // //if (service.ReturnCode == 0) + // //{ + // // currentSettings.AppId = service.AppId; + // // EditorUtility.SetDirty(currentSettings); + // // this.showRegistrationDone = true; + + // // Selection.objects = new UnityEngine.Object[] { currentSettings }; + // //} + // //else + // //{ + // // if (service.Message.Contains("registered")) + // // { + // // this.showDashboardLink = true; + // // } + // // else + // // { + // // this.showRegistrationError = true; + // // } + // //} + //} + //else + if (isAppId) + { + //currentSettings.AppId = this.mailOrAppId; + //EditorUtility.SetDirty(currentSettings); + if (this.cGui != null) + { + this.cGui.ChatAppSettings.AppIdChat = this.mailOrAppId; + EditorUtility.SetDirty(this.cGui); + } + + showRegistrationDone = true; + } + + //EditorGUIUtility.PingObject(currentSettings); + } + EditorGUI.EndDisabledGroup(); + + + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button(new GUIContent(OpenCloudDashboardText, OpenCloudDashboardTooltip), GUILayout.Width(205))) + { + EditorUtility.OpenWithDefaultApp(UrlCloudDashboard); + } + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + + //if (this.showDashboardLink) + //{ + // // button to open dashboard and get the AppId + // GUILayout.Space(15); + // GUILayout.Label(AlreadyRegisteredInfo); + + + // GUILayout.BeginHorizontal(); + // GUILayout.FlexibleSpace(); + // if (GUILayout.Button(new GUIContent(OpenCloudDashboardText, OpenCloudDashboardTooltip), GUILayout.Width(205))) + // { + // EditorUtility.OpenWithDefaultApp(UrlCloudDashboard + Uri.EscapeUriString(this.mailOrAppId)); + // this.mailOrAppId = string.Empty; + // this.showDashboardLink = false; + // } + // GUILayout.FlexibleSpace(); + // GUILayout.EndHorizontal(); + //} + //if (this.showRegistrationError) + //{ + // GUILayout.Space(15); + // GUILayout.Label(FailedToRegisterAccount); + + // GUILayout.BeginHorizontal(); + // GUILayout.FlexibleSpace(); + // if (GUILayout.Button(new GUIContent(OpenCloudDashboardText, OpenCloudDashboardTooltip), GUILayout.Width(205))) + // { + // EditorUtility.OpenWithDefaultApp(UrlCloudDashboard + Uri.EscapeUriString(this.mailOrAppId)); + // this.mailOrAppId = string.Empty; + // this.showDashboardLink = false; + // } + // GUILayout.FlexibleSpace(); + // GUILayout.EndHorizontal(); + + //} + if (this.showRegistrationDone) + { + GUILayout.Space(15); + //GUILayout.Label("Registration done"); + ////if (isMail) + ////{ + //// GUILayout.Label(RegisteredNewAccountInfo); + ////} + ////else + ////{ + // GUILayout.Label(AppliedToSettingsInfo); + ////} + + // setup-complete info + GUILayout.Space(15); + GUILayout.Label(SetupCompleteInfo); + + + // close window (done) + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button(CloseWindowButton, GUILayout.Width(205))) + { + this.Close(); + } + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + } + + public static bool IsAppId(string val) + { + if (string.IsNullOrEmpty(val) || val.Length < 16) + { + return false; + } + + try + { + new Guid(val); + } + catch + { + return false; + } + return true; + } + + // https://stackoverflow.com/a/1374644/1449056 + private static bool IsValidEmail(string email) + { + if (string.IsNullOrEmpty(email) || !email.Contains("@")) + { + return false; + } + try + { + System.Net.Mail.MailAddress addr = new System.Net.Mail.MailAddress(email); + return email.Equals(addr.Address); + } + catch + { + return false; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Editor/ChatEditor.cs.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Editor/ChatEditor.cs.meta new file mode 100644 index 00000000..b66c34ef --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Editor/ChatEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0ef7cc863c103cf44930b0411a10ad1f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Files.meta new file mode 100644 index 00000000..89c539d8 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Files.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c73bd05f7e3a006418e6398b47511e49 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Gradient.png b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Gradient.png new file mode 100644 index 00000000..67e1ce23 Binary files /dev/null and b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Gradient.png differ diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Gradient.png.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Gradient.png.meta new file mode 100644 index 00000000..f40fcd23 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Gradient.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 2fb83ea89df639b43a22d707d3c22af1 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -2 + maxTextureSize: 256 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 16 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 9f2a0d94850205c449718d6a65b6da2c + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Jura-Medium.ttf b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Jura-Medium.ttf new file mode 100644 index 00000000..acaa33e0 Binary files /dev/null and b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Jura-Medium.ttf differ diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Jura-Medium.ttf.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Jura-Medium.ttf.meta new file mode 100644 index 00000000..d22efdb4 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/Jura-Medium.ttf.meta @@ -0,0 +1,24 @@ +fileFormatVersion: 2 +guid: 5abfb0a229c98b3499cffa6c59c2ffb4 +TrueTypeFontImporter: + externalObjects: {} + serializedVersion: 4 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 0 + characterPadding: 1 + includeFontData: 1 + fontName: Jura + fontNames: + - Jura + fallbackFontReferences: + - {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + - {fileID: 12800000, guid: 4a4df204c321f9c40b0dbfb1baaffb4c, type: 3} + customCharacters: + fontRenderingMode: 0 + ascentCalculationMode: 1 + useLegacyBoundsCalculation: 0 + shouldRoundAdvanceValue: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/OutlinedSquaredBox.png b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/OutlinedSquaredBox.png new file mode 100644 index 00000000..dcfa148f Binary files /dev/null and b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/OutlinedSquaredBox.png differ diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/OutlinedSquaredBox.png.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/OutlinedSquaredBox.png.meta new file mode 100644 index 00000000..3b2c35ac --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/OutlinedSquaredBox.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: ea7134547a5488b41a6bb5243b4ec2f1 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 16 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 1, y: 1, z: 1, w: 1} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 0ca28098c6f2a0a4ba4f7e88ae619ca9 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/PunIcon-White-129.png b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/PunIcon-White-129.png new file mode 100644 index 00000000..885c22f7 Binary files /dev/null and b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/PunIcon-White-129.png differ diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/PunIcon-White-129.png.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/PunIcon-White-129.png.meta new file mode 100644 index 00000000..19e7ee7e --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/PunIcon-White-129.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 37b0a18b391c6ae468b5bcc74bba2c1a +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -2 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 10108fb3311b5d345a644c65ddc43a0d + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof35.ttf b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof35.ttf new file mode 100644 index 00000000..ad174c33 Binary files /dev/null and b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof35.ttf differ diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof35.ttf.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof35.ttf.meta new file mode 100644 index 00000000..c63831be --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof35.ttf.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: 4345225956e176043b2f73b9ee1b0f2b +TrueTypeFontImporter: + externalObjects: {} + serializedVersion: 4 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 0 + characterPadding: 1 + includeFontData: 1 + fontName: eurofurence light + fontNames: + - eurofurence light + fallbackFontReferences: + - {fileID: 12800000, guid: 954746d370bc8934299c8c8267543f4f, type: 3} + customCharacters: + fontRenderingMode: 0 + ascentCalculationMode: 1 + useLegacyBoundsCalculation: 0 + shouldRoundAdvanceValue: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof_tt.txt b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof_tt.txt new file mode 100644 index 00000000..b62725a2 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof_tt.txt @@ -0,0 +1,21 @@ +------------------------------------------------------------------------ +The eurofurence typeface family by tobias b koehler (unci@tigerden.com) +------------------------------------------------------------------------ + +This is a family of geometric rounded sans serif fonts consisting of +three weights (light, medium, bold) in upright and italic styles, +originally designed for EuroFurence, the first European furry convention +1995 in Kaiser-Wilhelm-Koog. + +The character set includes Roman, Greek and Cyrillic characters. +File format is TrueType for PC (under Windows, Linux etc). + +These fonts are freeware and can be distributed as long as they are +together with this text file. I would appreciate it though if you could +contact me at unci@tigerden.com if you put them on a server. Free +samples from commercial users are always very welcome. :) + +For more information, please see the uncifonts WWW page at: +http://mercurio.iet.unipi.it/users/tobias/uncifonts.html + +Have fun! tobias b koehler, 2000-04-02 \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof_tt.txt.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof_tt.txt.meta new file mode 100644 index 00000000..6d6d0015 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/Files/eurof_tt.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e96690bd3586cf643a223def4feaa4d4 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/FriendItem.cs b/Assets/Photon/PhotonChat/Demos/DemoChat/FriendItem.cs new file mode 100644 index 00000000..1027894e --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/FriendItem.cs @@ -0,0 +1,84 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Demo code for Photon Chat in Unity. +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + + +using UnityEngine; +using UnityEngine.UI; + + +namespace Photon.Chat.Demo +{ + /// + /// Friend UI item used to represent the friend status as well as message. + /// It aims at showing how to share health for a friend that plays on a different room than you for example. + /// But of course the message can be anything and a lot more complex. + /// + public class FriendItem : MonoBehaviour + { + [HideInInspector] + public string FriendId + { + set { this.NameLabel.text = value; } + get { return this.NameLabel.text; } + } + + public Text NameLabel; + public Text StatusLabel; + public Text Health; + + public void Awake() + { + this.Health.text = string.Empty; + } + + public void OnFriendStatusUpdate(int status, bool gotMessage, object message) + { + string _status; + + switch (status) + { + case 1: + _status = "Invisible"; + break; + case 2: + _status = "Online"; + break; + case 3: + _status = "Away"; + break; + case 4: + _status = "Do not disturb"; + break; + case 5: + _status = "Looking For Game/Group"; + break; + case 6: + _status = "Playing"; + break; + default: + _status = "Offline"; + break; + } + + this.StatusLabel.text = _status; + + if (gotMessage) + { + string _health = string.Empty; + if (message != null) + { + string[] _messages = message as string[]; + if (_messages != null && _messages.Length >= 2) + { + _health = (string)_messages[1] + "%"; + } + } + + this.Health.text = _health; + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/FriendItem.cs.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/FriendItem.cs.meta new file mode 100644 index 00000000..753c04d8 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/FriendItem.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 660b16ba396d0465b98be14947420288 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/IgnoreUiRaycastWhenInactive.cs b/Assets/Photon/PhotonChat/Demos/DemoChat/IgnoreUiRaycastWhenInactive.cs new file mode 100644 index 00000000..921f0ffa --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/IgnoreUiRaycastWhenInactive.cs @@ -0,0 +1,20 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Demo code for Photon Chat in Unity. +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + + +using UnityEngine; + + +namespace Photon.Chat.Demo +{ + public class IgnoreUiRaycastWhenInactive : MonoBehaviour, ICanvasRaycastFilter + { + public bool IsRaycastLocationValid(Vector2 screenPoint, Camera eventCamera) + { + return this.gameObject.activeInHierarchy; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/IgnoreUiRaycastWhenInactive.cs.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/IgnoreUiRaycastWhenInactive.cs.meta new file mode 100644 index 00000000..75adf539 --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/IgnoreUiRaycastWhenInactive.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4ba4c747f6975ea46bcc0a55ffe3bfe8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/NamePickGui.cs b/Assets/Photon/PhotonChat/Demos/DemoChat/NamePickGui.cs new file mode 100644 index 00000000..8e5852cd --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/NamePickGui.cs @@ -0,0 +1,55 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Demo code for Photon Chat in Unity. +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + + +using UnityEngine; +using UnityEngine.UI; + + +namespace Photon.Chat.Demo +{ + [RequireComponent(typeof(ChatGui))] + public class NamePickGui : MonoBehaviour + { + private const string UserNamePlayerPref = "NamePickUserName"; + + public ChatGui chatNewComponent; + + public InputField idInput; + + public void Start() + { + this.chatNewComponent = FindObjectOfType(); + + + string prefsName = PlayerPrefs.GetString(UserNamePlayerPref); + if (!string.IsNullOrEmpty(prefsName)) + { + this.idInput.text = prefsName; + } + } + + + // new UI will fire "EndEdit" event also when loosing focus. So check "enter" key and only then StartChat. + public void EndEditOnEnter() + { + if (Input.GetKey(KeyCode.Return) || Input.GetKey(KeyCode.KeypadEnter)) + { + this.StartChat(); + } + } + + public void StartChat() + { + ChatGui chatNewComponent = FindObjectOfType(); + chatNewComponent.UserName = this.idInput.text.Trim(); + chatNewComponent.Connect(); + this.enabled = false; + + PlayerPrefs.SetString(UserNamePlayerPref, chatNewComponent.UserName); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonChat/Demos/DemoChat/NamePickGui.cs.meta b/Assets/Photon/PhotonChat/Demos/DemoChat/NamePickGui.cs.meta new file mode 100644 index 00000000..c0d3682d --- /dev/null +++ b/Assets/Photon/PhotonChat/Demos/DemoChat/NamePickGui.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 696a5174ff5e707479b3540eb56d14b7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs.meta b/Assets/Photon/PhotonLibs.meta new file mode 100644 index 00000000..05f4c176 --- /dev/null +++ b/Assets/Photon/PhotonLibs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ee1734b1a7bac244bb5f15ecd778b5f2 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/Metro.meta b/Assets/Photon/PhotonLibs/Metro.meta new file mode 100644 index 00000000..42ef35f6 --- /dev/null +++ b/Assets/Photon/PhotonLibs/Metro.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 887ac71c799552346b6cf7654fb699cb +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll new file mode 100644 index 00000000..ed7cb989 Binary files /dev/null and b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll differ diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll.meta b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll.meta new file mode 100644 index 00000000..29b2a9ba --- /dev/null +++ b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll.meta @@ -0,0 +1,47 @@ +fileFormatVersion: 2 +guid: 3b5a0a7dce46a13459199d174ad3db3f +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Any + second: + enabled: 1 + settings: {} + - first: + '': WP8 + second: + enabled: 1 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: Assets/Photon/PhotonLibs/Photon3Unity3D.dll + SDK: AnySDK + ScriptingBackend: DotNet + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 1 + settings: + CPU: AnyCPU + DontProcess: false + PlaceholderPath: Assets/Photon/PhotonLibs/Photon3Unity3D.dll + SDK: AnySDK + ScriptingBackend: DotNet + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri new file mode 100644 index 00000000..889f87b8 Binary files /dev/null and b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri differ diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri.meta b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri.meta new file mode 100644 index 00000000..eb420eff --- /dev/null +++ b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3439a9e4030efca45b6cc06240106c02 +timeCreated: 1460035811 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/Photon3Unity3D.dll b/Assets/Photon/PhotonLibs/Photon3Unity3D.dll new file mode 100644 index 00000000..8e047228 Binary files /dev/null and b/Assets/Photon/PhotonLibs/Photon3Unity3D.dll differ diff --git a/Assets/Photon/PhotonLibs/Photon3Unity3D.dll.meta b/Assets/Photon/PhotonLibs/Photon3Unity3D.dll.meta new file mode 100644 index 00000000..a7208555 --- /dev/null +++ b/Assets/Photon/PhotonLibs/Photon3Unity3D.dll.meta @@ -0,0 +1,38 @@ +fileFormatVersion: 2 +guid: aadb37a20a33632429047acaef43658a +labels: +- ExitGames +- PUN +- Photon +- Networking +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Any + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/Photon3Unity3D.xml b/Assets/Photon/PhotonLibs/Photon3Unity3D.xml new file mode 100644 index 00000000..f85d60c5 --- /dev/null +++ b/Assets/Photon/PhotonLibs/Photon3Unity3D.xml @@ -0,0 +1,2767 @@ + + + + Photon3Unity3D + + + + + Initializes a new instance of the class. + + + + + Gets the public key that can be used by another DiffieHellmanCryptoProvider object + to generate a shared secret agreement. + + + + + Derives the shared key is generated from the secret agreement between two parties, + given a byte array that contains the second party's public key. + + + The second party's public key. + + + + Interface for Photon's DiffieHellman/Payload Encryption. + + + + Provides classical Diffie-Hellman Modular Exponentiation Groups defined by the + OAKLEY Key Determination Protocol (RFC 2412). + + + + + Gets the genrator (N) used by the the well known groups 1,2 and 5. + + + + + Gets the 768 bit prime for the well known group 1. + + + + + Gets the 1024 bit prime for the well known group 2. + + + + + Gets the 1536 bit prime for the well known group 5. + + + + A slice of memory that should be pooled and reused. Wraps a byte-array. + + This is a serializable datatype for the .Net clients. It will serialize and transfer as byte[]. + If PhotonPeer.UseByteArraySlicePoolForEvents is enabled, byte-arrays in (incoming) events will be deserialized as + ByteArraySlice. + + Adjust your OnEvent code accordingly. + + + + The buffer for the slice. + + + The position where the content starts in Buffer. + + + The length of the data in the Buffer. + + + + Internal constructor - these instances will be part of the pooling system. + + The pool to return to. + The index to return to (in the related returnPool). + + + + Create a new ByteArraySlice. The buffer supplied will be used. Usage is similar to ArraySegment. + + Not part of pooling. + + + + Creates a ByteArraySlice, which is not pooled. It has no Buffer. + + Not part of pooling. + + + + If this item was fetched from a ByteArraySlicePool, this will return it. + + + True if this was a pooled item and it successfully was returned. + If it does not belong to a pool nothing will happen, and false will be returned. + + + + Resets Count and Offset to 0 each. + + + Tiered pool for ByteArraySlices. Reduces the allocations once enough slices are available. + + + + Requests for buffers smaller than 2^minStackIndex will use 2^minStackIndex. This value avoids allocations of smaller rarely used buffers. + Set this to a lower value if you will never need sizes larger than byte[2^minStackIndex] + + + + Count of allocations this pool did. + + + Creates a new pool. + + + + Get a ByteArraySlice from pool. This overload handles user supplied byte[] and byte count and can be used as a non-boxing alternative to ArraySegment<byte>. + + + This effectively pools the ByteArraySlice instances but not their data. + ByteArraySlice.Release() will return the slice itself to the pool but delete the reference to the buffer supplied here. + + + + + Get byte[] wrapper from pool. This overload accepts a bytecount and will return a wrapper with a byte[] that size or greater. + + + + Pops a slice from the stack or creates a new slice for that stack. + The stack to use. Lock that stack before calling PopOrCreate for thread safety. + + A slice. + + + + Releasing a ByteArraySlice, will put it back into the pool, if it was acquired from one. + + The ByteArraySlice to return to the pool. + The stackIndex for this slice. + True if this slice was returned to some pool. False if not (null or stackIndex < 0. + + + + Clears all pool items with byte array sizes between lower and upper inclusively. + + + Use this if you sent some unusually large RaiseEvents and believe the buffers of that size + will not be needed again, and you would like to free up the buffer memory. + + + + + Replacement for Dictionary<K,V> which does not allocate memory during usage. + + Key type. + Value type. + + + + This is a substitute for the Hashtable class, missing in: Win8RT and Windows Phone. It uses a Dictionary<object,object> as base. + + + Please be aware that this class might act differently than the Hashtable equivalent. + As far as Photon is concerned, the substitution is sufficiently precise. + + + + + Translates the byte key into the pre-boxed byte before doing the lookup. + + + + + + + Creates a shallow copy of the Hashtable. + + + A shallow copy of a collection copies only the elements of the collection, whether they are + reference types or value types, but it does not copy the objects that the references refer + to. The references in the new collection point to the same objects that the references in + the original collection point to. + + Shallow copy of the Hashtable. + + + + Used as container for unknown types the client could not deserialize. + + + + + The type code which was read for this type. + + + + + The size/length value that was read for this type. + + May be larger than Data.Length, if the Size exceeded the remaining message content. + + + + Container for the data that arrived. + + If the Size exceeded the remaining message length, only the remaining data is read. This may be null, if the size was somehow less than 1. + + + Interface for DatagramEncryptor implementations. + + + Initialize the encryptor. + + + + Encryption/decryption algorithm implementation + + + + + Packet authentication algorithm impelmenation + + + + Number for reliable unsequenced commands (separate from "standard" reliable sequenced). Used to avoid duplicates. + + + The highest number of reliable unsequenced commands that arrived (and all commands before). + + + Any reliable unsequenced number that's been received, which is higher than the current highest in complete sequence (reliableUnsequencedNumbersCompletelyReceived). + + + To store the highest acknowledged sequence number (and get some impression what the server already received and stored). + + + Checks and queues incoming reliable unsequenced commands ("send" or "fragment"), if they haven't been received yet. + The command to check and queue. + True if the command is new and got queued (or could be executed/dispatched). + + + Quick Resends are suspended if the sent queue is this size or larger. + + + One list for all channels keeps sent commands (for re-sending). + + + One pool of ACK byte arrays ( 20 bytes each) for all channels to keep acknowledgements. + + + Gets enabled by "request" from server (not by client). + + + Initial PeerId as used in Connect command. If EnableServerTracing is false. + + + Initial PeerId to enable Photon Tracing, as used in Connect command. See: EnableServerTracing. + + + + Checks the incoming queue and Dispatches received data if possible. + + If a Dispatch happened or not, which shows if more Dispatches might be needed. + + + Gets the target size for fragments. + + Caches the result for a specific MTU value. + Fragment length is different, when datagram encryption is used (so this caches two values in fact). + + + + + + gathers acks until udp-packet is full and sends it! + + + + Queue of received commands. ReceiveIncomingCommands will queue commands, except ACKs which Execute immediately. + + + + gathers commands from all (out)queues until udp-packet is full and sends it! + + + + + Checks connected state and channel before operation is serialized and enqueued for sending. + + if operation could be enqueued + + + reliable-udp-level function to send some byte[] to the server via un/reliable command + only called when a custom operation should be send + the invocation ID for this operation (the payload) + + + reads incoming udp-packages to create and queue incoming commands* + + + Queues incoming commands in the correct order as either unreliable, reliable or unsequenced. + If queued or not. + + + removes commands which are acknowledged + + + + Enumeration of situations that change the peers internal status. + Used in calls to OnStatusChanged to inform your application of various situations that might happen. + + + Most of these codes are referenced somewhere else in the documentation when they are relevant to methods. + + + + the PhotonPeer is connected.
See {@link PhotonListener#OnStatusChanged}*
+
+ + the PhotonPeer just disconnected.
See {@link PhotonListener#OnStatusChanged}*
+
+ + the PhotonPeer encountered an exception and will disconnect, too.
See {@link PhotonListener#OnStatusChanged}*
+
+ + Exception while opening the incoming connection to the server. Followed by Disconnect. + The server could be down / not running or the client has no network or a misconfigured DNS.
See {@link PhotonListener#OnStatusChanged}*
+
+ + Used on platforms that throw a security exception on connect. Unity3d does this, e.g., if a webplayer build could not fetch a policy-file from a remote server. + + + Sending command failed. Either not connected, or the requested channel is bigger than the number of initialized channels. + + + Exception, if a server cannot be connected. Followed by Disconnect. + Most likely, the server is not responding. Ask user to try again later. + + + Disconnection due to a timeout (client did no longer receive ACKs from server). Followed by Disconnect. + + + Timeout disconnect by server. The server didn't receive necessary ACKs in time. Followed by Disconnect. + + + Disconnect by server due to concurrent user limit reached (received a disconnect command). + + + (1043) Disconnect by server due to server's logic. Followed by Disconnect. + + + Disconnect by server due to unspecified reason. Followed by Disconnect. + + + (1048) Value for OnStatusChanged()-call, when the encryption-setup for secure communication finished successfully. + + + (1049) Value for OnStatusChanged()-call, when the encryption-setup failed for some reason. Check debug logs. + + + + Callback interface for the Photon client side. Must be provided to a new PhotonPeer in its constructor. + + + These methods are used by your PhotonPeer instance to keep your app updated. Read each method's + description and check out the samples to see how to use them. + + + + + Provides textual descriptions for various error conditions and noteworthy situations. + In cases where the application needs to react, a call to OnStatusChanged is used. + OnStatusChanged gives "feedback" to the game, DebugReturn provies human readable messages + on the background. + + + All debug output of the library will be reported through this method. Print it or put it in a + buffer to use it on-screen. Use PhotonPeer.DebugOut to select how verbose the output is. + + DebugLevel (severity) of the message. + Debug text. Print to System.Console or screen. + + + + Callback method which gives you (async) responses for called operations. + + + Similar to method-calling, operations can have a result. + Because operation-calls are non-blocking and executed on the server, responses are provided + after a roundtrip as call to this method. + + Example: Trying to create a room usually succeeds but can fail if the room's name is already + in use (room names are their IDs). + + This method is used as general callback for all operations. Each response corresponds to a certain + "type" of operation by its OperationCode. + + + + When you join a room, the server will assign a consecutive number to each client: the + "actorNr" or "player number". This is sent back in the operation result. + + Fetch your actorNr of a Join response like this: + int actorNr = (int)operationResponse[(byte)OperationCode.ActorNr]; + + The response to an operation\-call. + + + + OnStatusChanged is called to let the game know when asynchronous actions finished or when errors happen. + + + Not all of the many StatusCode values will apply to your game. Example: If you don't use encryption, + the respective status changes are never made. + + The values are all part of the StatusCode enumeration and described value-by-value. + + A code to identify the situation. + + + + Called whenever an event from the Photon Server is dispatched. + + + Events are used for communication between clients and allow the server to update clients anytime. + The creation of an event is often triggered by an operation (called by this client or an other). + + Each event carries a Code plus optional content in its Parameters. + Your application should identify which content to expect by the event's Code. + + Events can be defined and modified server-side. + + If you use the LoadBalancing api as basis, several events like EvJoin and EvLeave are pre-defined. + The LoadBalancing api provides the EventCode and ParameterCode classes for pre-defined events. + + Photon also allows you to come up with custom events on the fly, purely client-side. + To do so, use OpRaiseEvent. + + Events are incoming messages and as such buffered in the peer. + Calling PhotonPeer.DispatchIncomingCommands will call IPhotonPeerListener.OnEvent, to hand over received events. + + PhotonPeer.ReuseEventInstance is an option to optimize memory usage by reusing one EventData instance. + + The event currently being dispatched. + + + The protocol for this socket, defined in constructor. + + + Address, as defined via a Connect() call. Including protocol, port and or path. + This is set in the constructor and in Connect() again. Typically the address does not change after the IPhotonSocket is instantiated. + + + Contains only the server's hostname (stripped protocol, port and or path). Set in IPhotonSocket.Connect(). + + + Contains the IP address of the previously resolved ServerAddress (or empty, if GetIpAddress wasn't used). + + + Contains only the server's port address (as string). Set in IphotonSocket.Connect(). + + + Where available, this exposes if the server's address was resolved into an IPv6 address or not. + + + + Provides the protocol string, of the current PhotonPeer.SerializationProtocolType to be used for WebSocket connections. + + + Any WebSocket wrapper could access this to get the desired binary protocol for the connection. + Some WebSocket implementations use a static value of the same name and need to be updated. + + The value is not cached and each call will create the needed string on the fly. + + + + + Separates the given address into address (host name or IP) and port. Port must be included after colon! + + + This method expects any address to include a port. The final ':' in addressAndPort has to separate it. + IPv6 addresses have multiple colons and must use brackets to separate address from port. + + Examples: + ns.exitgames.com:5058 + http://[2001:db8:1f70::999:de8:7648:6e8]:100/ + [2001:db8:1f70::999:de8:7648:6e8]:100 + See: + http://serverfault.com/questions/205793/how-can-one-distinguish-the-host-and-the-port-in-an-ipv6-url + + + + Wraps a DNS call to provide an array of addresses, sorted to have the IPv6 ones first. + + This skips a DNS lookup, if the hostname is an IPv4 address. Then only this address is used as is. + The DNS lookup may take a while, so it is recommended to do this in a thread. Also, it may fail entirely. + + + IPAddress array for hostname, sorted to put any IPv6 addresses first.
+ If the DNS lookup fails, HandleException(StatusCode.ExceptionOnConnect) gets called and null returned. + Then the socket should not attempt to connect. +
+
+ + + Returns null or the IPAddress representing the address, doing Dns resolution if needed. + + Only returns IPv4 or IPv6 adresses, no others. + The string address of a server (hostname or IP). + IPAddress for the string address or null, if the address is neither IPv4, IPv6 or some hostname that could be resolved. + + + Variants of the Photon specific serialization protocol used for operations, responses, events and data. + + + Version 1.6 (outdated). + + + Version 1.8. + + + + + + + Serialize creates a byte-array from the given object and returns it. + + The object to serialize + The serialized byte-array + + + + Deserialize returns an object reassembled from the given StreamBuffer. + + The buffer to be Deserialized + The Deserialized object + + + + Deserialize returns an object reassembled from the given byte-array. + + The byte-array to be Deserialized + The Deserialized object + + + + Interface for (UDP) traffic capturing. + + + + Indicates if the PhotonPeer should call Record or not. + + + Implement to record network traffic. Called by PhotonPeer for each UDP message sent and received. + + The buffer will not contain Ethernet Header, IP, UDP level data. Only the payload received by the client. + + It is advised to not use NetworkSimulation when recording traffic. + The recording is done on the timing of actual receive- and send-calls and internal simulation would offset the timing. + + Buffer to be sent or received. Check length value for actual content length. + Length of the network data. + Indicates incoming (true) or outgoing (false) traffic. + The local peerId for the connection. Defaults to 0xFFFF until assigned by the Server. + The currently used IPhotonSocket of this Peer. Enables you to track the connection endpoint. + + + Internal class for "commands" - the package in which operations are sent. + + + Size of the Payload, which may be null. + + + Checks commandFlags & FV_UNRELIABLE_UNSEQUENCED. + + + Checks commandFlags & FV_RELIABLE. + + + + ACKs should never be created as NCommand. use CreateACK to wrtie the serialized ACK right away... + + + + + + + + + this variant does only create outgoing commands and increments . incoming ones are created from a DataInputStream + + + this variant does only create outgoing commands and increments . incoming ones are created from a DataInputStream + + + reads the command values (commandHeader and command-values) from incoming bytestream and populates the incoming command* + + + + A simulation item is an action that can be queued to simulate network lag. + + + + With this, the actual delay can be measured, compared to the intended lag. + + + Timestamp after which this item must be executed. + + + Action to execute when the lag-time passed. + + + Starts a new Stopwatch + + + + A set of network simulation settings, enabled (and disabled) by PhotonPeer.IsSimulationEnabled. + + + For performance reasons, the lag and jitter settings can't be produced exactly. + In some cases, the resulting lag will be up to 20ms bigger than the lag settings. + Even if all settings are 0, simulation will be used. Set PhotonPeer.IsSimulationEnabled + to false to disable it if no longer needed. + + All lag, jitter and loss is additional to the current, real network conditions. + If the network is slow in reality, this will add even more lag. + The jitter values will affect the lag positive and negative, so the lag settings + describe the medium lag even with jitter. The jitter influence is: [-jitter..+jitter]. + Packets "lost" due to OutgoingLossPercentage count for BytesOut and LostPackagesOut. + Packets "lost" due to IncomingLossPercentage count for BytesIn and LostPackagesIn. + + + + internal + + + internal + + + internal + + + internal + + + internal + + + internal + + + internal + + + This setting overrides all other settings and turns simulation on/off. Default: false. + + + Outgoing packages delay in ms. Default: 100. + + + Randomizes OutgoingLag by [-OutgoingJitter..+OutgoingJitter]. Default: 0. + + + Percentage of outgoing packets that should be lost. Between 0..100. Default: 1. TCP ignores this setting. + + + Incoming packages delay in ms. Default: 100. + + + Randomizes IncomingLag by [-IncomingJitter..+IncomingJitter]. Default: 0. + + + Percentage of incoming packets that should be lost. Between 0..100. Default: 1. TCP ignores this setting. + + + Counts how many outgoing packages actually got lost. TCP connections ignore loss and this stays 0. + + + Counts how many incoming packages actually got lost. TCP connections ignore loss and this stays 0. + + + Provides an overview of the current values in form of a string. + String summary. + + + + The pool this wrapper should return to when released/disposed. + + + + + Gets value and if it belongs to the static pool, returns the wrapper to pool. + + + + + + Boxes the value and returns boxed object. Releases the wrapper. + + + + + + Removes this WrapperStruct from pooling. + + + + Returns a String which represents the value of this instance. + String which represents the value of this instance. + + + Returns a String which represents the type (in brackets and value of this instance. + String which represents the type (in brackets) and value of this instance. + + + + staticPool is used for implicit casting. This is not threadsafe, so casting between T and StructWrapper should only be done on the Unity main thread. + + + + + Replacement for object.GetType() that first checks to see if object is a WrappedStruct. + If so returns the StructWrapper T type, otherwise just returns object.GetType(). + + + + + + + Wrap a struct in a pooled StructWrapper. + + + + + Wrap a struct in a pooled StructWrapper. Pulls wrapper from the static pool. Wrapper is returned to pool when Unwrapped. + Slighty faster version of Wrap() that is hard wired to pull from the static pool. Use the persistant bool argument to make a permanent unpooled wrapper. + + + + + Tests if object is either a cast T, or a wrapped T + + + + + Remove all wrappers in hashtable from pooling, so they can remain cached and used later. + + + + + + Unwraps any WrapperStructs, boxes their value, releases hashtable entry with the boxed value. Releases the wrappers. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is will not be returned to its pool until it is Unwrapped, or the pool is cleared. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is will not be returned to its pool until it is Unwrapped, or the pool is cleared. + + + + + + + + + + + Will get the object using the key. If the key is invalid, will return null. + + + + + + Dictionary content as string. + If true, type-info is also included. + Full content of dictionary as string. + + + Param code. Used in internal op: InitEncryption. + + + Encryption-Mode code. Used in internal op: InitEncryption. + + + Param code. Used in internal op: InitEncryption. + + + Code of internal op: InitEncryption. + + + TODO: Code of internal op: Ping (used in PUN binary websockets). + + + Result code for any (internal) operation. + + + + This is the replacement for the const values used in eNet like: PS_DISCONNECTED, PS_CONNECTED, etc. + + + + No connection is available. Use connect. + + + Establishing a connection already. The app should wait for a status callback. + + + + The low level connection with Photon is established. On connect, the library will automatically + send an Init package to select the application it connects to (see also PhotonPeer.Connect()). + When the Init is done, IPhotonPeerListener.OnStatusChanged() is called with connect. + + Please note that calling operations is only possible after the OnStatusChanged() with StatusCode.Connect. + + + Connection going to be ended. Wait for status callback. + + + Acknowledging a disconnect from Photon. Wait for status callback. + + + Connection not properly disconnected. + + + The server's address, as set by a Connect() call, including any protocol, ports and or path. + If rHTTP is used, this can be set directly. + + + + This is the (low level) connection state of the peer. It's internal and based on eNet's states. + + Applications can read the "high level" state as PhotonPeer.PeerState, which uses a different enum. + + + Byte count of last sent operation (set during serialization). + + + Byte count of last dispatched message (set during dispatch/deserialization). + + + The command that's currently being dispatched. + + + This ID is assigned by the Realtime Server upon connection. + The application does not have to care about this, but it is useful in debugging. + + + + The serverTimeOffset is serverTimestamp - localTime. Used to approximate the serverTimestamp with help of localTime + + + + + Count of all bytes going out (including headers) + + + + + Count of all bytes coming in (including headers) + + + + Set via Connect(..., customObject) and sent in Init-Request. + + + Sent on connect in an Init Request. + + + Temporary cache of AppId. Used in Connect() to keep the AppId until we send the Init-Request (after the network-level (and Enet) connect). + + + Set to timeInt, whenever SendOutgoingCommands actually checks outgoing queues to send them. Must be connected. + + + Maximum Transfer Unit to be used for UDP+TCP + + + If IPhotonSocket.Connected is true, this value shows if the server's address resolved as IPv6 address. + + You must check the socket's IsConnected state. Otherwise, this value is not initialized. + Sent to server in Init-Request. + + + + + Writes and "Init Request", which initializes the connection / application used server-side. + + Uses this.ServerAddress, this.AppId, this.PhotonToken and CustomInitData and some more values. + Bytes of the init request. + + + Called when the server's Init Response arrived. + + + Serializes an operation into our binary messages (magic number, msg-type byte and message). Optionally encrypts. + This method is mostly the same in EnetPeer, TPeer and HttpPeerBase. Also, for raw messages, we have another variant. + + + Serializes an operation into our binary messages (magic number, msg-type byte and message). Optionally encrypts. + This method is mostly the same in EnetPeer, TPeer and HttpPeerBase. Also, for raw messages, we have another variant. + + + Returns the UDP Payload starting with Magic Number for binary protocol + + + + Checks outgoing queues for commands to send and puts them on their way. + This creates one package per go in UDP. + + If commands are not sent, cause they didn't fit into the package that's sent. + + + + Checks the incoming queue and Dispatches received data if possible. + + If a Dispatch happened or not, which shows if more Dispatches might be needed. + + + + Internally uses an operation to exchange encryption keys with the server. + + If the op could be sent. + + + + Gets the currently used settings for the built-in network simulation. + Please check the description of NetworkSimulationSet for more details. + + + + + Core of the Network Simulation, which is available in Debug builds. + Called by a timer in intervals. + + + + EnetPeer will set this value, so trafficstats can use it. TCP has 0 bytes per package extra + + + See PhotonPeer value. + + + See PhotonPeer value. + + + See PhotonPeer value. + + + See PhotonPeer value. + + + + Value range for a Peer's connection and initialization state, as returned by the PeerState property. + + + While this is not the same as the StatusCode of IPhotonPeerListener.OnStatusChanged(), it directly relates to it. + In most cases, it makes more sense to build a game's state on top of the OnStatusChanged() as you get changes. + + + + The peer is disconnected and can't call Operations. Call Connect(). + + + The peer is establishing the connection: opening a socket, exchanging packages with Photon. + + + The connection is established and now sends the application name to Photon. + You set the "application name" by calling PhotonPeer.Connect(). + + + The peer is connected and initialized (selected an application). You can now use operations. + + + The peer is disconnecting. It sent a disconnect to the server, which will acknowledge closing the connection. + + + + These are the options that can be used as underlying transport protocol. + + + + Use UDP to connect to Photon, which allows you to send operations reliable or unreliable on demand. + + + Use TCP to connect to Photon. + + + A TCP-based protocol commonly supported by browsers.For WebGL games mostly. Note: No WebSocket IPhotonSocket implementation is in this Assembly. + This protocol is only available in Unity exports to WebGL. + + + A TCP-based, encrypted protocol commonly supported by browsers. For WebGL games mostly. Note: No WebSocket IPhotonSocket implementation is in this Assembly. + This protocol is only available in Unity exports to WebGL. + + + + Level / amount of DebugReturn callbacks. Each debug level includes output for lower ones: OFF, ERROR, WARNING, INFO, ALL. + + + + No debug out. + + + Only error descriptions. + + + Warnings and errors. + + + Information about internal workflows, warnings and errors. + + + Most complete workflow description (but lots of debug output), info, warnings and errors. + + + Build target framework supported by this dll. + + + + Instances of the PhotonPeer class are used to connect to a Photon server and communicate with it. + + + A PhotonPeer instance allows communication with the Photon Server, which in turn distributes messages + to other PhotonPeer clients. + An application can use more than one PhotonPeer instance, which are treated as separate users on the + server. Each should have its own listener instance, to separate the operations, callbacks and events. + + + + + No effect anymore. Removed without replacement. + + + This value was used to get/set the initial capacities of command-lists. + These grow on demand but knowing their capacity is of very limited use. + Also, various command-lists grow their capacity independent from one another. + + + + + No effect anymore. Removed without replacement. + + + This was used to skip some received (and buffered) unreliable commands, to avoid situations + where the peer has aggregated a lot of (old) messages. + + + + + The WarningSize was used test all message queues for congestion. + + + + + Gets a local timestamp in milliseconds by calling SupportClass.GetTickCount(). + See LocalMsTimestampDelegate. + + + + Where dynamic linking is available, this library will attempt to load a native Photon "Encryptor" plugin library for "Datagram Encryption". + Fallback to a managed implementation. This value is always true. + + + Obsolete and ignored. Size of CommandLog. Default is 0, no logging. + + + Obsolete and ignored. Converts the CommandLog into a readable table-like string with summary. + + + False if this library build contains C# Socket code. If true, you must set some type as SocketImplementation before connecting. + + + True if the library was compiled with DEBUG setting. + + + Version of the Native Encryptor API compiled into this assembly. Defines which PhotonEncryptorPlugin needs to be used. + + + Target framework this dll was built for. + + + Global toggle to avoid callbacks from native plugins. Defaults to false, meaning: "callbacks enabled". + Callbacks from native code will fail on some platforms, which is why you can disable them. + + + Can be used to remove/hide the AppId from websocket connect paths. + + + A simplified identifier for client SDKs. Photon's APIs might modify this (as a dll can be used in more than one product). Helps debugging. + + + For the Init-request, we shift the ClientId by one and the last bit signals a "debug" (0) or "release" build (1). + + + Version of this library as string. + + + Version of this library as string. + + + A Native Socket implementation is no longer part of this DLL but delivered in a separate add-on. This value always returns false. + + + Native Payload Encryption is no longer part of this DLL but delivered in a separate add-on. This value always returns false. + + + Native Datagram Encryption is no longer part of this DLL but delivered in a separate add-on. This value always returns false. + + + Enables selection of a (Photon-)serialization protocol. Used in Connect methods. + Defaults to SerializationProtocol.GpBinaryV16; + + + Optional definition of IPhotonSocket type per ConnectionProtocol. + + Several platforms have special Socket implementations and slightly different APIs. + Customizing the SocketImplementationConfig helps to accomodate this. + By default, UDP and TCP have socket implementations assigned. + + If a native socket plugin is available set the SocketNativeSource class as Type definition here. + + You only need to set the SocketImplementationConfig once, after creating a PhotonPeer + and before connecting. If you switch the TransportProtocol, the correct implementation is being used. + + + + + Can be used to read the IPhotonSocket implementation at runtime (before connecting). + + + Use the SocketImplementationConfig to define which IPhotonSocket is used per ConnectionProtocol. + + + + + Sets the level (and amount) of debug output provided by the library. + + + This affects the callbacks to IPhotonPeerListener.DebugReturn. + Default Level: Error. + + + + + Gets the IPhotonPeerListener of this instance (set in constructor). + Can be used in derived classes for Listener.DebugReturn(). + + + + + Called when the client received a Disconnect Message from the server. Signals an error and provides a message to debug the case. + + + + + Option to make the PhotonPeer reuse a single EventData instance for all incoming events. + + + This reduces memory garbage. + If enabled, the event provided via OnEvent(EventData photonEvent) is invalid once the callback finished. + That event's content will get modified. Typically this is not a problem as events are rarely cached. + + Changing this value acquires the same lock that DispatchIncomingCommands() uses. + + + + + Enables a deserialization optimization for incoming events. Defaults to false. + + + When enabled, byte-arrays in incoming Photon events are deserialized into pooled ByteArraySlice instances (wrappers for byte[]). + This improves the memory footprint for receiving byte-arrays in events. + + When used, you have to release the (pooled) ByteArraySlice instances. + + Adjust your handling of EventData accordingly: + + The ByteArraySlice.Buffer will usually be bigger than the send/received byte-array. + Check the ByteArraySlice.Count and read only the actually received bytes. + The Buffer is reused and not cleared. The Offset will be 0 for incoming events. + + Important: + While the peer will acquire the ByteArraySlice and passes it to OnEvent, the game code has to call ByteArraySlice.Release() + when the slice is no longer needed. + + Send either byte[], ArraySegment or use the ByteArraySlicePool to acquire ByteArraySlices to send. + + + + + Instance of a ByteArraySlicePool. UseByteArraySlicePoolForEvents defines if this PhotonPeer is using the pool for deserialization of byte[] in Photon events. + + ByteArraySlice is a serializable datatype of the Photon .Net client library. + It helps avoid allocations by being pooled and (optionally) used in incoming Photon events (see: UseByteArraySlicePoolForEvents). + + You can also use the pool to acquire ByteArraySlice instances for serialization. + RaiseEvent will auto-release all ByteArraySlice instances passed in. + + + + + This debug setting enables a new send-ordering for commands. Defaults to true and commands are sent in the order they are created. Set to false to use Enet ordering. + + + + Skips resending (individual) commands if their reliable sequence number is this amount larger than the highest acknowledged sequence number. + + This puts focus on resending commands that are older and are needed on the receiver side to dispatch commands. + It queues more on the client side than on the server. + Affects only reliable UDP (based on enet). + + + + Skips sending reliable and unreliable commands if their reliable sequence number is this amount larger than the highest acknowledged sequence number. + + This puts focus on resending commands that are older and are needed on the receiver side to dispatch commands. + It queues more on the client side than on the server. + Affects only reliable UDP (based on enet). + + + + + Gets count of all bytes coming in (including headers, excluding UDP/TCP overhead) + + + + + Gets count of all bytes going out (including headers, excluding UDP/TCP overhead) + + + + + Gets the size of the dispatched event or operation-result in bytes. + This value is set before OnEvent() or OnOperationResponse() is called (within DispatchIncomingCommands()). + + + Get this value directly in OnEvent() or OnOperationResponse(). Example: + void OnEvent(...) { + int eventSizeInBytes = this.peer.ByteCountCurrentDispatch; + //... + + void OnOperationResponse(...) { + int resultSizeInBytes = this.peer.ByteCountCurrentDispatch; + //... + + + + Returns the debug string of the event or operation-response currently being dispatched or string. Empty if none. + In a release build of the lib, this will always be empty. + + + + Gets the size of the last serialized operation call in bytes. + The value includes all headers for this single operation but excludes those of UDP, Enet Package Headers and TCP. + + + Get this value immediately after calling an operation. + Example: + + this.loadbalancingClient.OpJoinRoom("myroom"); + int opjoinByteCount = this.loadbalancingClient.ByteCountLastOperation; + + + + If set, the TrafficRecorder will be used to capture all traffic. + + If null or not Enabled, the recorder is not being used. + Release builds of this library will never record traffic for performance reasons. + + See ITrafficRecorder docs. + + + + + Debugging option to tell the Photon Server to log all datagrams. + + + + + Up to 4 resend attempts for a reliable command can be done in quick succession (after RTT+4*Variance). + + + By default 0. Any later resend attempt will then double the time before the next resend. + Max value = 4; + Make sure to adjust SentCountAllowance to a slightly higher value, as more repeats will get done. + + + + + This is the (low level) state of the connection to the server of a PhotonPeer. Managed internally and read-only. + + + Don't mix this up with the StatusCode provided in IPhotonListener.OnStatusChanged(). + Applications should use the StatusCode of OnStatusChanged() to track their state, as + it also covers the higher level initialization between a client and Photon. + + + + + This peer's ID as assigned by the server or 0 if not using UDP. Will be 0xFFFF before the client connects. + + Used for debugging only. This value is not useful in everyday Photon usage. + + + + Count of all currently received but not-yet-Dispatched reliable commands + (events and operation results) from all channels. + + + + + Count of all commands currently queued as outgoing, including all channels and reliable, unreliable. + + + + + Sets a new (temporary) size of the MessageBufferPool to reuse memory where possible. + + + The MessageBufferPool is a Queue<StreamBuffer> for performance reasons. + This methods dequeues from the MessageBufferPool to get the Count equal to countOfBuffers, + then it calls MessageBufferPool.TrimExcess(). + + New size of the pool. Clears the pool if <= 0. + + + + Gets / sets the number of channels available in UDP connections with Photon. + Photon Channels are only supported for UDP. + The default ChannelCount is 2. Channel IDs start with 0 and 255 is a internal channel. + + + + + Enables the client so send the "encrypted" flag on secure connections. Incompatible with Server SDK 4.x. + + + + + While not connected, this controls if the next connection(s) should use a per-package CRC checksum. + + + While turned on, the client and server will add a CRC checksum to every sent package. + The checksum enables both sides to detect and ignore packages that were corrupted during transfer. + Corrupted packages have the same impact as lost packages: They require a re-send, adding a delay + and could lead to timeouts. + + Building the checksum has a low processing overhead but increases integrity of sent and received data. + Packages discarded due to failed CRC cecks are counted in PhotonPeer.PacketLossByCrc. + + + + + Count of packages dropped due to failed CRC checks for this connection. + + + + + + Count of packages dropped due to wrong challenge for this connection. + + + + + Gets the count of sent but not yet acknowledged commands (for UDP connections). + + + + + Count of commands that got repeated (due to local repeat-timing before an ACK was received). + + + + + Number of send retries before a peer is considered lost/disconnected. Default: 7. + + + The initial timeout countdown of a command is calculated by the current roundTripTime + 4 * roundTripTimeVariance. + Please note that the timeout span until a command will be resent is not constant, but based on + the roundtrip time at the initial sending, which will be doubled with every failed retry. + + DisconnectTimeout and SentCountAllowance are competing settings: either might trigger a disconnect on the + client first, depending on the values and Roundtrip Time. + + + + + Caps the initial timing for repeats of reliable commands. In milliseconds. Default: 400ms. + + + Unless acknowledged, reliable commands are repeated initially after: current roundTripTime + 4 * roundTripTimeVariance. + + As this value can be very high when there was exceptional lag, InitialResendTimeMax makes sure that commands + get repeated several times before they may trigger a timeout. + + + + + Sets the time between pings being sent automatically. They measure the roundtrip time and keep connections from closing. Default: 1000. + + + For Photon's reliable UDP connections, pings are skipped if any reliable command was sent during the specified TimePingInterval. + Any reliable command is used to update the RoundTripTime and RoundTripTimeVariance. + + When using TCP and WebSockets, the ping is of interest to measure the roundtrip and to keep a connection open, should nothing else + With those two protocols, the ping is used to update the RoundTripTime and RoundTripTimeVariance. + + + + + Time in milliseconds before any sent reliable command triggers a timeout disconnect, unless acknowledged by the receiver. Default: 10000. + + + DisconnectTimeout is not an exact value for a timeout. The exact timing of the timeout depends on the frequency + of Service() calls and the roundtrip time. Commands sent with long roundtrip-times and variance are checked less + often for re-sending. + + DisconnectTimeout and SentCountAllowance are competing settings: either might trigger a disconnect on the + client first, depending on the values and Roundtrip Time. + + Default: 10000 ms. Maximum setting: 65535. + Setting a negative value will apply the default timeout. + + + + + Approximated Environment.TickCount value of server (while connected). + + + UDP: The server's timestamp is automatically fetched after connecting (once). This is done + internally by a command which is acknowledged immediately by the server. + TCP: The server's timestamp fetched with each ping but set only after connecting (once). + + The approximation will be off by +/- 10ms in most cases. Per peer/client and connection, the + offset will be constant (unless FetchServerTimestamp() is used). A constant offset should be + better to adjust for. Unfortunately there is no way to find out how much the local value + differs from the original. + + The approximation adds RoundtripTime / 2 and uses this.LocalTimeInMilliSeconds to calculate + in-between values (this property returns a new value per tick). + + The value sent by Photon equals Environment.TickCount in the logic layer. + + + 0 until connected. + While connected, the value is an approximation of the server's current timestamp. + + + + + This setter for the (local-) timestamp delegate replaces the default Environment.TickCount with any equal function. + + + + The internally used per PhotonPeer time value. + + Returns the integer part of a Stopwatch ElapsedMilliseconds value. + If the PhotonPeer runs continuously the ClientTime will increment from zero to Int32..::.MaxValue + for approximately 24.9 days, then jump to Int32..::.MinValue (a negative number), then increment + back to zero during the next 24.9 days. + + It is recommended to use this int only for delta times, to avoid handling the overflow. + + + + The last ConnectionTime value, when some ACKs were sent out by this client. + Only applicable to UDP connections. + + + The last ConnectionTime value, when SendOutgoingCommands actually checked outgoing queues to send them. Must be connected. + Available for UDP and TCP connections. + + + Measures the maximum milliseconds spent in PhotonSocket.Send(). + + + Time until a reliable command is acknowledged by the server. + + The value measures network latency and for UDP it includes the server's ACK-delay (setting in config). + In TCP, there is no ACK-delay, so the value is slightly lower (if you use default settings for Photon). + + RoundTripTime is updated constantly. Every reliable command will contribute a fraction to this value. + + This is also the approximate time until a raised event reaches another client or until an operation + result is available. + + + + + Changes of the roundtriptime as variance value. Gives a hint about how much the time is changing. + + + + The last measured roundtrip time for this connection. + + + + Timestamp of the last time anything (!) was received from the server (including low level Ping, ACKs, events and operation-returns). + + + This is not the time when something was dispatched. If you enable NetworkSimulation, this value is affected as well. + + + + + The server address which was used in PhotonPeer.Connect() or null (before Connect() was called). + + + + Contains the IP address of the previously resolved ServerAddress (or empty, if address wasn't resolved with the internal methods). + + + The protocol this peer is currently connected/connecting with (or 0). + + + This is the transport protocol to be used for next connect (see remarks). + The TransportProtocol can be changed anytime but it will not change the + currently active connection. Instead, TransportProtocol will be applied on next Connect. + + + + + Gets or sets the network simulation "enabled" setting. + Changing this value also locks this peer's sending and when setting false, + the internally used queues are executed (so setting to false can take some cycles). + + + + + Gets the settings for built-in Network Simulation for this peer instance + while IsSimulationEnabled will enable or disable them. + Once obtained, the settings can be modified by changing the properties. + + + + + Defines the initial size of an internally used StreamBuffer for Tcp. + The StreamBuffer is used to aggregate operation into (less) send calls, + which uses less resoures. + + + The size is not restricing the buffer and does not affect when outgoing data is actually sent. + + + + + The Maximum Trasfer Unit (MTU) defines the (network-level) packet-content size that is + guaranteed to arrive at the server in one piece. The Photon Protocol uses this + size to split larger data into packets and for receive-buffers of packets. + + + This value affects the Packet-content. The resulting UDP packages will have additional + headers that also count against the package size (so it's bigger than this limit in the end) + Setting this value while being connected is not allowed and will throw an Exception. + Minimum is 576. Huge values won't speed up connections in most cases! + + + + + This property is set internally, when OpExchangeKeysForEncryption successfully finished. + While it's true, encryption can be used for operations. + + + + + While true, the peer will not send any other commands except ACKs (used in UDP connections). + + + + Defines if Key Exchange for Encryption is done asynchronously in another thread. + + + Indicates if sequence numbers should be randomized. + + + Initialization array, used to modify the sequence numbers of channels. + + + If GCM is used for DatagramEncryption. + If true, the randomization-value gets added to the current value, else (CBC/old style) the randomization-value replaces the current value. + + + + Gets the byte-count of incoming "low level" messages, which are either Enet Commands or Tcp Messages. + These include all headers, except those of the underlying internet protocol Udp or Tcp. + + + + + Gets the byte-count of outgoing "low level" messages, which are either Enet Commands or Tcp Messages. + These include all headers, except those of the underlying internet protocol Udp or Tcp. + + + + + Gets a statistic of incoming and outgoing traffic, split by operation, operation-result and event. + + + Operations are outgoing traffic, results and events are incoming. + Includes the per-command header sizes (Udp: Enet Command Header or Tcp: Message Header). + + + + + Returns the count of milliseconds the stats are enabled for tracking. + + + + + Enables or disables collection of statistics in TrafficStatsIncoming, TrafficStatsOutgoing and TrafficstatsGameLevel. + + + Setting this to true, also starts the stopwatch to measure the timespan the stats are collected. + Enables the traffic statistics of a peer: TrafficStatsIncoming, TrafficStatsOutgoing and TrafficstatsGameLevel (nothing else). + Default value: false (disabled). + + + + + Creates new instances of TrafficStats and starts a new timer for those. + + + + + Creates new TrafficStats values and the related Stopwatch instance. To be called when the peer is created / reset. + + + + + Returns a string of the most interesting connection statistics. + When you have issues on the client side, these might contain hints about the issue's cause. + + If true, Incoming and Outgoing low-level stats are included in the string. + Stats as string. + + + Implements the message-protocol, based on the underlying network protocol (udp, tcp, http). + + + Setter for the Payload Encryptor type. Used for next connection. + + If null, the PhotonPeer will create a DiffieHellmanCryptoProvider, which is the default. + This is only needed in rare cases, where using native payload encryption makes sense. + + Get in touch about this, if you got questions: developer@photonengine.com + + + + PayloadEncryption Secret. Message payloads get encrypted with it individually and on demand. + + + Setter for the Datagram Encryptor type. Used at next connect. + + If null, the PhotonPeer will create a default datagram encryptor instance. + + + + The datagram encryptor used for the current connection. Applied internally in InitDatagramEncryption. + + + Count of unreliable commands being discarded in case this client already dispatched a command that was newer (higher sequence number). + + + Set per dispatch in DispatchIncomingCommands to: commandUnreliableSequenceNumber - channel.incomingUnreliableSequenceNumber. Indicates how big the (sequence)gap is, compared to the last dispatched unreliable command. + + + Creates a new PhotonPeer with specified transport protocol (without a IPhotonPeerListener). + Make sure to set the Listener, before using the peer. + + + + Creates a new PhotonPeer instance to communicate with Photon and selects the transport protocol. We recommend UDP. + + a IPhotonPeerListener implementation + Protocol to use to connect to Photon. + + + + Starts connecting to the given Photon server. Non-blocking. + + + Connecting to the Photon server is done asynchronous. + Unless an error happens right away (and this returns false), wait for the call of IPhotonPeerListener.OnStatusChanged. + + + Address of a Photon server as IP:port or hostname. WebSocket connections must contain a scheme (ws:// or wss://). + + + The ID of the app to use. Typically this is a guid (for the Photon Cloud). Max 32 characters. + + + Optional custom data to be used by server during peer creation. + If used for authentication, the server is able to reject a client without creating a peer. + Must be a serializable data type of Photon. + + Custom data to send to the server in the Init request. Might be used to identify a client / user. + + True if a connection attempt will be made. False if some error could be detected early-on. + + + + + Starts connecting to the given Photon server. Non-blocking. + + + Connecting to the Photon server is done asynchronous. + Unless an error happens right away (and this returns false), wait for the call of IPhotonPeerListener.OnStatusChanged. + + + Address of a Photon server as IP:port or hostname. WebSocket connections must contain a scheme (ws:// or wss://). + + + Optional address of a proxy server. Only used by WebSocket connections. Set null to use none. + + + The ID of the app to use. Typically this is a guid (for the Photon Cloud). Max 32 characters. + + + Optional Photon token data to be used by server during peer creation. + If used for authentication, the server is able to reject a client without creating a peer. + Must be of type string or byte[] (as provided by server). + + Custom data to send to the server in the Init request. Might be used to identify a client / user. + + True if a connection attempt will be made. False if some error could be detected early-on. + + + + + This method initiates a mutual disconnect between this client and the server. + + + Calling this method does not immediately close a connection. Disconnect lets the server + know that this client is no longer listening. For the server, this is a much faster way + to detect that the client is gone but it requires the client to send a few final messages. + + On completion, OnStatusChanged is called with the StatusCode.Disconnect. + + If the client is disconnected already or the connection thread is stopped, then there is no callback. + + The default server logic will leave any joined game and trigger the respective event. + + + + + This method immediately closes a connection (pure client side) and ends related listening Threads. + + + Unlike Disconnect, this method will simply stop to listen to the server. Udp connections will timeout. + If the connections was open, this will trigger a callback to OnStatusChanged with code StatusCode.Disconnect. + + + + + This will fetch the server's timestamp and update the approximation for property ServerTimeInMilliseconds. + + + The server time approximation will NOT become more accurate by repeated calls. Accuracy currently depends + on a single roundtrip which is done as fast as possible. + + The command used for this is immediately acknowledged by the server. This makes sure the roundtrip time is + low and the timestamp + rountriptime / 2 is close to the original value. + + + + + This method creates a public key for this client and exchanges it with the server. + + + Encryption is not instantly available but calls OnStatusChanged when it finishes. + Check for StatusCode EncryptionEstablished and EncryptionFailedToEstablish. + + Calling this method sets IsEncryptionAvailable to false. + This method must be called before the "encrypt" parameter of OpCustom can be used. + + If operation could be enqueued for sending + + + + Initializes Datagram Encryption. Optionally, the EncryptorType is being used, if set. + + Secret used to cipher udp packets. + Secret used for authentication of udp packets. + Sets if enet Sequence Numbers will be randomized or not. Preferably should be true. + Sets if the chaining mode should be CBC (false, default) or GCM (true). GCM mode is only available with a native encryption plugin. + + + + Photon's Payload Encryption secret may be set by a response from the server. + + The secret in form of a byte[]. + + + + This method excutes DispatchIncomingCommands and SendOutgoingCommands in your application Thread-context. + + + The Photon client libraries are designed to fit easily into a game or application. The application + is in control of the context (thread) in which incoming events and responses are executed and has + full control of the creation of UDP/TCP packages. + + Sending packages and dispatching received messages are two separate tasks. Service combines them + into one method at the cost of control. It calls DispatchIncomingCommands and SendOutgoingCommands. + + Call this method regularly (2..20 times a second). + + This will Dispatch ANY remaining buffered responses and events AND will send queued outgoing commands. + Fewer calls might be more effective if a device cannot send many packets per second, as multiple + operations might be combined into one package. + + + You could replace Service by: + + while (DispatchIncomingCommands()); //Dispatch until everything is Dispatched... + SendOutgoingCommands(); //Send a UDP/TCP package with outgoing messages + + + + + + + Creates and sends a UDP/TCP package with outgoing commands (operations and acknowledgements). Also called by Service(). + + + As the Photon library does not create any UDP/TCP packages by itself. Instead, the application + fully controls how many packages are sent and when. A tradeoff, an application will + lose connection, if it is no longer calling SendOutgoingCommands or Service. + + If multiple operations and ACKs are waiting to be sent, they will be aggregated into one + package. The package fills in this order: + ACKs for received commands + A "Ping" - only if no reliable data was sent for a while + Starting with the lowest Channel-Nr: + Reliable Commands in channel + Unreliable Commands in channel + + This gives a higher priority to lower channels. + + A longer interval between sends will lower the overhead per sent operation but + increase the internal delay (which adds "lag"). + + Call this 2..20 times per second (depending on your target platform). + + The if commands are not yet sent. Udp limits it's package size, Tcp doesnt. + + + + Dispatching received messages (commands), causes callbacks for events, responses and state changes within a IPhotonPeerListener. + + + DispatchIncomingCommands only executes a single received + command per call. If a command was dispatched, the return value is true and the method + should be called again. + + This method is called by Service() until currently available commands are dispatched. + In general, this method should be called until it returns false. In a few cases, it might + make sense to pause dispatching (if a certain state is reached and the app needs to load + data, before it should handle new events). + + The callbacks to the peer's IPhotonPeerListener are executed in the same thread that is + calling DispatchIncomingCommands. This makes things easier in a game loop: Event execution + won't clash with painting objects or the game logic. + + + + + Prepares your operation (code and parameters) to be sent to the Photon Server with specified SendOptions. + + + This method serializes and enqueues the operation right away while the actual sending happens later. + To be able to aggregate operations/messages, the Photon client sends packages only when you call SendOutgoingCommands(). + + The sendOptions specify how the operation gets sent exactly. + Keep in mind that some transport protocols don't support unreliable or unsequenced transport. + In that case, the sendOptions might be ignored. + + The operationCode must be known by the server's logic or won't be processed. + In almost all cases, sending an operation will result in a OperationResponse (see: IPhotonPeerListener.OnOperationResponse). + + Operations are handled by their byte\-typed code. The codes are defined in the Realtime API (a.k.a. LoadBalancing API). + Containing parameters as key\-value pair. The key is byte\-typed, while the value is any serializable datatype. + Wraps up DeliveryMode (reliability), Encryption and Channel values for sending. + If operation could be enqueued for sending. + + + + Registers new types/classes for de/serialization and the fitting methods to call for this type. + + + SerializeMethod and DeserializeMethod are complementary: Feed the product of serializeMethod to + the constructor, to get a comparable instance of the object. + + After registering a Type, it can be used in events and operations and will be serialized like + built-in types. + + Type (class) to register. + A byte-code used as shortcut during transfer of this Type. + Method delegate to create a byte[] from a customType instance. + Method delegate to create instances of customType's from byte[]. + If the Type was registered successfully. + + + + Container for an Operation request, which is a code and parameters. + + + On the lowest level, Photon only allows byte-typed keys for operation parameters. + The values of each such parameter can be any serializable datatype: byte, int, hashtable and many more. + + + + Byte-typed code for an operation - the short identifier for the server's method to call. + + + The parameters of the operation - each identified by a byte-typed code in Photon. + + + + Contains the server's response for an operation called by this peer. + The indexer of this class actually provides access to the Parameters Dictionary. + + + The OperationCode defines the type of operation called on Photon and in turn also the Parameters that + are set in the request. Those are provided as Dictionary with byte-keys. + There are pre-defined constants for various codes defined in the LoadBalancing application. + Check: OperationCode, ParameterCode, etc. + + An operation's request is summarized by the ReturnCode: a short typed code for "Ok" or + some different result. The code's meaning is specific per operation. An optional DebugMessage can be + provided to simplify debugging. + + Each call of an operation gets an ID, called the "invocID". This can be matched to the IDs + returned with any operation calls. This way, an application could track if a certain OpRaiseEvent + call was successful. + + + + The code for the operation called initially (by this peer). + Use enums or constants to be able to handle those codes, like OperationCode does. + + + A code that "summarizes" the operation's success or failure. Specific per operation. 0 usually means "ok". + + + An optional string sent by the server to provide readable feedback in error-cases. Might be null. + + + A Dictionary of values returned by an operation, using byte-typed keys per value. + + + + Alternative access to the Parameters, which wraps up a TryGetValue() call on the Parameters Dictionary. + + The byte-code of a returned value. + The value returned by the server, or null if the key does not exist in Parameters. + + + ToString() override. + Relatively short output of OpCode and returnCode. + + + Extensive output of operation results. + To be used in debug situations only, as it returns a string for each value. + + + A Photon Event consists of a Code value and a Parameters Dictionary with the event's content (if any). + + The indexer of this class provides access to the values in Parameters. + It wraps the null check for Parameters and uses TryGetValue() for the provided key. + + Photon servers use events to send information which is not triggered by a client's operation requests (those get responses). + The Realtime API allows you to send custom events with any Code and content via OpRaiseEvent. + + + + The event code identifies the type of event. + + + The Parameters of an event is a Dictionary<byte, object>. + + + + Access to the Parameters of a Photon-defined event. Custom Events only use Code, Sender and CustomData. + + The key byte-code of a Photon event value. + The Parameters value, or null if the key does not exist in Parameters. + + + + Defines the event key containing the Sender of the event. + + + Defaults to Sender key of Realtime API events (RaiseEvent): 254. + Can be set to Chat API's ChatParameterCode.Sender: 5. + + + + + Accesses the Sender of the event via the indexer and SenderKey. The result is cached. + + + Accesses this event's Parameters[CustomDataKey], which may be null. + In that case, this returns 0 (identifying the server as sender). + + + + + Defines the event key containing the Custom Data of the event. + + + Defaults to Data key of Realtime API events (RaiseEvent): 245. + Can be set to any other value on demand. + + + + + Accesses the Custom Data of the event via the indexer and CustomDataKey. The result is cached. + + + Accesses this event's Parameters[CustomDataKey], which may be null. + + + + ToString() override. + Short output of "Event" and it's Code. + + + Extensive output of the event content. + To be used in debug situations only, as it returns a string for each value. + + + + Type of serialization methods to add custom type support. + Use PhotonPeer.ReisterType() to register new types with serialization and deserialization methods. + + The method will get objects passed that were registered with it in RegisterType(). + Return a byte[] that resembles the object passed in. The framework will surround it with length and type info, so don't include it. + + + Serialization method delegate. StreamBuffer based custom serialization methods must use this form. + + + + Type of deserialization methods to add custom type support. + Use PhotonPeer.RegisterType() to register new types with serialization and deserialization methods. + + The framwork passes in the data it got by the associated SerializeMethod. The type code and length are stripped and applied before a DeserializeMethod is called. + Return a object of the type that was associated with this method through RegisterType(). + + + Deserialization method delegate. StreamBuffer based custom deserialization methods must use this form. + + + + Provides tools for the Exit Games Protocol + + + + + Serialize creates a byte-array from the given object and returns it. + + The object to serialize + The serialized byte-array + + + + Deserialize returns an object reassembled from the given byte-array. + + The byte-array to be Deserialized + The Deserialized object + + + + Serializes a short typed value into a byte-array (target) starting at the also given targetOffset. + The altered offset is known to the caller, because it is given via a referenced parameter. + + The short value to be serialized + The byte-array to serialize the short to + The offset in the byte-array + + + + Serializes an int typed value into a byte-array (target) starting at the also given targetOffset. + The altered offset is known to the caller, because it is given via a referenced parameter. + + The int value to be serialized + The byte-array to serialize the short to + The offset in the byte-array + + + + Serializes an float typed value into a byte-array (target) starting at the also given targetOffset. + The altered offset is known to the caller, because it is given via a referenced parameter. + + The float value to be serialized + The byte-array to serialize the short to + The offset in the byte-array + + + + Deserialize fills the given int typed value with the given byte-array (source) starting at the also given offset. + The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. + The altered offset is this way also known to the caller. + + The int value to deserialize into + The byte-array to deserialize from + The offset in the byte-array + + + + Deserialize fills the given short typed value with the given byte-array (source) starting at the also given offset. + The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. + The altered offset is this way also known to the caller. + + The short value to deserialized into + The byte-array to deserialize from + The offset in the byte-array + + + + Deserialize fills the given float typed value with the given byte-array (source) starting at the also given offset. + The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. + The altered offset is this way also known to the caller. + + The float value to deserialize + The byte-array to deserialize from + The offset in the byte-array + + + + Exit Games GpBinaryV16 protocol implementation + + + + + The gp type. + + + + + Unkown type. + + + + + An array of objects. + + + This type is new in version 1.5. + + + + + A boolean Value. + + + + + A byte value. + + + + + An array of bytes. + + + + + An array of objects. + + + + + A 16-bit integer value. + + + + + A 32-bit floating-point value. + + + This type is new in version 1.5. + + + + + A dictionary + + + This type is new in version 1.6. + + + + + A 64-bit floating-point value. + + + This type is new in version 1.5. + + + + + A Hashtable. + + + + + A 32-bit integer value. + + + + + An array of 32-bit integer values. + + + + + A 64-bit integer value. + + + + + A string value. + + + + + An array of string values. + + + + + A custom type. 0x63 + + + + + Null value don't have types. + + + + + Calls the correct serialization method for the passed object. + + + + + DeserializeInteger returns an Integer typed value from the given stream. + + + + Exception type for de/serialization issues. Used in Protocol 1.8. + + + Constructor for the exception. + + + Unkown. GpType: 0. + + + Boolean. GpType: 2. See: BooleanFalse, BooleanTrue. + + + Byte. GpType: 3. + + + Short. GpType: 4. + + + 32-bit floating-point value. GpType: 5. + + + 64-bit floating-point value. GpType: 6. + + + String. GpType: 7. + + + Null value don't have types. GpType: 8. + + + CompressedInt. GpType: 9. + + + CompressedLong. GpType: 10. + + + Int1. GpType: 11. + + + Int1_. GpType: 12. + + + Int2. GpType: 13. + + + Int2_. GpType: 14. + + + L1. GpType: 15. + + + L1_. GpType: 16. + + + L2. GpType: 17. + + + L2_. GpType: 18. + + + Custom Type. GpType: 19. + + + Custom Type Slim. GpType: 128 (0x80) and up. + + + Dictionary. GpType: 20. + + + Hashtable. GpType: 21. + + + ObjectArray. GpType: 23. + + + OperationRequest. GpType: 24. + + + OperationResponse. GpType: 25. + + + EventData. GpType: 26. + + + Boolean False. GpType: 27. + + + Boolean True. GpType: 28. + + + ShortZero. GpType: 29. + + + IntZero. GpType: 30. + + + LongZero. GpType: 3. + + + FloatZero. GpType: 32. + + + DoubleZero. GpType: 33. + + + ByteZero. GpType: 34. + + + Array for nested Arrays. GpType: 64 (0x40). Element count and type follows. + + + + Writes integers as compressed. Either directly as zigzag-encoded or (when a type is written for this value) it can use an optimized sub-type. + + + + Enum of the three options for reliability and sequencing in Photon's reliable-UDP. + + + The operation/message gets sent just once without acknowledgement or repeat. The sequence (order) of messages is guaranteed. + + + The operation/message asks for an acknowledgment. It's resent until an ACK arrived. The sequence (order) of messages is guaranteed. + + + The operation/message gets sent once (unreliable) and might arrive out of order. Best for your own sequencing (e.g. for streams). + + + The operation/message asks for an acknowledgment. It's resent until an ACK arrived and might arrive out of order. Best for your own sequencing (e.g. for streams). + + + Wraps up DeliveryMode, Encryption and Channel values for sending operations and messages. + + + Default SendOptions instance for reliable sending. + + + Default SendOptions instance for unreliable sending. + + + Chose the DeliveryMode for this operation/message. Defaults to Unreliable. + + + If true the operation/message gets encrypted before it's sent. Defaults to false. + Before encryption can be used, it must be established. Check PhotonPeer.IsEncryptionAvailable is true. + + + The Enet channel to send in. Defaults to 0. + Channels in Photon relate to "message channels". Each channel is a sequence of messages. + + + Sets the DeliveryMode either to true: Reliable or false: Unreliable, overriding any current value. + Use this to conveniently select reliable/unreliable delivery. + + + Encapsulates the network i/o functionality for the realtime library. + + + used by PhotonPeer* + + + Endless loop, run in Receive Thread. + + + Internal class to encapsulate the network i/o functionality for the realtime libary. + + + used by PhotonPeer* + + + Encapsulates the network i/o functionality for the realtime library. + + + used by PhotonPeer* + + + Endless loop, run in Receive Thread. + + + Internal class to encapsulate the network i/o functionality for the realtime libary. + + + used by PhotonPeer* + + + + Allocates a new byte[] that is the exact used length. Use GetBuffer for nonalloc operations. + + + + + Allocates a new byte[] that is the exact used length. Use GetBuffer for nonalloc operations. + + + + + The bytes between Position and Length are copied to the beginning of the buffer. Length decreased by Position. Position set to 0. + + + + + Brings StreamBuffer to the state as after writing of 'length' bytes. Returned buffer and offset can be used to actually fill "written" segment with data. + + + + + Remaining bytes in this StreamBuffer. Returns 0 if len - pos is less than 0. + + + + + Sets stream length. If current position is greater than specified value, it's set to the value. + + + SetLength(0) resets the stream to initial state but preserves underlying byte[] buffer. + + + + + Guarantees that the buffer is at least neededSize bytes. + + + + + Contains several (more or less) useful static methods, mostly used for debugging. + + + + + Gets the local machine's "milliseconds since start" value (precision is described in remarks). + + + This method uses Environment.TickCount (cheap but with only 16ms precision). + PhotonPeer.LocalMsTimestampDelegate is available to set the delegate (unless already connected). + + Fraction of the current time in Milliseconds (this is not a proper datetime timestamp). + + + + Creates a background thread that calls the passed function in intervals, as long as that returns true. + + + With StopBackgroundCalls, you can stop threads started with this method. + The resulting ThreadAbortException is caught and discarded. + + The function to call. Must return true, if it should be called again. Returning false ends the thread. + Milliseconds to sleep between calls of myThread. Default: 100ms. + An optional name for the task to help debugging. Null or empty won't set the thread.Name. + + + + Calls Abort on the thread with the given id (= index of the thread list) + + + The resulting ThreadAbortException is caught and discarded. + + The unique ID of the thread. + True if the thread is canceled and false otherwise, e.g. if the thread with the given ID does not exist. + + + + Calls Abort on all threads that were started via StartBackgroundCalls. + + + The resulting ThreadAbortException is caught and discarded. + + True if any thread got aborted. + + + + Writes the exception's stack trace to the received stream. + + Exception to obtain information from. + Output sream used to write to. + + + + Writes the exception's stack trace to the received stream. Writes to: System.Diagnostics.Debug. + + Exception to obtain information from. + + + + This method returns a string, representing the content of the given IDictionary. + Returns "null" if parameter is null. + + IDictionary to return as string. + + + + + Converts a byte-array to string (useful as debugging output). + Uses BitConverter.ToString(list) internally after a null-check of list. + + Byte-array to convert to string. + Length of bytes to convert to string. If negative, list.Length is converted. Optional. Default: -1. + + List of bytes as string. + + + + + Class to wrap static access to the random.Next() call in a thread safe manner. + + + + + An Attribute named "Preserve" tells Unity to not strip the code. + + + + TCP "Package" header: 7 bytes + + + TCP "Message" header: 2 bytes + + + TCP header combined: 9 bytes + + + Defines if the (TCP) socket implementation needs to do "framing". + The WebSocket protocol (e.g.) includes framing, so when that is used, we set DoFraming to false. + + + + Checks the incoming queue and Dispatches received data if possible. Returns if a Dispatch happened or + not, which shows if more Dispatches might be needed. + + + + + gathers commands from all (out)queues until udp-packet is full and sends it! + + + + Sends a ping in intervals to keep connection alive (server will timeout connection if nothing is sent). + Always false in this case (local queues are ignored. true would be: "call again to send remaining data"). + + + enqueues serialized operations to be sent as tcp stream / package + + + Sends a ping and modifies this.lastPingResult to avoid another ping for a while. + + + reads incoming tcp-packages to create and queue incoming commands* + + + + Only in use as long as PhotonPeer.TrafficStatsEnabled = true; + + + + Gets sum of outgoing operations in bytes. + + + Gets count of outgoing operations. + + + Gets sum of byte-cost of incoming operation-results. + + + Gets count of incoming operation-results. + + + Gets sum of byte-cost of incoming events. + + + Gets count of incoming events. + + + + Gets longest time it took to complete a call to OnOperationResponse (in your code). + If such a callback takes long, it will lower the network performance and might lead to timeouts. + + + + Gets OperationCode that causes the LongestOpResponseCallback. See that description. + + + + Gets longest time a call to OnEvent (in your code) took. + If such a callback takes long, it will lower the network performance and might lead to timeouts. + + + + Gets EventCode that caused the LongestEventCallback. See that description. + + + + Gets longest time between subsequent calls to DispatchIncomgingCommands in milliseconds. + Note: This is not a crucial timing for the networking. Long gaps just add "local lag" to events that are available already. + + + + + Gets longest time between subsequent calls to SendOutgoingCommands in milliseconds. + Note: This is a crucial value for network stability. Without calling SendOutgoingCommands, + nothing will be sent to the server, who might time out this client. + + + + + Gets number of calls of DispatchIncomingCommands. + + + + + Gets number of calls of DispatchIncomingCommands. + + + + + Gets number of calls of SendOutgoingCommands. + + + + Gets sum of byte-cost of all "logic level" messages. + + + Gets sum of counted "logic level" messages. + + + Gets sum of byte-cost of all incoming "logic level" messages. + + + Gets sum of counted incoming "logic level" messages. + + + Gets sum of byte-cost of all outgoing "logic level" messages (= OperationByteCount). + + + Gets sum of counted outgoing "logic level" messages (= OperationCount). + + + + Resets the values that can be maxed out, like LongestDeltaBetweenDispatching. See remarks. + + + Set to 0: LongestDeltaBetweenDispatching, LongestDeltaBetweenSending, LongestEventCallback, LongestEventCallbackCode, LongestOpResponseCallback, LongestOpResponseCallbackOpCode. + Also resets internal values: timeOfLastDispatchCall and timeOfLastSendCall (so intervals are tracked correctly). + + + + Gets the byte-size of per-package headers. + + + + Counts commands created/received by this client, ignoring repeats (out command count can be higher due to repeats). + + + + Gets count of bytes as traffic, excluding UDP/TCP headers (42 bytes / x bytes). + + + Timestamp of the last incoming ACK that has been read (every PhotonPeer.TimePingInterval milliseconds this client sends a PING which must be ACKd). + + + Timestamp of last incoming reliable command (every second we expect a PING). + +
+
diff --git a/Assets/Photon/PhotonLibs/Photon3Unity3D.xml.meta b/Assets/Photon/PhotonLibs/Photon3Unity3D.xml.meta new file mode 100644 index 00000000..671d8243 --- /dev/null +++ b/Assets/Photon/PhotonLibs/Photon3Unity3D.xml.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8d4f08d435c4b6343969d8af249460ff +labels: +- ExitGames +- PUN +- Photon +- Networking +TextScriptImporter: + userData: diff --git a/Assets/Photon/PhotonLibs/WebSocket.meta b/Assets/Photon/PhotonLibs/WebSocket.meta new file mode 100644 index 00000000..a02cf77c --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 2f243ce0406bd1c40a9ff5fc2d78d905 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs b/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs new file mode 100644 index 00000000..24b5e1f8 --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs @@ -0,0 +1,433 @@ +#if UNITY_WEBGL || WEBSOCKET || WEBSOCKET_PROXYCONFIG + +// -------------------------------------------------------------------------------------------------------------------- +// +// Copyright (c) Exit Games GmbH. All rights reserved. +// +// +// Internal class to encapsulate the network i/o functionality for the realtime library. +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + + +namespace ExitGames.Client.Photon +{ + using System; + using System.Collections; + using UnityEngine; + using SupportClassPun = SupportClass; + + + /// + /// Yield Instruction to Wait for real seconds. Very important to keep connection working if Time.TimeScale is altered, we still want accurate network events + /// + public sealed class WaitForRealSeconds : CustomYieldInstruction + { + private readonly float _endTime; + + public override bool keepWaiting + { + get { return this._endTime > Time.realtimeSinceStartup; } + } + + public WaitForRealSeconds(float seconds) + { + this._endTime = Time.realtimeSinceStartup + seconds; + } + } + + + /// + /// Internal class to encapsulate the network i/o functionality for the realtime libary. + /// + public class SocketWebTcp : IPhotonSocket, IDisposable + { + private WebSocket sock; + + private readonly object syncer = new object(); + + public SocketWebTcp(PeerBase npeer) : base(npeer) + { + this.ServerAddress = npeer.ServerAddress; + this.ProxyServerAddress = npeer.ProxyServerAddress; + if (this.ReportDebugOfLevel(DebugLevel.INFO)) + { + this.Listener.DebugReturn(DebugLevel.INFO, "new SocketWebTcp() for Unity. Server: " + this.ServerAddress + (String.IsNullOrEmpty(this.ProxyServerAddress) ? "" : ", Proxy: " + this.ProxyServerAddress)); + } + + //this.Protocol = ConnectionProtocol.WebSocket; + this.PollReceive = false; + } + + public void Dispose() + { + this.State = PhotonSocketState.Disconnecting; + + if (this.sock != null) + { + try + { + if (this.sock.Connected) + { + this.sock.Close(); + } + } + catch (Exception ex) + { + this.EnqueueDebugReturn(DebugLevel.INFO, "Exception in SocketWebTcp.Dispose(): " + ex); + } + } + + this.sock = null; + this.State = PhotonSocketState.Disconnected; + } + + GameObject websocketConnectionObject; + + public override bool Connect() + { + //bool baseOk = base.Connect(); + //if (!baseOk) + //{ + // return false; + //} + + + this.State = PhotonSocketState.Connecting; + + + if (this.websocketConnectionObject != null) + { + UnityEngine.Object.Destroy(this.websocketConnectionObject); + } + + this.websocketConnectionObject = new GameObject("websocketConnectionObject"); + MonoBehaviour mb = this.websocketConnectionObject.AddComponent(); + this.websocketConnectionObject.hideFlags = HideFlags.HideInHierarchy; + UnityEngine.Object.DontDestroyOnLoad(this.websocketConnectionObject); + + + this.ConnectAddress += "&IPv6"; // this makes the Photon Server return a host name for the next server (NS points to MS and MS points to GS) + + + // earlier, we read the proxy address/scheme and failed to connect entirely, if that wasn't successful... + // it was either successful (using the resulting proxy address) or no connect at all... + + // we want: + // WITH support: fail if the scheme is wrong or use it if possible + // WITHOUT support: use proxy address, if it's a direct value (not a scheme we provide) or fail if it's a scheme + + string proxyServerAddress; + if (!this.ReadProxyConfigScheme(this.ProxyServerAddress, this.ServerAddress, out proxyServerAddress)) + { + this.Listener.DebugReturn(DebugLevel.INFO, "ReadProxyConfigScheme() failed. Using no proxy."); + } + + + try + { + this.sock = new WebSocket(new Uri(this.ConnectAddress), proxyServerAddress, this.SerializationProtocol); + this.sock.DebugReturn = (DebugLevel l, string s) => + { + if (this.State != PhotonSocketState.Disconnected) + { + this.Listener.DebugReturn(l, this.State + " " + s); + } + }; + + this.sock.Connect(); + mb.StartCoroutine(this.ReceiveLoop()); + + return true; + } + catch (Exception e) + { + this.Listener.DebugReturn(DebugLevel.ERROR, "SocketWebTcp.Connect() caught exception: " + e); + return false; + } + } + + + /// + /// Attempts to read a proxy configuration defined by a address prefix. Only available to Industries Circle members on demand. + /// + /// + /// Extended proxy support is available to Industries Circle members. Where available, proxy addresses may be defined as 'auto:', 'pac:' or 'system:'. + /// In all other cases, the proxy address is used as is and fails to read configs (if one of the listed schemes is used). + /// + /// Requires file ProxyAutoConfig.cs and compile define: WEBSOCKET_PROXYCONFIG_SUPPORT. + /// + /// Proxy address from the server configuration. + /// Url to connect to (one of the Photon servers). + /// Resulting proxy URL to use. + /// False if there is some error and the resulting proxy address should not be used. + private bool ReadProxyConfigScheme(string proxyAddress, string url, out string proxyUrl) + { + proxyUrl = null; + + #if !WEBSOCKET_PROXYCONFIG + + if (!string.IsNullOrEmpty(proxyAddress)) + { + if (proxyAddress.StartsWith("auto:") || proxyAddress.StartsWith("pac:") || proxyAddress.StartsWith("system:")) + { + this.Listener.DebugReturn(DebugLevel.WARNING, "Proxy configuration via auto, pac or system is only supported with the WEBSOCKET_PROXYCONFIG define. Using no proxy instead."); + return true; + } + proxyUrl = proxyAddress; + } + + return true; + + #else + + if (!string.IsNullOrEmpty(proxyAddress)) + { + var httpUrl = url.ToString().Replace("ws://", "http://").Replace("wss://", "https://"); // http(s) schema required in GetProxyForUrlUsingPac call + bool auto = proxyAddress.StartsWith("auto:", StringComparison.InvariantCultureIgnoreCase); + bool pac = proxyAddress.StartsWith("pac:", StringComparison.InvariantCultureIgnoreCase); + + if (auto || pac) + { + string pacUrl = ""; + if (pac) + { + pacUrl = proxyAddress.Substring(4); + if (pacUrl.IndexOf("://") == -1) + { + pacUrl = "http://" + pacUrl; //default to http + } + } + + string processTypeStr = auto ? "auto detect" : "pac url " + pacUrl; + + this.Listener.DebugReturn(DebugLevel.INFO, "WebSocket Proxy: " + url + " " + processTypeStr); + + string errDescr = ""; + var err = ProxyAutoConfig.GetProxyForUrlUsingPac(httpUrl, pacUrl, out proxyUrl, out errDescr); + + if (err != 0) + { + this.Listener.DebugReturn(DebugLevel.ERROR, "WebSocket Proxy: " + url + " " + processTypeStr + " ProxyAutoConfig.GetProxyForUrlUsingPac() error: " + err + " (" + errDescr + ")"); + return false; + } + } + else if (proxyAddress.StartsWith("system:", StringComparison.InvariantCultureIgnoreCase)) + { + this.Listener.DebugReturn(DebugLevel.INFO, "WebSocket Proxy: " + url + " system settings"); + string proxyAutoConfigPacUrl; + var err = ProxySystemSettings.GetProxy(out proxyUrl, out proxyAutoConfigPacUrl); + if (err != 0) + { + this.Listener.DebugReturn(DebugLevel.ERROR, "WebSocket Proxy: " + url + " system settings ProxySystemSettings.GetProxy() error: " + err); + return false; + } + if (proxyAutoConfigPacUrl != null) + { + if (proxyAutoConfigPacUrl.IndexOf("://") == -1) + { + proxyAutoConfigPacUrl = "http://" + proxyAutoConfigPacUrl; //default to http + } + this.Listener.DebugReturn(DebugLevel.INFO, "WebSocket Proxy: " + url + " system settings AutoConfigURL: " + proxyAutoConfigPacUrl); + string errDescr = ""; + err = ProxyAutoConfig.GetProxyForUrlUsingPac(httpUrl, proxyAutoConfigPacUrl, out proxyUrl, out errDescr); + + if (err != 0) + { + this.Listener.DebugReturn(DebugLevel.ERROR, "WebSocket Proxy: " + url + " system settings AutoConfigURLerror: " + err + " (" + errDescr + ")"); + return false; + } + } + } + else + { + proxyUrl = proxyAddress; + } + + this.Listener.DebugReturn(DebugLevel.INFO, "WebSocket Proxy: " + url + " -> " + (string.IsNullOrEmpty(proxyUrl) ? "DIRECT" : "PROXY " + proxyUrl)); + } + + return true; + #endif + } + + + + public override bool Disconnect() + { + if (this.ReportDebugOfLevel(DebugLevel.INFO)) + { + this.Listener.DebugReturn(DebugLevel.INFO, "SocketWebTcp.Disconnect()"); + } + + this.State = PhotonSocketState.Disconnecting; + + lock (this.syncer) + { + if (this.sock != null) + { + try + { + this.sock.Close(); + } + catch (Exception ex) + { + this.Listener.DebugReturn(DebugLevel.ERROR, "Exception in SocketWebTcp.Disconnect(): " + ex); + } + + this.sock = null; + } + } + + if (this.websocketConnectionObject != null) + { + UnityEngine.Object.Destroy(this.websocketConnectionObject); + } + + this.State = PhotonSocketState.Disconnected; + return true; + } + + /// + /// used by TPeer* + /// + public override PhotonSocketError Send(byte[] data, int length) + { + if (this.State != PhotonSocketState.Connected) + { + return PhotonSocketError.Skipped; + } + + try + { + if (data.Length > length) + { + byte[] trimmedData = new byte[length]; + Buffer.BlockCopy(data, 0, trimmedData, 0, length); + data = trimmedData; + } + + //if (this.ReportDebugOfLevel(DebugLevel.ALL)) + //{ + // this.Listener.DebugReturn(DebugLevel.ALL, "Sending: " + SupportClassPun.ByteArrayToString(data)); + //} + + if (this.sock != null) + { + this.sock.Send(data); + } + } + catch (Exception e) + { + this.Listener.DebugReturn(DebugLevel.ERROR, "Cannot send to: " + this.ServerAddress + ". " + e.Message); + + this.HandleException(StatusCode.Exception); + return PhotonSocketError.Exception; + } + + return PhotonSocketError.Success; + } + + public override PhotonSocketError Receive(out byte[] data) + { + data = null; + return PhotonSocketError.NoData; + } + + + internal const int ALL_HEADER_BYTES = 9; + internal const int TCP_HEADER_BYTES = 7; + internal const int MSG_HEADER_BYTES = 2; + + public IEnumerator ReceiveLoop() + { + //this.Listener.DebugReturn(DebugLevel.INFO, "ReceiveLoop()"); + if (this.sock != null) + { + while (this.sock != null && !this.sock.Connected && this.sock.Error == null) + { + yield return new WaitForRealSeconds(0.1f); + } + + if (this.sock != null) + { + if (this.sock.Error != null) + { + this.Listener.DebugReturn(DebugLevel.ERROR, "Exiting receive thread. Server: " + this.ServerAddress + " Error: " + this.sock.Error); + this.HandleException(StatusCode.ExceptionOnConnect); + } + else + { + // connected + if (this.ReportDebugOfLevel(DebugLevel.ALL)) + { + this.Listener.DebugReturn(DebugLevel.ALL, "Receiving by websocket. this.State: " + this.State); + } + + this.State = PhotonSocketState.Connected; + this.peerBase.OnConnect(); + + while (this.State == PhotonSocketState.Connected) + { + if (this.sock != null) + { + if (this.sock.Error != null) + { + this.Listener.DebugReturn(DebugLevel.ERROR, "Exiting receive thread (inside loop). Server: " + this.ServerAddress + " Error: " + this.sock.Error); + this.HandleException(StatusCode.ExceptionOnReceive); + break; + } + else + { + byte[] inBuff = this.sock.Recv(); + if (inBuff == null || inBuff.Length == 0) + { + // nothing received. wait a bit, try again + yield return new WaitForRealSeconds(0.02f); + continue; + } + + //if (this.ReportDebugOfLevel(DebugLevel.ALL)) + //{ + // this.Listener.DebugReturn(DebugLevel.ALL, "TCP << " + inBuff.Length + " = " + SupportClassPun.ByteArrayToString(inBuff)); + //} + + if (inBuff.Length > 0) + { + try + { + this.HandleReceivedDatagram(inBuff, inBuff.Length, false); + } + catch (Exception e) + { + if (this.State != PhotonSocketState.Disconnecting && this.State != PhotonSocketState.Disconnected) + { + if (this.ReportDebugOfLevel(DebugLevel.ERROR)) + { + this.EnqueueDebugReturn(DebugLevel.ERROR, "Receive issue. State: " + this.State + ". Server: '" + this.ServerAddress + "' Exception: " + e); + } + + this.HandleException(StatusCode.ExceptionOnReceive); + } + } + } + } + } + } + } + } + } + + this.Disconnect(); + } + + + private class MonoBehaviourExt : MonoBehaviour + { + } + } +} + + +#endif \ No newline at end of file diff --git a/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs.meta b/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs.meta new file mode 100644 index 00000000..7f04d3c3 --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ac953d6a57a9ea94e96ec689598995d5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonLibs/WebSocket/WebSocket.cs b/Assets/Photon/PhotonLibs/WebSocket/WebSocket.cs new file mode 100644 index 00000000..e8a4feba --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/WebSocket.cs @@ -0,0 +1,252 @@ +#if UNITY_WEBGL || WEBSOCKET || WEBSOCKET_PROXYCONFIG + +// -------------------------------------------------------------------------------------------------------------------- +// +// Provided originally by Unity to cover WebSocket support in WebGL and the Editor. Modified by Exit Games GmbH. +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + + +namespace ExitGames.Client.Photon +{ + using System; + using System.Text; + using ExitGames.Client.Photon; + + #if UNITY_WEBGL && !UNITY_EDITOR + using System.Runtime.InteropServices; + #else + using WebSocketSharp; + using System.Collections.Generic; + using System.Security.Authentication; + #endif + + + public class WebSocket + { + private Uri mUrl; + private string mProxyAddress; + + /// Photon uses this to agree on a serialization protocol. Either: GpBinaryV16 or GpBinaryV18. Based on enum SerializationProtocol. + private string protocols = "GpBinaryV16"; + + public Action DebugReturn { get; set; } + + public WebSocket(Uri url, string proxyAddress, string protocols = null) + { + this.mUrl = url; + this.mProxyAddress = proxyAddress; + + if (protocols != null) + { + this.protocols = protocols; + } + + string protocol = mUrl.Scheme; + if (!protocol.Equals("ws") && !protocol.Equals("wss")) + { + throw new ArgumentException("Unsupported protocol: " + protocol); + } + } + + public string ProxyAddress + { + get { return mProxyAddress; } + } + + public void SendString(string str) + { + Send(Encoding.UTF8.GetBytes(str)); + } + + public string RecvString() + { + byte[] retval = Recv(); + if (retval == null) + return null; + return Encoding.UTF8.GetString(retval); + } + + #if UNITY_WEBGL && !UNITY_EDITOR + [DllImport("__Internal")] + private static extern int SocketCreate (string url, string protocols); + + [DllImport("__Internal")] + private static extern int SocketState (int socketInstance); + + [DllImport("__Internal")] + private static extern void SocketSend (int socketInstance, byte[] ptr, int length); + + [DllImport("__Internal")] + private static extern void SocketRecv (int socketInstance, byte[] ptr, int length); + + [DllImport("__Internal")] + private static extern int SocketRecvLength (int socketInstance); + + [DllImport("__Internal")] + private static extern void SocketClose (int socketInstance); + + [DllImport("__Internal")] + private static extern int SocketError (int socketInstance, byte[] ptr, int length); + + int m_NativeRef = 0; + + public void Send(byte[] buffer) + { + SocketSend (m_NativeRef, buffer, buffer.Length); + } + + public byte[] Recv() + { + int length = SocketRecvLength (m_NativeRef); + if (length == 0) + return null; + byte[] buffer = new byte[length]; + SocketRecv (m_NativeRef, buffer, length); + return buffer; + } + + public void Connect() + { + m_NativeRef = SocketCreate (mUrl.ToString(), this.protocols); + + //while (SocketState(m_NativeRef) == 0) + // yield return 0; + } + + public void Close() + { + SocketClose(m_NativeRef); + } + + public bool Connected + { + get { return SocketState(m_NativeRef) != 0; } + } + + public string Error + { + get { + const int bufsize = 1024; + byte[] buffer = new byte[bufsize]; + int result = SocketError (m_NativeRef, buffer, bufsize); + + if (result == 0) + return null; + + return Encoding.UTF8.GetString (buffer); + } + } + #else + WebSocketSharp.WebSocket m_Socket; + Queue m_Messages = new Queue(); + bool m_IsConnected = false; + string m_Error = null; + + + public void Connect() + { + m_Socket = new WebSocketSharp.WebSocket(mUrl.ToString(), new string[] {this.protocols}); + m_Socket.Log.Output = (ld, f) => + { + var s = string.Format("WebSocketSharp: {0}", ld.Message); + switch (ld.Level) + { + case WebSocketSharp.LogLevel.Trace: + case WebSocketSharp.LogLevel.Debug: + DebugReturn(DebugLevel.ALL, s); + break; + case WebSocketSharp.LogLevel.Info: + DebugReturn(DebugLevel.INFO, s); + break; + case WebSocketSharp.LogLevel.Warn: + DebugReturn(DebugLevel.WARNING, s); + break; + case WebSocketSharp.LogLevel.Error: + case WebSocketSharp.LogLevel.Fatal: + DebugReturn(DebugLevel.ERROR, s); + break; + } + }; + + string user = null; + string pass = null; + + if (!String.IsNullOrEmpty(mProxyAddress)) + { + var authDelim = mProxyAddress.IndexOf("@"); + if (authDelim != -1) + { + user = mProxyAddress.Substring(0, authDelim); + mProxyAddress = mProxyAddress.Substring(authDelim + 1); + var passDelim = user.IndexOf(":"); + if (passDelim != -1) + { + pass = user.Substring(passDelim + 1); + user = user.Substring(0, passDelim); + } + } + + // throws an exception, if scheme not specified + m_Socket.SetProxy("http://" + mProxyAddress, user, pass); + } + + if (m_Socket.IsSecure) + { + m_Socket.SslConfiguration.EnabledSslProtocols = m_Socket.SslConfiguration.EnabledSslProtocols | (SslProtocols)(3072 | 768); + } + + m_Socket.OnMessage += (sender, e) => { m_Messages.Enqueue(e.RawData); }; + m_Socket.OnOpen += (sender, e) => { m_IsConnected = true; }; + m_Socket.OnError += (sender, e) => { m_Error = e.Message + (e.Exception == null ? "" : " / " + e.Exception); }; + + this.m_Socket.OnClose += SocketOnClose; + + m_Socket.ConnectAsync(); + } + + private void SocketOnClose(object sender, CloseEventArgs e) + { + //UnityEngine.Debug.Log(e.Code.ToString()); + + // this code is used for cases when the socket failed to get created (specifically used to detect "blocked by Windows firewall") + // for some reason this situation is not calling OnError + if (e.Code == 1006) + { + this.m_Error = e.Reason; + this.m_IsConnected = false; + } + } + + public bool Connected + { + get { return m_IsConnected; } + } + + + public void Send(byte[] buffer) + { + m_Socket.Send(buffer); + } + + public byte[] Recv() + { + if (m_Messages.Count == 0) + return null; + return m_Messages.Dequeue(); + } + + public void Close() + { + m_Socket.Close(); + } + + public string Error + { + get { return m_Error; } + } + #endif + } +} +#endif \ No newline at end of file diff --git a/Assets/Photon/PhotonLibs/WebSocket/WebSocket.cs.meta b/Assets/Photon/PhotonLibs/WebSocket/WebSocket.cs.meta new file mode 100644 index 00000000..241c9218 --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/WebSocket.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b1bad04f7805f764dba77f0d4518e0f0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonLibs/WebSocket/WebSocket.jslib b/Assets/Photon/PhotonLibs/WebSocket/WebSocket.jslib new file mode 100644 index 00000000..a078b8e8 --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/WebSocket.jslib @@ -0,0 +1,117 @@ +var LibraryWebSockets = { +$webSocketInstances: [], + +SocketCreate: function(url, protocols) +{ + var str = UTF8ToString(url); + var prot = UTF8ToString(protocols); + var socket = { + socket: new WebSocket(str, [prot]), + buffer: new Uint8Array(0), + error: null, + messages: [] + } + socket.socket.binaryType = 'arraybuffer'; + socket.socket.onmessage = function (e) { +// if (e.data instanceof Blob) +// { +// var reader = new FileReader(); +// reader.addEventListener("loadend", function() { +// var array = new Uint8Array(reader.result); +// socket.messages.push(array); +// }); +// reader.readAsArrayBuffer(e.data); +// } + if (e.data instanceof ArrayBuffer) + { + var array = new Uint8Array(e.data); + socket.messages.push(array); + } + }; + socket.socket.onclose = function (e) { + if (e.code != 1000) + { + if (e.reason != null && e.reason.length > 0) + socket.error = e.reason; + else + { + switch (e.code) + { + case 1001: + socket.error = "Endpoint going away."; + break; + case 1002: + socket.error = "Protocol error."; + break; + case 1003: + socket.error = "Unsupported message."; + break; + case 1005: + socket.error = "No status."; + break; + case 1006: + socket.error = "Abnormal disconnection."; + break; + case 1009: + socket.error = "Data frame too large."; + break; + default: + socket.error = "Error "+e.code; + } + } + } + } + var instance = webSocketInstances.push(socket) - 1; + return instance; +}, + +SocketState: function (socketInstance) +{ + var socket = webSocketInstances[socketInstance]; + return socket.socket.readyState; +}, + +SocketError: function (socketInstance, ptr, bufsize) +{ + var socket = webSocketInstances[socketInstance]; + if (socket.error == null) + return 0; + var str = socket.error.slice(0, Math.max(0, bufsize - 1)); + writeStringToMemory(str, ptr, false); + return 1; +}, + +SocketSend: function (socketInstance, ptr, length) +{ + var socket = webSocketInstances[socketInstance]; + socket.socket.send (HEAPU8.buffer.slice(ptr, ptr+length)); +}, + +SocketRecvLength: function(socketInstance) +{ + var socket = webSocketInstances[socketInstance]; + if (socket.messages.length == 0) + return 0; + return socket.messages[0].length; +}, + +SocketRecv: function (socketInstance, ptr, length) +{ + var socket = webSocketInstances[socketInstance]; + if (socket.messages.length == 0) + return 0; + if (socket.messages[0].length > length) + return 0; + HEAPU8.set(socket.messages[0], ptr); + socket.messages = socket.messages.slice(1); +}, + +SocketClose: function (socketInstance) +{ + var socket = webSocketInstances[socketInstance]; + socket.socket.close(); +} +}; + +autoAddDeps(LibraryWebSockets, '$webSocketInstances'); +mergeInto(LibraryManager.library, LibraryWebSockets); diff --git a/Assets/Photon/PhotonLibs/WebSocket/WebSocket.jslib.meta b/Assets/Photon/PhotonLibs/WebSocket/WebSocket.jslib.meta new file mode 100644 index 00000000..e5a1c7d0 --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/WebSocket.jslib.meta @@ -0,0 +1,21 @@ +fileFormatVersion: 2 +guid: 04bb5f307f2e48b4fbaa6da865fd4091 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WebGL: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.README b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.README new file mode 100644 index 00000000..55690fba --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.README @@ -0,0 +1,5 @@ + +UPDATED: WebSocket/websocket-sharp.dll from our own Git Fork. Commit: 77f74bd +forked from https://github.com/sta/websocket-sharp.git + +websocket-sharp is provided under The MIT License as mentioned here: https://github.com/sta/websocket-sharp#license \ No newline at end of file diff --git a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.README.meta b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.README.meta new file mode 100644 index 00000000..47cc15d3 --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.README.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 3e262c2b04eaa8440987b50a91e86674 +DefaultImporter: + userData: diff --git a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll new file mode 100644 index 00000000..c0414205 Binary files /dev/null and b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll differ diff --git a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll.meta b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll.meta new file mode 100644 index 00000000..099f3fc6 --- /dev/null +++ b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll.meta @@ -0,0 +1,137 @@ +fileFormatVersion: 2 +guid: 748eb70bc0d7515498ef73fed155520a +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude OSXUniversal: 0 + Exclude WebGL: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 1 + - first: + '': OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + '': OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + '': WP8 + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 1 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: x86_64 + - first: + Standalone: LinuxUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + DontProcess: False + PlaceholderPath: + SDK: AnySDK + ScriptingBackend: AnyScriptingBackend + - first: + XboxOne: XboxOne + second: + enabled: 0 + settings: {} + - first: + iPhone: iOS + second: + enabled: 0 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/changes-library.txt b/Assets/Photon/PhotonLibs/changes-library.txt new file mode 100644 index 00000000..5ef74b35 --- /dev/null +++ b/Assets/Photon/PhotonLibs/changes-library.txt @@ -0,0 +1,1847 @@ + +Photon C# Client Library - Changelog +Exit Games GmbH - www.photonengine.com - forum.photonengine.com + + +Version 4.1.6.17 (02. August 2022 - rev6472) + Changed: SequenceDeltaLimitResends to 100 and SequenceDeltaLimitSends to 75. + +Version 4.1.6.16 (20. June 2022) + Note: No notable changes. + +Version 4.1.6.15 (02. June 2022) + Note: No notable changes. + +Version 4.1.6.14 (26. April 2022 - rev6414) + Fixed: WSS PhotonClientWebSocket blocking the main thread when sending isn't possible. Without loss. This affects the RTT however. + Changed: PhotonClientWebSocket will return PhotonSocketError.Busy, if previous Task is not completed yet. + Changed: TPeer.SendData passes the inner result code (PhotonSocketError) to the calling method. + Changed: TPeer.SendOutgoingCommands() will skip sending, if SendData() returns PhotonSocketError.Busy. + +Version 4.1.6.13 (29. March 2022 - rev6399) + Fixed: Fragment length for Datagram Encryption gets recalculated when the encryption gets enabled. + Fixed: Resends will stop early, if the mtu-udpBufferIndex is less than 80. + Changed: Read for a specified GpType. If it is unknown, this will throw a InvalidDataException instead of reading data in undefined ways. The server is sending us the types, so in regular use, this should actually not happen. It is however cleaner to debug data this way. + Fixed: Several comments and log and exception messages. + Changed: Protocol18.WriteCustomTypeBody to use the size written by the serialize-method, instead of using the returned value. + Added: Short delay before closing a socket to give disconnect messages a better chance of being sent out. + +Version 4.1.6.12 (30. November 2021 - rev6299) + Changed: EnetPeer.Disconnect() sets state Disconnecting immediately. + Changed: EnetPeer.ReceiveIncomingCommands() will skip incoming datagrams when in state Disconnected. + Changed: EnetPeer.ReceiveIncomingCommands() checks the incoming challenge as early as possible to avoid using data from outdated connections. + Changed: How Datagram Encryption is enabled, when the first encrypted datagram arrives. + Changed: Some logged messages. + Added: Parameter "length" to SupportClass.ByteArrayToString to convert only a part of a byte[] to string. + Internal: Changed conversion from ParameterDictionary to Dictionary so that StructWrapper does not leak to resulting Dictionary. + +Version 4.1.6.11 (23. November 2021 - rev6288) + Fixed: Payload encryption initialization (without DiffieHellman) for TCP connection. + Fixed: Protocol16.DeserializeCustom() to check if length of read bytes is available (else, a byte[] is returned). + Changed: Custom Type arrays will return UnknownType[] if the array's item-type is unknown. If the custom type is known but items do not read properly, they will be null. + Added: Checks if each generated Custom Type instance can be assigned to the Custom Type array (and skips those that are null or can't be assigned). + Changed: Protocol18Read.ReadCustomType() and ReadCustomTypeArray() to throw error for size < 0. In that case, it is not possible to continue reading and the data is compromized. + Removed: Some logging code that was specific for Unity. + Removed: Exception handling for OnEvent and OnOperationResponse calls. This turned out somewhat inflexible and was hiding valuable debug information. Instead of the low level try/catch, projects should wrap DispatchIncomingCommands in try/catch blocks. + +Version 4.1.6.10 (21. October 2021 - rev6243) + Fixed: ReadCustomTypeArray to return an object[], if any item in the array is unreadable. This object[] contains any properly read custom types but also items of UnknownType. This is of course likely to cause exceptions in the dispatch callbacks. + Added: Exception handling to OnEvent and OnOperationResponse calls. + +Version 4.1.6.9 (12. October 2021 - rev6231) + Fixed: Reliable UDP protocol to send pings, if no reliable command was acknowledged or sent recently. This bug was preventing a client timeout in some cases. + +Version 4.1.6.8 (30. September 2021 - rev6222) + Fixed: ReadCustomType to not use custom deserialization methods, should the reported size be less than available bytes. + Fixed: ReadCustomType and ReadCustomTypeArray to also skip custom types when size is 0. + +Version 4.1.6.7 (27. September 2021 - rev6214) + Fixed: A bug in Protocol18 reader for very long arrays. + +Version 4.1.6.6 (21. September 2021 - rev6204) + Changed: Dns resolution. It is suspected to fail sometimes due to a Mono/Unity bug (issue 6940). Changing from only attempting Dns.GetHostEntry to first attempting Dns.GetHostAddresses followed by Dns.GetHostByName in case of an Exception (yes obsolete api but maybe a different implementation). + Removed: C# wrapper classes for native plugins (sockets and encryption). These classes will be part of the plugin packages. + Changed: PhotonPeer values NativeSocketLibAvailable, NativePayloadEncryptionLibAvailable and NativeDatagramEncryptionLibAvailable are now obsolete. Unity's IL2CPP does not implement PrelinkAll in IL2CPP and we moved the wrapper classes for native libs out of the assembly. + Added: PayloadEncryptorType and related usage to be able to set another Payload Encryption implementation. This is only for completeness. The managed implementation, which is used by default, is fine. + Fixed: TrafficStatsIncoming for PhotonClientWebSocket (used by default in WS/WSS connections in the .Net Standard 2.0 dll). + +Version 4.1.6.5 (24. August 2021 - rev6181) + Fixed: Protocol16 to throw a NotSupportedException when a length value can not be serialized as short (as defined). This affects arrays (except byte[]), strings, hashtables, dictionaries and other variable length values. + Updated: C# classes to the latest state of the native PhotonEncryptorPlugin API. + +Version 4.1.6.4 (26. July 2021 - rev6143) + Changed: ByteArraySlice and ByteArraySlicePool to achieve thread safety. + Changed: PhotonClientWebSocket.AsyncConnectAndReceive to reuse memory. It may still grow somewhat as memory allocated for very large messages is not released but rather held to receive as big messages. This class is not used for WebGL exports. + Removed: Surplus logging in PhotonClientWebSocket implementation. + Added: Null-check in PhotonClientWebSocket.Send() if the socket may be disconnecting already. Added fitting error log. + Changed: TCP implementation to avoid memory allocations. It now uses a Queue which is pooled and re-used. DispatchIncomingCommands() releases the StreamBuffers back into the pool. + Fixed: TrafficStats counting of ping-result command size. This was still counting the buffer size instead of received-data size (usually less). + +Version 4.1.6.3 (24. June 2021 - rev6099) + Fixed: An issue with deserialization of custom types. + +Version 4.1.6.2 (23. June 2021 - rev6092) + Fixed: Potential NullReferenceException in PhotonClientWebSocket.Disconnect(). If called before the connect-flow finished, the instance was null. + +Version 4.1.6.1 (09. June 2021 - rev6086) + Fixed: TPeer.TotalPacketCount and TotalCommandsInPackets counters. They were increased in two places for the Init message. + Fixed: TPeer.TrafficStatsOutgoing.TotalCommandsInPackets counting in SendData, which was adding the remaining count in queues instead of +1. + Changed: TPeer.SendOutgoingCommands(), which will now stop sending if more than MTU size of data was sent. + Note: Messages are not fragmented for TCP/WSS, so they can be well over MTU size as such. But SendOutgoingCommands() will now return if there are more messages, so sending can be limited somewhat. + Changed: PhotonClientWebSocket will pause the task only for 50ms if nothing was received. + Changed: Log level of PhotonClientWebSocket incoming bytes logging. It's now level "ALL". + +Version 4.1.6.0 (19. May 2021 - rev6070) + Changed: PhotonPeer.ClientVersion is now marked as obsolete. The value should be static and so we added PhotonPeer.Version instead as replacement. + Internal: EnetPeer.Reset() now sets the timeoutInt = 0 and does a sentReliableCommands.Clear() instead of replacing it. + Changed: PhotonPeer.IsSendingOnlyAcks is now obsolete. Use SendAcksOnly() where needed. + Changed: EnetPeer.QueueSentCommand will not set the timeoutInt. Instead, this should be set when the next resends are checked in SendOutgoing. + Changed: Resends of reliable commands are now done directly, without them ever leaving the sentReliableCommands list. This has the benefit of being able to resend those commands in sequence. + Internal: On resend, timeoutInt becomes the lowest value found in the sentReliableCommands. It stays unchanged, if any command wasn't resent. + Added: SerializeCommandToBuffer, which is split out of SerializeToBuffer(Queue commandList). Allows sending single commands. + Changed: QueueSentCommand will not add reliable commands to the sentReliableCommands list, if the parameter signals it was in there already. + Changed: PepareWebSocketUrl() will now write the parameter "libversion" instead of "clientversion". Renamed according to Slack discussion. + Changed: PhotonPeer time keeping to use a Stopwatch per peer, instead of one in the SupportClass. + Changed: PeerBase now has a Stopwatch and PeerBase.timeInt will use that. + Removed: All internal usages of SupportClass.GetTickCount(). + Note: Socket implementations should replace their usage of SupportClass.GetTickCount() - peerBase.timeBase with this.peerBase.timeInt. + Changed: PhotonPeer.LocalMsTimestampDelegate, SupportClass.IntegerMillisecondsDelegate, .IntegerMilliseconds and .GetTickCount() are obsolete now. + Added: EnetPeer.QUICK_RESEND_QUEUELIMIT (value: 25) to suspend quick resending if the sent-queue is larger than that value. + Internal: Minor changes to NCommand. + Added: PhotonPeer SequenceDeltaLimitSends and SequenceDeltaLimitResends to prevent sending more commands, when the server does not keep up with acknowledging them. If those values are 0, this new logic is disabled. + Added: EnetChannel.highestReceivedAck to keep track of the highest sequence number ACKed by the server. + Changed: EnetPeer.SendOutgoingCommands() and .SendAcksOnly() to implement the limit. + +Version 4.1.5.5 (06. May 2021 - rev6050) + Changed: Protocol18 ReadCustomType to no longer throw an exception when a unknown custom type arrives. Instead pass UnknownType. + Added: Type "UnknownType", which is used to pass not-deserialized custom types to the game logic. + Changed: Protocol18 ReadCustomType to use a "boundedSize" to read remaining data if the incoming size value is > remaining message data. + Internal: StreamBuffer.Available to get remaining bytes in buffer. Returns value >= 0. + Fixed: Protocol18 WriteArraySegmentByte to not write any bytes, if count is 0. + Fixed: Potential deserialization issues in protocol 1.6, which could be exposed to crash clients. + Changed: String deserialization in protocol 1.6 avoids some memory allocation. + Changed: String deserialization in protocol 1.6 throws a NotSupportedException if the length is negative (was never supported but now it's a clear error). + Changed: DeserializeDictionary in Protocol16, will no longer allow key- or value-types Dictionary or Array. Both were read incorrectly. + Changed: DeserializeDictionaryType in Protocol16, will no longer allow key- or value-types Dictionary or Array. Both were read incorrectly. + Fixed: Error message in 1.8 GetAllowedDictionaryKeyTypes. + +Version 4.1.5.2 (12. March 2021 - rev6017) + Fixed: A compatibility issue of the Native Encryptor API v2 and Unity UWP exports using the .Net Runtime as runtime. The incompatibility made the reference rewriter fail. Introduced in the Metro build of the library in v4.1.5.0. + Fixed: EncryptorNative will not use the new "native-to-managed callback API" when compiling for NETFX_CORE (UWP Metro). + +Version 4.1.5.1 (01. March 2021 - rev5999) + Note: Release as SDK. + +Version 4.1.5.1 (25. February 2021 - rev5991) + Fixed: Handling of IPv6 addresses (bug was introduced in v4.1.5.0). + +Version 4.1.5.0 (23. February 2021 - rev5986) + Added: Optional parameter CustomInitData to Connect() methods. This data/object is used in InitV3. + Changed: Parameter name for photonToken (was "customdata" or similar). + Internal: PrepareInitV3ConnectData(...) is now WriteInitRequest() without the bunch of parameters which were all coming from the PeerBase anyways. + Fixed: NonAllocDictionary.Remove will also remove the value-reference by setting a default. + Changed: Handling of server IP addresses. IpAddress.TryParse has a few false positives. Those are double-checked and may cause ServerAddressInvalid. + Changed: Failed DNS lookup uses status code: DnsExceptionOnConnect. This clarifies a set of runtime errors, which were hard to identify. + Added: StatusCode ServerAddressInvalid = 1050 and DnsExceptionOnConnect = 1051. Used in IPhotonPeerListener.OnStatusChanged(). + Changed: Native Encryptor API v2 is now required. This affects native Datagram Encryption plugins (and allows GCM / Mode 13). + Changed: PDB files are now in "portable" format. This should be equivalent to "full" (previously used) but compatible with latest Unity versions. + +Version 4.1.4.9 (11. January 2021 - rev5966) + Fixed: EnetPeer to reset values for unsequenced commands on connect. Before, clients would send illegal command numbers after switching connections. + Added: Special handling for StructWrapper in DictionaryToString(). Pretty-prints type and value. + Added: StructWrapper.ToString() and and ParameterDictionary.ToStringFull() to simplify logging. + Fixed: Add overload in ParameterDictionary was sending ints to byte, rather than object. + Changed: NonAllocDictionary now implements IDictionary. + Changed: ValueIterator and KeyIterator now implement IEnumerator, System.Collections.IEnumerator. + Changed: PairIterator now implement IEnumerator>. + +Version 4.1.4.8 (03. December 2020 - rev5915) + Fixed: Issue with DisconnectTimeout, which could be set to int.MaxValue and force a timeout. + Note: The maximum value that is applied as DisconnectTimeout is now 65535 (ushort.MaxValue). Negative values set to default timeout. + Added: PhotonPeer.RemoveAppIdFromWebSocketPath option to skip the appid in websocket connects. Defaults to false. + Internal: PeerBase.PepareWebSocketUrl to skip the appid when RemoveAppIdFromWebSocketPath is true. Changed order of parameters. + Note: The AppId is not mandatory on the PhotonCloud but might be needed to connect to Photon OnPremise when the port does not define the app type. + +Version 4.1.4.7 (26. November 2020 - rev5893) + Fixed: PhotonClientWebSocket handling of messages > MTU. Incoming messages may be incomplete and are now reassembled. Before the fix, common result was that deserialization failed with incorrect / incomplete data. + Added: ExitGames.Client.Photon.Hashtable Add() and Remove() for byte keys. This makes sure ht.Add(0, obj) and ht.Remove(0) match how the access via ht[0] works. + +Version 4.1.4.6 (17. November 2020 - rev5865) + Changed: The EventData.Paramters dictionary is now readonly. It does not need to be settable and can no longer be null. So null-checks are removed. + Changed: If the ByteArrayPool is used for reading events, the sender's actorNumber will not longer be in the EventData parameter-table. Instead, only the Sender property is used. + Note: This makes receiving EventData events non-alloc by not adding the Sender key/value to the Parameters (which would box the int value). + Note: The EventData.Sender property was available for a while and was a better way to access the event-sender's actornumber. + Changed: PhotonPeer.SendOperation() and PhotonPeer.SendMessage() will now check a few conditions (is connected, etc) and call PeerBase.SerializeOperationToMessage(). + Internal: Changed the code path for operations and messages serialization. There are lots of internal changes for this but no externals. + Internal: Message header length is set in EnqueueMessageAsPayload along with other updates (was in TPeer.SerializeOperationToMessage()). + Removed: PhotonPeer.OpCustom(), which was already obsolete for a long time. + Added: PeerBase.IsTransportEncrypted() to help figure out if Payload Encryption should be skipped. + Changed: PeerBase.SerializeMessageToMessage no longer updates the header for TCP. Done in EnqueueMessageAsPayload, used by EnqueuePhotonMessage. + Changed: SerializeMessageToMessage to check existing value isRawMessage instead of re-checking the condition when applying message type. + Fixed: Detection of Generic-Dictionary-typed arrays. Was lacking a test if the element was of type Dictionary. + Changed: Connect(string serverAddress, string applicationName) to call variant with proxy-support directly. + Updated: Connect methods and their docs. + Removed: More of the RHTTP support. + Added: DisconnectMessage deserialization and an event for this case: PhotonPeer.OnDisconnectMessage. This does not break the dll's compatibility. + Changed: Connect() workflow. This simplified the TPeer and EnetPeer somewhat and unifies some actions that were scattered in the classes hierarchy. + Changed: PhotonPeer to create the SocketImplementationConfig in the constructor. Connect() will use this to create the actual IPhotonSocket. + Changed: TPeer.Connect and EnetPeer.Connect are a bit simpler now (don't have to create the actual IPhotonSocket). + Removed: PeerBase.SocketImplementation member. + Changed: Setter and handling for the Version.clientVersion (conditional for SERVERSDK). + Changed: Version.clientVersion is readonly, unless SERVERSDK is defined. + Changed: CreatePeerBase() will only create a new EnetPeer or TPeer on demand (if the protocol changed or there was no PeerBase implementation). + Added: Special treatment for byte-typed keys to the Photon Hashtable to avoid boxing. Pre-boxed items are stored in a static array. + Added: NonAllocDictionary support in SupportClass (DictionaryToString()). + Added: ParameterDictionary as type and support to de/serialize it. + Note: This is a WiP commit to get LoadBalancing non-allow (or less alloc). + Added: PhotonPeer.WrapIncomingStructs to control how to de-serialize responses and events. Setting this requires adjusted code. + Note: As long as WrapIncomingStructs is not set, code changes are not mandatory. + Fixed: Error message in SerializeDictionaryHeader to include the type of the value which failed (it was logging the key's type). + Changed: The PhotonClientWebSocket does a DNS request before connecting, to figure out if IPv6 should be requested by Photon servers. + Added: PhotonPeer.TargetFramework to identify the target framework that the dll was built-for. Might help identify the used variant. + Changed: Code order a little, to get obsolete fields up in the range for them. + Removed: RhttpMinConnections and RhttpMaxConnections, which were entirely obsolete. + Changed: OperationResponse indexer is not obsolete. This was used to detect where it's used. + Changed: ParameterDictionary now has a Get() method, so the API is analog to Unwrap() in this case. + Changed: EnetChannel to use NonAllocDictionary instead of Dictionary. Our replacement is internal and non-allocating for iteration. + Changed: the logging level of events possibly happening on each Service() call changed from INFO to ALL + Changed: EnqueueMessageAsPayload stats-keeping no longer throws an exception, when the delivery mode is "out of range". + Internal: Changed how the client writes acknowledgements. + Internal: TPeer.ReceiveIncomingCommands() will only log "Wrong MagicNumber", if the received length is more than 0. It also logs the length then. + Changed: PhotonClientWebSocket (in .Net Standard 2.0 dll) now checks if the clientWebSocket state is still "Open" before handling incoming data. + Changed: PhotonClientWebSocket logs INFO, when the received data has length 0 but the socket is still Open. + + +Version 4.1.4.5 (04. September 2020 - rev5733) + Fixed: Serialization of a ByteArraySlice will now release it, as described in the docs. So you can pass a ByteArraySlice to RaiseEvent and control of it is passed over to the Photon API. + Fixed: Potential issues with SupportLogger.StartBackgroundCalls() when there were 255 threads running (and or stopped). + Changed: When PhotonClientWebSocket fails to connect, this will now correctly result in a disconnect with code/reason ExceptionOnConnect. + Changed: The socket reading-thread not call it's disconnect method, if already disconnecting/disconnected. This avoids a surplus call (and callback). + Internal: The thread locking object in SocketNative is no longers static. + Note: The next release will change the native datagram encryptor api. Most likely this is the last one compatible with the old native plugin. + +Version 4.1.4.4 (29. June 2020 - rev5625) + Fixed: NonAllocDict. Capacity change was broken. This is a critical fix. + Added: Indexer to NonAllocDict to allow Dict[key] get and set. + Added: NonAllocDict.Clear() method. + +Version 4.1.4.3 (24. June 2020 - rev5622) + Added: PhotonPeer.UseByteArraySlicePoolForEvents and PhotonPeer.ByteArraySlicePool to avoid memory garbage when events consist only of a byte-array. See comments / doc. + Added: Class NonAllocDictionary as replacement for the suboptimal implementation in Mono. Some of our code relies on Dictionaries and can be optimized with this. Note: This is neither documented well yet and considered "beta" until we got feedback on some use cases. + Added: PhotonPeer.TrafficRecorder and ITrafficRecorder. This can be used to capture traffic on UDP connections. + Changed: IPhotonSocket.ConnectAddress is now a local field. Before, it accessed the peer which might already connect to another server. + Changed: Debug log for DNS resolution (INFO level). This includes a count of IPs that were returned. + Added: Static PhotonPeer.NoNativeCallbacks to disable callbacks from native code to C#. SocketNative is the first class to use NoNativeCallbacks in DnsAndConnect(). + Changed: SocketUdp and SocketTcp are now public, like other implementations. This means you can assign them to the SocketImplementationConfig and select these deliberately. + Internal: Datagram Encryption was updated and optimized. (rev5548+rev5550). Added PhotonPeer.NativeEncryptorApiVersion constant to be able to check which native encryptor API is being compiled into the assembly. + Changed: EnetPeer.ReceiveIncomingCommands(): bytesIn counter simplified: now it simply incremented by input data size. + Removed: "CommandLog" feature. It was replaced by Traffic Recording. Remaining setting values for this (in PhotonPeer) are now Obsolete and without function. + Changed: WebSocket init workflow to make it compatible with AuthOnce / AuthOnceWss. It can send an init request now. + Internal: WebSockets need to use the ConnectAddress, as the TPeer will setup the address and path as required. + Changed: The IPhotonSocket does not set the ConnectAddress again, so the Peer can set this address before connecting. This is used for WebSocket connects. + Fixed: NETFX_CORE variant of payload encryption initialization. + Added: PreserveAttribute and used it on IPhotonSocket constructors. This keeps Unity's code stripping from constructors which we need. + Fixed: A rare threading issue for UDP connections. + Internal: SupportClass.StartBackgroundCalls() and related methods are now locked. A proper cleanup of StartBackgroundCalls is pending. + Changed: SupportClass.StopBackgroundCalls(id) will now clear the reference to the used thread but not remove the entry in the list. + Changed: SupportClass.StopAllBackgroundCalls() will now clear all referenced threads. Could be used when disconnected / before another connect to reduce number of Threads. + Removed: SupportClass.CallInBackground, which was replaced by StartBackgroundCalls a while ago. + + +Version 4.1.4.2 (08. May 2020 - rev5519) + Updated: DotNet SDK (net35, UWP and .Net Standard 2.0) and Unity SDK. +Version 4.1.4.1 (30. April 2020 - rev5482) + Fixed: String serialization for characters with more bytes. UTF8.GetBytes was called with byte-count instead of character-count as parameter. +Version 4.1.4.0 (28. April 2020 - rev5474) + Internal: Changed serialization of strings to produce no memory garbage. Strings that exceed a UTF8-encoded byte-length of 32767 (short.MaxValue) are not supported in either protocol (now throwing an exception). + Internal: Improved the serialization of float, double, float-array and double-array to produce less memory garbage with better performance. + Fixed: Cross platform serialization of float and double values in protocol 1.8 (which is used by default by PUN 2). Undiscovered, the C# client was using a wrong byte-order for network. The server and native clients were receiving a wrong value. Between C# clients, everything was fine. + Added: WebSocket support built-in to the Metro / UWP assembly. The PhotonMessageWebSocket is automatically used, unless some override is defined externally. + Changed: The socket implementations now disconnect when an exception happens due to sending. This uses the StatusCode.SendError, reported via OnStatusChanged callback. The LoadBalancingClient will handle this and report a DisconnectCause.Exception. Careful when updating only the library: Handle this in LoadBalancingClient. + Changed: The internal exception logging is now in log level INFO. This means the handled exception is no longer logged as if it's not. + Internal: Reverted to using the datagram encryption API v1. The new one is not fully implemented and should not be used yet (but was in v4.1.3.0). + Fixed: If a timeout message arrives after the client disconnected locally, the timeout is neither reported (via OnStatusChanged) nor does it trigger (another) disconnect. This avoids rare issues where clients would get stuck in Disconnecting state. + Added: Initial changes to support proxies for WSS. The PhotonPeer got a Connect overload which sets the proxy address and the IPhotonSocket got ProxyServerAddress. Higher level changes are upcoming. + Fixed: When the StreamBuffer for a large message got fragmented, this goes back to the StreamBuffer pool. + Changed: ExecuteCommand() for fragments. We now use a StreamBuffer from the pool and only adjust the buffered size if needed. + Added: Static PhotonPeer.MessageBufferPoolSize() to have access to the current StreamBuffer pool size. + +Version 4.1.3.0 (23. March 2020 - rev5399) + Internal: Changed Visual Studio projects which build the C# Photon libraries. Added a .Net Standard 2.0 assembly, which has built-in WebSocket support. + Added: IPhotonSocket.SerializationProtocol property. This provides the protocol of the current PhotonPeer.SerializationProtocolType as string. + Note: Some WebSocket implementations use a static value of the same name and need to be updated! Some projects contain SocketWebTcp.cs, SocketWebTcpThread.cs or similar files. + Changed: It is now possible to signal "on demand encryption" (known as Payload Encryption within Photon terms) even on secure connections (WSS / Datagram Encryption). This is important (only) for mixed connection types. A server update is required. The Photon Cloud is updated. + Added: PhotonPeer.SendInCreationOrder. This defaults to true, enabling the new behaviour explained below. + Changed: The send order of reliable and unreliable commands (UDP). This improves throughput of unreliable commands, when there are multiple datagrams of data. Before, a datagram got filled with the reliable commands first. Only when those were gone, unreliable commands were sent. The server was discarding some messages are too late. + Updated: Pool to be used in higher level APIs. Pool.Count is now also locked. + Internal: EnetPeer ocal variable fragmentLength to currentFragmentSize. It no longer hides EnetPeer.fragmentLength, which was probably causing issues in the Native Toolchain (Master builds for HoloLens 2). + Internal: Datagram Encryption now has a new mode: GCM. It can be used seamlessly with the Photon Cloud. + Internal: Native Datagram Encryption plugins and APIs are now more efficient. + Removed: rHttp support. + +Version 4.1.2.20 (12. December 2019 - rev5296) + Changed: DiffieHellmanCryptoProviderNative is now always compiled into the assembly using dynamic linking. If the payload encryption native library is present, it will be used automatically. + Changed: Extern methods with the DllImport attribute are now public. This allows a PrelinkAll() check if the dll is available and can be loaded. + Internal: EncryptorNative will no longer use native extern methods in static fields. This causes execptions in unexpected context. + Added: PhotonPeer NativePayloadEncryptionLibAvailable, NativeDatagramEncryptionLibAvailable and NativeSocketLibAvailable values. + Changed: SocketNative is autmatically used if the native socket lib is available, based on the checks above. + Changed: The wrappers for the native libraries (sockets and datagram encryption) will now setup a debug logging callback with debug level. This requires new native libraries. + +Version 4.1.2.19 (13. November 2019 - rev5271) + Internal: Handling for DllNotFoundException in the SocketNative.DnsAndConnect(). + Internal: Added support for setting the serialization protocol when using native websocket. + Internal: Added logging to native plugins for sockets and encryptor. + Internal: Changed the access level of PeerBase.debugOut from 'internal' to 'public'. + Changed: UDP socket classes now trigger a disconnect in the send methods, should the lower-level socket be disconnected. This gives us a quicker "disconnected" state in some error cases. So far, only reading-errors triggered disconnects in UDP. + Changed: Logging in case of send errors. + Added: Exception handling to deserialization. This adds a safety layer for receiving messages, which can be skipped. Important: It will be unknown, what message got discarded and if it's important or if it was fake / surplus. + Fixed: Internal class EncryptorNet, which was not thread safe, so DatagramEncryption was failing sooner or later. This affected only v4.1.2.18, which was an internal release. + +Version 4.1.2.18 (1. October 2019 - rev5229) + Removed: Surplus logging "Deserializing OpResponse Ping." for TCP/WebSocket connections. + Changed: Datagram Encryption to use an interface for the encryptor. + Changed: PhotonPeer.Encryptor is now public and can be set before connect. Applications can switch to new Datagram Encryption implementations. InitDatagramEncryption will create an instance and use that or falls back to the managed encryptor. + Note: PhotonPeer.Encryptor replaces DgramEncryptor. Setting the class before connect is likely what the LoadBalancingClient will do anyways. + Changed: The EncryptorNative class is for dynamic linked libs. It can be present in all Unity projects. + Changed: PhotonPeer.NativeDatagramEncrypt is obsolete, as it's always true now. On demand, an alternative Encryptor can be set. + Internal: ClientSdkIdShifted is simplified (because it was causing an error in another compiler / in Unity). + Changed: Reading Hashtables and Dictionaries will now check if the read key is null. If so, the key-value pair will be dropped silently. This applies to Protocol 1.6 and 1.8 alike. + Changed: All built-in socket implementations which are now more alike to one another. + Changed: When DNS resolution provides more than one IP, the socket will use the IPv6 ones first. If there is no route to the remote IP, the next in list is used. It does not resolve strings with IPv4 (e.g. a local address). + +Version 4.1.2.17 (9. August 2019 - rev5187) + Removed: Obsolete StatusCode values: DisconnectByServer is now DisconnectByServerTimeout. Other values are simply removed. + Updated: Used StatusCode.DisconnectByServer to DisconnectByServerTimeout. A follow up to renaming and removing the code. Some implementations of IPhotonSocket can be in existing projects and may still use the old naming. Simply rename. + Changed: PeerBase.timeInt is now a property which calculates the current time: SupportClass.GetTickCount() - this.timeBase. + Fixed: The change for timeInt fixes a problem with TCP connections which go entirely silent and would no longer update the PhotonPeer.ConnectionTime. + +Version 4.1.2.16 (28. June 2019 - rev5168) + Changed: TrafficStats Stopwatch initialization. This keeps the Stopwatch but resets it. Also it's started on initialization, if trafficStatsEnabled. + Changed: VitalStatsToString() can now return a useful stats string, even if TrafficStatsGameLevel is null (which is never the case currently). + Added: VitalStatsToString() now logs the "Longest send" time. This is a new value to debug connections. + Changed: NETFX_CORE now also uses Activator.CreateInstance, if a SocketImplementation is set (as in other implementations). + +Version 4.1.2.16 (24. June 2019 - rev5154) + Fixed: DispatchIncomingCommands() for reliable UDP. In some cases, an unreliable command/message could dispatch before the related reliable command (which was written and sent earlier). This issue was introduced in v4.1.2.11, 15. April 2019. + Fixed: Each thread created via SupportClass.StartBackgroundCalls will now try-catch a ThreadAbortException. Apparently the handling of a ThreadAbortException changed with Unity 2019, which started to log the exceptions on Android, IL2CPP, 4.x runtime. + +Version 4.1.2.15 (07. June 2019 - rev5137) + Changed: Tcp messages with magic byte 0xF4 are no longer accepted (this was used on a deprecated platform). + Changed: An Internal Operation Response for OpPing is now executed right away, fixing timing problems when using Op Ping (in WSS, e.g. on Xbox). + Added: PhotonPeer.InitialResentTimeMax. It guarantees resends for commands, despite bad lag (which may be temporary). + Changed: NCommand.ToString() for slightly better organization and naming of values. This is mostly a debugging help for the Photonians. + +Version 4.1.2.14 (16. May 2019 - rev5128) + Changed: The single "release history" file is now split. There is one "changes" file per api/level. For example: changes-realtime.txt lists the LoadBalancing / Realtime API changes. Find them in the respective subfolders. + Changed: The structure of the Unity SDK. As in PUN 2, there is a "Photon" folder, which wraps up all apis and libraries within a Unity project. + Updated: The readme txt. +Version 4.1.2.14 (6. May 2019 - rev5097) + Changed: EventData now has Sender or CustomData properties as well as SenderKey and CustomDataKey. The keys can be defines according to API. The default are the Realtime API values. Sender and CustomData access is cached. If an EventData instance is reused (PhotonPeer.ReuseEventInstance), the values will reset. + +Version 4.1.2.13 (3. May 2019 - rev5086) + Changed: EventData to not contain the Sender or CustomData properties anymore. They have been specific for the Realtime API and confusing for APIs like Chat. + Added: PhotonPeer.ReuseEventInstance as option to use a single EventData instance for all incoming events. This reduces memory garbage. The drawback is: An event provided via OnEvent(EventData photonEvent) is invalidated right after the callback finished. That event's content will get modified. Typically this is not a problem as events are rarely cached. + Internal: Added caching for a EventData instance (on demand). + +Version 4.1.2.12 (26. April 2019 - rev5046) + Fixed: A problem with the new EventData code of v4.1.2.11. It optimistically assumed that events with codes below 200 were always just containing Sender and CustomData. Photon Chat uses different codes, however. + Added: Access the Sender and CustomData via the EventData.Parameters dictionary, even if that is null (due to the new rules). In that case, the Sender and CustomData is accessed via the properties instead. + +Version 4.1.2.11 (15. April 2019 - rev5043) + Note: This version has a few changes that optimize memory usage mostly. + Internal: Changed EventData class (custom and Photon-defined events). Custom events set the Sender and Code and the CustomData but not Parameters (dict) now. EventData indexer checks if the "Parameters" are non-null. If the indexer is used to access non-existing Parameters, the result is null. Custom events are NOT setting Parameters anymore, saving the Dictionary<> use. + Internal: StreamBuffer.ReadByte() to return a byte or throw an exception when the end of the stream was reached. The -1 value was never used though. + Changed: EnetPeer.DispatchIncomingCommands() as optimization. When dispatching unreliable commands, the code now checks if the next command is available. If so, this is dispatched, without going through the keys of the dictionary (which was creating garbage to clean up). + +Version 4.1.2.10 (11. March 2019 - rev5023) + Fixed: A timeout issue for WS / WSS transport protocols by sending a ping. + +Version 4.1.2.9 (20. February 2019 - rev5003) + Note: Release .Net and Unity SDK from our page. + +Version 4.1.2.9 (13. February 2019 - rev4985) + Removed: Setting of Thread.Name for internally used threads. This was used for debugging only (since a while) but caused issues on a console platform (due to an issue in Unity IL2CPP exports). + +Version 4.1.2.8 (31. January 2019 - rev4975) + Fixed: The cap for the lastRoundtripTime. When the current roundTripTime was very low this meant the rtt wasn't going up again. This was a problem with local servers. + Fixed: Setting the roundTripTime when the connect-command gets acknowledged. This sets a minimum of 15ms now. Before, a local server could get a 0ms roundTripTime (due to using Environment.TickCount). + +Version 4.1.2.7 (25. January 2019 - rev4954) + Removed: CommandBufferSize and LimitOfUnreliableCommands. Technically, those are "Obsolete" but no longer used anywhere. See comments. + Fixed: MessageBufferPoolTrim() was not using a lock(), so this wasn't thread safe. + + +Older Versions + +*** Version 4.1.2.6 (12. December 2018 - rev4935) + Changed: Unsequenced delivery is now available in all builds. Internally, this was wrapped in compile conditions. + +*** Version 4.1.2.5 (10. December 2018 - rev4911) + Added: PhotonPeer.SentReliableCommandsCount - reliable commands sent but not yet acknowledged. This can be used as indicator for the quality of service, aslong with ResentReliableCommands. + Note: This build include the "Best Region Ping" classes, to minimize changes when released with Quantum. + +*** Version 4.1.2.4 (23. October 2018 - rev4868) + Fixed: Fragment bug introduced in 4557 (12. March 2018). This kept one command per reassembled message in the incoming queue (without payload). + Added: An upper limit for the calculated lastRoundtripTime (per ack) to prevent uncontrolled rtt changes due to garbled incoming messages. Protecting the rtt timer improves resending commands if needed. INFO level logging starts with: "LastRoundtripTime is suspicious". + Added: SocketTcpAsync class, which is receiving with BeginReceive and EndReceive in callback. This should work for Unity's 4.x Runtime, which has a bug that blocks Socket.Receive() indefinitely. + Changed: TPeer.ReceiveIncomingCommands() will now use dataLength as indicator how much was received. + Internal: CalculateCrc() now uses a cached lookup table, which gives it much better performance (most obviously for longer datagrams). + +*** Version 4.1.2.3 (17. October 2018 - rev4847) + Fixed: Fragment handling. When a duplicate fragment arrived after the "original" was reassembled, this led to an exception and disconnect. + +*** Version 4.1.2.2 (16. October 2018 - rev4843) + Changed: Enum StatusCode values. DisconnectByServer is obsolete and replaced with DisconnectByServerTimeout. + Added: StatusCode.DisconnectByServerReasonUnknown, as a generic case (unknown reason). + Added: You can now send List, which gets de/serialized as object[]. + Internal: PeerBase.MessageBufferPool is now a Queue, which means the usage changed minimally. This is faster than before. + Internal: When a client detects a timeout disconnect, it will enqueue the status-change, to allow the Disconnect()-call to finish first. This provides a clearer order of actions happening internally for a timeout. + Internal: Simplified the ExecuteCommand for a received Disconnect command. The StatusCallback is now enqueued, as Disconnect() also enqueues changes. + Updated: SocketUdpAsync class is now sending in blocking mode but receiving with BeginReceive and EndReceive in callback. This should work for Unity's 4.x Runtime, which has issues with blocking socket receive. + +*** Version 4.1.2.1 (31. July 2018 - rev4787) + Fixed: OutOfMemory exception while building 'Master' version on UWP with .Net Native Toolchain. This is a workaround for an alleged bug in ilc.exe. + Added: EventData.Sender to simplify access to this info. If there is no sender or if the server sent the event, the actorNumber is 0. +LoadBalancing: + Changed: OnStateChangeAction is now named StateChanged and provides a "previous state" value. State changes only trigger the event-call when the value actually changes. + Renamed: OnEventAction to EventReceived and OnOpResponseAction to OpResponseReceived. + Added: LoadBalancingClient now has AddCallbackTarget and RemoveCallbackTarget to simplify registering for various callbacks. +Chat: + Changed: Namespace from "ExitGames.Client.Photon.Chat" to "Photon.Chat". + Added: ConnectAndSetStatus method. + +*** Version 4.1.2.0 (3. May 2018 - rev4660) + Added: Unsequenced delivery for messages (reliable and unreliable). This way, operations and resulting responses and events can be sent as unsequenced, which is good for use cases like streaming voice, input and such. + Internal: The Photon library now re-uses memory for messages and commands. This avoids garbage collection in Unity, which can be a performance problem. + Changed: There is a new method to send operations: PhotonPeer.SendOperation. It uses the SendOptions struct to define the delivery mode, encryption, etc. This replaces the obsolete OpCustom(). + Added: Optionally, the Serialization Protocol v1.8 can now be used. Consider it a pre-release/test version for which we could use feedback. Set PhotonPeer.SerializationProtocolType. + Internal: Replaced foreach with while in SerializeParameterTable, SerializeHashTable and SerializeDictionaryElements in SerializationProtocol v1.6. + Internal: Changed EnetPeer to have a CommandQueue. Instead of queueing ExecuteCommand(cmd) delegates, we now queue the commands. This is leaner. + Internal: The SendOptions.DeliveryMode enum's order changed. + Added: PeerBase.MessageBufferPool, MessageBufferPoolGet() and MessageBufferPoolPut(StreamBuffer buff) as a simple memory pool implementation. + Added: PhotonPeer.MessageBufferPoolTrim() to give an option to limit the amount of memory buffered. + Added: PhotonPeer.MessageBufferPoolGet() as a (brute force) way to externally debug the memory buffer. This is temporary. Don't rely on this. + Added: For TCP, a client-side timeout. This is based on checking timestampOfLastReceive in the DispatchIncomingCommands method (timeouts only get called when you dispatch). + Fixed: The TCP implementation only checks for a TimeoutDisconnect, while in ConnectionStateValue.Connected. Otherwise, no timeout can happen. + Internal: Renamed various values for more fitting names. + Internal: Added special handling of Arrays of int and byte to DeserializeArray() in Protocol 1.6, using DeserializeByteArray and DeserializeIntArray respectively. +LoadBalancing: + Changed: The namespace to the simpler "Photon.Realtime". + Added: Various callbacks to signal specific situations / events. To get those, a class must implement the interface and be added to a list of "Targets". See: ILoadBalancingCallbacks. + Added: RegionHandler, which provides methods to ping a list of regions and to find the one with best ping. This moves PUN's "Best Region" feature to the LoadBalancing API. + Moved: The PhotonPing was part of the dll but is now part of LoadBalancing. + Added: LoadBalancingClient.UseAlternativeUdpPorts. This way, UDP may use ports of the Steam Multiplayer port-range by simply replacing existing port strings in addresses. + Changed: RaiseEvent now has an overload, that uses RaiseEventOptions and SendOptions. The old variant is obsolete but will still work. + Changed: CheckUserOnJoin is now set by default. The RoomOptions.CheckUserOnJoin got removed. + Added: Client-side checks and limits for OpFindFriends. + Added: Optional parameter sendAuthCookie to OpLeaveRoom. The app can control what's passed from Photon to a server via WebHook. + Changes: The room list for lobbies is no longer part of the LoadBalancingClient. Instead, implement the callback for the changed room list. + Added: AppSettings, a base class to host AppId and some settings for a title. This will help make it available across products. Right now, the LoadBalancingClient is not using it yet. + Changed: Player.ID is now .ActorNumber, which mirrors the server's naming. + Fixed: Unity compile defines to support Unity 2018, + +*** Version 4.1.1.19 (9. April 2018 - rev4590) + Fixed: WSS now sends an operation "ping" in SendAcksOnly() (and SendOutgoingCommands()) to avoid getting timed out. This happens right away, while other commands/operations stay in queue. + +*** Version 4.1.1.18 (19. December 2017 - rev4540) + Fixed: Exception in QueueOutgoingAcknowledgement() with a lock(). This avoids threading issues between Send- and Receive-thread. This was an issue mostly seen in Photon Voice, which uses the library multi-threaded. + Changed: Network Simulation now only stores the actual data of messages, instead of storing an action/delegate. + Note: The delegate IL code for Network Simulation was instantiating a "display class" instance and caused GC garbage, even if no simulation was running. +LoadBalancing: + Changed: FriendInfo.Name is now "UserId", which is up to date with it's usage. + Changed: CheckUserOnJoin is now set by default. The RoomOptions.CheckUserOnJoin got removed. + +*** Version 4.1.1.17 (11. October 2017 - rev4465) + Fixed: Fetching the server timestamp now works for the "No C# Sockets"-library build for WebSockets. This affected libraries used for XB1 and as a result, the serve time was not synced. E.g. PhotonNetwork.time was locked at 0. + Changed: XML doc of PhotonPeer.DisconnectTimeout. This is no longer a UDP exclusive setting and clearly states that the unit is milliseconds. + Updated: Several documentation comments for the PhotonPeer. Using shorter summaries and remarks for the details. +LoadBalancing: + Changed: OperationCode const byte Join = 255 is now marked obsolete. We use "JoinGame" instead. + Added: DisconnectCause.AuthenticationTicketExpired. + Fixed: DebugReturn call in Unity WebGL. +Chat: + Fixed: Unity "6" compile define is now UNITY_2017. + +*** Version 4.1.1.16 (1. September 2017 - rev4349) + Fixed: The native implementations for "PhotonPing", which are used for PUN's "Best Region" selection in the "No Sockets" dlls (Android and iOS for Unity 4.x). Disposing the "dynamic" version was causing an exception (due to an attempted fix of a less-obvious memory leak). This caused the Best Region selection to stall. + +*** Version 4.1.1.15 (17. July 2017 - rev4232) +WebSocket: + Changed: WebSockets are now treated like "addons", as their implementations are complex and potentially not running on some platforms (be it UWP or some Unity export). The Readme-Photon-WebSocket.txt tells you how to add them to your project and set them up. + Added: Folder "PhotonWebSocket" with SocketWebTcpCoroutine and SocketWebTcpThread classes, to support platforms with and without Thread API. + Added: PingHttp.cs for Unity WebGL exports, to support "Best Region" selection in PUN. +LoadBalancing: + Added: LoadBalancingClient.TransportProtocol as shortcut to the use PhotonPeer's TransportProtocol value. This enables setting the protocol easily while not connected. + Added: LoadBalancingClient.SocketImplementationConfig as shortcut to modify PhotonPeer's SocketImplementationConfig. This enables you to setup which IPhotonSocket implementation to use for which network protocol. + Changed: LoadBalancingPeer.ConfigUnitySockets() to try to find our websocket implementations in the assembly, making the SocketWebTcpCoroutine and SocketWebTcpThread classes optional. + Removed: Class "SocketWebTcp" is no longer found by ConfigUnitySockets(). +Chat: + Added: ChatClient.TransportProtocol as shortcut to the use PhotonPeer's TransportProtocol value. This enables setting the protocol easily while not connected. + Added: ChatClient.SocketImplementationConfig as shortcut to modify PhotonPeer's SocketImplementationConfig. This enables you to setup which IPhotonSocket implementation to use for which network protocol. + Changed: ChatPeer.ConfigUnitySockets() to try to find our websocket implementations in the assembly, making the SocketWebTcpCoroutine and SocketWebTcpThread classes optional. + Removed: Class "SocketWebTcp" is no longer found by ConfigUnitySockets(). + +*** Version 4.1.1.14 (5. July 2017 - rev4191) + Changed: SupportClass StartBackgroundCalls method now assigns an ID to each thread/task and enables you to cancel it explicitly via StopBackgroundCalls. CallInBackground is now obsolete due to renaming. +LoadBalancing + Changed: The ClientState "Uninitialized" is now "PeerCreated". This is the initial state. ConnectedToMaster is now ConnectedToMasterserver (both use the same value). + Updated: ClientState values descriptions. + Internal: GameEnteredOnGameServer() first sets the local player's actorNumber, then updates the player lists. +Chat: + Added: ChatClient can optionally run a thread to call SendOutgoingCommands in intervals. This makes sure the connection doesn't fail easily (e.g. when Unity is loading scenes, etc.). You still have to call Service to dispatch received messages. + Added: ChatClient.UseBackgroundWorkerForSending. Set this to true, to use the new background thread. Note: Do not use this in WebGL exports from Unity cause Threads are unavailable in them. +WebSocket: + Changed: Updated enabled protocols for WebSocket.cs. Now it is posible to connect to a server which supports only either TLS 1.1 or TLS 1.2 or TLS 1.0 or any combination of them. + +*** Version 4.1.1.13 (2. June 2017 - rev4112) + Internal: Fixed StreamBuffer.Seek() which was throwing an exception when seeking position 0 in an empty stream. + Removed: The queue-length checks which were using OnStatusChanged to warn about the amount of data queued for sending. Several StatusCode values are now obsolete accordingly. + Removed: StatusCode InternalReceiveException = 1039 and TcpRouter* which were obsolete for a longer time. + +*** Version 4.1.1.12 (24. May 2017 - rev4086) + Fixed: Peer.timeLastSendOutgoing was set in SendAcksOnly and ReceiveIncomingCommands. This should not happen. In PUN, this led to an issue with the fallback thread, which could not keep the connection. + Fixed: DNS resolution in the UDP socket is no longer inside a lock. Even if it takes longer (without network), the socket can now be closed before it's even opened properly, avoiding a freeze. + Fixed: UWP clients can set a SocketImplementationConfig. This opens up the use of WebSockets or any IPhotonSocket implementation in UWP, too. + Internal: Acknowledgements are no longer created as "commands" and serialized on send. Instead, they are directly written to a byte[] buffer, which is using less memory. + Added: PhotonPeer.EnableServerTracing to enable UDP Datagram Tracing on server side. We might ask you to use this when debugging connection issues. Otherwise, don't use this, as you can't access the server's logs anyways. + +*** Version 4.1.1.11 (13. April 2017 - rev3922) + Fixed: Bug of v4.1.1.10, which caused disconnects after a short time. + +*** Version 4.1.1.10 (11. April 2017 - rev3916) + Internal: Memory Allocation for nCommand and EnetPeer within SendoutGoingCommand, and AreReliableCommandInTransit + Internal: Refactoring of SerializeToBuffer to prevent memory allocation and access udpBuffer directly instead of using BlockCopy. + Internal: EnetPeer.channels got removed and replaced by a simple array and a GetChannel() method to access all channels. + +*** Version 4.1.1.9 (15. March 2017 - rev3884) + Fixed: Size calculation for Datagram Encryption (used on one console only, so far), when the MTU was changed from default. In some cases, an Exception was thrown: ArgumentException: Offset and length were out of bounds [...] at System.Buffer.BlockCopy. Adjusted GetFragmentLength() and CalculateBufferLen() internally. + +*** Version 4.1.1.8 (24. February 2017 - rev3873) + Fixed: Handling of non-fatal "WouldBlock" SocketExceptions when receiving data via TCP. This led to disconnects before. This affects only TCP connections in libs other than Windows Store. + Changed: Memory usage for TCP socket usage. Less memory is being allocated per receive. As we have to queue incoming data, it still has to get copied once. + Changed: Memory usage for encrypting messages. + Changed: SupportClass.DictionaryToString() now logs the length of a byte-array (not the content). + Changed: Deserializing unknown "Custom Types" returns the sent byte[]. There is no warning/error log yet but deserialization won't fail entirely. + Changed: PeerBase.SerializeMessageToMessage() to use less memory for encryption. Also, Raw-Messages can now be de/encrypted successfully. + Internal: Added StreamBuffer.ToArrayFromPos(), enabling you to get a buffer copy, starting with some offset (position of the buffer). + Internal: Removed some NETFX special build cases (obsolete due to using our own SteamBuffer). +LoadBalancing: + Added: Player.UserId field and code to read published UserIds from the player properties in CacheProperties(). When publishing the UserId in a room (RoomOptions.PublishUserId = true), the UserId becomes available for all players in a room. Good to find/make friends or follow a team player into another room. + Added: New matchmaking operation: OpGetGameList(typedLobby, sqlFilter). This fetches a list of rooms that match the filter. You can show lists of rooms with specific properties, if needed (or still use OpJoinRandom). + Fixed: WebFlags properties setters. + +*** Version 4.1.1.7 (16. December 2016) + Note: No new lib version. Just updated demos for the SDK. +Demos: + Fixed: Demos with persistent (Turnbased) games. The Memory Demo was not setting up rooms correctly (which led to errors joining them) and used a "join" rather than a "rejoin" to get into saved games (getting added to the room once more). + +*** Version 4.1.1.6 (9. December 2016 - rev3801) + Changed: Default SentCountAllowance = 7. +Loadbalancing: + Added: OpJoinRandom will now "remember" to send ExpectedUsers to the Game Server (by caching the value). + Added: AuthEvent and it's handling. This (internally sent) event can now update the client's token anytime (before that expires). + Added: LoadBalancingClient.OpChangeGroups(). + Changed: LoadBalancingClient.Disconnect() no longer sets it's own State to Disconnected. It waits till the state-change callback gets called by the lib. + +*** Version 4.1.1.5 (18. November 2016 - rev3775) +Internal: + Fixed: Photon-init request is now created by the factory method CreateAndEnqueueCommand to make sure we fragment the init if needed (for small MTU and more init-data). + Fixed: Bug in TrafficStatsReset method, which caused the averaged stats to go up infinitely after a reset. + +*** Version 4.1.1.4 (21. October 2016 - rev3737) + Internal: Added ArraySegment support for byte[]. This way, we can internally reuse more memory. + Changed: Implementations of PeerBase Disconnect() are now using EnqueueStatusCallback(StatusCode.Disconnect) to delay the "callback". That enables any thread to call Disconnect() while the status change correctly gets called in the main thread via DispatchIncomingCommands(). + Changed: When a SocketImplementationConfig for UDP is set, this will be used via Activator.CreateInstance(socketImplementation, this). + +*** Version 4.1.1.3 (20. September 2016 - rev3673) + Changed: NETFX_CORE implementation for UDP. This no longer attempts to detach the stream after every single Send, which caused issues when connecting and getting a lot of messages. + +*** Version 4.1.1.2 (13. September 2016 - rev3652) + Changed: There are less variants of the Photon library now, which makes it easier to integrate, run and test. There is a general "DotNet" version and a Windows Store (universal) dll. These two also come as Unity build and in Debug and Release. UWP can use the Universal/WSA library. + Added: PhotonPeer.SocketImplementationConfig. This allows easier configuration of the IPhotonSocket type to use per protocol, so that switching protocols is easier (compared to having to set a SocketImplementation before connecting). + Changed: PhotonPeer.SocketImplementation can't be set public. Use the SocketImplementationConfig instead. + Internal: This release summarizes a lot of internal refactorings. It's easy now to switch protocols (internally), to set socket implementations (platform dependent) if needed, etc. +LoadBalancing: + Removed: LoadBalancingClient.PlayerName and Player.Name. Were obsolete for more than a year. There is a NickName and the UserId can be set in the AuthValues. + Removed: OpJoinRoom() overload with actorNumber. This was obsolete. To enable clients to return to a room, set AuthValues and a userID. + Changed: LoadBalancingClient no longer overrides the protocol for Unity WebGL. This is done in the LoadBalancingPeer.ConfigUnitySockets(). + Changed: GetNameServerAddress() is the same in Chat and LoadBalancing APIs now. + Added: DisconnectCause.DisconnectByServerLogic and handling for this case. You can check this DisconnectedCause when the LoadBalancingClient.State is ClientState.Disconnected. + Added: Hashtable definition to use Photon's own implementation for Windows Store builds (NETFX_CORE). This must be used but it means you to use the same Hashtable definition in all builds (no matter if 8.1 or 10). + Added: Support for WebGL export in Unity. + Changed: OnStateChangeAction, OnEventAction and OnOpResponseAction are now events. To register a method in one of those, use += and to deregister you need to use -=. This prevents assigning a new method and de-registering any previously registered ones. +Chat: + Changed: ChatPeer now has ConfigUnitySockets(), which defines the SocketImplementationConfig. It's only used in Unity (using UNITY define). + Changed: ChatClient is not setting socket implementations anymore. + Added: Hashtable definition to use Photon's own implementation for Windows Store builds (NETFX_CORE). This must be used but it means you to use the same Hashtable definition in all builds (no matter if 8.1 or 10). + Added: Support for WebGL export in Unity. + +*** Version 4.1.1.1 (22. August 2016 - rev3549) + Fixed: IPv6 support. The init-message was missing it in 4.1.1.0. + Fixed: UWP build for Unity now has (Photon-)Hashtable class once more. Unlike Windows RT, UWP does support Hashtable (again). But in Unity, we always use ours. + +*** Version 4.1.1.0 (15. August 2016 - rev3536) + Changed: Unity exports now need to set the API Compatibility to ".Net 2.0". The ".Net 2.0 Subset" won't work anymore, due to need of some features for a new encryption mode. + Fixed: Windows Store implementation of TCP Socket. This is now compatible with 8.1 and 10 and the locally configured timeout is also applied while connecting initially. + Fixed: OpWebRPC documentation. +LoadBalancing: + Fixed: Room.ClearExpectedUsers() is now sending it's current, local "expected users" to update the server with "CAS" (Check and Swap). This gives the client an update when the values become valid (which updates the local cache after the roundtrip). + Added: Support for the 'Server Side Master Client' feature. The Room will read master client updates from the server accordingly. Room.SetMasterClient() enables you to override the server's selection (provided it did not change before your operation gets executed). + Changed: Option for bool WebForward into the new "WebFlags". This allows fine control of which data is being sent to WebHooks. This affects all SetProperties, OpWebRPC and the RaiseEventOptions. + Added: WebRPC.cs to the LoadBalancing API folder (was available separately before). It contains WebFlags and WebRpcResponse. +Internal: + Changed: Instead of Windows Phone 8.0 support, we now have a Windows 8.1 Universal library ("Metro") and one for Windows 10 Universal ("UWP"). + Changed: Changed initialization of PhotonPeer and related classes. + Changed: Workflow to send Init command. + Added: Option for "Datagram Encryption" and a new Authentication Workflow ("AuthOnce" and "AuthOnceWss"). This is part of the LoadBalancing API. + Added: ClientSdkId, which is used internally for reference. + +*** Version 4.1.0.6 (30. June 2016 - rev3400) + Changed: ExchangeKeysForEncryption() and internally called DeriveSharedKey() can now be executed in their own Thread. + Added: static PhotonPeer.AsyncKeyExchange to define if encryption calculations are done in parallel. +Internal: + Changed: NetworkSimulationSet.IsSimulationEnabled only does any work, if the value gets changed (saving some surplus work). + +*** Version 4.1.0.6 (21. June 2016 - rev3376) +Internal: + Removed: The wrapper for the optional "native encryption library" from most assemblies. It didn't get certified for the Windows Store and caused problems in the Unity WebPlayer. This will be provided on demand instead. + Removed: Our upcoming protocol implementation until it's fully compatible with all supported platforms. Despite not being used, it also caused some issues on some Unity exports. + Changed: Usage of MemoryStream is being replaced with a StreamBuffer. This is our own implementation and always grants access to the underlying byte[] (which is not possible in Windows Phone / Store API in some cases). For your Custom Type serialization, replace MemoryStream with StreamBuffer. That's all. + Internal: Commands are now split into header and payload byte-arrays, instead of copying them into yet another buffer before sending them. + Added: Support for IPv6 adresses in Photon Ping classes. This supports "Best Region" usage in PUN. + Fixed: After DNS resolution, IPv6 adresses are preferred over IPv4 ones. +LoadBalancing: + Fixed: LoadBalancingPeer.OpRaiseEvent(...) to send operations (and events) unencrypted again. + +*** Version 4.1.0.4 (19. May 2016 - rev3322) +Internal: + Updated: For Unity, the usage of the optional "native sockets" library is now compatible with IPv6 addresses, as required by Apple. + +*** Version 4.1.0.3 (28. April 2016) +Internal: + Added: An optional native library for encryption. This speeds up the (rarely used) key-exchange and encryption of messages. The usual case is to use the C# variant, as before. + +*** Version 4.1.0.2 (21. April 2016 - rev3283) +Internal: + Changed: PeerBase: ipv6 flag set in INIT_BYTES[5] after dns lookup, when ip address type already known + Changed: PeerBase: INIT_BYTES[4] contains clientlibid and release flag (15) + Changed: PeerBase: client version packed in INIT_BYTES[5,7,6] bytes + Changed: pProtocol prefix and path parsed (and trimmed) in IPhotonSocket.TryParseAddress to support websocket urls + Changed: Client version moved to separate version.cs + Changed: Protocol static methods reworked to instance methods, IProtocol interface extracted + Changed: PeerBase.DeserializeMessageAndCallback() to use a variant of new MemoryStream that exists in Windows 10 Universal APIs, too. +LoadBalancing: + Added: Expected Users. This affects the Room, LoadBalancingClient, JoinRoom, JoinOrCreateRoom and CreateRoom. + Added: null check in Extensions.StripToStringKeys(). + Fixed: FriendInfo.IsInRoom, which returned the opposite of it's naming! Also changed FriendInfo ToString() according to PUN's. + Added: RoomInfo expectedUsersField, which is updated with room properties (well known ones). + Added: Room.ExpectedUsers and ClearExpectedUsers() to expose the list of expected players. + Added: RoomInfo.serverSideMasterClient and masterClientIdField (also updated with well known properties). + Changed: OpRaiseEvent now re-uses a Dictionary in the LoadBalancingPeer. It uses Clear(), rather than creating a new Dict each time. + Changed: AuthenticationValues to also use C# properties and and backup-fields. This is guaranteed to work in Unity. + Updated: EventCode ErrorInfo reference with a link to "WebHooks" doc online. + Changed: Disconnect handling in the LoadBalancingClient. The client should reset correctly and log info, if it's in a State where a disconnect is a proper error. Note: In some cases like "switching server", a disconnect is expected, so it's not an error then. + Fixed: PlayerProperties sent to game server will now include well-known properties again. This fixes the "NickName missing" bug. + Fixed: LoadBalancingClient.State value when the client fails to join or create a game on the Master Server. The state is correctly re-set to ClientState.JoinedLobby or ClientState.ConnectedToMaster. + Internal: Added private inLobby value, to store if the client was/is in a lobby on the Master Server. + Fixed: DemoClient (in demo-loadbalancing) now makes use of the Name Server by using: ConnectToRegionMaster("eu"). + Added: DemoClient now has debug output when the connection times out or can't be established. + + +*** Version 4.0.5.1 (18. January 2016 - rev3187) + Fixed: EnetPeer.ExecuteCommand(). Fixed: Receiving a Disconnect-command didn't clear the receive-buffers. However, it has to be the last command executed. + Note: The bug related to the Disconnect-command happened, when an app paused, queued incoming commands and executed the Disconnect while incoming commands were queued. + Fixed: Setting of DisconnectTimeout for TCP connections (ReceiveTimeout and SendTimeout). + Changed: Our protocol serializes Enums implicitly as their underlying Type. This means you can easily send them but will lose the Type info (they don't arrive as your Enum type). This is now also working in Windows Store libraries (NETFX_CORE). +LoadBalancing: + Added: OpSetCustomPropertiesOfActor() and OpSetCustomPropertiesOfRoom() now check locally, if the client is currently in a room. It must be, to be able to set these properties. An exception exists for setting properties for the local player's actorNumber, but those are better set via LoadBalancingClient.LocalPlayer. +Unity SDK: + Changed: The Unity condition which defines "using Hashtable = ExitGames.Client.Photon.Hashtable;". All versions of Unity 4 and up now define that Photon's Hashtable is needed. This is only in the LoadBalancing API, not in the demos. + Added: WebGL support + +*** Version 4.0.5.0 (3. December 2015 - rev3144) + Changed: Signature of SetCustomProperties methods. All overloads now include a final, optional "webForward" parameter. This enables you to update a WebHook when properties change. This is intended for turnbased games, not for high-frequency updates - use with care. + Internal: Added more debug output to error messages from the socket usage. This should now always include the ServerAddress to make things easier to debug server-side, if needed. + Added: Serveral new ErrorCode values, which will be used by v4RC5 and newer servers. See ErrorCode.JoinFailed***, HttpLimitReached and ExternalHttpCallFailed. + Fixed: LoadBalancing API now reads the correct "NickName" key from the server's authentication response. So far, it was reading a key that is never used. Note: This means you can set a user's NickName server-side to override the client's nickname. +Chat + Added: A MessageLimit field for ChatClient and ChatChannel to limit the number of messages the client keeps locally. It might be useful to limit memory usage in long running chats. Set ChatClient.MessageLimit to apply the limit to any channel subscribed afterwards or apply a limit individually. + +*** Version 4.0.0.12 (3. November 2015 - rev3112) + Added: Support for IPv6. Note: IPv6 does not work in Unity yet. It has issues with IPv6. (Case 740910) + Note: Host name resolution will prefer IPv4 over IPv6, if both IPs should be available. IPv6 Addresses must use brackets! Example: [::1]:5055. This separates the port from the address. + Added: Error logging when Addresses can not be resolved to IPs. + Changed: LoadBalancingClient OpJoinOrCreateRoom() no longer allows you to re-join a room. Simply remove the ActorNumber from the parameters. To re-join, use OpJoin with actorNumber (Player.ID that was assigned in the room). + Added: Support for PS4 in Unity LoadBalancing SDK. Note: The demos are not all updated with controller support, as we use the old UI, still. To test export, use the Particle Demo. + +*** Version 4.0.0.11 (28. October 2015 - rev3093) + Changed: Sending a generic Dictionary (with specific types) will now throw an Exception, if any key or value is null. This limitation does not include Dictionaries which use object as type. Those Exceptions are one of the few, which are not catched and turned into a debug message. Catch them by wrapping Operation calls, where needed (OpRaiseEvent()). + Changed: TrafficStatsGameLevel public properties are now settable. This enables you to reset individual values to (e.g.) show "LongestDeltaBetweenSending of the past second". + Added: CommandLog debugging option. This can be used to get a list of sent reliable commands and their ACKs (from the server). Default is 0 size ("off"). + Added: CommandLogSize and CommandLogToString() to PhotonPeer. This is part of a LoadBalancingClient.loadBalancingPeer. + Added: Several PhotonPeer values to analyze connections: ConnectionTime, LastSendAckTime and LastSendOutgoingTime. PacketLossByChallenge is probably a tempoary addition to check if we have to drop corrupted packages due to bad "challenge" value. + Added: Log for incoming reliable commands. The most recent 200 entries will be logged with the CommandLogToString(). This is probably temporary. + Changed: Timing for resending reliable commands in RUDP. The peer will check the sent-queue more frequently now, no matter at what time some random command would have to be repeated. Repeats should be more timely, based on their dynamic resend-timing. + Changed: PhotonPeer.MaximumTransferUnit minimum is now 576 (was 520, which was lower than on the server). + Internal: Channels in the EnetPeer are now stored in an array, so we can replace some foreach-loops with for-loops. +LoadBalancing (Realtime and Turnbased API) + Added: LeaveLobby handling in OnOperationResponse(), which sets the client's state correctly. + Changed: Order of execution for Ev Join. If user is known (inactive user rejoins), the player's props are read. The actor list is used, if available. + Changed: RoomOptions to use properties with backup-fields to avoid issues in Unity which has issues with Object Initializer (curly brackets). + Changed: JoinMode 2 is now "JoinOrRejoin". Was: "Rejoin". + Added: ErrorCode constant AuthenticationTicketExpired. + Internal: OpJoinRoom, OpCreateRoom and OpJoinRandomRoom no longer use a (growing) list of properties. Instead, classes were created to "sum up" their parameters. The api for games didn't change. + Internal: Related to the refactoring of Join/Create, the LoadBalancingClient now creates a Room instance when the client arrived on the GameServer (before, it got created in the initial "create" call). +Chat + Added: More sanity checks on operations (empty userId or secret, max friends). + Added: Special debug logging when the server returns an error for "Operation Unknown". In this case, it's highly likely that you don't use a Chat AppId. + Added: More helpful error logging. + +*** Version 4.0.0.10 (14. July 2015 - rev2988) + Removed: LitePeer class and complete "Lite" namespace. It's highly recommended to use the LoadBalancing API (LoadBalancingClient, etc). The (few) operations that were defined in Lite are no longer required really. + Refactored: Some "base" enumerations that were provided by the Lite peer. They are now in LoadBalancingPeer. + Added: support for RoomOptions.Plugins. Which we need now since we support multiple plugins per plugin dll - for testing purposes for instance. + Fixed: The wrapper classes for the native sockets now do a Sleep(15) when there's nothing to receive. This reduces CPU load considerably. + Fixed: Unity library SocketWebTcp class for websocket support. It requires a coroutine on a new GameObject which is now marked as DontDestroyOnLoad(go) and survives scene loading. + Fixed: The Windows 8 SDKs now include the release assemblies. This makes sure you can submit your app to the Windows Store. + Added: ConnectionProtocol WebSocket and WebSocketSecure. It's simply a different protocol, compared to UDP and TCP, so it should be separated. + Internal: DoFraming is now a part of TPeer (was in IPhotonSocket). It's set by the ConnectionProtocol which avoids misconfiguration. + Changed: SendPing can now send a ping binary message or enqueue the Ping Operation (when DoFraming is false). + Added: A null-check for TrafficStatsStopwatch to avoid NullReferenceExceptions. + Added: Compile condition for Ping result handling. It's only used when the client uses Sockets as well (for the time being). + Added: Unity WebGL export also sets a "using" Hashtable definition. + Fixed: An exception in Photon.Hashtable.ToString() if a value was null. The assumption was that there are no null-values. + Changed: SocketUdp and SocketTcp now implement IDisposable, which seems to help with infrequent freezes in the Unity Editor. + Added: PhotonPeer.QuickResendAttempts. Sets how many resend attempts for a reliable command will be done in quick succession (after RTT+4*Variance), before the time between repeats will be increased. Use with care and with low values. + Added: IP/Hostname to logged exceptions when Connect fails. This is easier to support (e.g. DNS lookup fails). + Fixed: Library for PUN+ export to WebGL. Originally, we forced UDP as protocol for PUN+ export, as the native sockets library doesn't support TCP. However, WebGL export introduced a new use case. + Added: LoadBalancingClient.EnableLobbyStatistics and .LobbyStatistics. They provide an overview which lobbies your game uses and how busy they are. + Fixed: The LB Demo should set CustomProperties instead of directly setting (any) properties. + Fixed: SocketWebTcp is completely empty, unless WEBSOCKET is defined. Before the file still contained the "using" part of the class. +LoadBalancing (Realtime and Turnbased API) + Updated: Description for IsConnectedAndReady. + Changed: NameServerAddress to return a fitting address depending on protocol (including WebSocket but not yet RHTTP). + Updated: The only name server host is now "ns.exitgames.com", which gets turned into a proper address by protocol. + Changed: LoadBalancingClient.CustomAuthenticationValues is now .AuthValues. You can use those values to identify a user, even if you don't setup an external, custom authentication service. + Changed: LoadBalancingClient.UserId no longer directly stores the id but puts it into AuthValues. This means, the UserId could also be set via setting AuthValues. + Changed: The API of AuthenticationValues. There is now the UserId and AddAuthParameter() replaces the less general SetAuthParameters() (which only set specific key/values). + Changed: PlayerName gets renamed to NickName, so PhotonPlayer.Name becomes .NickName and LoadBalancingClient.Name becomes .NickName, too. The old naming is marked as obsolete. + Changed: Particle Demo now connects to the Cloud by default (because it's easier to setup and try). You can define your own Master Server (Photon OnPremise) of course. + Added: GamePropertyKey.MasterClientId (248) and ParameterCode.MasterClientId (203) + Added: ParameterCode.ExpectedValues (231) + Added: ParameterCode.SuppressRoomEvents (237) +Chat API: + Added: A Unity 4.6 demo with uGUI. It's missing a few features but should give you a good start to making your own. + Added: Unity/WebGL support (merged from PUN). + Added: Breaking! IChatClientListener.DebugReturn(). Photon lib and chat client log via this method (no logging to console by default). + Changed: ChatClient.CustomAuthenticationValues is now .AuthValues. You can use those values to identify a user, even if you don't setup an external, custom authentication service. + Changed: ChatClient.UserId no longer directly stores the id but puts it into AuthValues. This means, the UserId could also be set via setting AuthValues. + Changed: The API of AuthenticationValues. There is now the UserId and AddAuthParameter() replaces the less general SetAuthParameters() (which only set specific key/values). + Note: All users should have a UserId. You can set chatClient.UserId before you connect, or you can set the AuthenticationValues in Connect(..., authValues) to set a UserId. + Added: ChatChannel.ToStringMessages(), which gets all messages in a single string, line by line. The format is "Sender:Message". + Added: ChatClient.TryGetChannel() to find a channel only by name, no matter if public or private. +Photon Unity SDK + Changed: Organization of APIs and Assemblies in SDK. Now you can copy the content of folder "PhotonAssets" into your project's Assets folder and you have all APIs. + Added: PhotonAssets-U5 folder which includes only the Windows Universal DLL. + +*** Version 4.0.0.8 (14. January 2015 - rev2765) + Fixed: Serialization of custom types with nested Serialize-calls. In this case, re-using a specific memory stream breaks it. + +*** Version 4.0.0.7 (12. January 2015 - rev2763) + Fixed: Serialization of arrays of custom-types. +Chat API + Internal: Changed code for UserID from 7 to 225. The latter is used in LoadBalancing, too, so we want to re-use the code here. + +*** Version 4.0.0.6 (05. December 2014 - rev2758) + Added: ChatApi and LoadBalancingApi folders to Unity SDK. They are needed in any Photon project with Unity. When updating, copy and paste the files over existing ones and make sure to replace the assembly-files, too. + Changed: Protocol to save more memory or re-use it. The idea is to have less Garbage Collection (primarily for Unity/PUN and custom types). + Added: New CustomType de/serialization methods which provide the MemoryStream, instead of a byte[] COPY from the stream. + Changed: Now using one method to identify a Type. This was duplicated code before. + Changed: De/Serialization of some types. + Note: The drawback is now, that there are more places with: lock(). This is far from optimal but the alternative would be to make Protocol instances per thread. As most is static at the moment, this would not be an easy task. + Added: position check for DeserializeStreamFunction() call. Stream position must be "previous + customtype length". It gets corrected but at the moment no error is thrown. + Changed: DispatchIncomingCommands() no longer instantiates the commandsToRemove each call. This is reused and thus saves memory. + Changed: net_fx build will now check IsConstructedGenericType to detect if something is a dictionary +LoadBalancing + Added: LoadBalancingClient.OpJoinOrCreateRoom overload which has lobby as parameter. If a room gets created, this defines in which lobby it belongs. + Changed: LoadBalancingPeer: Added new error code PluginMismatch, documentation for Plugins parameter code. + +*** Version 4.0.0.5 (23. September 2014 - rev2738) + Updated: AddFriends and RemoveFriends doc. + Changed: Logging level for two cases. Dropping a package due to failed CRC-check is now logged for INFO. It's expected and certainly not an error. Dropping a package when the incoming challenge does not match is also not an ERROR. It is expected when you switch servers and packages arrive late. This is now debug level ALL. + +*** Version 4.0.0.4 (19. September 2014 - rev2736) + Fixed: Fragmentation when CRC checks are enabled. This kept clients from sending fragmented commands when the additional 4 bytes CRC were included later on. + Fixed: An issue in the ChatClient which was referring to a class from Photon Unity networking. This caused compile issues in the Unity Chat Demo. + Updated: Reference doc generation. + +*** Version 4.0.0.3 (15. September 2014 - rev2731) + Updated: Doc generation settings and style. + Note: This version has no code changes to rev2728 described below. That version is already released in the Unity Asset Store in PUN. + +*** Version 4.0.0.3 (11. September 2014 - rev2728) + Fixed: A simple "order of things" issue when detecting a timeout (due to resends). We first have to set "Zombie" state so that any Disconnect() call created a disconnect-command with reserved byte = 2 = "due to timeout". + Fixed: Chat to be compatible with native sockets of PUN+ (iOS and Android exports from Unity). + Fixed: Access to native sockets (in classes SocketUdpNativeDynamic and SocketUdpNativeStatic) is now using a lock(). The native methods are not thread safe but we need more than one socket for PUN+ and Chat (with native sockets, too). + Changed: Logging for the case "Ignoring received package due to wrong challenge". This got logged on log-level ERROR but maybe is better as WARNING only. Now this should log less often. + Internal: Updated to a newer native-sockets interface. + Internal: Updated to a newer native-sockets interface (affects PUN+ only). Cleaned up precompile defines and #if usage. + +*** Version 4.0.0.2 (01. August 2014 - rev2715) + Added: PhotonPing class and subclasses per platform. Allows clients to use regular UDP messages to ping our servers and find the best region. + Added: Native and Win8 support for PhotonPing. + Known Issue: Native ping has to be done "one by one" and without any other connection in Unity. It's not yet thread safe (but that is ok as we don't want to ping most of the time but only rarely and out of game). + Added: PhotonPing class/file to Win8 platforms. + Changed: The extern static methods for the native libs are now internal (instead of private). Pings are using them, too. + Changed: WebRpcResponse.ReturnCode comment to include fail code. + Changed: OpWebRpc doc is now much more complete and helpful. + Updated: Unity SDK Particle Demo (more) and LoadBalancing Demo (just a bit). + +*** Version 4.0.0.1 (17. June 2014 - rev2663) + Fixed: DotNet assembly no longer contains classes that try to include our Unity native socket libs. This was causing issues in some cases. + Added: PhotonPeer.CommandInfoCurrentDispatch. This property gives you the debug string of the currently dispatched command (events or responses). Only useful for UDP. +LoadBalancing: + Added: LoadBalancingClient.OpRaiseEvent(). Now that LoadBalancingClient USES a loadBalancingPeer (and doesn't extend it), things are much easier by offering this method, too! + Added: LoadBalancingClient.IsConnected and .IsConnectedAndReady to LB API. Going to be part of the API from now on. + Removed: Unused fields clientId and clientCount. + Changed: Field for internal use "lastJoinActorNumber" is now private as intended. + Changed: LoadBalancingClient.Disconnect is now setting it's own state to Disconnected if the connection got closed (as expected). +Chat: + Changed: How the server responds to Subscribe and Unsubscribe. Events will now contain success/failure of those. This allows us to send the answer after calling a WebHook if needed and we can even send it to multiple clients (which authenticated with the same userID). + Changed: Handling of subscription responsed. This is done to allow web services to subscribe a client remotely and to be able to prevent joining some channel that a user should not join (the channel of some guild or another team, e.g.). + Changed: Debug loggging. In Unity we can't use Debug.Assert, etc. So we have to log more cleanly. This works in Editor and several platforms (but not all). + Changed: Folder for Chat API. It now begins with "Photon" which provides some context no matter where you copy the files. Easier to find in Unity projects. + Changed: Operation FriendList and method SendFriendList renamed to AddFriends + Added: Operation RemoveFriends and corresponding method in ChatClient.cs + Added: Console Demo has new command 'fr' to remove friends + +*** Version 4.0.0.0 (23. May 2014 - rev2614) + Changed: This version contains a few features that are not compatible with the Photon Server SDK v3.x. Notable features that are not in the Server SDK are: NameServer, WebHooks and Turnbased API features. + Changed: This SDK is the first that contains all current APIs for Realtime, Turnbased and Chat. + Fixed: Release build of the Unity assembly now also excludes native-socket using code, fixing a Unity Free export issue. We only use the debug assembly in our demos though and suggest you do the same. +LoadBalancing: + Changed: LoadBalancingClient.FriendList creation/update is delayed until the server's response is available. This avoids cases where the friends are offline for the moment between requesting the update and getting it. Initially, it is null as before. + Added: some methods to Player to find next player, etc. Useful for turnbased games to find an opponent. + Added: LoadBalancingClient.UserId, which is the ID of a user(account). This is used in FindFriends and when you fetch account-related data (like save-games for Turnbased games). Set it before Connect*(). As fallback when empty during connect, the PlayerName is used instead. + Removed: LoadBalancingPeer.OpSetCustomPropertiesOfActor and OpSetPropertyOfRoom which were too special to be so low level. Could be implemented to LBClient. +Turnbased: + Fixed: OpJoinRandomRoom and OpCreateRoom which didn't reset the ActorNr to claim when entering the room. Depending on previous actions, some calls of those methods did fail when the actorNumber wasn't available. + Changed: OperationCode.Rpc is now called OperationCode.WebRpc. It's simply much cleaner (considering PUN has RPCs as well but in a different context). + Changed: WebRpcResponse reading to be able to handle additional data. + Added: Parameter webForward to: OpSetCustomPropertiesOfRoom and OpSetPropertiesOfRoom. The "old" overloads of these methods are still there, too. If webForward is true, the properties are sent to the WebHooks. +Chat: + Added: SendPrivateMessage() overload that has option to encrypt private messages. Public messages don't need encryption. + Removed: lastId and LastMessageIndex from channels. Those were impractical and should be removed from the API. + Changed: UserStatus class to ChatUserStatus. + Changed: Most classes are defined in their own file now. + Removed: Folders "Shared" and their subfolders. This gives a much better overview. + Added: Handling for event SubscribeResponse. This is not actually a response but gives you info about channels that got subscribed (e.g. when you re-login quickly or when a user is logged in in multiple clients). + Added: HandleSubscriptionResults() method to handle the event and proper responses. + +*** Version 3.2.2.6 (13. May - rev2575) + Fixed: Windows Store and Windows Phone libraries now only send the bytes they should send. This means we have to copy the payload from the "complete package buffer" in order to send it. + Fixed: SocketTcp now handles all exceptions during reading. Still, abort-by-server is treated as ServerDisconnect. Everything else as client side disconnect. This fix is especially for iOS exports from Unity. The iOS Power-button will immediately cut any connection. The Home-button allows us to keep the connection if we return the app to focus within a few seconds. + Fixed: TPeer.StopConnection() now clears the incoming queue when it disconnects. This avoids getting any more (already received) commands. + Changed: TPeer.Disconnect() now uses StopConnection instead of implementing the same code again. + +*** Version 3.2.2.5 (30. April - rev2566) +LoadBalancing: + Added: TypedLobby class to replace lobby name/type pair. + Added: LoadbalancingClient.CurrentLobby property. CurrentLobbyName and CurrentLobbyType are obsolete. + Added: New overloads in LoadbalancingClient with TypedLobby parameter instead of separate lobby name and type: OpJoinLobby, OpJoinRandomRoom. Old methods marked obsolete. + Added: New overloads in LoadbalancingClient for OpJoinOrCreateRoom, OpCreateRoom, CreateRoom with parameters packed in RoomOptions class. Old methods marked obsolete. + Breaking: LoadbalancingClient.CreateRoom parameters changed to (string roomName, RoomOptions opt). + Internal: Removed obsolete LoadBalancingPeer overloads of OpCreateRoom and OpJoinRoom + Internal: Added 'onGameServer' parameter to LoadBalancingPeer OpCreateRoom, OpJoinRoom; used to avoid sending extra data to master (player- and room-props) + Internal: Loadbalancing Room constructor(string roomName, RoomOptions opt). + Internal: Added use of the "JoinMode" parameter which is used in context of Turnbased games. + Fixed: Bug in OpLeaveLobby which joined the default lobby instead of leaving any lobby. +General: + Fixed: Server ports were read as short, which was wrong. We now use the correct unsigned short to convert from the address string). + Fixed: A minor issue in the SupportClass ToString conversion which used a Hashtable's key type instead of the value's type in one place. + +*** Version 3.2.2.4 (21. March 2014 - rev2519) + Internal: For Unity, the classes that handle native sockets can now be compiled in a variant that does not actually reference the native-socket-libs. The dll for PUN+ uses native sockets and need the native libs. Any regular dll will have the (not used and empty) classes for build-compatibility reasons. + Added: Values to enum EventCaching: SliceIncreaseIndex, SliceSetIndex, SlicePurgeIndex and SlicePurgeUpToIndex. They are in Lite but used in LoadBalancing. This is likely to be cleaned up in the next major release. + Changed: EventCaching MergeCache, ReplaceCache and RemoveCache as they belong to an outdated form of caching. The "RoomCache" is the better option in any case. +LoadBalancing: + Added: RaiseEventOptions class. It's used for OpRaiseEvent to avoid further parameter- and overload-clutter for this operation. While it's still not optimal for all cases, the fields in the RaiseEventOptions class are hopefully more clear how to use. Maybe some constructors will be added soon. + Changed: All OpRaiseEvent variants, except the one with RaiseEventOptions is now obsolete. + Added: Event Cache Slicing. Cached events can now be organized into "slices" which allows you to handle them in chunks. You can purge events in specific slices (e.g. get rid of the previous game-rounds events). +Turnbased: + Added: RaiseEventOptions.ForwardToWebhook which allows you to forward an event to a webhook (to be defined in Dashboard). Use this rarely, as it has an impact on (server) performance! + +*** Version 3.2.2.3 (18. February 2013 - rev2493) + Added: const PhotonPeer.NoSocket, so programs using our assemblies can detect if they must provide an external SocketImplementation. Some builds avoid using the Socket class (cause Unity Free doesn't support it on all platforms). + Added: PhotonPeer.SendMessage method in order to send any serializable object to server. + Added: IPhotonPeerListener.OnMessage in order to be notified about getting message from server. + Added: new 'Connect' method, which accepts as third parameter any serializable object. You may use this object on server before creating peer. + Added: OnMessage callback to samples + Changed: TCP and UDP both set the socket to null explicitly in Disconnect(). Hopefully this fixes a misbehaviour in Unity Editor which locked up often. + Changed: SocketTCP now has a syncer object and locks in Disconnect(), so only one Disconnect call can be made anytime. + Fixed: Nullreference when calling DispatchIncomingCommands() before Connect(). This was due to a (new) use of the socket wrapper. Commented this out until needed. + Fixed: Nullreference when calling SendAcksOnly() before Connect() with a new non-null check. + Fixed: breaking issue in Hashtable replacement class. Enumerators used in 2 "foreach" loops were breaking with a nullreference. Fix: No caching of enumerator. + Changed: AutoJoinLobby now uses this.CurrentLobbyName and this.CurrentLobbyType to join a specified lobby. + Changed: EnetPeer.StopConnection will always reset the state to be able to re-connect. + Changed: Disconnect() in SocketTcp and SocketUdp sets this.socket = null, even if socket.Close() caused an exception. This is what was expected. + Added: SocketUdpNativeDynamic and SocketUdpNativeStatic to "regular" Unity Lib, to improve compatibility in Unity for different export platforms (with and without native sockets). + +*** Version 3.2.2.1 (17. October 2013 - rev2335) + Note: This lib contains a lot of breaking changes and socket handling has been refactored. By now, this is well tested and confirmed working. + Changed: The way sockets are handled and added native-socket-lib support. There is a new IPhotonSocket interface which even allows to use external classes as socket wrapper. + Added: SocketImplementation property to set a class as socket implementation (Unity. sets native implementation or c# socket at compile time) + Changed: Win 8 RT and Phone now use fewer separate classes and files. Instead, more files from the (regular) DotNet client are used. RT and Phone are now part of the trunk folder in our SVN. + Added: TrafficStats.TimestampOfLastAck and .TimestampOfLastReliableCommand + Changed: Handling of server-side shutdown (a form of TCP disconnect) is now handled specifically as server-side-disconnect (was: generic receive exception) + Added: If a UDP connection times out in a client, it sends a special flag in it's disconnect command (to the server). This enables us to detect which side is triggering timeouts more often (and we can improve things). +LoadBalancing API + Fixed: issue where we called a virtual member from a constructor (http://confluence.jetbrains.com/display/ReSharper/Virtual+method+call+in+constructor) + Changed: LocalPlayer is now a property which checks null and returns a new Player (via virtual CreatePlayer) on demand. + Added: OpJoinRoom now optionally creates a room if parameter "createIfNotExists" is set to true and the room didn't exist. Room properties can't be set "on create" this way. LocalPlayer.IsMasterClient will be true. + Added: When OpJoinRoom can create a room, it also won't define which properties go into the lobby. You can use the new Room.SetPropertiesListedInLobby(). + Added: You can pass a actorNumber to OpJoinRoom when you re-enter a room and want to reclaim a specific actorNumber in that room. In best case, the client can re-join after a disconnect/crash and seamlessly go on playing. + +*** Version 3.2.1.6 (15. August 2013 - rev2272) + Changed: The library for Unity now contains a ExitGames.Client.Photon.Hashtable to be compatible with Win 8 exports. This must be used from now on! + Note: In Unity, the compiler will complain about ambiguous Hashtable definitions. To solve this, add this to the "using" part of your code: using Hashtable = ExitGames.Client.Photon.Hashtable; + Removed: Builds for Silverlight and Windows Phone 7.1 (this is not affecting Windows 8 RT and Windows 8 Phone SDKs which are of course supported) + Fixed: A null-reference check for a TCP connection's SendAcksOnly(). + +*** Version 3.2.1.5 (06.08.2013 - rev2242) + Added: Steam and Facebook entries to CustomAuthenticationType enum. + Fixed: Potential nullreference exception in TCP SendAcksOnly() code. If called before Connect(), this always failed. + Updated: Replacement classes for datatypes not supported on some platforms (Hashtable mostly). + Added: Hashtable got a new GetEnumerator that returns a IDictionary just like the standard Hashtable does. + Changed: Constructor with int InitialSize now calls the matching base constructor. + Removed: Synchronized() method which didn't do much and is not used. + Changed: ToString is now an override instead a "new" method. + Changed: DataTypes.cs: the Stopwatch is only implemented for Silverlight (non Windows Phone 8) + Updated: Description. + Changed: Protocol to expect Hashtable always providing a DictionaryEntry. Related to change in DataTypes.cs. + Changed: Protocol now has conditional "Dictionary" detection. In WP8 the API is different for that. Uses #if WINDOWS_PHONE. same file now works in W8 and WP8. + Changed: Removed PRPCAttribute from SupportClass.cs. This is used only in PUN and needs conditional per-platform compilation anyways, so it gets implemented there. + Removed: surplus debug output in ReceiveIncomingCommands(). + Fixed: Debug output in FetchServerTimestamp() depended on the Thread calling the method. Correct: The output is enqueued and dispatched later on. + Fixed: FetchServerTimestamp no longer fails with a SendError when the state is not "Connected". + Internal: Metro-Alike project now uses DataTypes.cs of Silverlight (like everyone else). Removed surplus copy. + Internal: DataTypes.cs and Protocol.cs files can now be used in DotNet 3.5, Windows Store and Windows 8 Phone. + Internal: outdated compiler-definitions "Photon" and "METROALIKE". + +*** Version 3.2.1.4 (10.07.2013 - rev2209) + Added: "Typed Lobby" API. Photon Cloud and Loadbalancing now support multiple lobbies per app/title. Also, different types of lobbies are now possible, each can have different options and different rules for matchmaking. + Added: enum LobbyType with "Default" and "SqlLobby". The SqlLobby is a new type of lobby that uses up to 10 room properties with sql-like filters. The filter being written like the "where" part of a sql query. + Changed: FetchServerTimestamp now enqueues callbacks (can be called by socket-receive-thread). also no longer causes a disconnect callback if offline + Changed: RemoveSentReliableCommand now enqueues callbacks (can be called by socket-receive-thread) + Internal: SendAcksOnly override in TCP's TPeer class. This now sends pings but nothing else. That resets the server's timeout for this peer +LoadBalancing API + Updated: LoadBalancing API in the Unity demos (now gets copied over at build time, making sure it's identical to the DotNet "original") + Fixed: LoadBalancingClient now handles SecurityException and InternalReceiveExceptions and disconnects correctly. Before, especially Unity web clients would get stuck in "Disconnecting" state. + Fixed: LoadBalancingClient state on disconnect (no matter what caused the disconnect). + +*** Version 3.2.1.3 (19.06.2013 - rev2170) + Fixed: surplus conversion of incoming data to string, which was used in debugging. + +*** Version 3.2.1.2 (17.06.2013 - rev2160) + Fixed: custom auth will send custom auth parameters if any authentication params are set + +*** Version 3.2.1.1 (10.06.2013 - rev2148) + Added: new POST value for Custom Authentication. POST can carry more data than GET (usually used). AuthenticationValues has a setter for this. +LoadBalancing API + Changed: LoadBalancingClient.AuthValues is renamed to CustomAuthenticationValues property (sets the custom authentication values). + Changed: Player class now compares by ActorNumer (assigned by server) instead of comparing the instance. + Internal: SupportClass.GetMethods() now returns type.GetRuntimeMethods(), filtered by attribute (if at all needed). This is used by Photon Unity Networking (PUN) internally. It also returns inherited methods now, not only Declared. + +*** Version 3.2.1.0 (24.05.2013 - rev2112) + Added: Feature "Custom Authentication" which lets you authorize players/users in the Photon Cloud with an external account/user service. More on that online: http://doc.photonengine.com/photon-cloud/CustomAuthentication + Added: LoadBalancing API Feature "Friend Finding" which enables a client to find friends in rooms by userId. If an external service provides a userID per player and a friend list, this can be used to find a friend's room (game) and join it (unless closed or full). + Added: CustomAuthenticationType enum to enable differnt types of custom auth later on (only one actually useful value so far). + Added: Class AuthenticationValues as container for authentication values. + Added: LoadBalancingClient.Connect overload which takes a AuthenticationValues parameter. + Added: LoadBalancingPeer.AuthValues property to set the custom authentication values. + Added: Parameter authValues to OpAuthenticate. This is used to provide the authentication parameters and or the secret/ticket provided by Photon. + Added: ErrorCode.CustomAuthenticationFailed to be used in switches for OperationResponse.ErrorCode (for OpAuthenticate). + Changed: LoadBalancingClient.PlayerName can be set before connecting to get a UserId which is "findable" by OpFindFriends(). Find friends does NOT use any values set for custom authentication! + Added: Class FriendInfo to contain a friend's name, online state and room name (if available and after using OpFindFriends()). + Added: OpFindFriends() to actually find the friends. Use on the Master Server only, not on a room. + Added: LoadBalancingClient.FriendList, a List of FriendInfo entries. Filled by using OpFindFriends (don't modify this list directly!). + Added: LoadBalancingClient.FriendListAge, to let you know how old the FriendList is. Only get updates when the list gets "old". + Fixed: OpRaiseEvent will no longer send "group" if it's 0 (which is the default). + Added: OpRaiseEvent overload to send object instead of Hashtable. This overload uses another parameter order to not mix up with the older implementation. You can send any serializable datatype now but must be aware if the event is Hashtable or something else. + Changed: Several variants of OpAuthenticate(), Connect() and ConnectToMaster() are now obsolete or removed. Use the alternative implementations (which should be cleaner). + Internal: Added several (operation) parameters to enum ParameterCode: ClientAuthenticationType, ClientAuthenticationParams, FindFriendsRequestList, FindFriendsResponseOnlineList, FindFriendsResponseRoomIdList. + Added: PhotonPeer.ResentReliableCommands to get count of re-sent commands (might be higher than out command count (as that counts created commands only) + Internal: Address (string) handling now uses string.Split instead of IndexOf to separate port from address and short.TryParse instead of short.Parse + Added: TrafficStatsGameLevel.ResetMaximumCounters() to reset those values that could max-out easily. Allows to get "longest delta between SendOutgoingCommands()-calls since last query". + +*** Version 3.2.0.2 (21.02.2013 - rev2066) + Fixed: Potential lock-up during sending. This could cause infinite blocking and thus a crash in some apps. (Win8 / Win Store api only) + +*** Version 3.2.0.1 (15.02.2013 - rev2060) + Fixed: Issue with delayed sending of operations in udp. The data could become overwritten before being sent. The bug was leading to high disconnect rates for clients using Windows Phone 7 and 8 and Silverlight or any client that used Network Simulation. + +*** Version 3.2.0.0 (13.02.2013 - rev2053) + Note: This release only changed the version, matching the new Server SDK v3.2.0.0 + Updated: readme.txt + Fixed: Reference for Windows 8 RT and Windows Phone 8 SDKs. + Added: Particle Demo to Unity Client SDK. + +*** Version 3.0.1.18 (11.02.2013 - rev1998) + Added: Optional per package CRC checksums to filter out compromised packages (avoiding more issues, compared to reading bad values). + Added: PhotonPeer .CrcEnabled and .PacketLossByCrc to handle CRC and get the count of affected (incoming) packages. + Note: Checking packages with CRC will take some computation time. Consider this an option to detect if/why someone's connection is bad. It's likely not good to be enabled by default. +Windows 8 RT & Windows 8 Phone: + Fixed: Serialization of foat and double values. These caused exceptions when used in object-arrays. + +*** Version 3.0.1.17 (19.12.2012 - rev1946) + Added: New Platform: Mono 4 Android. Please check the Readme.txt for hints how to build the demo in Mono 4 Android. + Changed: The referenced DotNet assemblies used by our libraries, which makes ours compatible with Mono 4 Android and others. + Changed: The Particle Demo Logic to also handle events sent by JavaScript clients. In case these are used, the types used in event differ from what DotNet or other clients send. + Changed: PhotonPeer.LocalTimeInMilliSeconds property now uses SupportClass.GetTickCount(). That method is using Environment.TickCount (which can be replaced if needed). + Changed: Any place that directly used Environment.TickCount (as the way SupportClass.GetTickCount() gets the value can be replaced). + Renamed: GetLocalMsTimestampDelegate is now: SupportClass.IntegerMillisecondsDelegate (rarely used if at all). + +*** Version 3.0.1.16 (29.11.2012 - rev1923) + Internal: A client timeout now internally sets connectionState to Zombie and then calls Disconnect() instead of stopping the connection right away. + Changed: Disconnect() sends a disconnect-command in any case (except not connected or disconnecting). If the connection is not in state connected anymore, said command is unsequenced (unreliable) and the disconnect is locally executed immediately as call to StopThread(). As before, disconnecting and disconnected clients won't send this. + Changed: Ping creation is now more strict and checks also if any reliable commands are outgoing AreReliableCommandsInTransit(). this avoids a few pings. + Fixed: NullReference exception in StopConnection() if it's called before being connected for the first time (late object creation made this fail). + Changed: PhotonPeer.LocalTimeInMilliSeconds property now uses SupportClass.GetTickCount(). That method is using Environment.TickCount (which can be replaced if needed). + Changed: Any place that directly used Environment.TickCount (as the way SupportClass.GetTickCount() gets the value can be replaced). + Renamed: GetLocalMsTimestampDelegate is now: SupportClass.IntegerMillisecondsDelegate (rarely used if at all). + + +*** Version 3.0.1.15 (27.11.2012 - rev1917) + Note: Silverlight SDK release only! + Updated: Silverlight projects with proper references (hopefully). In case you wonder: Some projects are included even though only their (source) files are linked in Silverlight. We can't reference DotNet projects directly, so we use the (shared) files instead. + Updated: Silverlight Particle Demo now has a basic gui and hopefully helps with your first steps. + +*** Version 3.0.1.14 (16.11.2012 - rev1891) + Added: Interest Groups! In rooms, you might send events to an interest group, identified by a byte (255 groups are currently allowed). OpChangeGroups lets you add or remove groups you're interested in. + Added: New platform! Welcome Windows 8 RT and Windows Phone 8. Both are "preview" releases but based on the stable DotNet basis we have. + Note: The Windows Phone 8 SDK does not yet have a LoadBalancing demo but the API is available (Windows Phone 8 is separate from the still existing Windows Phone 7.1 SDK). + Added: Another new platform: Playstation Mobile! This is Sony's SDK for mobile platforms. Find out more about it: www.playstation.com/psm + Added: Silverlight 4 SDK is back. Now with LoadBalancing API (the demo implementation is not finished but the basic "logic" is running). + Fixed: Windows Phone 7 and Silverlight TCP error handling while connecting to the server. This should fix issues with failing connects due to missing policy settings. + Internal: Windows Phone 7 and Silverlight TCP connections now set their state a bit differently (this doesn't affect the workflow though). + Internal: Http implementation now checks if a Proxy was set deliberately. Check is: (WebRequest.DefaultWebProxy as WebProxy != null). + Internal: DispatchIncomingCommands() now avoids copying lists when checking for commands that need a repeat. + Internal: SendOutgoingCommands() now re-uses a buffer to create UDP packages in before sending. This should save a lot of memory allocation. +LoadBalancing API: + Added: New demo "Particle". You will notice it's similar to the "Realtime Demo" but LoadBalancing- and Cloud-compatible and it makes better use of the default features. Check out Particle "Logic". + Added: LoadBalancingClient.DisconnectedCause to track certain disconnect causes (no matter if the connection or an operation caused the disconnect). + Added: DisconnectCause enum to enumerate those disconnection causes. + Changed: LoadBalancing OnOperationResponse() and OnStatusChanged() to track most disconnect reasons (in DisconnectedCause). + Removed: LoadBalancing Connect() variants that essentially were duplicates of others. + Changed: LoadBalancingClient debug output now goes to: Debug.WriteLine (which is available in debugger, while Console is not always). + Changed: CacheProperties method is now virtual for Room and Player. This allows you to override it and use this as callback to update props. + Added: Player.Tag to store arbitrary (game) data with the Player. Put in (e.g.) a player's representation/avatar or similar. + Added: ErrorCode constants MaxCcuReached and InvalidRegion. These are important for the Photon Cloud. + Added: Handling for DisconnectedByUserLimit. This is a status of OnStatusChanged when a Photon Server License's CCU limit is reached. This no longer will try to connect to a Game Server (where it gets rejected, too). + Changed: Debug output of loadBalancingClient now goes to Debug.WriteLine (which is available in debugger). + Changed: API now uses a factory method to create Room instances (this makes it possible to extend the Room class and instantiate the new class instead). + Changed: The Player constructor now has an "actorProperties" parameter and will cache the provided properties. This makes sure actor-props are available locally. +Windows Phone 8: + Added: Demo for Cloud / LoadBalancing. The Particle Demo only has a special WP8 GUI and links it's logic from a separate project (read: folder). +Windows 8 RT: + Added: Demo "Phong", which is a simplified, basic multiplayer game. It's focus is to show how to sync data, not to make it super smooth and error free. Let us know any issues but bear with us as it isn't fully featured. + +*** Version 3.0.1.13 (26.09.2012 - rev1731) + Fixed: Internals of method DispatchIncomingCommands() for UDP. In some cases this removed commands from a dictionary inside a foreach loop (which causes an Exception due to changing the dictionary) + Added: Support for Dictionary<,>[]. This is not a very lean way to send data (especially when using ) but if needed, it now works + Changed: Replaced several foreach loops with for loops (it doesn't change usage but in Unity exports to iOS, foreach uses more memory than for) + Added: Doc for public methods in Protocol class (they are useful to quickly write values into an existing byte-array) + Fixed: Unity UDP send code: iOS 5 devices will kill a socket when the power button is pressed (screen locked). This case was not detectable by checking socket.Connected. + Added: Unity UDP send code: Now tries to open another socket to refresh/keep the connection. This is affected by timeouts still, of course (as are all connections). + Internal: locked usage of UDP / enet channels + +*** Version 3.0.1.12 (26.07.2012 - rev1683) + Changed: The DotNet client libraries are now Thread safe! You could start a background Thread to keep calling SendOutgoingCommands in intervals and still call it from a game loop, too + Changed: Due to the thread safety, the demos no longer use excessive locks. This is now solved by the lib, more streamlined and hidden. One Thread is used instead of Timers (which could fire concurrently if execution was longer then their interval) + Changed: Moved the enable/disable property fro NetworkSimulationSettings to PhotonPeer.IsSimulationEnabled (this should now be thread safe) + Changed: NetworkSimulation will create and keep one thread when you first enable it in a (debug) client. Disabling it, will execute any delayed action immediately (in IsSimulationEnabled!) and pause the simulation thread + Changed: All demos are updated. We assigned new event codes (starting at 0, like any developer's code should) and extended the comments. Check them out + Changed: All Loadbalancing demos are now using the same DemoBasisCode linked in, so it can be changed in one position. Where needed an extension is made + Updated: comments / documentation for LoadBalancing API, Lite API and basic Photon API (basically anything public) + Changed: SupportClass.NumberToByteArray is now obsolete. It can be replaced with Protocol.Serialize() easily and that is performing better + Fixed: Windows Phone UDP socket was sending a full package of zeros on connect. It didn't break anything but is not needed, of course. + Fixed: SupportClass.StripKeysWithNullValues method was prone to throw an exception +LoadBalancing API: + Changed: LoadBalancingClient.OpLeaveRoom() skips execution when the room is null or the server is not GameServer or the client is disconnecting from GS already + Note: LoadBalancingClient.OpLeaveRoom() returns false in those cases and won't change the state, so check return of this method + Fixed: workflow for authentication (which should be called only once per connection, instead of "any time we establish encryption) + +*** Version 3.0.1.11 (05.06.2012 - rev1569) + Fixed: Udp issue with channels and unreliable commands. Unreliable commands of one channel were discarded, when another channel had unreliable commands, too + +*** Version 3.0.1.10 (04.06.2012 - rev1561) + Fixed: TCP connection issues for DotNet and Unity (Silverlight and WindowsPhone are different) + Fixed: DotNet+Unity TCP send calls with 0 bytes to send (this was ignored by the socket but useless anyways) + Moved: DNS resolution and socket.Connect() are now handled in the connection thread (TCP in DotNet and Unity) + Fixed: Issue with (TCP) socket connections being closed directly while connecting. in this case, socket.Receive() might receive 0 bytes instead of blocking until more bytes are available. without sending anything, the socket never updates its .Connected state and never throws a Exception. now we send a ping and thus trigger a exception + Fixed: Some documentation errors (due to changed API, etc) +Loadbalancing API: + Changed: LoadBalancingClient.OnEvent() now uses a join-event's actornumber-list to create Player instances for anyone who wasn't created as Player before + Fixed: LoadBalancingClient.OnEvent() handling for join-event does not expect any actor/player properties anymore (which fixes a potential null-reference exception when not even a name is set) + +*** Version 3.0.1.9 (10.05.2012 - rev1512) + Fixed: Reference to project in Windows Phone SDK + +*** Version 3.0.1.8 (09.05.2012 - rev1508) + Fixed: The OpJoinRandom of the LoadBalancingAPI failed to filter rooms for their custom room properties. Instead, any room matched. This is fixed now. + Added: New Demo for Windows Phone: Cloud Basics + Changed: The loadbalancing / cloud-based demos are refactored to share a similar codebase + +*** Version 3.0.1.6 (07.05.2012 - rev1489) + Note: This is a "stable" release, containing only a few updates. The bulk of changes are in the "odd" numbered releases. Read those updates carefully. + +*** Version 3.0.1.5 + Changed: adopted the even/odd version numbering system. versions ending on a odd number = intermediate/in-development version, even number = released (that makes 3.0.1.5 a intermediate) + Fixed: When NetworkSimulation is disabled, all remaining packages are sent/received immediately (ignoring the former delays) + Note: NetworkSimulation should be working nicely now. Be aware that sudden, additional lag might (!) lead to a disconnect. Play with the settings to find out which ones work for you + Changed: Protocol class now has a few methods to (effectively) serialize some datatypes to arrays (and into existing arrays) + Removed: Surplus public methods from Protocol that were "type-named" like SerializeFloat. The functionality is in still with overloaded methods + Added: count of packages (requests) outgoing if TrafficStatsEnabled +Demo Realtime: + Changed: The commandline arguments are now server:port, protocol (udp,tcp,http), reliable sending, interval dispatch, interval send, interval move. Example: localhost:5055 Udp false 15 25 15 + Changed: Demo Realtime: If the commandline sets an unknown protocol, the client shows a message and closes gracefully + Changed: Demo Realtime: The demo now starts in the grid view (showing something). Local player and player list are created with the Game instance. Player startpoint is randomized. +Loadbalancing API: + Renamed: LoadBalancingClient.lbPeer to .loadBalancingPeer + Fixed: LocalPlayer.SetCustomProperties() usage + Added: Service() method, which calls the LoadBalancingClient's Service simply + Changed: LoadBalancingClient is no longer extending LoadBalancingPeer but instead using one + Changed: the many overloads of Operations are gone in LoadBalancingPeer to streamline the api + Changed: ActorProperties are no longer set via JoinRoom, JoinRandomRoom or CreateRoom. instead, set the properties in the LocalPlayer and let the LoadBalancingClient send and sync them where necessary + Fixed: MasterClientId is now 0 when there are no more players in the room (it was set to int.max before) +Internal: + Changed: all DispatchIncomingCommands now use a while loop to dispatch the ActionQueue (in the hope this is the fastest way to do it) + Changed: DispatchIncomingCommands now looks for the received unreliable command with lowest unreliable seqNr to dispatch this + Changed: DispatchIncomingCommands discards commands if the reliable OR unreliable sequence is beyond the command's sequences + Changed: DispatchIncomingCommands now truncates the incoming unreliable commands to limitOfUnreliableCommands (if that's > 0) + Changed: the next reliable command to dispatch is now fetched with Dictionary.TryGetValue() (for being faster) + Changed: no longer using BinaryReader streams anywhere (this should improve speed and reduce mem usage) + Changed: PeerBase accordingly + Changed: Unit test MyType de/serialization now supports null-references (as 1 byte being 0) + Changed: Protocol.SerializeOperationRequest is now used in the same way, no matter if request is "top level" or inside some other datatype + Changed: the peer bases accordingly to use only one SerializeMemStream and lock it + Changed: how encryption fits in to the new serialization (it is a special case, as only the operation bytes get encrypted) + Added: Protocol.SerializeParameterTable() as requests, events and responses all use the same way to write their parameters + Changed: SerializeOperationToMessage parameter order + Changed: Order of Protocol methods to make more sense (from byte to more complex types for serialization) + New: PhotonDotNet library prototype for windows 8 metro + +*** Version 3.0.1.3 (13.04.2012 - rev1430) + Known issues: The Network Simulation is currently not guaranteed to work properly. Please bear with us. + Note: the following change might be a breaking one: + Changed: When dispatching a server's disconnect-command, the state is changed to ConnectionStateValue.Disconnecting BEFORE any callback due to state change is called. This should disallow game-code from calling any operations immediately. + Changed: Many internals. This should result in better performance + Changed: Service() now calls SendOutgoingCommands() until send-queues are empty. This might take more time but gets important commands out. If you need more control, Service() can be replaced with DispatchIncomingCommands and SendOutgoingCommands! + Added: null check to GetEndpoint() to avoid issues when the host address is null + Fixed: queueIncomingCommand() debug out message when a command is being received AND in in-queue (the list it accesses is now a dict) + Added: new "vital" stats to TrafficStats + Added: LongestOpResponseCallback and LongestOpResponseCallbackOpCode (opcode and time of longest callback) + Added: LongestEventCallback and LongestEventCallbackCode (event code and time of longest callback) + Added: LongestDeltaBetweenDispatching and LongestDeltaBetweenSending to detect "gaps" between subsequent calls of those + Added: DispatchCalls and SendOutgoingCommandsCalls to measure average call-rate + Fixed: PeerBase.TrafficStatsEnabledTime now checks if a stopwatch is set, else it returns 0 + Fixed: TrafficStatsReset() now works as intended (starting a new stopwatch, too) +Internal: + Changed: name of variable timeLastReceive. is now: timeLastAckReceive (better fit with what it does) + Internal: queueOutgoingReliableCommand() to use a lock on the channel it accesses + Internal: SerializeOperationRequest() now locks the MemoryStream while using it (avoids threading-issues with calling OPs) + Internal: SendUdpPackage() now checks if socket is obsolete (and disconnected for a reason) or not. only if not, a error is logged + Internal: EnetChannel now uses Dictionary and Queue for commands (should be faster to access) + Internal: simplified access methods in EnetChannel according to changes + Internal: outgoingAcknowledgementsList is now a Queue + Internal: receiveIncomingCommands() no longer has a local variable sentTime. instead using this.serverSentTime directly + Internal: UDP sending is now done with a synchronous socket call (profiling told us: this is cheaper) + Internal: re-using the socket arguments for receiving packages (saves some buffer allocation) + Internal: socket to non-blocking (maybe not possible on all devices) + Removed: initial-HTTP-protocol support (HTTP support not public yet) + Added: support for encryption with HTTP protocol + +*** Version 3.0.1.2 +- Added: Rooms now have a "well known" property to list the custom properties that should be available in the lobby. This can be set per room (but most likely makes sense per title/application). +- Added: LoadBalancingClient.OpCreateRoom() has a new parameter "propsListedInLobby" and Room.PropsListedInLobby is available to check this list (if needed at all). +- Added: GameProperties.PropsListedInLobby as "well known property" key +- Changed: LoadBalancingPeer.OpCreateRoom now sets ParameterCode.CleanupCacheOnLeave to true by default. This makes the server clean a player's event cache on leave. +- Added: SupportClass.DictionaryToString() will now print values of string[] and optionally leaves out type information. +- Note: 3.0.1.1 didn't get it's own SDK, so read that version's changes, too + +*** Version 3.0.1.1 +- Added: PhotonPeer.TrafficStatsElapsedMs, which gives you the milliseconds that the traffic stats are enabled. This internally uses a stopwatch (for now) which might not be available on all platforms. Please report if this new SDK causes issues. +- Added: PhotonPeer.TrafficStatsReset() to reset the traffic stats and the timer. This could be useful to get stats of "in game" versus "out of game". Note: Loadbalancing includes frequent server-switching and each disconnect/reconnect causes a reset. +- Changed: In LoadBalancingPeer EventCode.SetProperties is obsolete and replaced with EventCode.PropertiesChanged. Please switch to new constant. +- Added: Support in LoadBalancingAPI for Player.IsMasterClient. For this, the Players now get a RoomReference set (when added). The active player with the lowest ID is the master (per room). +- Added: Room.MasterClientId, which is updated when new players are added or the current master is removed. +- Added: SupportClass.DictionaryToString() has an overload which doesn't "print" the Type per key/value. +- Added: Loadbalancing API overload for OpJoinRandomRoom(...) taking additional parameter 'playerProperties' +- Added: Loadbalancing API CacheProperties() and Room.GetPlayer() are public now +- Added: LoadBalancingClient will now handle ExceptionOnConnect and keep clients from re-connecting if establishing a connection fails +- Note: The following changes affect only HTTP, which is an upcoming option for connections. So far, the public server SDKs don't support this. Feel free to contact us about it. +- Added: setter for PhotonPeer.ServerAddress to allow setting a http url (even while connected) +- Added: PhotonPeer.HttpUrlParameters setting parameters to be added to end of url (must begin with '&') +- Added: HttpUrlParameters to PeerBase +- Added: HttpUrlParameters is now attached to the end of a URL in http usecase +- Added: "Http2" support to Unity library +- Internal: method HttpBase.ConnectAsync is no longer needed and Request() is now directly passed to thread + +*** Version 3.0.1.0 +- Added: Loadbalancing (Cloud) Features +- Added: Project with the Loadbalancing sourcecode for DotNet, WindowsPhone and Unity3d (usable without PUN) +- Added: Initial, simple Loadbalancing demos for each platform (will update and extend those) +- Note: The API of the client libraries didn't change. The new features were added on top of the known API +- Added: VS2010 solutions for DotNet and Windows Phone SDKs containing the demos and APIs in the package +- Added: readme.txt with initial help to setup the Cloud/Loadbalancing demos +- Added: default appId for Loadblanacing demos: "" + +*** Version 3.0.0.10 +- Added: When UDP StartConnection (internal method) fails, callbacks to OnStatusChanged(StatusCode.Disconnect) are now done additionally to the SecurityExceptionOnConnect and ExceptionOnConnect calls. This happens direcly inside PhotonPeer.Connect()! +- Changed: When Unity UDP implementation fails to connect due to missing DNS resolution, it now also calls OnStatusChanged(StatusCode.ExceptionOnConnect) +- Removed: StatusCode.Exception_Connect value (obsolete, replaced by ExceptionOnConnect, same value) +- Fixed: Http connections (DotNet & Unity) now skip results while in disconnected state +- Fixed: Http connections (DotNet & Unity) now ignore results after a disconnect and reconnect was done (this applies only to HttpBase, not HttpBase2) +- Fixed: misleading debug out (pointing to WindowsPhone while the class is now in general use) +- Changed: DotNet UDP connection now only logs socket errors if the connection isn't obsolete (disconnected) already + +*** Version 3.0.0.9 +- Fixed: issue with HTTP connections and EstablishEncryption() +- Changed: ActionQueue is now a Queue, allowing Dequeue in a while loop instead of foreach(i in list) and clear() +- Changed: Unity HttpBase DispatchIncomingCommands() to make use of the queue +- Fixed: init byte[] length (internal. did not have consequences) +- Fixed: LitePeer OpRaiseEvent() was sending encrypted +- Internal: ContainsUnreliableSequenceNumber() check if reliable list needed sorting +- Fixed: Unity/Silverlight bug with encryption. Their implementation of BigInteger.GetBytes() failed when the 2nd, 3rd or 4th of the first 4 bytes was 0 but the previous wasnt. This led to incompatible secrets. +- Changed: TCP socket sending debug output now checks debuglevel (when send is skipped, cause the sender is obsolete already) +- Added: caching option RemoveFromRoomCacheForActorsLeft = 7 +- Internal: Added another http-based communication protocol. Please note: The fitting server's are not yet publicly released. This does not affect UDP or TCP protocols. + +*** Version 3.0.0.8 +- Fixed: Udp fragment reassembly in case fragments are received out of order and incoming queue was not yet sorted +- Fixed: Handling of incoming reliable commands (udp) which were skipped in some cases, if not received in order +- Fixed: Network simulation issue which caused lost incoming commands +- Fixed: Demo Realtime. protocol is now again Udp, fitting the default server address "localhost:5055" (make sure to build the demo with your server's address if Photon is not on the same machine) + +*** Version 3.0.0.7 +- Changed: Udp socket usage for Unity 3d lib. Both threads (send (in game loop) and receive (separate)) now have minimal locks while using the socket +- Fixed: SendOutgoingCommands now returns true if anything didn't make it into the outgoing UDP package +- Internal: TCP connections also skip network simulation when it's turned off + +*** Version 3.0.0.6 +- Fixed: SendOutgoingCommands now returns true if commands are remaining in outgoing queues (UDP only sends one package per call, TCP will send anything outgoing). +- Added: New "RoomCache" for Events. The EventCaching enum allows you to use it. Events in this cache will keep the order in which they arrived in the server. A filter makes deleting them very flexible. +- Internal: Ability to make lib send only ACKs and nothing else. This is probably a temp solution as it might be better to make sending and calling ops completely thread safe. +- Internal: PhotonPeer.IsSendingOnlyAcks, which is locked with the sending (not changing while sending). This makes SendOutgoingCommands() thread safe, which is good if you need a separate thread to keep connection. You could call operations while sending. +- Internal: Unity3d's connection now also syncs socket usage + +*** Version 3.0.0.5 +- Fixed: ObjectDisposedException in DotNet UDP workflow. This was caused by disconnecting while incoming data was processed (and before the next datagram was accepted) +- Added: PhotonPeer.LimitOfUnreliableCommands property. This helps you skip potentially "outdated" unreliable commands (events), which helps if you couldn't dispatch for a while +- Internal: Minor performance improvements. Example: The check if network simulation is turned on is done earlier in the workflow, which avoids a bit of overhead + +*** Version 3.0.0.4 +- Fixed: Tcp connections have been throwing ArgumentNullException in DispatchIncomgingCommands() if they were not connected yet +- Internal: Adjusted Http client to server rev2360 + +*** Version 3.0.0.3 RC2 +- Internal: Communication with HTTP server is WIP (Work In Progress - not a publicly available feature) + +*** Version 3.0.0.2 +- Fixed: OpRaiseEvent overload with EventCaching and ReceiverGroup parameters was not sending the customEventContent as expected. This was always null. +- Fixed: Time fetching case where no time was accepted. Servertime is now accepted, if the fetch-time-command was less or equal as the current roundtrip time. Avoids issues if rtt is exceptionally low immediately. +- Internal: When using multiple channels, dispatching incoming commands now will continue with the next channel, if one doesn't yet have the next reliable command (reliable sequence of one channel does not affect others) +- Internal: Changed protocol for TCP and message headers. This will support bigger message sizes. Also changed debug out related to unknown headers. +- Internal: Changed handling of TCP receive-callbacks for unfinished messages in Silverlight and WP. This should fix handling of very big data that's received in multiple "chunks" +- Internal: Http messages are now deserialized the same way that content in tcp or udp is handled + +*** Version 3.0.0.1 RC1 +- Fixed: Packaging of SDK now includes all files in demo folders, except a list of ignored file-endings (xaml and jpg files were missing in previous Silverlight and WindowsPhone SDKs) + +*** Version 3.0.0.0 RC1 +- Changed: Filenames! Now include a '3' for Photon v3. Update your references! Also, Silverlight libraries now use "Silverlight" in the filename (was: SL) +- Changed: Versioning. A dll's version has now 4 digits. The first 2 match Major and Minor number of the Server SDK. The latter 2 are Release and Build respectively +- Changed: Silverlight DataTypes (like Hashtable) are now in namespace ExitGames.Client.Photon. This is easier to include (as that namespace is in "using" in most cases) + +*** Version 6.4.5 +- Changed: Parameters for OpCustom are now of type Dictionary, making sure that only byte-codes are used for parameters +- Changed: Most IPhotonPeer names (to match those in server code): EventAction -> OnEvent, OperationResult -> OnOperationResponse, PeerStatusCallback -> OnStatusChanged +- Added: SupportClass.DictionaryToString(), which converts the content to string (includes support for Hashtables) +- Moved: Definitions of Lite and Lite Lobby specific codes for Parameters, operations and events are now in LitePeer. Will be available as source and could be replaced +- Changed: Usage of codes in Lite and Lite Lobby. Now pre-defined codes are starting at 255 and go down. Your events, operations and operation-parameters can now start at 0 and go up without clashing with pre-defined ones +- Changed: Constants that are non-exclusive (like event codes and OpKeys, which can be extended) are no longer "defined" as enums but as class of const byte values. Less casting but also less convenient "name" representation in debug output +- Added: LiteEventKey.CustomContent as key to access the content you sent via OpRaiseEvent ("Data" seems a bit misleading but is also available) +- Changed: Namespace of LitePeer to ExitGames.Client.Photon.Lite (the Lite-specific class is still compiled into the library for convenience but can be ignored quite easily this way) +- Added: Property MaximumTransferUnit. The default is 1200 bytes. Usually this is ok. In few cases, it might make sense to lower this value to ~520, which is commonly assumed the minimum MTU. Don't change this, if you don't know why. +- Added: New classes to wrap up op-requests (OperationRequest), op-results (OperationResponse) and events (EventData). Those new classes are now used in callback methods OnEvent and OnOperationResponse +- Changed: by using the new classes (note above), the client is a bit more like the server in its naming. We didn't want to change every last bit though. +- Internal: Changed protocol (to 1.6) so that it does not require any parameter codes internally. Any application can now define any operation, parameter and event codes it wants to. +- Changed: Encryption is now triggered by you and resolved by the library. You don't have to look out for the result of EstablishEncryption and use it. Instead: wait for OnPeerStateChanged call with either EncryptionEstablished or EncryptionFailedToEstablish +- Removed: InvocationId. This concept was very rarely used but confusing. It's easy to implement, if needed. If you don't know what this means: Nevermind. +- Changed: Operation calls now return bool: if they could be enqueued or not. If enqueued (cause you are connected and the data was serializable), then SendOutgoingCommands will send those operations (as before). +- Added: Support to de/serialize Dictionary. If the types are more specific than object, the serialization writes the type-code only once (lean byte usage in protocol) +- Added: Support to de/serialize null. Enables you to send a null value, e.g. in a Hashtable +- Added: ReceiverGroup enum to select a range of players that get an event via Operation Raise Event +- Added: Event Caching. Any event sent via RaiseEvent can now be buffered on the server side and is "repeated" when a new player is joining a room. This is similar to Properties but lets you categorize your info better and works just like regular events, too. +- Added: EventCaching enum to select if an event is to be cached and how it's cached: either "not at all" (default), replacing anything cached so far (fast) or "merge" (which will add new and replace old keys with new values). Optionally, a event can be raise with option "remove". +- Added: new overload of OpRaiseEvent() with the two new parameters noted above +- Added: Support for custom de/serializer methods. By writing 2 methods to convert a object into a byte-array (and back from that), Photon now supports any custom object type (standard datatypes are still supported out of the box) +- Added: PhotonPeer.RegisterType() to register serializer and deserialize methods for a certain type. Per object, a length and one byte 'type code' are added to the serialized data +- Added: Support for non-strict object[]. Unlike strictly-typed array, here each element will carry its own type. +- Note: If you want to use the new Custom Types or the object[], you have to update your server! Older Servers don't support the new features. As long as you don't use these features, the library is compatible with previous servers. +- Added: ByteCountCurrentDispatch and ByteCountLastOperation properties to PhotonPeer (the ancestor of LiteGame, etc). A game can now access the size of operation-results and events as well as operation-call size. +- Added: Traffic statistic set: PhotonPeer.TrafficStatsGameLevel as "high level" game-related traffic statistic. Counts bytes used by operations, their results and events. This includes overhead for these types of messages, but excludes connection-related overhead +- Added: Traffic statistic set: PhotonPeer.TrafficStatsIncoming and PhotonPeer.TrafficStatsOutgoing as low level statistics of the traffic +- Added: PhotonPeer.TrafficStatsEnabled which enables two sets of traffic statistics. By default, statistics are turned off. +- Added: Classes TrafficStats and TrafficStatsGameLevel for the two statistic cases metioned above +- Changed: NetworkSimulation now starts a Thread when it becomes enabled and the thread ends on simulation disable. Disable the NetworkSimulation to stop the thread, as Disconnect does not change the simulation settings! +- Internal: Cleanup and renaming of several properties +- Internal: Each new peer increases the PeerCount but it is no longer reduced on disconnect (it is existing still, after all) +- Internal: Udp commands will be buffered when serialized. This saves some work when re-sending a reliable command +- Added: TCP Routing code (not in Silverlight). To be used when running Photon on Azure (can be ignored in regular use) +- Added: to StatusCode: TcpRouterResponseOk = 1044, TcpRouterResponseNodeIdUnknown = 1045, TcpRouterResponseEndpointUnknown = 1046 and TcpRouterResponseNodeNotReady = 1047, +- Added: override for PhotonPeer.Connect() with node +- Internal: DotNet now reads the 2 bytes routing response, if a routing request was made (also, not in Silverlight) +- Internal: If TConnect sent a routing request, nothing else will be sent until 2 bytes response are read. +- Internal: If the routing-response does not start with ProxyResponseMarkerByte = 0xF1, a debug message is enqueued and TCP will disconnect +- Internal: Init request for TCP is now always enqueued instead sent directly. This way, it can be delayed if a routing node is selected +- Internal: TPeer EnqueueInit() and SendProxyInit() now create init and routing request respectively +- Internal: TConnect.sendTcp() checks isRunning before it tries to send (the socket might close before the NetSim does). This won't be an issue anytime, still INFO-level callback to DebugReturn is done. +- Removed: debug out for "send package" situation (even on ALL-level, this is more or less spam) +- Internal: updated version numbers of init to 6.4.5 +- Changed: SupportClass HashtableToString() returns "null" if parameter is null +- Internal: Removed SortedCommandList and CommandList classes. Replaced by List and a Sort() where necessary +- Internal: EnetPeer.channels is now a Dictionary instead of a SortedList +- Internal: the channels are initialized with channel 0xff first - this makes 0xff high prio in all foreach usaged +- Internal: NCommand class is now IComparable for usage in Sort() + + +*** Version 6.4.4 +- Added: PhotonPeer.TimestampOfLastSocketReceive now provides the time when something was received. Can be used warn players of bad communication-timing even before the disconnect timeout will be happening +- Fixed: OpGetPropertiesOfActor did use the actorNrList correctly, which always got you all properties of all players + +*** Version 6.4.3 +- Changed: A udp connection timeout in Unity will now end the socket-handling thread correctly +- Changed: The thread for Network simulation is now stopped when the client disconnects and started on connection (instead of keeping it per peer) +- Fixed: Exceptions in network simulation, when Disconnect() was called soon after Connect() but before the connection was established. + +*** Version 6.4.2 +- Fixed: It was possible to send PhotonPeer.FetchServerTimestamp() before being connected properly. Now the method triggers debug output (INFO level) and the callback PeerStatusCallback(StatusCode.SendError) +- Internal: Added a lock in the UDP version of SendOutgoingCommands(). It's still illegal to access a peer from multiple threads but the follow-up issues this lock avoids are very difficult to track. +- Internal: to stay compatible with all exports of Unity, the use of System.Threading.Interlocked.Exchange was replaced by simply replacing the list's reference instead + +*** Version 6.4.1 +- Changed: The Unity library now uses the WWW class for Http based requests. Results are checked within DispatchIncomingCommands(). Important: Unity allows handling WWW requests only on the MainThread, so dispatch must be called from this context! +- Note: Photon does not support Http requests out of the box. Customers get access to a fitting server on demand +- Changed: outgoing list is now replaced on send, instead of calling remove(0) repeatedly (which takes longer). Internal: this uses System.Threading.Interlocked.Exchange to switch to a new outgoing list in one step + +*** Version 6.4.0 +- Fixed: TCP handling of incoming data. This avoids loss of data (operation-results or events) when a lot of data is incoming. +- Changed: PeerStatusCallback() is less often called for queue-length warnings (e.g.: StatusCode.QueueIncomingReliableWarning). Only if a queue has a multiple of PhotonPeer.WarningSize items. +- Changed: WarningSize is now 100 by default +- Changed: Description of PhotonPeer.WarningSize and PhotonPeer.CommandBufferSize, which really is just the initial size of any buffer. The warnings are there to avoid situations where all heap is used up. +- Changed: Naming: StatusCode.Exception_Connect is now Obsolete and replaced with StatusCode.ExceptionOnConnect +- Added: Missing summary for StatusCode.SecurityExceptionOnConnect +- Added: NetworkSimulationSet.ToString override to provide a better overview +- Added: Support for arrays of Hashtables + +*** Version 6.3.1 +- Fixed: Network simulation now delays incoming packages by IncomingLag and IncomingJitter as expected (it was using the outgoing values, too) + +*** Version 6.3.0 +- Added: Network simulation (lag, jitter and drop rate) to debug builds +- Added: class NetworkSimulationSet with properties to control network simulation +- Added: NetworkSimulationSettings.NetworkSimulationSettings property to get current simulation settings +- Changed: only the first peerId of a VerifyConnect is accepted in client (avoids surplus peerID changes) +- Internal: added PeerBase.SendNetworkSimulated() and PeerBase.ReceiveNetworkSimulated() and a Thread to run delay simulation +Siverlight: +- Updated: to Silverlight v4.0 +- Added: Encryption to Silverlight library +- Internal: updated internal BigInteger class for Silverlight +- Internal: DiffieHellmanCryptoProvider in Silverlight, so it uses AesManaged instead of Rijndael (which is not part of Silverlight 3) +- Added: Stopwatch class to DataTypes.cs (for Silverlight only) + +*** Version 6.2.0 +- Added: "Demo LiteLobby Chatroom" to Unity SDK +- Updated: Demo Realtime in Unity client SDK. It's still compatible with the demo on other platforms but cleaned up and much better commented +- Updated: Documentation is now clearer on where the Lite logic is used (it runs on Photon but is not the only application logic) +- Updated: Documentation for the enumerations in IPhotonListener. The Lite application based ones are better described and it's now clear which ones are essential to the Photon client (not only in Lite) +- Updated: Documentation in several other places +- Added: StatusCode.SecurityExceptionOnConnect which is thrown if a security exception keeps a socket from connecting (happens in Unity when it's missing a policy file) +- Added: PhotonEventKey and PhotonOpParameterKey which contain the fixed byte keys that cannot be re-assigned by applications at will (as these keys are used in the clients and server in their respective context) +- Change: PhotonPeer.PeerState is no longer a byte but of type PhotonPeer.PeerStateValue, which makes checking the state simpler. The PeerStateCallback() for state changes is still called as before. +- Changed: Property PhotonPeer.PeerState. It now converts the low level ConnectionStateValue to a PeerStateValue, which now includes a state InitializingApplication. See reference for PeerStateValue. +- Changed: PeerStateValue enum is now part of the ExitGames.Client.Photon namespace, making it more accessible +- Internal: NConnect in DotNet and Unity to catch security exceptions +- Internal: from using var to explicit type usage in DiffieHellmanCryptoProvider.cs (Mono Develop friendly) +- Internal: made const: ENET_PEER_PACKET_LOSS_SCALE, ENET_PEER_DEFAULT_ROUND_TRIP_TIME and ENET_PEER_PACKET_THROTTLE_INTERVAL +- Internal: PeerBase "PeerStateValue peerState" is now: "ConnectionStateValue peerConnectionState" (holding the low level connection state, nothing more) +- Internal: added PeerBase.ApplicationIsInitialized, which stores if the init command was answered by Photon (reset on connect/disconnect) +- Removed: PhotonDemoServerUrlPort and PhotonDemoServerIpPort of PhotonPeer. All demos now use "localhost:5055" and you should run your own server. +- Added: enum ConnectionProtocol to get rid of the "useTcp" parameter in the PhotonPeer constructor (which was less clear than the explicit enum now in use) +- Added: overload of PhotonPeer constructor, which is still compatible with the "useTcp" bool parameter (to avoid a breaking change for the time being) +- Added: PhotonPeer.UsedProtocol property to find out this peer's protcol +- Added: LitePeer.OpLeave() overload without the gameName parameter. That name is not checked in the Lite application (on the server), so it's not really needed + +*** Version 6.1.0 +- Added: Encryption for Unity and DotNet. Operations (and their responses) can be encrypted after exchanging the public keys with the server +- Added: OpExchangeKeysForEncryption(), DeriveSharedKey() and IsEncryptionAvailable to PhotonPeer (and LitePeer inherits these) +- Added: OpCustom() will throw an ArgumentException if the operation should be encrypted but keys are not yet exchanged (exchange keys first) +- Added: LiteOpCode.ExchangeKeysForEncryption = (byte)95 +- Added: Overloaded PhotonPeer.OpCustom() with new "encrypt" parameter +- Added: property PhotonPeer.IsEncryptionAvailable is true if public-keys are exchanged and the secret is compiled from them +- Added: Encryption demo to Realtime Demo. Press E to exchange keys and R to toggle encrypted sending for the move data (even though events are never encrypted) +- Changed: PeerBase methods: sendOperation()->EnqueueOperation(...,encrypt), updateRoundTripTimeAndVariance()->UpdateRoundTripTimeAndVariance() +- Updated: the Unity client is now a Unity v3.1 project. Make sure to change the server address before you build for iPhone (localhost:5055 won't work on the mobile) +- Removed: the outdated, separate iPhone demo (was: Unity v1.7 for iPhone) +- Updated: PhotonPeer documentation for Service(), DispatchIncomingCommands() and SendOutgoingCommands() +- Added: OpRaiseEvent() overload with parameter TargetActors. Sends optional list of actors that will receive the event (if null, all *other* actors will receive the event, as default) +- Internal: Added source BigInteger.cs, DiffieHellmanCryptoProvider.cs and OakleyGroups.cs +- Internal: PeerBase.CryptoProvider, PeerBase.ExchangeKeysForEncryption() and PeerBase.DeriveSharedKey() +- Internal: EnetPeer.initPhotonPeer() and TPeer.initPhotonPeer() are setting PeerBase.isEncryptionAvailable = false +- Internal: De/Serialization methods (and some variables for it) are moved from NConnect to PeerBase and renamed to: SerializeOperationToMessage() and DeserializeMessageAndCallback() +- Internal: switched project to allow "unsafe" functions (used by BigInteger) +- Internal: renamed PhotonPeer.sendOperation()->EnqueueOperation +- Internal: changed assembly version to 6.1.0 and "client version" in init-byte-block to 6,1,0 +- Internal: moved protocol handling to EnetPeer and TPeer classes (where encryption is added) +- Internal: moved InitBlock to (shared) PeerBase (same for UDP/TCP) +- Internal: serialization is now done by Protocol.SerializeOpParameters(), which excludes the message header. this makes encryption simpler + +*** Version 6.0.0 +- Changed: This library requires Photon v2.2.0 and up! (in other words: the libraries are not compatible with older Photon servers, due to servertime changes) +- Added: Support for arrays in arrays. Any serializable datatype can now be used in nested arrays. Even arrays of Hashtables are possible. +- Added: Realtime Demo optional command line arguments for game config. set all or none: serverAddress, useTcp (true/false), useReliable (true/false), int intervalDispatch, intervalSend (ms), intervalMove (ms) +- Note: Realtime Demo commandline might look like this: start demo-realtime.exe localhost:5055 false true 5 25 100 +- Changed: renamed GetLocalMsTimestamp property to LocalMsTimestampDelegate (it does not have a getter, despite the old name's implication) +- Added: PhotonPeer.LocalTimeInMilliSeconds property to use the timestamp delegate to get the current client milliseconds (by default this is Environment.TickCount) +- Changed: UDP: The default value for PhotonPeer.RoundTripTime (300ms, used before connecting) is now replaced with the turnaround time of connect. This should lead to accurate RTT values much sooner +- Changed: PhotonPeer.ServerTimeInMilliSeconds is no longer updated all the time. Instead it's fetched soon after connect (when initialization won't affect rountrips anymore) and extrapolated. It should be better to be off by a constant value than by a changing value +- Changed: PhotonPeer.ServerTimeInMilliSeconds now returns 0 until the server's timestamp is fetched. Updated the documentation with some internals for this. +- Added: PhotonPeer.FetchServerTimestamp() to send the time fetch command (this is done automatically as well. this method is here for completeness) +- Fixed: roundtrip time calculation is no longer affected by long intervals between Service() or DispatchIncomingCommands() calls (bug of v5.9.0, caused by internal action queues) +- Added: internally for UDP, we use a new command to fetch the timestamp which minimizes the latency for that roundtrip. this one is excluded in roundtrip time measuring +- Changed: internal: ACKs by the server are again directly executed (other commands which are put into the action queue and dispatched) +- Fixed: Peers with TCP as protocol will no longer try to disconnect while not being connected (does not do anything of disconnected or disconnecting) +- Changed: Peers with TCP as protocol will clear the outgoing queue when disconnect() is called (while connected. see fix above) +- Updated: Silverlight Realtime Demo slightly +- Added: PhotonPeer.Listener property to give subclasses access to the IPhotonPeerListener (set in constructor). Can be useful to call Listener.DebugReturn() +- Added: LitePeer-Source.cs to demo-realtime. This is the source of a LitePeer and could be used as sample to create custom operations on the client side + +*** Version 5.9.0 +- Release: of changes in 5.7.6 and 5.7.5 + +*** Version 5.7.6 +- Fixed: a debug output line for TCP connections which did not heed the debug-level. +- Changed: PhotonPeer uses less locking internally and will handle incoming data in the game thread (inside DispatchIncomingCommands() or Service()). +- Changed: Internally, all commands are put into a (locked) queue which is processed within DispatchIncomingCommands(). Your dispatch interval affects local lag but not the PhotonPeer.RoundTripTime value. +- Note: Don't use a peer from multiple threads! It's not thread safe. All callbacks to IPhotonPeerListener methods are happening in your game thread (again: inside DispatchIncomingCommands()). +- Changed: removed locks inside the callbacks (according to above change). +- Changed: DNS resolution is now done in Connect() unless you provide a valid IP address (if IPAddress.Parse(address) is successful, the IP is used directly). +- Fixed: PhotonPeer.Connect() should fail if the IP is unknown or unavailable. Exception: using a localhost might succeed but fail when we try to receive anything. +- Updated: Game.cs now initialized the timing intervals. This avoids issues if the client system is having a negative TickCount. +- Added: ServerAddress property to PhotonPeer, which might help while developing with several servers and peers. +- Changed: This version includes GetLocalMsTimestampDelegate and the PhotonPeer property GetLocalMsTimestamp to set the delegate for local timestamp. + +*** Version 5.7.5 +- Changed: All precompiled demos now connect to localhost! From now on, you need to run Photon before trying any of the demos (as we don't guarantee that udp.exitgames.com is online anyways) +- Changed: OpCustom() now accepts null as parameter Hashtable, which is a shortcut to "no parameters" for simple operations (an empty hashtable is sent though, it does not reduce bandwidth) +- Added: new feature: UDP timeout definition by setting PhotonPeer.DisconnectTimeout (individual per command, set in milliseconds, checked when a command is repeated) +- Renamed: enum ReturnCode to StatusCode. The StatusCode values are only used for status callbacks (not as operation results) +- Changed: parameter type of PeerStatusCallback() from int to StatusCode (to differentiate them from operation ReturnCodes, which are customizable) +- Removed: StatusCode.Ok (as it was actually an Operation ReturnCode) +- Added: new StatusCallback value: StatusCode.SendError. Used for sending error cases: "not connected" and "channel not available" +- Changed: sendOperation() (Udp and Tcp) does not throw an exception while disconnected or for wrong channel (using StatusCode.SendError instead) +- Changed: callback DebugReturn() now has the additional parameter (DebugLevel)level, analog to logging +- Changed: UDP connection is disconnected when a read exception happens (before we tried to read despite this until a timeout ended it) +- Changed: EnetPeer.Disconnect() now ignores calls when peer is disconnected or disconnecting already +- Fixed: TCP code tried to detect socket issues by checking for IOExceptions but now checks SocketException instead +- Changed: internal threading: Callbacks due to incoming packages and commands are now queued and triggered by dispatch (in game loop) +- Changed: dispatch of action-queue as added to DispatchIncomingCommands (in EnetPeer and TPeer) +- Changed: internally, there is no locking for outgoing reliable and unreliable command lists anymore +- Changed: Realtime Demo timer usage to avoid nullref on form-close +- Changed: Realtime Demo propety isReliable is now in the Player class +- Changed: Game.cs and Player.cs for all realtime demos. There is now something like a gameloop (Update()) which must be called regularly and makes (pretty) sure just one thread accesses the peer +- Changed: all realtime demos to use the new Update() method and use more similar Game and Player classes (cleanup for less differences) +- Fixed: RoundtripTimeVariance is now also reset on connect / init, so the resend-timing of reliable udp does not suffer when a peer connects after a disconnect +- Fixed: typo in ExitGames.Client.Photon.StatusCode.QueueIncomingUnreliableWarning (was QueueIncomingUneliableWarning) + +*** Version 5.7.4 RC3 +- Changed: Unity3D lib again has it's own UDP handling (the DotNet one causes browser crashes on web-player exit) + +*** Version 5.7.3 RC3 +- Changed: Unity3D lib is now identical to DotNet lib (Unity iPhone is compatible with DotNet 2.0 now and this got tested) +- Fixed: DNS resolution (did not work for "localhost", which gave two results (IPv4 and IPv6), mixing up things + +*** Version 5.7.2 RC3 +- Changed: Unity3D lib: the receive thread will now receive until no data is available, then sleep 5ms and check again +- Changed: serverTime is now a signed int (as on server) and adds averaged rountripTime/2 when it gets an update +- Changed: ServerTimeInMilliSeconds doc (more concrete, explains how server time works) +- Added: support for serverTime, RountripTime and RoundtripTimeVariance when using TCP (Silverlight does not allow UDP) +- Added: Silverlight supports either URL:Port and IP:Port as server url string + +*** Version 5.7.1 RC2 +- Added: DotNet "Lobby Demo" which uses the "LiteLobby" application of the server SDK to show running games and their player-count +- Changed: the realtime demos to use the more similar Game and Player classes + +*** Version 5.7.0 RC1 +- Added: documentation: project for Silverlight Hashtable and ArrayList substitutes. +- Changed: RealtimeDemo uses same classes Game and Player for Unity3 + Silverlight +- Changed: Silverlight: Hashtable and ArrayList are now a separate project / lib +- Internal: Silverlight: listener interfaces (Photon and Neutron) now conditionally use ExitGames.Client datatypes from lib +- Changed: Photon: connect callback is now deferred to on-init-response (instead of enet-connect) which ensures "no ops before init" +- Changed: Unity Realtime demo: using game and player classes merged over from silverlight and re-wrote sample code to display players +- Internal: photon projects now have a pre-compile setting "Photon" +- Changed: SupportClass Namespace is now compiling into either ExitGames.Client .Photon or .Neutron (to avoid ambiguation) +- Added: LitePeer as Lite Application specific peer (with OpJoin and the rest) +- Changed: demos accordingly +- Changed: case of PhotonPeer methods to first-letter-is-uppercase (as usual in C#) +- Removed: nNet-prefix (Connect and Disconnect are self-explanatory) +- Renamed: PropertyTypes are now LitePropertyTypes (as they belong to the Lite application) +- Changed: Peer state constants with PS_* converted into enum "PeerStateValue" +- Removed: URL_RT_SERVER, URL_RT_SERVER_DEV, IP_RT_SERVER and IP_RT_SERVER_DEV +- Added: PhotonDemoServerUrlPort and PhotonDemoServerIpPort +- Renamed: NPeer to PhotonPeer +- Renamed: PhotonPeerListener to IPhotonListener (class and file) +- Changed: namespace from Com.ExitGames to ExitGames and ExitGames.Client, ExitGames.Client.Photon and ExitGames.Client.Neutron +- Removed: QueueOutgoingUnreliableError, QueueOutgoingAcksError, QueueIncomingReliableError, QueueIncomingUneliableError, QueueSentError (no errors, only warnings) +- Removed: error "report" when TCP incoming queue getts fuller +- Internal: updates Neutron part to run with Protocol.cs de/serialization (added a serializeParametersNeutron() as there are multiple differences to UDP part) +- Changed: projects and scripts to build documentation xml in debug builds +- Renamed: demo-photon-SL to demo-realtime-SL (according to other demo realtime implementations) +- Changed: many classes and properties are now internal. e.g. Protocol, EnetChannel, EnetPeer (and inner classes), TPeer, SuppportClass.ReadInput() +- Updated: AssemblyInfo.cs for photon dotnet and silverlight +- Internal: projects to have precompile-flags also in release builds +- Updated: build scripts for SDK building +- Removed: Compact Framework support + +*** Version 5.6.1 +- Fixed: 0 element arrays caused bugs +- Fixed: double type was cast incorrectly after being read + +*** Version 5.6.0 +- Added: more supported datatypes: float, double and arrays of all basic datatypes (no arrays of hashtable or arrays) +- Internal: changed Photon protocol internally to 1.5. (needs a server update to Photon Server SDK 1.6.1+)! +- Changed: Channels for Photon UDP are now priorized (from low to high) getting the lower channels out first +- Internal: switched de/serialization at several places from manual shifting to a support function, which should provide endian-correctness (Photon Unity PPC compatibility) +- Added: Unity info about "Application.runInBackground = true;" to Unity Appendix in doc +- Changed: Photon return values are put into a NEW hashtable on receive. not just a cleared one which was not reference-safe (no more need to deep-copy the data of events) +- Added: Photon support for "disconnect-reason" which is sent by server in the enet "reserved" byte +- Added: Photon ReturnCode.DisconnectByServerUserLimit and .DisconnectByServerLogic +- Removed: NPeer.IncomingReliableCommands (was more or less useless) +- Added: QueuedIncomingCommands and QueuedOutgoingCommands as metric for how effective send and dispatch is done +- Changed: now throwing exceptions when trying to set init-values at runtime (to be fixed at development-time) +- Added: doc for sequencing and updated channel doc, (too) short chapter on custom operations, topic "opCodes: byte versus short", doc for property-related functions +- Added: overloaded functions for opGetProperties*() for byte-keys +- Fixed: Realtime Demo keypress in input-fields have been used as in-game actions, too +- Changed: Realtime Demo game-name is now that of the native samples ("play" with other platform SDKs) +- Changed: Silverlight SDK has a different port in the constants NPeer.URL_RT_SERVER* and .IP_RT_SERVER* (as Silverlight uses TCP port 4350) + +*** Version 5.4.1 +- Added: missing documentation in Unity3d SDK + +*** Version 5.4.0 +- Change: The timespan until a sent and unacknowledged reliable command is considered lost, is now calculated by + current roundTripTime + 4 * roundTripTimeVariance + The result of this calculation is doubled with every following resend. The maximum number of retries can still be defined by calling SetSentCountAllowance. +- Change: Removed TimeAllowanceInt +- Change: removed surplus debug out, adjusted levels for other, output of command sent-time from hex to decimal +- Added: fragmentation support: bigger data is now placed into multiple packages and reassembled +- Internal: command-buffers are replaced with CommandList and SortedCommandList (major change, but fully internal) +- Fixed: possibility of command buffer overflow. now everything is stored and warnings are used as hint for temporary problems +- Added: property NPeer.IncomingReliableCommands, which returns the count of reliable commands currently queued +- Added: callback on NCommand.CT_DISCONNECT to inform the NPeerListener about a disconnect from server (see above) +- Added: disconnect command will be sent by server in case of timeout, connection-limitations or other issues +- Added: NPeer ReturnCode.DisconnectByServer is called on server-side disconnect (see description) +- Added: call to StopConnection() on disconnect (by server) +- Added: NPeer.PeerID property to get ENet's peerID (useful while debugging) +- Internal: SupportClass.WriteIntToByteArray() to ease writing ints to byte[] +- Internal: added several values to NCommand to store fragments +- Added: support for channels. read more about this in the documentation +- Added: NPeer.ChannelCount which sets the number of channels while not connected (default: 2) +- Changed: opRaiseEvent() and opCustom() now optionally have a channel parameter +- Added: Photon properties functions to NPeer (available with Photon Server SDK v1.5.0) and doc +- Added: LiteEventKey.SetProperties = 92 for broadcasted property set +- Added: LiteOpKey.Broadcast = 13 and .Properties = 12 +- Added: LiteEventKey.TargetActorNr = 10 (actorNr the properties are attached to) and .Properties = 12 (changed properties) + + +*** Version 5.3.11 +- Change: all bytes sent to and from server are treated as unsigned bytes (standard for c#). same for byte-arrays +- Change: updated realtime demo to use int for posx,posy but still sending just a byte-value (the field is 16x16, after all) + +*** Version 5.3.10 +- Change: switched from sbyte-array to byte-array in de/serialization! important: bytes (ev-keys etc) are sbyte. arrays of bytes are unsigned (on client and server) +- Change: NeutronListener functions getShadowReturn() and HasbadwordsReturn() now have byte-array return values. please adjust, even if you don't use those +- Internal: changed SupportClass for Compact Framework +- Internal: getting ticks sitched from expensive "System.DateTime.Now.Ticks / 10000" to cheap "Environment.TickCount" +- Change: Unity lib will now give more debug out if serialisation fails + +*** Version 5.3.9 +- Fixed: result-queue, timeouts and customOps work also fine for Unity build again (were broken due to Neutron Unity webplayer compatibility changes in 5.3.8 for Unity) +- Fixed: if the browser is closed and the unity webplayer immediatly can't use http anymore, Neutron now informs the application via NetworkStatusReturn() + +*** Version 5.3.8 +- Fixed: Neutron Unity now also works fine in webplayer -> Neutron and Photon now both support all platforms of Unity und Unity iPhone +- Fixed: default value for parameter encrypt of NeutronGame::RaiseEvent() now is false like for all other RaiseEvent methods and like on all other platforms, instead of true, as it was before + +*** Version 5.3.7 +- Fixed: .Net UDP issue, where standard MTU settings caused dropped UDP packages +- Internal: refactored ACK queue to arraylist + +*** Version 5.3.6 +- Fixed: NPeer issue with ACKs for repeated commands. this enhances handling of lost packages +- Changed: NPeer.opJoin() no longer needs the SID + +*** Version 5.3.5 +- Known issues: to use Photon on iPhone device, you do need Unity iPhone 1.0.2b1 or higher (current official release is 1.0.1, so please ask for a prerelease or wait until next official release), but of course you can use Photon with Unity iPhone 1.0.1 IDE +- Merged: renamed .NET 1.1 NeutronUnity3DiPhone into NeutronUnity3D to replace the old .NET 2.0 lib of that name, which means, that you can use the same .NET 1.1 based lib for Unity and for Unity iPhone now, since 1.1 cpmpatibility fixes are all done now +- Fixed: photon is fully compatible to .NET 1.1 now +- Internal: optimized UDP package size in Unity3D library (was sending surplus bytes, which were ignored) +- Fixed: NPeer.opCustom() now sends the operation given by parameter +- Changed: IP_RT_SERVER points to new server IP of udp.exitgames.com +- Changed: a new NeutronSession now clears the NetworkLoss state and the sendQueue +- Changed: timeout of a HTTP request to 10 seconds. it triggers + +*** Version 5.3.4 +- Added: prealpha Unity3DiPhone version of Neutron .NET: core lib already functional, but realtime part not usable on device yet +- Internal: there are 4 different versions of Neutron.NET now: + - Full .NET: .NET 2.0 based, with asnyc realtime part + - Compact Framework: .NET 2.0 based, with threaded realtime part + - Unity3D: .NET 2.0 based, with Unity www-class based http part and threaded realtime part + - Unity3DiPhone: .NET 1.1 based, with Unity www-class based http part and threaded realtime part + +*** Version 5.3.3 +- New: ReturnCode.RC_RT_EXCEPTION_CONNECT, which covers the cases where a server is not running +- New: NPeer can now be created with UDP or TCP (by new bool parameter) +- Change: renamed most of the constants for NPeer (in INPeerListener structs) +- Note: TCP does not offer ServerTime or RoundTripTime jet + +*** Version 5.3.2 +- Internal: reverted to threaded model in NConnect (as async UDP is not supported by Unity3D) + +*** Version 5.3.1 +- New: login(), register(), customOperation() and raiseEvent() (all variants) can be encrypted with additional parameter "encrypt" (overloaded function) +- New: encryption uses HTTPs as transfer, by changing the "http:" url to a "https:" url +- New: returnCode for failure of encrypted HTTPs requests: RC_SSL_AUTHENTICATION_FAILED (if certificate is not found, valid or expired) +- Fixed: Realtime Demo using the older Realtime Server + +*** Version 5.3.0 +- New: separated libraries into "Compact Framework" (CF) and "Regular Framework" (no name postfix) +- Change: libraries are now in "libs" folder as debug/release and in libs/CompactFramework debug/release +- Change: libs default URL set to EU/Test. use setServerURL() with Neutron.URL_NEUTRON_* for other Neutron instances +- Internal: lib now uses async UDP communication now with "regular" framework +- Added: properties serverTimeInMilliSeconds, serverTimeAsTimeSpan and serverTimeAsDateTime for getting the current server time +- Removed: serverTimeOffset is now internal only and removed from the API (was only needed to calculate the servertime by yourself, before neutron could do this for you) +- Change: debug out for realtime classes is now layered +- Change: debug level NPeer.DebugOut is now a NPeer.DebugLevel enum and will include all lower levels in output, default: DebugLevel.ERROR +- Fixed: size of realtime demo board +- Change: NPeer constructor now always throws an exception if listener is null +- Change: EventAction() parameter eventCode is now of type sbyte (was int), which corresponds to type of RaiseEvent (and server-side used type) +- Internal: NPeer.opRaiseEvent() now treats eventCode as parameter of operation RaiseEvent (as changed in latest RT server) +- Change: NPeer has its own listener (INPeerListener) and several (better named) structs for the constants used with NPeer / realtime +- Added: LiteOpKey and LiteOpKey.ActorNumber to have a constant for the only OP key of interest +- Change: EventAction() always returns the complete event, which contains a code, the ActorNumber (if any given) and data from raiseEvent (see below) +- Change: in custom events, the data from opRaiseEvent() is in placed as value of key: LiteEventKey.EV_RT_KEY_DATA. to get the data use: Hashtable data = (Hashtable)neutronEvent[LiteEventKey.EV_RT_KEY_DATA]; + +*** Version 5.2.0 +- changed library filename to neutron-lib__.dll with server "test" and "run" (no debug out) and billing "dummy" and "none" +- removed US build of library. please use NeutronSession.SetServerUrl() and the constants: Neutron.URL_NEUTRON_SERVER_*. + +*** Version 5.1.0 +- added realtime classes to DotNet library: ported NPeer (and internal: NCommand and NConnect) classes +- added nPeerReturn() to NeutronListener interface +- added constants for realtime returnCodes (RC_RT_*): RC_RT_CONNECT, RC_RT_DISCONNECT and RC_RT_EXCEPTION +- added constants for realtime eventCodes (EV_RT_*) +- added constants for Neutron servers to Neutron class: URL_NEUTRON_* +- added Reamtime Demo +- updated samples +- added test for UDP to NUnit + +*** Version 5.0.1 +- New: operation Spectate (including new SpectateReturn) to get events from any game (as admin) +- New: SetServerUrl and SetCustomServerUrl now return the URL to debugReturn +- Internal: constant "DEBUG_- InternalS" to be used for intern debugging output + +*** Version 5.0.0 +- New: hasBadwords() as OP and return. Server side check of strings for badwords + +*** Version 5.0.0 RC3 +- Internal: changed constant values: EV_KEY_PROPERTIES = "Data", EV_KEY_REVISION = "Rev" +- New: EV_KEY_CHANNELTYPE for channel-type in property-change events +- New: constants for default channels, CHANNEL_APPLICATION_LONGLIFE, CHANNEL_ACTOR_SHORTLIFE, CHANNEL_ACTOR_LONGLIFE and CHANNEL_APPINSTANCE +- Change: operations that fail due to missing moderation-rights now return RC_MODERATION_DENIED instead of RC_COMMAND_ACCESS_DENIED +- Change: actor-properties can no longer be broadcasted in any way - removed "broadcast" parameter from setActorProperties() +- Change: properties now have a revision which is increased on each change. this way outdated updates might be skipped +- Change: parameters of GetPropertiesReturn(). property-type is replaced by channel. added revision +- Change: EV_PROPERTIES_CHANGE now has a key EV_KEY_OWNERNR if it's a "player property" (the key is missing if it's a game-property) +- Internal: changed setProperties and getProperties to new operation-codes using different parameters (with similar results) +- New: parameter "textMessage" for NeutronGame.invite() adds personal message to invited players (in EV_INV and gameListInvitations()) +- New: key EV_KEY_INFO will be added to EV_INV if "textMessage" was used in NeutronGame.invite() (it's not there otherwise) +- New: gameListInvitations() has new value parameter {t} to get "textMessage" from NeutronGame.invite() +- New: RC_APPINSTANCE_NOT_OPEN is now used for "singleton namebased pools" where a game is full (not able to join / instanciate) +- New: gameCreate() with invitations will fail if the chosen game-name is already taken in a "singleton namebased pool" +- New: RC_APPINSTANCE_ALREADY_EXISTS for the case above + +*** Version 5.0.0 RC2 +- Change: gameCreateReturn() now returns RC_APPINSTANCE_NOT_OPEN (instead of RC_AI_TOO_MANY_ACTORSESSIONS) for full games in "singleton" pools +- Change: obsolete events EV_TURN, EV_TXTMSG and EV_DATA which could be sent by raiseEvent*() and still handled +- Change: switched Neutron URLs to "[..].neutron5.[..]" for test/run libs +- Fix: Polling (getEvents operation) again calls sendGameDataReturn() for all errors (as intended for v4.9.2 already) +- New: constant NeutronListener.EV_KEY_TYPE as part of event EV_BUDDNOTICE + +*** Version 5.0.0 RC1 +- New: RaiseEvent (all functions of this name) now has a "filter" parameter. If filter is true, all String-typed values in an event are badword filtered +- Change: signature of NeutronGame.raiseEvent(), NeutronGame.raiseEventInChannel(), NeutronSession.raiseEventInChannel(), NeutronSession.raiseEventForActor() start with: byte eventCode, Hashtable event, boolean filter +- Change: signature of NeutronSession.raiseEventForActor() is changed to "byte eventCode, Hashtable eventData, boolean filter, String userID, int minutesValid, byte maxTypeCount, byte channel" +- Change: NeutronGame.doModerate() is now isModerator() +- Change: moved GpOperation.SerializeData() and GpOperation.DeserializeData() to Neutron.SerializeData() and Neutron.DeserializeData(). +- New: errorCode RC_INVALID_TARGET and RC_PARAMETER_NOT_SUPPLIED added as constant. + +*** Version 4.9.3 +- New: Errors constants in NeutronListener: RC_FATAL_LOGIC, RC_MATCHMAKING_NOT_COMPLETED, RC_CHANNEL_ACCESS_VIOLATION +- New: for game-creation you can now reserve "spots", which are not filled up by Neutron matchmaking. players can be invited to fill the spots, or they can be deblocked later on +- New: Parameter reservedSpots in NeutronSession.gameCreate() +- New: NeutronGame.setReservedSpots() to modify the number of reserved slots (to make them available to matchmaking again, or block/reserve them) +- New: event EV_RESERVED_SPOTS will update the NeutronGame.reservedSpots value after a call to NeutronGame.setReservedSpots() +- New: NeutronSession.listBannedPlayers() gives you the list of banned players for a known game - only usable by "admin" users +- New: NeutronSession.unbanPlayer() is a modified "kick" operation which allows the respective user to join a certain game again - only usable by "admin" users +- New: the event invitation includes now the game's name (in the new key EV_KEY_NAME) +- New: NeutronSession.gameListPerPool() has now three options to sort the results: by game-name, player-count or "persistent games first" +- Removed: NeutronGame: handoverTurn(), sendData(), sendTextMsg(), getEventHistory() and getEventHistoryReturn(). Obsolete events: EV_TURN, EV_TXTMSG, EV_DATA. Session: getScorePosition()+getScorePositionReturn() +- Update: release_history.txt was updated from v4.0. All changes up to v4.0.4 are added to v4.9.3 + +*** Version 4.9.2 +- New: Players can be admins (by list of logins on server) or moderator (by being the first active player of a game) +- New: Players may request and become moderator for game: NeutronSession.gameCanModerate(boolean), NeutronSession.canModerate, NeutronGame.doModerate() and NeutronGame.moderatorActorNr +- Change: the new value NeutronSession.canModerate will be sent with gameCreate() operations (if set to true) +- New: Event key NeutronListener.EV_KEY_MODERATOR to get moderator's actorNr from events +- Change: EV_QUIT and EV_KICKED now carry the new key EV_KEY_MODERATOR which tells all players who is the current moderator (by actorNr); this is stored into NeutronGame.moderatorActorNr +- New: Players in NeutronGame can have new state PLAYER_KICKED (player-data is updated with EV_KICKED) +- New: NeutronGame.kickPlayer() (for moderators) and NeutronSession.kickPlayer() (for admin's who are not active in the game to shutdown) +- New: NeutronSession.shutdownGame() can be used by admin-players (for others, this operation will fail) +- New: Namebased pools can now be defined as "singleton": only one instance per pool and name will be created; if such a game is full players get an error instead of a new game +- New: Errors constants in NeutronListener: RC_ACTORSESSION_KICKED, RC_ACTORSESSION_BANNED, RC_APPINSTANCE_CLOSED, RC_ACTORSESSION_ALREADY_JOINED +- Change: NeutronGame.raiseEvent() accepts a "targetActorNr" which defines a single player to get the raised event; leave 0 to target "all players in game" (as before) +- New: NeutronGame.quitLocally() to release a NeutronGame instance locally (without having to quit()); used after a player was kicked or game shutdown +- Update: NeutronGame.playerGetCount() is updated to simply count all active or inactive players (excluding quit and kicked ones) +- Internal: NeutronGame constructor reads new parameter: P_MODERATOR +- Change: Polling (getEvents operation) now calls sendGameDataReturn() for all errors (not just RC_ACTORSESSION_EXPIRED and RC_ACTORSESSION_NOT_FOUND); takes care of kicked/banned errors +- Fix: Fatal server errors cause a returnCode of NeutronListener.RC_OP_SERVER again; debug test-server libs print out debug text! (during development fatal errors could happen in case of not matching client/server setups) +- Change: removed (already deprecated) NeutronListener.gameListPerPoolReturn() +- Change / Internal: canModerate is sent as Byte (not bool) as in definition; Code: if ( canModerate ) op.addParameter(Neutron.P_MODERATOR , new Byte((byte)1)); +- Add: NeutronGame.PLAYER_KICKED is now listed in JavaDoc for NeutronGame.playerGetStatus() +- Update: JavaDoc package.html, gameCreateReturn(), gamesListReturn(), EV_DEACTIVATE, kickPlayer(), quitLocally(), RC_ACTORSESSION_KICKED, RC_ACTORSESSION_BANNED, RC_APPINSTANCE_CLOSED, RC_ACTORSESSION_ALREADY_JOINED +- Added: Event EV_STATUS (50) includes a key EV_KEY_ISADMIN if the current player has administrator rights; the value is (byte)1 in that case. The key does not exist in any other case (normal users) +- Update: JavaDoc gameCreateReturn; +- New: Added constant RC_APPINSTANCE_NOT_FOUND = 137 for shutdownGameReturn() +- Fix: serializable datatypes are now completely listed in NeutronSession JavaDoc +- New: Constant for property-change events: EV_PROPERTIES_CHANGE including new keys: EV_KEY_PROPERTY_TYPE, EV_KEY_PROPERTIES, EV_KEY_ISDIFF +- Update: JavaDoc for properties in NeutronSession + +*** Version 4.1.1 +- Fix: gameListPerPool() defaults to 10 games and no offset if the values are less than 1 +- Fix: gamesListReturn() JavaDoc description for "listType" is now: 0 = open games; 1 = invitations; 2 = pool's open games list +- Update: gameListPerPool() sends "{gn}" as values-parameter if it's null +- Update: getPropertiesReturn() gets new parameters: actorNr, userID. These are optional and are available in certain situations only. See JavaDoc +- Update: gameListPerPoolReturn() is now deprecated and merged into gamesListReturn() which in turn got a "type" to identify the list-type +- New: getListBuddyIgnore() got one more value: 't'. This requests the type of relation to users. useful when getting lists of type "both". this is buddies and ignores. +- Change: renamed returned parameters to: count and countOnline. These values are referring to the number in the returned list +- Internal: parameter P_USERID = 85; used in getProperties +- New: made methods nullpointer resistant: getListBuddyIgnore, buddySet, get/set PlayerProperties, get/set ActorProperties, get/set GameProperties; some methods throw exceptions in debug version + +*** Version 4.1.0 +- New: Properties. NeutronSession: setActorProperties(), getActorProperties(). NeutronGame: setLocalPlayerProperties(), getPlayerProperties(), getGameProperties(), setGameProperties() +- New: Buddylist and Ignorelist in NeutronSession: listBuddies(), listIgnored(), getListBuddyIgnore(), buddySet() +- New: Listing of games per pool in NeutronSession: NeutronSession gameListPerPool() +- New: Games with password (only usable for named games) +- Internal: Changed parameter in buddySet from P_STATUS to P_TYPE + +*** Version 4.0.4 +- Change: NeutronGame.handoverTurn() and NeutronGame.sendData() are now getting a Hashtable parameter instead of Object +- New: RC_ACTORSESSION_BUSY (121) constant to help identify common development error! check in gameCreateReturn() + +*** Version 4.0.3 +- New: RC_INVALID_CONNECTIONSTRING (74) constant to help identify a common error! check in loginReturn() +- Update: list of serializable datatypes in NeutronSession JavaDoc +- Fix: Fatal server errors cause a returnCode of NeutronListener.RC_OP_SERVER again; debug test-server libs print out debug text! (during development fatal errors could happen in case of not matching client/server setups) + +*** Version 4.0.2 +- Internal: Neutron.deserializeData() now returns either the P_DATA part of the deserialized data (if available / serialized by serializeData()) or the resulting hashtable itself + +*** Version 4.0.1 +- New: NConnectSE connects to server defined by parameter: ipPort (before: fixed host) +- New: SE version is now completely independent from Java ME classes (were not used, but had to be present) +- Fix: Changed versioning for "ClientLibVersion" in Login/CC +*** Version 4.0.0.0 + +- Removed methods: + - NeutronSession.BuggyGetList - replaced by new GetListBuddyIgnore method; + - NeutronSession.ReSubscribe; + - NeutrinSession.ConfirmBilling; + - NeutronListener.ResubscribeReturn; + +- Added methods: + - NeutronSession.GameCreateNamed with password parameter; + - NeutronSession.GameListPerPool; + - NeutronSession.GetActorProperties; + - NeutronSession.SetActorProperties; + - NeutronSession.GetListBuddyIgnore - replaces removed BuggyGetList; + - NeutronSession.ListBuddies; + - NeutronSession.ListIgnore; + - NeutronSession.BillingInitPayment; + - NeutronSession.BillingProcessPayment; + - NeutronGame.Invite; + - NeutronGame.GetGameProperties; + - NeutronGame.SetGameProperties; + - NeutronGame.GetPlayerProperties; + - NeutronGame.SetLocatPlayerProperties; + - NeutronListener.GameInviteReturn; + - NeutronListener.GetPropertiesReturn; + - NeutronListener.SetPropertiesReturn; + +- Changed argument list: + - NeutronSession.GameCreate - added password parameter; + - NeutronListener.GamesListReturn added listType parameter; + - NeutronListener.BuddyGetListReturn all buddy related info now in passing in one strings array parrameter; + - NeutronListener.BuddySetReturn added type parameter; + - NeutronListener.BillingInitPaymentReturn; + + +- added constants: + - OPC_INVITE + - OPC_TELLAFRIEND + - OPC_LISTGAMES + - OPC_SETPROPERTIES + - OPC_GETPROPERTIES + - P_USERID + - P_RESERVE + - P_RESULT + - P_PROPERTIES + - P_BROADCAST + - P_ISDIFF + - RCB_CHARGING_ERROR + - RCB_POST_CHARGING_ERROR + - RCB_TIMEOUT + - RCB_PRICE_- Changed + - RCB_PRICE_INVALID + - RCB_FATAL_SERVER_ERROR + - RCB_FATAL_LOGIC_ERROR + - RCB_NOT_INCLUDED + - RCB_WMA_UNAVAILABLE + +*** Version 3.0.2.2 +- CLS-specifications largely corrected + +*** Version 3.0.1.1 +- changes in neutron-java-lib integrated + +*** +- Removed: NeutronGame: playerNames, playerIDs, playerLobbies, playerStats +- Change: removed GpOperation.roundtripTime, now using public Neutron.roundtripTime + to be sent in operation headers (GpOperation.serializeParameters(), internal) +- Change: channelRaiseEvent() is now raiseEventInChannel() and gets the eventCode + as seperate parameter value - analog to raiseEventForActor() +- Fix: renamed EV_KEY_M_MIPLAYERS to EV_KEY_M_MINPLAYERS (number of min players of game, before start) +- Fix: values for EV_KEY_M_MINPLAYERS and EV_KEY_M_MAXPLAYERS corrected (wrong case so far) +- Changed: Neutron.millisecondsToWait (current value of polling-interval) is now + set in Neutron.receiveResponse() for login, register and alike diff --git a/Assets/Photon/PhotonLibs/changes-library.txt.meta b/Assets/Photon/PhotonLibs/changes-library.txt.meta new file mode 100644 index 00000000..85684b76 --- /dev/null +++ b/Assets/Photon/PhotonLibs/changes-library.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d8040d310df77714a90a561261bfb2cb +timeCreated: 1557919981 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/netstandard2.0.meta b/Assets/Photon/PhotonLibs/netstandard2.0.meta new file mode 100644 index 00000000..c52d1331 --- /dev/null +++ b/Assets/Photon/PhotonLibs/netstandard2.0.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: beb9d2a25c882b54ab2fd9adaec2b53c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.deps.json b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.deps.json new file mode 100644 index 00000000..57ca7141 --- /dev/null +++ b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.deps.json @@ -0,0 +1,47 @@ +{ + "runtimeTarget": { + "name": ".NETStandard,Version=v2.0/", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETStandard,Version=v2.0": {}, + ".NETStandard,Version=v2.0/": { + "Photon3Unity3D/4.1.6.17": { + "dependencies": { + "NETStandard.Library": "2.0.3" + }, + "runtime": { + "Photon3Unity3D.dll": {} + } + }, + "Microsoft.NETCore.Platforms/1.1.0": {}, + "NETStandard.Library/2.0.3": { + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0" + } + } + } + }, + "libraries": { + "Photon3Unity3D/4.1.6.17": { + "type": "project", + "serviceable": false, + "sha512": "" + }, + "Microsoft.NETCore.Platforms/1.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==", + "path": "microsoft.netcore.platforms/1.1.0", + "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" + }, + "NETStandard.Library/2.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", + "path": "netstandard.library/2.0.3", + "hashPath": "netstandard.library.2.0.3.nupkg.sha512" + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.deps.json.meta b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.deps.json.meta new file mode 100644 index 00000000..c26136a5 --- /dev/null +++ b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.deps.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a966b98b651e18748abf2829786b5899 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll new file mode 100644 index 00000000..4f8b44eb Binary files /dev/null and b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll differ diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll.meta b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll.meta new file mode 100644 index 00000000..e507b85b --- /dev/null +++ b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll.meta @@ -0,0 +1,165 @@ +fileFormatVersion: 2 +guid: 6a558ae793155af4b9b9ab945fc64a0f +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude GameCoreScarlett: 0 + Exclude GameCoreXboxOne: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude Lumin: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 0 + Exclude PS5: 0 + Exclude Switch: 0 + Exclude WebGL: 0 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 1 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: LinuxUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 1 + settings: + CPU: AnyCPU + DontProcess: false + PlaceholderPath: + SDK: AnySDK + ScriptingBackend: Il2Cpp + - first: + iPhone: iOS + second: + enabled: 1 + settings: + AddToEmbeddedBinaries: false + CompileFlags: + FrameworkDependencies: + - first: + PS4: PS4 + second: + enabled: 1 + settings: {} + - first: + PS5: PS5 + second: + enabled: 1 + settings: {} + - first: + Nintendo Switch: Switch + second: + enabled: 1 + settings: {} + - first: + XboxOne: XboxOne + second: + enabled: 1 + settings: {} + - first: + GameCoreScarlett: GameCoreScarlett + second: + enabled: 1 + settings: {} + - first: + GameCoreXboxOne: GameCoreXboxOne + second: + enabled: 1 + settings: {} + - first: + Lumin: Lumin + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml new file mode 100644 index 00000000..f85d60c5 --- /dev/null +++ b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml @@ -0,0 +1,2767 @@ + + + + Photon3Unity3D + + + + + Initializes a new instance of the class. + + + + + Gets the public key that can be used by another DiffieHellmanCryptoProvider object + to generate a shared secret agreement. + + + + + Derives the shared key is generated from the secret agreement between two parties, + given a byte array that contains the second party's public key. + + + The second party's public key. + + + + Interface for Photon's DiffieHellman/Payload Encryption. + + + + Provides classical Diffie-Hellman Modular Exponentiation Groups defined by the + OAKLEY Key Determination Protocol (RFC 2412). + + + + + Gets the genrator (N) used by the the well known groups 1,2 and 5. + + + + + Gets the 768 bit prime for the well known group 1. + + + + + Gets the 1024 bit prime for the well known group 2. + + + + + Gets the 1536 bit prime for the well known group 5. + + + + A slice of memory that should be pooled and reused. Wraps a byte-array. + + This is a serializable datatype for the .Net clients. It will serialize and transfer as byte[]. + If PhotonPeer.UseByteArraySlicePoolForEvents is enabled, byte-arrays in (incoming) events will be deserialized as + ByteArraySlice. + + Adjust your OnEvent code accordingly. + + + + The buffer for the slice. + + + The position where the content starts in Buffer. + + + The length of the data in the Buffer. + + + + Internal constructor - these instances will be part of the pooling system. + + The pool to return to. + The index to return to (in the related returnPool). + + + + Create a new ByteArraySlice. The buffer supplied will be used. Usage is similar to ArraySegment. + + Not part of pooling. + + + + Creates a ByteArraySlice, which is not pooled. It has no Buffer. + + Not part of pooling. + + + + If this item was fetched from a ByteArraySlicePool, this will return it. + + + True if this was a pooled item and it successfully was returned. + If it does not belong to a pool nothing will happen, and false will be returned. + + + + Resets Count and Offset to 0 each. + + + Tiered pool for ByteArraySlices. Reduces the allocations once enough slices are available. + + + + Requests for buffers smaller than 2^minStackIndex will use 2^minStackIndex. This value avoids allocations of smaller rarely used buffers. + Set this to a lower value if you will never need sizes larger than byte[2^minStackIndex] + + + + Count of allocations this pool did. + + + Creates a new pool. + + + + Get a ByteArraySlice from pool. This overload handles user supplied byte[] and byte count and can be used as a non-boxing alternative to ArraySegment<byte>. + + + This effectively pools the ByteArraySlice instances but not their data. + ByteArraySlice.Release() will return the slice itself to the pool but delete the reference to the buffer supplied here. + + + + + Get byte[] wrapper from pool. This overload accepts a bytecount and will return a wrapper with a byte[] that size or greater. + + + + Pops a slice from the stack or creates a new slice for that stack. + The stack to use. Lock that stack before calling PopOrCreate for thread safety. + + A slice. + + + + Releasing a ByteArraySlice, will put it back into the pool, if it was acquired from one. + + The ByteArraySlice to return to the pool. + The stackIndex for this slice. + True if this slice was returned to some pool. False if not (null or stackIndex < 0. + + + + Clears all pool items with byte array sizes between lower and upper inclusively. + + + Use this if you sent some unusually large RaiseEvents and believe the buffers of that size + will not be needed again, and you would like to free up the buffer memory. + + + + + Replacement for Dictionary<K,V> which does not allocate memory during usage. + + Key type. + Value type. + + + + This is a substitute for the Hashtable class, missing in: Win8RT and Windows Phone. It uses a Dictionary<object,object> as base. + + + Please be aware that this class might act differently than the Hashtable equivalent. + As far as Photon is concerned, the substitution is sufficiently precise. + + + + + Translates the byte key into the pre-boxed byte before doing the lookup. + + + + + + + Creates a shallow copy of the Hashtable. + + + A shallow copy of a collection copies only the elements of the collection, whether they are + reference types or value types, but it does not copy the objects that the references refer + to. The references in the new collection point to the same objects that the references in + the original collection point to. + + Shallow copy of the Hashtable. + + + + Used as container for unknown types the client could not deserialize. + + + + + The type code which was read for this type. + + + + + The size/length value that was read for this type. + + May be larger than Data.Length, if the Size exceeded the remaining message content. + + + + Container for the data that arrived. + + If the Size exceeded the remaining message length, only the remaining data is read. This may be null, if the size was somehow less than 1. + + + Interface for DatagramEncryptor implementations. + + + Initialize the encryptor. + + + + Encryption/decryption algorithm implementation + + + + + Packet authentication algorithm impelmenation + + + + Number for reliable unsequenced commands (separate from "standard" reliable sequenced). Used to avoid duplicates. + + + The highest number of reliable unsequenced commands that arrived (and all commands before). + + + Any reliable unsequenced number that's been received, which is higher than the current highest in complete sequence (reliableUnsequencedNumbersCompletelyReceived). + + + To store the highest acknowledged sequence number (and get some impression what the server already received and stored). + + + Checks and queues incoming reliable unsequenced commands ("send" or "fragment"), if they haven't been received yet. + The command to check and queue. + True if the command is new and got queued (or could be executed/dispatched). + + + Quick Resends are suspended if the sent queue is this size or larger. + + + One list for all channels keeps sent commands (for re-sending). + + + One pool of ACK byte arrays ( 20 bytes each) for all channels to keep acknowledgements. + + + Gets enabled by "request" from server (not by client). + + + Initial PeerId as used in Connect command. If EnableServerTracing is false. + + + Initial PeerId to enable Photon Tracing, as used in Connect command. See: EnableServerTracing. + + + + Checks the incoming queue and Dispatches received data if possible. + + If a Dispatch happened or not, which shows if more Dispatches might be needed. + + + Gets the target size for fragments. + + Caches the result for a specific MTU value. + Fragment length is different, when datagram encryption is used (so this caches two values in fact). + + + + + + gathers acks until udp-packet is full and sends it! + + + + Queue of received commands. ReceiveIncomingCommands will queue commands, except ACKs which Execute immediately. + + + + gathers commands from all (out)queues until udp-packet is full and sends it! + + + + + Checks connected state and channel before operation is serialized and enqueued for sending. + + if operation could be enqueued + + + reliable-udp-level function to send some byte[] to the server via un/reliable command + only called when a custom operation should be send + the invocation ID for this operation (the payload) + + + reads incoming udp-packages to create and queue incoming commands* + + + Queues incoming commands in the correct order as either unreliable, reliable or unsequenced. + If queued or not. + + + removes commands which are acknowledged + + + + Enumeration of situations that change the peers internal status. + Used in calls to OnStatusChanged to inform your application of various situations that might happen. + + + Most of these codes are referenced somewhere else in the documentation when they are relevant to methods. + + + + the PhotonPeer is connected.
See {@link PhotonListener#OnStatusChanged}*
+
+ + the PhotonPeer just disconnected.
See {@link PhotonListener#OnStatusChanged}*
+
+ + the PhotonPeer encountered an exception and will disconnect, too.
See {@link PhotonListener#OnStatusChanged}*
+
+ + Exception while opening the incoming connection to the server. Followed by Disconnect. + The server could be down / not running or the client has no network or a misconfigured DNS.
See {@link PhotonListener#OnStatusChanged}*
+
+ + Used on platforms that throw a security exception on connect. Unity3d does this, e.g., if a webplayer build could not fetch a policy-file from a remote server. + + + Sending command failed. Either not connected, or the requested channel is bigger than the number of initialized channels. + + + Exception, if a server cannot be connected. Followed by Disconnect. + Most likely, the server is not responding. Ask user to try again later. + + + Disconnection due to a timeout (client did no longer receive ACKs from server). Followed by Disconnect. + + + Timeout disconnect by server. The server didn't receive necessary ACKs in time. Followed by Disconnect. + + + Disconnect by server due to concurrent user limit reached (received a disconnect command). + + + (1043) Disconnect by server due to server's logic. Followed by Disconnect. + + + Disconnect by server due to unspecified reason. Followed by Disconnect. + + + (1048) Value for OnStatusChanged()-call, when the encryption-setup for secure communication finished successfully. + + + (1049) Value for OnStatusChanged()-call, when the encryption-setup failed for some reason. Check debug logs. + + + + Callback interface for the Photon client side. Must be provided to a new PhotonPeer in its constructor. + + + These methods are used by your PhotonPeer instance to keep your app updated. Read each method's + description and check out the samples to see how to use them. + + + + + Provides textual descriptions for various error conditions and noteworthy situations. + In cases where the application needs to react, a call to OnStatusChanged is used. + OnStatusChanged gives "feedback" to the game, DebugReturn provies human readable messages + on the background. + + + All debug output of the library will be reported through this method. Print it or put it in a + buffer to use it on-screen. Use PhotonPeer.DebugOut to select how verbose the output is. + + DebugLevel (severity) of the message. + Debug text. Print to System.Console or screen. + + + + Callback method which gives you (async) responses for called operations. + + + Similar to method-calling, operations can have a result. + Because operation-calls are non-blocking and executed on the server, responses are provided + after a roundtrip as call to this method. + + Example: Trying to create a room usually succeeds but can fail if the room's name is already + in use (room names are their IDs). + + This method is used as general callback for all operations. Each response corresponds to a certain + "type" of operation by its OperationCode. + + + + When you join a room, the server will assign a consecutive number to each client: the + "actorNr" or "player number". This is sent back in the operation result. + + Fetch your actorNr of a Join response like this: + int actorNr = (int)operationResponse[(byte)OperationCode.ActorNr]; + + The response to an operation\-call. + + + + OnStatusChanged is called to let the game know when asynchronous actions finished or when errors happen. + + + Not all of the many StatusCode values will apply to your game. Example: If you don't use encryption, + the respective status changes are never made. + + The values are all part of the StatusCode enumeration and described value-by-value. + + A code to identify the situation. + + + + Called whenever an event from the Photon Server is dispatched. + + + Events are used for communication between clients and allow the server to update clients anytime. + The creation of an event is often triggered by an operation (called by this client or an other). + + Each event carries a Code plus optional content in its Parameters. + Your application should identify which content to expect by the event's Code. + + Events can be defined and modified server-side. + + If you use the LoadBalancing api as basis, several events like EvJoin and EvLeave are pre-defined. + The LoadBalancing api provides the EventCode and ParameterCode classes for pre-defined events. + + Photon also allows you to come up with custom events on the fly, purely client-side. + To do so, use OpRaiseEvent. + + Events are incoming messages and as such buffered in the peer. + Calling PhotonPeer.DispatchIncomingCommands will call IPhotonPeerListener.OnEvent, to hand over received events. + + PhotonPeer.ReuseEventInstance is an option to optimize memory usage by reusing one EventData instance. + + The event currently being dispatched. + + + The protocol for this socket, defined in constructor. + + + Address, as defined via a Connect() call. Including protocol, port and or path. + This is set in the constructor and in Connect() again. Typically the address does not change after the IPhotonSocket is instantiated. + + + Contains only the server's hostname (stripped protocol, port and or path). Set in IPhotonSocket.Connect(). + + + Contains the IP address of the previously resolved ServerAddress (or empty, if GetIpAddress wasn't used). + + + Contains only the server's port address (as string). Set in IphotonSocket.Connect(). + + + Where available, this exposes if the server's address was resolved into an IPv6 address or not. + + + + Provides the protocol string, of the current PhotonPeer.SerializationProtocolType to be used for WebSocket connections. + + + Any WebSocket wrapper could access this to get the desired binary protocol for the connection. + Some WebSocket implementations use a static value of the same name and need to be updated. + + The value is not cached and each call will create the needed string on the fly. + + + + + Separates the given address into address (host name or IP) and port. Port must be included after colon! + + + This method expects any address to include a port. The final ':' in addressAndPort has to separate it. + IPv6 addresses have multiple colons and must use brackets to separate address from port. + + Examples: + ns.exitgames.com:5058 + http://[2001:db8:1f70::999:de8:7648:6e8]:100/ + [2001:db8:1f70::999:de8:7648:6e8]:100 + See: + http://serverfault.com/questions/205793/how-can-one-distinguish-the-host-and-the-port-in-an-ipv6-url + + + + Wraps a DNS call to provide an array of addresses, sorted to have the IPv6 ones first. + + This skips a DNS lookup, if the hostname is an IPv4 address. Then only this address is used as is. + The DNS lookup may take a while, so it is recommended to do this in a thread. Also, it may fail entirely. + + + IPAddress array for hostname, sorted to put any IPv6 addresses first.
+ If the DNS lookup fails, HandleException(StatusCode.ExceptionOnConnect) gets called and null returned. + Then the socket should not attempt to connect. +
+
+ + + Returns null or the IPAddress representing the address, doing Dns resolution if needed. + + Only returns IPv4 or IPv6 adresses, no others. + The string address of a server (hostname or IP). + IPAddress for the string address or null, if the address is neither IPv4, IPv6 or some hostname that could be resolved. + + + Variants of the Photon specific serialization protocol used for operations, responses, events and data. + + + Version 1.6 (outdated). + + + Version 1.8. + + + + + + + Serialize creates a byte-array from the given object and returns it. + + The object to serialize + The serialized byte-array + + + + Deserialize returns an object reassembled from the given StreamBuffer. + + The buffer to be Deserialized + The Deserialized object + + + + Deserialize returns an object reassembled from the given byte-array. + + The byte-array to be Deserialized + The Deserialized object + + + + Interface for (UDP) traffic capturing. + + + + Indicates if the PhotonPeer should call Record or not. + + + Implement to record network traffic. Called by PhotonPeer for each UDP message sent and received. + + The buffer will not contain Ethernet Header, IP, UDP level data. Only the payload received by the client. + + It is advised to not use NetworkSimulation when recording traffic. + The recording is done on the timing of actual receive- and send-calls and internal simulation would offset the timing. + + Buffer to be sent or received. Check length value for actual content length. + Length of the network data. + Indicates incoming (true) or outgoing (false) traffic. + The local peerId for the connection. Defaults to 0xFFFF until assigned by the Server. + The currently used IPhotonSocket of this Peer. Enables you to track the connection endpoint. + + + Internal class for "commands" - the package in which operations are sent. + + + Size of the Payload, which may be null. + + + Checks commandFlags & FV_UNRELIABLE_UNSEQUENCED. + + + Checks commandFlags & FV_RELIABLE. + + + + ACKs should never be created as NCommand. use CreateACK to wrtie the serialized ACK right away... + + + + + + + + + this variant does only create outgoing commands and increments . incoming ones are created from a DataInputStream + + + this variant does only create outgoing commands and increments . incoming ones are created from a DataInputStream + + + reads the command values (commandHeader and command-values) from incoming bytestream and populates the incoming command* + + + + A simulation item is an action that can be queued to simulate network lag. + + + + With this, the actual delay can be measured, compared to the intended lag. + + + Timestamp after which this item must be executed. + + + Action to execute when the lag-time passed. + + + Starts a new Stopwatch + + + + A set of network simulation settings, enabled (and disabled) by PhotonPeer.IsSimulationEnabled. + + + For performance reasons, the lag and jitter settings can't be produced exactly. + In some cases, the resulting lag will be up to 20ms bigger than the lag settings. + Even if all settings are 0, simulation will be used. Set PhotonPeer.IsSimulationEnabled + to false to disable it if no longer needed. + + All lag, jitter and loss is additional to the current, real network conditions. + If the network is slow in reality, this will add even more lag. + The jitter values will affect the lag positive and negative, so the lag settings + describe the medium lag even with jitter. The jitter influence is: [-jitter..+jitter]. + Packets "lost" due to OutgoingLossPercentage count for BytesOut and LostPackagesOut. + Packets "lost" due to IncomingLossPercentage count for BytesIn and LostPackagesIn. + + + + internal + + + internal + + + internal + + + internal + + + internal + + + internal + + + internal + + + This setting overrides all other settings and turns simulation on/off. Default: false. + + + Outgoing packages delay in ms. Default: 100. + + + Randomizes OutgoingLag by [-OutgoingJitter..+OutgoingJitter]. Default: 0. + + + Percentage of outgoing packets that should be lost. Between 0..100. Default: 1. TCP ignores this setting. + + + Incoming packages delay in ms. Default: 100. + + + Randomizes IncomingLag by [-IncomingJitter..+IncomingJitter]. Default: 0. + + + Percentage of incoming packets that should be lost. Between 0..100. Default: 1. TCP ignores this setting. + + + Counts how many outgoing packages actually got lost. TCP connections ignore loss and this stays 0. + + + Counts how many incoming packages actually got lost. TCP connections ignore loss and this stays 0. + + + Provides an overview of the current values in form of a string. + String summary. + + + + The pool this wrapper should return to when released/disposed. + + + + + Gets value and if it belongs to the static pool, returns the wrapper to pool. + + + + + + Boxes the value and returns boxed object. Releases the wrapper. + + + + + + Removes this WrapperStruct from pooling. + + + + Returns a String which represents the value of this instance. + String which represents the value of this instance. + + + Returns a String which represents the type (in brackets and value of this instance. + String which represents the type (in brackets) and value of this instance. + + + + staticPool is used for implicit casting. This is not threadsafe, so casting between T and StructWrapper should only be done on the Unity main thread. + + + + + Replacement for object.GetType() that first checks to see if object is a WrappedStruct. + If so returns the StructWrapper T type, otherwise just returns object.GetType(). + + + + + + + Wrap a struct in a pooled StructWrapper. + + + + + Wrap a struct in a pooled StructWrapper. Pulls wrapper from the static pool. Wrapper is returned to pool when Unwrapped. + Slighty faster version of Wrap() that is hard wired to pull from the static pool. Use the persistant bool argument to make a permanent unpooled wrapper. + + + + + Tests if object is either a cast T, or a wrapped T + + + + + Remove all wrappers in hashtable from pooling, so they can remain cached and used later. + + + + + + Unwraps any WrapperStructs, boxes their value, releases hashtable entry with the boxed value. Releases the wrappers. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is will not be returned to its pool until it is Unwrapped, or the pool is cleared. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is returned to the wrapper pool if applicable, so it is not considered safe to Unwrap multiple times, as the wrapper may be recycled. + + + + + If object is a StructWrapper, the value will be extracted. If not, the object will be cast to T. + Wrapper is will not be returned to its pool until it is Unwrapped, or the pool is cleared. + + + + + + + + + + + Will get the object using the key. If the key is invalid, will return null. + + + + + + Dictionary content as string. + If true, type-info is also included. + Full content of dictionary as string. + + + Param code. Used in internal op: InitEncryption. + + + Encryption-Mode code. Used in internal op: InitEncryption. + + + Param code. Used in internal op: InitEncryption. + + + Code of internal op: InitEncryption. + + + TODO: Code of internal op: Ping (used in PUN binary websockets). + + + Result code for any (internal) operation. + + + + This is the replacement for the const values used in eNet like: PS_DISCONNECTED, PS_CONNECTED, etc. + + + + No connection is available. Use connect. + + + Establishing a connection already. The app should wait for a status callback. + + + + The low level connection with Photon is established. On connect, the library will automatically + send an Init package to select the application it connects to (see also PhotonPeer.Connect()). + When the Init is done, IPhotonPeerListener.OnStatusChanged() is called with connect. + + Please note that calling operations is only possible after the OnStatusChanged() with StatusCode.Connect. + + + Connection going to be ended. Wait for status callback. + + + Acknowledging a disconnect from Photon. Wait for status callback. + + + Connection not properly disconnected. + + + The server's address, as set by a Connect() call, including any protocol, ports and or path. + If rHTTP is used, this can be set directly. + + + + This is the (low level) connection state of the peer. It's internal and based on eNet's states. + + Applications can read the "high level" state as PhotonPeer.PeerState, which uses a different enum. + + + Byte count of last sent operation (set during serialization). + + + Byte count of last dispatched message (set during dispatch/deserialization). + + + The command that's currently being dispatched. + + + This ID is assigned by the Realtime Server upon connection. + The application does not have to care about this, but it is useful in debugging. + + + + The serverTimeOffset is serverTimestamp - localTime. Used to approximate the serverTimestamp with help of localTime + + + + + Count of all bytes going out (including headers) + + + + + Count of all bytes coming in (including headers) + + + + Set via Connect(..., customObject) and sent in Init-Request. + + + Sent on connect in an Init Request. + + + Temporary cache of AppId. Used in Connect() to keep the AppId until we send the Init-Request (after the network-level (and Enet) connect). + + + Set to timeInt, whenever SendOutgoingCommands actually checks outgoing queues to send them. Must be connected. + + + Maximum Transfer Unit to be used for UDP+TCP + + + If IPhotonSocket.Connected is true, this value shows if the server's address resolved as IPv6 address. + + You must check the socket's IsConnected state. Otherwise, this value is not initialized. + Sent to server in Init-Request. + + + + + Writes and "Init Request", which initializes the connection / application used server-side. + + Uses this.ServerAddress, this.AppId, this.PhotonToken and CustomInitData and some more values. + Bytes of the init request. + + + Called when the server's Init Response arrived. + + + Serializes an operation into our binary messages (magic number, msg-type byte and message). Optionally encrypts. + This method is mostly the same in EnetPeer, TPeer and HttpPeerBase. Also, for raw messages, we have another variant. + + + Serializes an operation into our binary messages (magic number, msg-type byte and message). Optionally encrypts. + This method is mostly the same in EnetPeer, TPeer and HttpPeerBase. Also, for raw messages, we have another variant. + + + Returns the UDP Payload starting with Magic Number for binary protocol + + + + Checks outgoing queues for commands to send and puts them on their way. + This creates one package per go in UDP. + + If commands are not sent, cause they didn't fit into the package that's sent. + + + + Checks the incoming queue and Dispatches received data if possible. + + If a Dispatch happened or not, which shows if more Dispatches might be needed. + + + + Internally uses an operation to exchange encryption keys with the server. + + If the op could be sent. + + + + Gets the currently used settings for the built-in network simulation. + Please check the description of NetworkSimulationSet for more details. + + + + + Core of the Network Simulation, which is available in Debug builds. + Called by a timer in intervals. + + + + EnetPeer will set this value, so trafficstats can use it. TCP has 0 bytes per package extra + + + See PhotonPeer value. + + + See PhotonPeer value. + + + See PhotonPeer value. + + + See PhotonPeer value. + + + + Value range for a Peer's connection and initialization state, as returned by the PeerState property. + + + While this is not the same as the StatusCode of IPhotonPeerListener.OnStatusChanged(), it directly relates to it. + In most cases, it makes more sense to build a game's state on top of the OnStatusChanged() as you get changes. + + + + The peer is disconnected and can't call Operations. Call Connect(). + + + The peer is establishing the connection: opening a socket, exchanging packages with Photon. + + + The connection is established and now sends the application name to Photon. + You set the "application name" by calling PhotonPeer.Connect(). + + + The peer is connected and initialized (selected an application). You can now use operations. + + + The peer is disconnecting. It sent a disconnect to the server, which will acknowledge closing the connection. + + + + These are the options that can be used as underlying transport protocol. + + + + Use UDP to connect to Photon, which allows you to send operations reliable or unreliable on demand. + + + Use TCP to connect to Photon. + + + A TCP-based protocol commonly supported by browsers.For WebGL games mostly. Note: No WebSocket IPhotonSocket implementation is in this Assembly. + This protocol is only available in Unity exports to WebGL. + + + A TCP-based, encrypted protocol commonly supported by browsers. For WebGL games mostly. Note: No WebSocket IPhotonSocket implementation is in this Assembly. + This protocol is only available in Unity exports to WebGL. + + + + Level / amount of DebugReturn callbacks. Each debug level includes output for lower ones: OFF, ERROR, WARNING, INFO, ALL. + + + + No debug out. + + + Only error descriptions. + + + Warnings and errors. + + + Information about internal workflows, warnings and errors. + + + Most complete workflow description (but lots of debug output), info, warnings and errors. + + + Build target framework supported by this dll. + + + + Instances of the PhotonPeer class are used to connect to a Photon server and communicate with it. + + + A PhotonPeer instance allows communication with the Photon Server, which in turn distributes messages + to other PhotonPeer clients. + An application can use more than one PhotonPeer instance, which are treated as separate users on the + server. Each should have its own listener instance, to separate the operations, callbacks and events. + + + + + No effect anymore. Removed without replacement. + + + This value was used to get/set the initial capacities of command-lists. + These grow on demand but knowing their capacity is of very limited use. + Also, various command-lists grow their capacity independent from one another. + + + + + No effect anymore. Removed without replacement. + + + This was used to skip some received (and buffered) unreliable commands, to avoid situations + where the peer has aggregated a lot of (old) messages. + + + + + The WarningSize was used test all message queues for congestion. + + + + + Gets a local timestamp in milliseconds by calling SupportClass.GetTickCount(). + See LocalMsTimestampDelegate. + + + + Where dynamic linking is available, this library will attempt to load a native Photon "Encryptor" plugin library for "Datagram Encryption". + Fallback to a managed implementation. This value is always true. + + + Obsolete and ignored. Size of CommandLog. Default is 0, no logging. + + + Obsolete and ignored. Converts the CommandLog into a readable table-like string with summary. + + + False if this library build contains C# Socket code. If true, you must set some type as SocketImplementation before connecting. + + + True if the library was compiled with DEBUG setting. + + + Version of the Native Encryptor API compiled into this assembly. Defines which PhotonEncryptorPlugin needs to be used. + + + Target framework this dll was built for. + + + Global toggle to avoid callbacks from native plugins. Defaults to false, meaning: "callbacks enabled". + Callbacks from native code will fail on some platforms, which is why you can disable them. + + + Can be used to remove/hide the AppId from websocket connect paths. + + + A simplified identifier for client SDKs. Photon's APIs might modify this (as a dll can be used in more than one product). Helps debugging. + + + For the Init-request, we shift the ClientId by one and the last bit signals a "debug" (0) or "release" build (1). + + + Version of this library as string. + + + Version of this library as string. + + + A Native Socket implementation is no longer part of this DLL but delivered in a separate add-on. This value always returns false. + + + Native Payload Encryption is no longer part of this DLL but delivered in a separate add-on. This value always returns false. + + + Native Datagram Encryption is no longer part of this DLL but delivered in a separate add-on. This value always returns false. + + + Enables selection of a (Photon-)serialization protocol. Used in Connect methods. + Defaults to SerializationProtocol.GpBinaryV16; + + + Optional definition of IPhotonSocket type per ConnectionProtocol. + + Several platforms have special Socket implementations and slightly different APIs. + Customizing the SocketImplementationConfig helps to accomodate this. + By default, UDP and TCP have socket implementations assigned. + + If a native socket plugin is available set the SocketNativeSource class as Type definition here. + + You only need to set the SocketImplementationConfig once, after creating a PhotonPeer + and before connecting. If you switch the TransportProtocol, the correct implementation is being used. + + + + + Can be used to read the IPhotonSocket implementation at runtime (before connecting). + + + Use the SocketImplementationConfig to define which IPhotonSocket is used per ConnectionProtocol. + + + + + Sets the level (and amount) of debug output provided by the library. + + + This affects the callbacks to IPhotonPeerListener.DebugReturn. + Default Level: Error. + + + + + Gets the IPhotonPeerListener of this instance (set in constructor). + Can be used in derived classes for Listener.DebugReturn(). + + + + + Called when the client received a Disconnect Message from the server. Signals an error and provides a message to debug the case. + + + + + Option to make the PhotonPeer reuse a single EventData instance for all incoming events. + + + This reduces memory garbage. + If enabled, the event provided via OnEvent(EventData photonEvent) is invalid once the callback finished. + That event's content will get modified. Typically this is not a problem as events are rarely cached. + + Changing this value acquires the same lock that DispatchIncomingCommands() uses. + + + + + Enables a deserialization optimization for incoming events. Defaults to false. + + + When enabled, byte-arrays in incoming Photon events are deserialized into pooled ByteArraySlice instances (wrappers for byte[]). + This improves the memory footprint for receiving byte-arrays in events. + + When used, you have to release the (pooled) ByteArraySlice instances. + + Adjust your handling of EventData accordingly: + + The ByteArraySlice.Buffer will usually be bigger than the send/received byte-array. + Check the ByteArraySlice.Count and read only the actually received bytes. + The Buffer is reused and not cleared. The Offset will be 0 for incoming events. + + Important: + While the peer will acquire the ByteArraySlice and passes it to OnEvent, the game code has to call ByteArraySlice.Release() + when the slice is no longer needed. + + Send either byte[], ArraySegment or use the ByteArraySlicePool to acquire ByteArraySlices to send. + + + + + Instance of a ByteArraySlicePool. UseByteArraySlicePoolForEvents defines if this PhotonPeer is using the pool for deserialization of byte[] in Photon events. + + ByteArraySlice is a serializable datatype of the Photon .Net client library. + It helps avoid allocations by being pooled and (optionally) used in incoming Photon events (see: UseByteArraySlicePoolForEvents). + + You can also use the pool to acquire ByteArraySlice instances for serialization. + RaiseEvent will auto-release all ByteArraySlice instances passed in. + + + + + This debug setting enables a new send-ordering for commands. Defaults to true and commands are sent in the order they are created. Set to false to use Enet ordering. + + + + Skips resending (individual) commands if their reliable sequence number is this amount larger than the highest acknowledged sequence number. + + This puts focus on resending commands that are older and are needed on the receiver side to dispatch commands. + It queues more on the client side than on the server. + Affects only reliable UDP (based on enet). + + + + Skips sending reliable and unreliable commands if their reliable sequence number is this amount larger than the highest acknowledged sequence number. + + This puts focus on resending commands that are older and are needed on the receiver side to dispatch commands. + It queues more on the client side than on the server. + Affects only reliable UDP (based on enet). + + + + + Gets count of all bytes coming in (including headers, excluding UDP/TCP overhead) + + + + + Gets count of all bytes going out (including headers, excluding UDP/TCP overhead) + + + + + Gets the size of the dispatched event or operation-result in bytes. + This value is set before OnEvent() or OnOperationResponse() is called (within DispatchIncomingCommands()). + + + Get this value directly in OnEvent() or OnOperationResponse(). Example: + void OnEvent(...) { + int eventSizeInBytes = this.peer.ByteCountCurrentDispatch; + //... + + void OnOperationResponse(...) { + int resultSizeInBytes = this.peer.ByteCountCurrentDispatch; + //... + + + + Returns the debug string of the event or operation-response currently being dispatched or string. Empty if none. + In a release build of the lib, this will always be empty. + + + + Gets the size of the last serialized operation call in bytes. + The value includes all headers for this single operation but excludes those of UDP, Enet Package Headers and TCP. + + + Get this value immediately after calling an operation. + Example: + + this.loadbalancingClient.OpJoinRoom("myroom"); + int opjoinByteCount = this.loadbalancingClient.ByteCountLastOperation; + + + + If set, the TrafficRecorder will be used to capture all traffic. + + If null or not Enabled, the recorder is not being used. + Release builds of this library will never record traffic for performance reasons. + + See ITrafficRecorder docs. + + + + + Debugging option to tell the Photon Server to log all datagrams. + + + + + Up to 4 resend attempts for a reliable command can be done in quick succession (after RTT+4*Variance). + + + By default 0. Any later resend attempt will then double the time before the next resend. + Max value = 4; + Make sure to adjust SentCountAllowance to a slightly higher value, as more repeats will get done. + + + + + This is the (low level) state of the connection to the server of a PhotonPeer. Managed internally and read-only. + + + Don't mix this up with the StatusCode provided in IPhotonListener.OnStatusChanged(). + Applications should use the StatusCode of OnStatusChanged() to track their state, as + it also covers the higher level initialization between a client and Photon. + + + + + This peer's ID as assigned by the server or 0 if not using UDP. Will be 0xFFFF before the client connects. + + Used for debugging only. This value is not useful in everyday Photon usage. + + + + Count of all currently received but not-yet-Dispatched reliable commands + (events and operation results) from all channels. + + + + + Count of all commands currently queued as outgoing, including all channels and reliable, unreliable. + + + + + Sets a new (temporary) size of the MessageBufferPool to reuse memory where possible. + + + The MessageBufferPool is a Queue<StreamBuffer> for performance reasons. + This methods dequeues from the MessageBufferPool to get the Count equal to countOfBuffers, + then it calls MessageBufferPool.TrimExcess(). + + New size of the pool. Clears the pool if <= 0. + + + + Gets / sets the number of channels available in UDP connections with Photon. + Photon Channels are only supported for UDP. + The default ChannelCount is 2. Channel IDs start with 0 and 255 is a internal channel. + + + + + Enables the client so send the "encrypted" flag on secure connections. Incompatible with Server SDK 4.x. + + + + + While not connected, this controls if the next connection(s) should use a per-package CRC checksum. + + + While turned on, the client and server will add a CRC checksum to every sent package. + The checksum enables both sides to detect and ignore packages that were corrupted during transfer. + Corrupted packages have the same impact as lost packages: They require a re-send, adding a delay + and could lead to timeouts. + + Building the checksum has a low processing overhead but increases integrity of sent and received data. + Packages discarded due to failed CRC cecks are counted in PhotonPeer.PacketLossByCrc. + + + + + Count of packages dropped due to failed CRC checks for this connection. + + + + + + Count of packages dropped due to wrong challenge for this connection. + + + + + Gets the count of sent but not yet acknowledged commands (for UDP connections). + + + + + Count of commands that got repeated (due to local repeat-timing before an ACK was received). + + + + + Number of send retries before a peer is considered lost/disconnected. Default: 7. + + + The initial timeout countdown of a command is calculated by the current roundTripTime + 4 * roundTripTimeVariance. + Please note that the timeout span until a command will be resent is not constant, but based on + the roundtrip time at the initial sending, which will be doubled with every failed retry. + + DisconnectTimeout and SentCountAllowance are competing settings: either might trigger a disconnect on the + client first, depending on the values and Roundtrip Time. + + + + + Caps the initial timing for repeats of reliable commands. In milliseconds. Default: 400ms. + + + Unless acknowledged, reliable commands are repeated initially after: current roundTripTime + 4 * roundTripTimeVariance. + + As this value can be very high when there was exceptional lag, InitialResendTimeMax makes sure that commands + get repeated several times before they may trigger a timeout. + + + + + Sets the time between pings being sent automatically. They measure the roundtrip time and keep connections from closing. Default: 1000. + + + For Photon's reliable UDP connections, pings are skipped if any reliable command was sent during the specified TimePingInterval. + Any reliable command is used to update the RoundTripTime and RoundTripTimeVariance. + + When using TCP and WebSockets, the ping is of interest to measure the roundtrip and to keep a connection open, should nothing else + With those two protocols, the ping is used to update the RoundTripTime and RoundTripTimeVariance. + + + + + Time in milliseconds before any sent reliable command triggers a timeout disconnect, unless acknowledged by the receiver. Default: 10000. + + + DisconnectTimeout is not an exact value for a timeout. The exact timing of the timeout depends on the frequency + of Service() calls and the roundtrip time. Commands sent with long roundtrip-times and variance are checked less + often for re-sending. + + DisconnectTimeout and SentCountAllowance are competing settings: either might trigger a disconnect on the + client first, depending on the values and Roundtrip Time. + + Default: 10000 ms. Maximum setting: 65535. + Setting a negative value will apply the default timeout. + + + + + Approximated Environment.TickCount value of server (while connected). + + + UDP: The server's timestamp is automatically fetched after connecting (once). This is done + internally by a command which is acknowledged immediately by the server. + TCP: The server's timestamp fetched with each ping but set only after connecting (once). + + The approximation will be off by +/- 10ms in most cases. Per peer/client and connection, the + offset will be constant (unless FetchServerTimestamp() is used). A constant offset should be + better to adjust for. Unfortunately there is no way to find out how much the local value + differs from the original. + + The approximation adds RoundtripTime / 2 and uses this.LocalTimeInMilliSeconds to calculate + in-between values (this property returns a new value per tick). + + The value sent by Photon equals Environment.TickCount in the logic layer. + + + 0 until connected. + While connected, the value is an approximation of the server's current timestamp. + + + + + This setter for the (local-) timestamp delegate replaces the default Environment.TickCount with any equal function. + + + + The internally used per PhotonPeer time value. + + Returns the integer part of a Stopwatch ElapsedMilliseconds value. + If the PhotonPeer runs continuously the ClientTime will increment from zero to Int32..::.MaxValue + for approximately 24.9 days, then jump to Int32..::.MinValue (a negative number), then increment + back to zero during the next 24.9 days. + + It is recommended to use this int only for delta times, to avoid handling the overflow. + + + + The last ConnectionTime value, when some ACKs were sent out by this client. + Only applicable to UDP connections. + + + The last ConnectionTime value, when SendOutgoingCommands actually checked outgoing queues to send them. Must be connected. + Available for UDP and TCP connections. + + + Measures the maximum milliseconds spent in PhotonSocket.Send(). + + + Time until a reliable command is acknowledged by the server. + + The value measures network latency and for UDP it includes the server's ACK-delay (setting in config). + In TCP, there is no ACK-delay, so the value is slightly lower (if you use default settings for Photon). + + RoundTripTime is updated constantly. Every reliable command will contribute a fraction to this value. + + This is also the approximate time until a raised event reaches another client or until an operation + result is available. + + + + + Changes of the roundtriptime as variance value. Gives a hint about how much the time is changing. + + + + The last measured roundtrip time for this connection. + + + + Timestamp of the last time anything (!) was received from the server (including low level Ping, ACKs, events and operation-returns). + + + This is not the time when something was dispatched. If you enable NetworkSimulation, this value is affected as well. + + + + + The server address which was used in PhotonPeer.Connect() or null (before Connect() was called). + + + + Contains the IP address of the previously resolved ServerAddress (or empty, if address wasn't resolved with the internal methods). + + + The protocol this peer is currently connected/connecting with (or 0). + + + This is the transport protocol to be used for next connect (see remarks). + The TransportProtocol can be changed anytime but it will not change the + currently active connection. Instead, TransportProtocol will be applied on next Connect. + + + + + Gets or sets the network simulation "enabled" setting. + Changing this value also locks this peer's sending and when setting false, + the internally used queues are executed (so setting to false can take some cycles). + + + + + Gets the settings for built-in Network Simulation for this peer instance + while IsSimulationEnabled will enable or disable them. + Once obtained, the settings can be modified by changing the properties. + + + + + Defines the initial size of an internally used StreamBuffer for Tcp. + The StreamBuffer is used to aggregate operation into (less) send calls, + which uses less resoures. + + + The size is not restricing the buffer and does not affect when outgoing data is actually sent. + + + + + The Maximum Trasfer Unit (MTU) defines the (network-level) packet-content size that is + guaranteed to arrive at the server in one piece. The Photon Protocol uses this + size to split larger data into packets and for receive-buffers of packets. + + + This value affects the Packet-content. The resulting UDP packages will have additional + headers that also count against the package size (so it's bigger than this limit in the end) + Setting this value while being connected is not allowed and will throw an Exception. + Minimum is 576. Huge values won't speed up connections in most cases! + + + + + This property is set internally, when OpExchangeKeysForEncryption successfully finished. + While it's true, encryption can be used for operations. + + + + + While true, the peer will not send any other commands except ACKs (used in UDP connections). + + + + Defines if Key Exchange for Encryption is done asynchronously in another thread. + + + Indicates if sequence numbers should be randomized. + + + Initialization array, used to modify the sequence numbers of channels. + + + If GCM is used for DatagramEncryption. + If true, the randomization-value gets added to the current value, else (CBC/old style) the randomization-value replaces the current value. + + + + Gets the byte-count of incoming "low level" messages, which are either Enet Commands or Tcp Messages. + These include all headers, except those of the underlying internet protocol Udp or Tcp. + + + + + Gets the byte-count of outgoing "low level" messages, which are either Enet Commands or Tcp Messages. + These include all headers, except those of the underlying internet protocol Udp or Tcp. + + + + + Gets a statistic of incoming and outgoing traffic, split by operation, operation-result and event. + + + Operations are outgoing traffic, results and events are incoming. + Includes the per-command header sizes (Udp: Enet Command Header or Tcp: Message Header). + + + + + Returns the count of milliseconds the stats are enabled for tracking. + + + + + Enables or disables collection of statistics in TrafficStatsIncoming, TrafficStatsOutgoing and TrafficstatsGameLevel. + + + Setting this to true, also starts the stopwatch to measure the timespan the stats are collected. + Enables the traffic statistics of a peer: TrafficStatsIncoming, TrafficStatsOutgoing and TrafficstatsGameLevel (nothing else). + Default value: false (disabled). + + + + + Creates new instances of TrafficStats and starts a new timer for those. + + + + + Creates new TrafficStats values and the related Stopwatch instance. To be called when the peer is created / reset. + + + + + Returns a string of the most interesting connection statistics. + When you have issues on the client side, these might contain hints about the issue's cause. + + If true, Incoming and Outgoing low-level stats are included in the string. + Stats as string. + + + Implements the message-protocol, based on the underlying network protocol (udp, tcp, http). + + + Setter for the Payload Encryptor type. Used for next connection. + + If null, the PhotonPeer will create a DiffieHellmanCryptoProvider, which is the default. + This is only needed in rare cases, where using native payload encryption makes sense. + + Get in touch about this, if you got questions: developer@photonengine.com + + + + PayloadEncryption Secret. Message payloads get encrypted with it individually and on demand. + + + Setter for the Datagram Encryptor type. Used at next connect. + + If null, the PhotonPeer will create a default datagram encryptor instance. + + + + The datagram encryptor used for the current connection. Applied internally in InitDatagramEncryption. + + + Count of unreliable commands being discarded in case this client already dispatched a command that was newer (higher sequence number). + + + Set per dispatch in DispatchIncomingCommands to: commandUnreliableSequenceNumber - channel.incomingUnreliableSequenceNumber. Indicates how big the (sequence)gap is, compared to the last dispatched unreliable command. + + + Creates a new PhotonPeer with specified transport protocol (without a IPhotonPeerListener). + Make sure to set the Listener, before using the peer. + + + + Creates a new PhotonPeer instance to communicate with Photon and selects the transport protocol. We recommend UDP. + + a IPhotonPeerListener implementation + Protocol to use to connect to Photon. + + + + Starts connecting to the given Photon server. Non-blocking. + + + Connecting to the Photon server is done asynchronous. + Unless an error happens right away (and this returns false), wait for the call of IPhotonPeerListener.OnStatusChanged. + + + Address of a Photon server as IP:port or hostname. WebSocket connections must contain a scheme (ws:// or wss://). + + + The ID of the app to use. Typically this is a guid (for the Photon Cloud). Max 32 characters. + + + Optional custom data to be used by server during peer creation. + If used for authentication, the server is able to reject a client without creating a peer. + Must be a serializable data type of Photon. + + Custom data to send to the server in the Init request. Might be used to identify a client / user. + + True if a connection attempt will be made. False if some error could be detected early-on. + + + + + Starts connecting to the given Photon server. Non-blocking. + + + Connecting to the Photon server is done asynchronous. + Unless an error happens right away (and this returns false), wait for the call of IPhotonPeerListener.OnStatusChanged. + + + Address of a Photon server as IP:port or hostname. WebSocket connections must contain a scheme (ws:// or wss://). + + + Optional address of a proxy server. Only used by WebSocket connections. Set null to use none. + + + The ID of the app to use. Typically this is a guid (for the Photon Cloud). Max 32 characters. + + + Optional Photon token data to be used by server during peer creation. + If used for authentication, the server is able to reject a client without creating a peer. + Must be of type string or byte[] (as provided by server). + + Custom data to send to the server in the Init request. Might be used to identify a client / user. + + True if a connection attempt will be made. False if some error could be detected early-on. + + + + + This method initiates a mutual disconnect between this client and the server. + + + Calling this method does not immediately close a connection. Disconnect lets the server + know that this client is no longer listening. For the server, this is a much faster way + to detect that the client is gone but it requires the client to send a few final messages. + + On completion, OnStatusChanged is called with the StatusCode.Disconnect. + + If the client is disconnected already or the connection thread is stopped, then there is no callback. + + The default server logic will leave any joined game and trigger the respective event. + + + + + This method immediately closes a connection (pure client side) and ends related listening Threads. + + + Unlike Disconnect, this method will simply stop to listen to the server. Udp connections will timeout. + If the connections was open, this will trigger a callback to OnStatusChanged with code StatusCode.Disconnect. + + + + + This will fetch the server's timestamp and update the approximation for property ServerTimeInMilliseconds. + + + The server time approximation will NOT become more accurate by repeated calls. Accuracy currently depends + on a single roundtrip which is done as fast as possible. + + The command used for this is immediately acknowledged by the server. This makes sure the roundtrip time is + low and the timestamp + rountriptime / 2 is close to the original value. + + + + + This method creates a public key for this client and exchanges it with the server. + + + Encryption is not instantly available but calls OnStatusChanged when it finishes. + Check for StatusCode EncryptionEstablished and EncryptionFailedToEstablish. + + Calling this method sets IsEncryptionAvailable to false. + This method must be called before the "encrypt" parameter of OpCustom can be used. + + If operation could be enqueued for sending + + + + Initializes Datagram Encryption. Optionally, the EncryptorType is being used, if set. + + Secret used to cipher udp packets. + Secret used for authentication of udp packets. + Sets if enet Sequence Numbers will be randomized or not. Preferably should be true. + Sets if the chaining mode should be CBC (false, default) or GCM (true). GCM mode is only available with a native encryption plugin. + + + + Photon's Payload Encryption secret may be set by a response from the server. + + The secret in form of a byte[]. + + + + This method excutes DispatchIncomingCommands and SendOutgoingCommands in your application Thread-context. + + + The Photon client libraries are designed to fit easily into a game or application. The application + is in control of the context (thread) in which incoming events and responses are executed and has + full control of the creation of UDP/TCP packages. + + Sending packages and dispatching received messages are two separate tasks. Service combines them + into one method at the cost of control. It calls DispatchIncomingCommands and SendOutgoingCommands. + + Call this method regularly (2..20 times a second). + + This will Dispatch ANY remaining buffered responses and events AND will send queued outgoing commands. + Fewer calls might be more effective if a device cannot send many packets per second, as multiple + operations might be combined into one package. + + + You could replace Service by: + + while (DispatchIncomingCommands()); //Dispatch until everything is Dispatched... + SendOutgoingCommands(); //Send a UDP/TCP package with outgoing messages + + + + + + + Creates and sends a UDP/TCP package with outgoing commands (operations and acknowledgements). Also called by Service(). + + + As the Photon library does not create any UDP/TCP packages by itself. Instead, the application + fully controls how many packages are sent and when. A tradeoff, an application will + lose connection, if it is no longer calling SendOutgoingCommands or Service. + + If multiple operations and ACKs are waiting to be sent, they will be aggregated into one + package. The package fills in this order: + ACKs for received commands + A "Ping" - only if no reliable data was sent for a while + Starting with the lowest Channel-Nr: + Reliable Commands in channel + Unreliable Commands in channel + + This gives a higher priority to lower channels. + + A longer interval between sends will lower the overhead per sent operation but + increase the internal delay (which adds "lag"). + + Call this 2..20 times per second (depending on your target platform). + + The if commands are not yet sent. Udp limits it's package size, Tcp doesnt. + + + + Dispatching received messages (commands), causes callbacks for events, responses and state changes within a IPhotonPeerListener. + + + DispatchIncomingCommands only executes a single received + command per call. If a command was dispatched, the return value is true and the method + should be called again. + + This method is called by Service() until currently available commands are dispatched. + In general, this method should be called until it returns false. In a few cases, it might + make sense to pause dispatching (if a certain state is reached and the app needs to load + data, before it should handle new events). + + The callbacks to the peer's IPhotonPeerListener are executed in the same thread that is + calling DispatchIncomingCommands. This makes things easier in a game loop: Event execution + won't clash with painting objects or the game logic. + + + + + Prepares your operation (code and parameters) to be sent to the Photon Server with specified SendOptions. + + + This method serializes and enqueues the operation right away while the actual sending happens later. + To be able to aggregate operations/messages, the Photon client sends packages only when you call SendOutgoingCommands(). + + The sendOptions specify how the operation gets sent exactly. + Keep in mind that some transport protocols don't support unreliable or unsequenced transport. + In that case, the sendOptions might be ignored. + + The operationCode must be known by the server's logic or won't be processed. + In almost all cases, sending an operation will result in a OperationResponse (see: IPhotonPeerListener.OnOperationResponse). + + Operations are handled by their byte\-typed code. The codes are defined in the Realtime API (a.k.a. LoadBalancing API). + Containing parameters as key\-value pair. The key is byte\-typed, while the value is any serializable datatype. + Wraps up DeliveryMode (reliability), Encryption and Channel values for sending. + If operation could be enqueued for sending. + + + + Registers new types/classes for de/serialization and the fitting methods to call for this type. + + + SerializeMethod and DeserializeMethod are complementary: Feed the product of serializeMethod to + the constructor, to get a comparable instance of the object. + + After registering a Type, it can be used in events and operations and will be serialized like + built-in types. + + Type (class) to register. + A byte-code used as shortcut during transfer of this Type. + Method delegate to create a byte[] from a customType instance. + Method delegate to create instances of customType's from byte[]. + If the Type was registered successfully. + + + + Container for an Operation request, which is a code and parameters. + + + On the lowest level, Photon only allows byte-typed keys for operation parameters. + The values of each such parameter can be any serializable datatype: byte, int, hashtable and many more. + + + + Byte-typed code for an operation - the short identifier for the server's method to call. + + + The parameters of the operation - each identified by a byte-typed code in Photon. + + + + Contains the server's response for an operation called by this peer. + The indexer of this class actually provides access to the Parameters Dictionary. + + + The OperationCode defines the type of operation called on Photon and in turn also the Parameters that + are set in the request. Those are provided as Dictionary with byte-keys. + There are pre-defined constants for various codes defined in the LoadBalancing application. + Check: OperationCode, ParameterCode, etc. + + An operation's request is summarized by the ReturnCode: a short typed code for "Ok" or + some different result. The code's meaning is specific per operation. An optional DebugMessage can be + provided to simplify debugging. + + Each call of an operation gets an ID, called the "invocID". This can be matched to the IDs + returned with any operation calls. This way, an application could track if a certain OpRaiseEvent + call was successful. + + + + The code for the operation called initially (by this peer). + Use enums or constants to be able to handle those codes, like OperationCode does. + + + A code that "summarizes" the operation's success or failure. Specific per operation. 0 usually means "ok". + + + An optional string sent by the server to provide readable feedback in error-cases. Might be null. + + + A Dictionary of values returned by an operation, using byte-typed keys per value. + + + + Alternative access to the Parameters, which wraps up a TryGetValue() call on the Parameters Dictionary. + + The byte-code of a returned value. + The value returned by the server, or null if the key does not exist in Parameters. + + + ToString() override. + Relatively short output of OpCode and returnCode. + + + Extensive output of operation results. + To be used in debug situations only, as it returns a string for each value. + + + A Photon Event consists of a Code value and a Parameters Dictionary with the event's content (if any). + + The indexer of this class provides access to the values in Parameters. + It wraps the null check for Parameters and uses TryGetValue() for the provided key. + + Photon servers use events to send information which is not triggered by a client's operation requests (those get responses). + The Realtime API allows you to send custom events with any Code and content via OpRaiseEvent. + + + + The event code identifies the type of event. + + + The Parameters of an event is a Dictionary<byte, object>. + + + + Access to the Parameters of a Photon-defined event. Custom Events only use Code, Sender and CustomData. + + The key byte-code of a Photon event value. + The Parameters value, or null if the key does not exist in Parameters. + + + + Defines the event key containing the Sender of the event. + + + Defaults to Sender key of Realtime API events (RaiseEvent): 254. + Can be set to Chat API's ChatParameterCode.Sender: 5. + + + + + Accesses the Sender of the event via the indexer and SenderKey. The result is cached. + + + Accesses this event's Parameters[CustomDataKey], which may be null. + In that case, this returns 0 (identifying the server as sender). + + + + + Defines the event key containing the Custom Data of the event. + + + Defaults to Data key of Realtime API events (RaiseEvent): 245. + Can be set to any other value on demand. + + + + + Accesses the Custom Data of the event via the indexer and CustomDataKey. The result is cached. + + + Accesses this event's Parameters[CustomDataKey], which may be null. + + + + ToString() override. + Short output of "Event" and it's Code. + + + Extensive output of the event content. + To be used in debug situations only, as it returns a string for each value. + + + + Type of serialization methods to add custom type support. + Use PhotonPeer.ReisterType() to register new types with serialization and deserialization methods. + + The method will get objects passed that were registered with it in RegisterType(). + Return a byte[] that resembles the object passed in. The framework will surround it with length and type info, so don't include it. + + + Serialization method delegate. StreamBuffer based custom serialization methods must use this form. + + + + Type of deserialization methods to add custom type support. + Use PhotonPeer.RegisterType() to register new types with serialization and deserialization methods. + + The framwork passes in the data it got by the associated SerializeMethod. The type code and length are stripped and applied before a DeserializeMethod is called. + Return a object of the type that was associated with this method through RegisterType(). + + + Deserialization method delegate. StreamBuffer based custom deserialization methods must use this form. + + + + Provides tools for the Exit Games Protocol + + + + + Serialize creates a byte-array from the given object and returns it. + + The object to serialize + The serialized byte-array + + + + Deserialize returns an object reassembled from the given byte-array. + + The byte-array to be Deserialized + The Deserialized object + + + + Serializes a short typed value into a byte-array (target) starting at the also given targetOffset. + The altered offset is known to the caller, because it is given via a referenced parameter. + + The short value to be serialized + The byte-array to serialize the short to + The offset in the byte-array + + + + Serializes an int typed value into a byte-array (target) starting at the also given targetOffset. + The altered offset is known to the caller, because it is given via a referenced parameter. + + The int value to be serialized + The byte-array to serialize the short to + The offset in the byte-array + + + + Serializes an float typed value into a byte-array (target) starting at the also given targetOffset. + The altered offset is known to the caller, because it is given via a referenced parameter. + + The float value to be serialized + The byte-array to serialize the short to + The offset in the byte-array + + + + Deserialize fills the given int typed value with the given byte-array (source) starting at the also given offset. + The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. + The altered offset is this way also known to the caller. + + The int value to deserialize into + The byte-array to deserialize from + The offset in the byte-array + + + + Deserialize fills the given short typed value with the given byte-array (source) starting at the also given offset. + The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. + The altered offset is this way also known to the caller. + + The short value to deserialized into + The byte-array to deserialize from + The offset in the byte-array + + + + Deserialize fills the given float typed value with the given byte-array (source) starting at the also given offset. + The result is placed in a variable (value). There is no need to return a value because the parameter value is given by reference. + The altered offset is this way also known to the caller. + + The float value to deserialize + The byte-array to deserialize from + The offset in the byte-array + + + + Exit Games GpBinaryV16 protocol implementation + + + + + The gp type. + + + + + Unkown type. + + + + + An array of objects. + + + This type is new in version 1.5. + + + + + A boolean Value. + + + + + A byte value. + + + + + An array of bytes. + + + + + An array of objects. + + + + + A 16-bit integer value. + + + + + A 32-bit floating-point value. + + + This type is new in version 1.5. + + + + + A dictionary + + + This type is new in version 1.6. + + + + + A 64-bit floating-point value. + + + This type is new in version 1.5. + + + + + A Hashtable. + + + + + A 32-bit integer value. + + + + + An array of 32-bit integer values. + + + + + A 64-bit integer value. + + + + + A string value. + + + + + An array of string values. + + + + + A custom type. 0x63 + + + + + Null value don't have types. + + + + + Calls the correct serialization method for the passed object. + + + + + DeserializeInteger returns an Integer typed value from the given stream. + + + + Exception type for de/serialization issues. Used in Protocol 1.8. + + + Constructor for the exception. + + + Unkown. GpType: 0. + + + Boolean. GpType: 2. See: BooleanFalse, BooleanTrue. + + + Byte. GpType: 3. + + + Short. GpType: 4. + + + 32-bit floating-point value. GpType: 5. + + + 64-bit floating-point value. GpType: 6. + + + String. GpType: 7. + + + Null value don't have types. GpType: 8. + + + CompressedInt. GpType: 9. + + + CompressedLong. GpType: 10. + + + Int1. GpType: 11. + + + Int1_. GpType: 12. + + + Int2. GpType: 13. + + + Int2_. GpType: 14. + + + L1. GpType: 15. + + + L1_. GpType: 16. + + + L2. GpType: 17. + + + L2_. GpType: 18. + + + Custom Type. GpType: 19. + + + Custom Type Slim. GpType: 128 (0x80) and up. + + + Dictionary. GpType: 20. + + + Hashtable. GpType: 21. + + + ObjectArray. GpType: 23. + + + OperationRequest. GpType: 24. + + + OperationResponse. GpType: 25. + + + EventData. GpType: 26. + + + Boolean False. GpType: 27. + + + Boolean True. GpType: 28. + + + ShortZero. GpType: 29. + + + IntZero. GpType: 30. + + + LongZero. GpType: 3. + + + FloatZero. GpType: 32. + + + DoubleZero. GpType: 33. + + + ByteZero. GpType: 34. + + + Array for nested Arrays. GpType: 64 (0x40). Element count and type follows. + + + + Writes integers as compressed. Either directly as zigzag-encoded or (when a type is written for this value) it can use an optimized sub-type. + + + + Enum of the three options for reliability and sequencing in Photon's reliable-UDP. + + + The operation/message gets sent just once without acknowledgement or repeat. The sequence (order) of messages is guaranteed. + + + The operation/message asks for an acknowledgment. It's resent until an ACK arrived. The sequence (order) of messages is guaranteed. + + + The operation/message gets sent once (unreliable) and might arrive out of order. Best for your own sequencing (e.g. for streams). + + + The operation/message asks for an acknowledgment. It's resent until an ACK arrived and might arrive out of order. Best for your own sequencing (e.g. for streams). + + + Wraps up DeliveryMode, Encryption and Channel values for sending operations and messages. + + + Default SendOptions instance for reliable sending. + + + Default SendOptions instance for unreliable sending. + + + Chose the DeliveryMode for this operation/message. Defaults to Unreliable. + + + If true the operation/message gets encrypted before it's sent. Defaults to false. + Before encryption can be used, it must be established. Check PhotonPeer.IsEncryptionAvailable is true. + + + The Enet channel to send in. Defaults to 0. + Channels in Photon relate to "message channels". Each channel is a sequence of messages. + + + Sets the DeliveryMode either to true: Reliable or false: Unreliable, overriding any current value. + Use this to conveniently select reliable/unreliable delivery. + + + Encapsulates the network i/o functionality for the realtime library. + + + used by PhotonPeer* + + + Endless loop, run in Receive Thread. + + + Internal class to encapsulate the network i/o functionality for the realtime libary. + + + used by PhotonPeer* + + + Encapsulates the network i/o functionality for the realtime library. + + + used by PhotonPeer* + + + Endless loop, run in Receive Thread. + + + Internal class to encapsulate the network i/o functionality for the realtime libary. + + + used by PhotonPeer* + + + + Allocates a new byte[] that is the exact used length. Use GetBuffer for nonalloc operations. + + + + + Allocates a new byte[] that is the exact used length. Use GetBuffer for nonalloc operations. + + + + + The bytes between Position and Length are copied to the beginning of the buffer. Length decreased by Position. Position set to 0. + + + + + Brings StreamBuffer to the state as after writing of 'length' bytes. Returned buffer and offset can be used to actually fill "written" segment with data. + + + + + Remaining bytes in this StreamBuffer. Returns 0 if len - pos is less than 0. + + + + + Sets stream length. If current position is greater than specified value, it's set to the value. + + + SetLength(0) resets the stream to initial state but preserves underlying byte[] buffer. + + + + + Guarantees that the buffer is at least neededSize bytes. + + + + + Contains several (more or less) useful static methods, mostly used for debugging. + + + + + Gets the local machine's "milliseconds since start" value (precision is described in remarks). + + + This method uses Environment.TickCount (cheap but with only 16ms precision). + PhotonPeer.LocalMsTimestampDelegate is available to set the delegate (unless already connected). + + Fraction of the current time in Milliseconds (this is not a proper datetime timestamp). + + + + Creates a background thread that calls the passed function in intervals, as long as that returns true. + + + With StopBackgroundCalls, you can stop threads started with this method. + The resulting ThreadAbortException is caught and discarded. + + The function to call. Must return true, if it should be called again. Returning false ends the thread. + Milliseconds to sleep between calls of myThread. Default: 100ms. + An optional name for the task to help debugging. Null or empty won't set the thread.Name. + + + + Calls Abort on the thread with the given id (= index of the thread list) + + + The resulting ThreadAbortException is caught and discarded. + + The unique ID of the thread. + True if the thread is canceled and false otherwise, e.g. if the thread with the given ID does not exist. + + + + Calls Abort on all threads that were started via StartBackgroundCalls. + + + The resulting ThreadAbortException is caught and discarded. + + True if any thread got aborted. + + + + Writes the exception's stack trace to the received stream. + + Exception to obtain information from. + Output sream used to write to. + + + + Writes the exception's stack trace to the received stream. Writes to: System.Diagnostics.Debug. + + Exception to obtain information from. + + + + This method returns a string, representing the content of the given IDictionary. + Returns "null" if parameter is null. + + IDictionary to return as string. + + + + + Converts a byte-array to string (useful as debugging output). + Uses BitConverter.ToString(list) internally after a null-check of list. + + Byte-array to convert to string. + Length of bytes to convert to string. If negative, list.Length is converted. Optional. Default: -1. + + List of bytes as string. + + + + + Class to wrap static access to the random.Next() call in a thread safe manner. + + + + + An Attribute named "Preserve" tells Unity to not strip the code. + + + + TCP "Package" header: 7 bytes + + + TCP "Message" header: 2 bytes + + + TCP header combined: 9 bytes + + + Defines if the (TCP) socket implementation needs to do "framing". + The WebSocket protocol (e.g.) includes framing, so when that is used, we set DoFraming to false. + + + + Checks the incoming queue and Dispatches received data if possible. Returns if a Dispatch happened or + not, which shows if more Dispatches might be needed. + + + + + gathers commands from all (out)queues until udp-packet is full and sends it! + + + + Sends a ping in intervals to keep connection alive (server will timeout connection if nothing is sent). + Always false in this case (local queues are ignored. true would be: "call again to send remaining data"). + + + enqueues serialized operations to be sent as tcp stream / package + + + Sends a ping and modifies this.lastPingResult to avoid another ping for a while. + + + reads incoming tcp-packages to create and queue incoming commands* + + + + Only in use as long as PhotonPeer.TrafficStatsEnabled = true; + + + + Gets sum of outgoing operations in bytes. + + + Gets count of outgoing operations. + + + Gets sum of byte-cost of incoming operation-results. + + + Gets count of incoming operation-results. + + + Gets sum of byte-cost of incoming events. + + + Gets count of incoming events. + + + + Gets longest time it took to complete a call to OnOperationResponse (in your code). + If such a callback takes long, it will lower the network performance and might lead to timeouts. + + + + Gets OperationCode that causes the LongestOpResponseCallback. See that description. + + + + Gets longest time a call to OnEvent (in your code) took. + If such a callback takes long, it will lower the network performance and might lead to timeouts. + + + + Gets EventCode that caused the LongestEventCallback. See that description. + + + + Gets longest time between subsequent calls to DispatchIncomgingCommands in milliseconds. + Note: This is not a crucial timing for the networking. Long gaps just add "local lag" to events that are available already. + + + + + Gets longest time between subsequent calls to SendOutgoingCommands in milliseconds. + Note: This is a crucial value for network stability. Without calling SendOutgoingCommands, + nothing will be sent to the server, who might time out this client. + + + + + Gets number of calls of DispatchIncomingCommands. + + + + + Gets number of calls of DispatchIncomingCommands. + + + + + Gets number of calls of SendOutgoingCommands. + + + + Gets sum of byte-cost of all "logic level" messages. + + + Gets sum of counted "logic level" messages. + + + Gets sum of byte-cost of all incoming "logic level" messages. + + + Gets sum of counted incoming "logic level" messages. + + + Gets sum of byte-cost of all outgoing "logic level" messages (= OperationByteCount). + + + Gets sum of counted outgoing "logic level" messages (= OperationCount). + + + + Resets the values that can be maxed out, like LongestDeltaBetweenDispatching. See remarks. + + + Set to 0: LongestDeltaBetweenDispatching, LongestDeltaBetweenSending, LongestEventCallback, LongestEventCallbackCode, LongestOpResponseCallback, LongestOpResponseCallbackOpCode. + Also resets internal values: timeOfLastDispatchCall and timeOfLastSendCall (so intervals are tracked correctly). + + + + Gets the byte-size of per-package headers. + + + + Counts commands created/received by this client, ignoring repeats (out command count can be higher due to repeats). + + + + Gets count of bytes as traffic, excluding UDP/TCP headers (42 bytes / x bytes). + + + Timestamp of the last incoming ACK that has been read (every PhotonPeer.TimePingInterval milliseconds this client sends a PING which must be ACKd). + + + Timestamp of last incoming reliable command (every second we expect a PING). + +
+
diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml.meta b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml.meta new file mode 100644 index 00000000..b58d8aa6 --- /dev/null +++ b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7015e500cd5b71244af56448dfb59804 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonNetworking-Documentation.chm b/Assets/Photon/PhotonNetworking-Documentation.chm new file mode 100644 index 00000000..72971dc5 Binary files /dev/null and b/Assets/Photon/PhotonNetworking-Documentation.chm differ diff --git a/Assets/Photon/PhotonNetworking-Documentation.chm.meta b/Assets/Photon/PhotonNetworking-Documentation.chm.meta new file mode 100644 index 00000000..e6fd407e --- /dev/null +++ b/Assets/Photon/PhotonNetworking-Documentation.chm.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6923098d409554f57bedd5a4fa66e3ad +timeCreated: 1527163075 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonNetworking-Documentation.pdf b/Assets/Photon/PhotonNetworking-Documentation.pdf new file mode 100644 index 00000000..b25429e2 Binary files /dev/null and b/Assets/Photon/PhotonNetworking-Documentation.pdf differ diff --git a/Assets/Photon/PhotonNetworking-Documentation.pdf.meta b/Assets/Photon/PhotonNetworking-Documentation.pdf.meta new file mode 100644 index 00000000..32343cba --- /dev/null +++ b/Assets/Photon/PhotonNetworking-Documentation.pdf.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c285a840e88d74462a18710772dc4bfb +timeCreated: 1527163075 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime.meta b/Assets/Photon/PhotonRealtime.meta new file mode 100644 index 00000000..5ddf0d6c --- /dev/null +++ b/Assets/Photon/PhotonRealtime.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b54c221855bde4a4ba511877e7b6b904 +folderAsset: yes +timeCreated: 1505899913 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code.meta b/Assets/Photon/PhotonRealtime/Code.meta new file mode 100644 index 00000000..fe279808 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 028784b24103cfd46a9d2eadba4c285f +folderAsset: yes +timeCreated: 1523525776 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/AppSettings.cs b/Assets/Photon/PhotonRealtime/Code/AppSettings.cs new file mode 100644 index 00000000..9cf874db --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/AppSettings.cs @@ -0,0 +1,198 @@ +// ----------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// Settings for Photon application(s) and the server to connect to. +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_2017_4_OR_NEWER +#define SUPPORTED_UNITY +#endif + +namespace Photon.Realtime +{ + using System; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// Settings for Photon application(s) and the server to connect to. + /// + /// + /// This is Serializable for Unity, so it can be included in ScriptableObject instances. + /// + #if !NETFX_CORE || SUPPORTED_UNITY + [Serializable] + #endif + public class AppSettings + { + /// AppId for Realtime or PUN. + public string AppIdRealtime; + + /// AppId for Photon Fusion. + public string AppIdFusion; + + /// AppId for Photon Chat. + public string AppIdChat; + + /// AppId for Photon Voice. + public string AppIdVoice; + + /// The AppVersion can be used to identify builds and will split the AppId distinct "Virtual AppIds" (important for matchmaking). + public string AppVersion; + + + /// If false, the app will attempt to connect to a Master Server (which is obsolete but sometimes still necessary). + /// if true, Server points to a NameServer (or is null, using the default), else it points to a MasterServer. + public bool UseNameServer = true; + + /// Can be set to any of the Photon Cloud's region names to directly connect to that region. + /// if this IsNullOrEmpty() AND UseNameServer == true, use BestRegion. else, use a server + public string FixedRegion; + + /// Set to a previous BestRegionSummary value before connecting. + /// + /// This is a value used when the client connects to the "Best Region".
+ /// If this is null or empty, all regions gets pinged. Providing a previous summary on connect, + /// speeds up best region selection and makes the previously selected region "sticky".
+ /// + /// Unity clients should store the BestRegionSummary in the PlayerPrefs. + /// You can store the new result by implementing . + /// If is not null, store this string. + /// To avoid storing the value multiple times, you could set SummaryToCache to null. + ///
+ #if SUPPORTED_UNITY + [NonSerialized] + #endif + public string BestRegionSummaryFromStorage; + + /// The address (hostname or IP) of the server to connect to. + public string Server; + + /// If not null, this sets the port of the first Photon server to connect to (that will "forward" the client as needed). + public int Port; + + /// The address (hostname or IP and port) of the proxy server. + public string ProxyServer; + + /// The network level protocol to use. + public ConnectionProtocol Protocol = ConnectionProtocol.Udp; + + /// Enables a fallback to another protocol in case a connect to the Name Server fails. + /// See: LoadBalancingClient.EnableProtocolFallback. + public bool EnableProtocolFallback = true; + + /// Defines how authentication is done. On each system, once or once via a WSS connection (safe). + public AuthModeOption AuthMode = AuthModeOption.Auth; + + /// If true, the client will request the list of currently available lobbies. + public bool EnableLobbyStatistics; + + /// Log level for the network lib. + public DebugLevel NetworkLogging = DebugLevel.ERROR; + + /// If true, the Server field contains a Master Server address (if any address at all). + public bool IsMasterServerAddress + { + get { return !this.UseNameServer; } + } + + /// If true, the client should fetch the region list from the Name Server and find the one with best ping. + /// See "Best Region" in the online docs. + public bool IsBestRegion + { + get { return this.UseNameServer && string.IsNullOrEmpty(this.FixedRegion); } + } + + /// If true, the default nameserver address for the Photon Cloud should be used. + public bool IsDefaultNameServer + { + get { return this.UseNameServer && string.IsNullOrEmpty(this.Server); } + } + + /// If true, the default ports for a protocol will be used. + public bool IsDefaultPort + { + get { return this.Port <= 0; } + } + + /// ToString but with more details. + public string ToStringFull() + { + return string.Format( + "appId {0}{1}{2}{3}" + + "use ns: {4}, reg: {5}, {9}, " + + "{6}{7}{8}" + + "auth: {10}", + String.IsNullOrEmpty(this.AppIdRealtime) ? string.Empty : "Realtime/PUN: " + this.HideAppId(this.AppIdRealtime) + ", ", + String.IsNullOrEmpty(this.AppIdFusion) ? string.Empty : "Fusion: " + this.HideAppId(this.AppIdFusion) + ", ", + String.IsNullOrEmpty(this.AppIdChat) ? string.Empty : "Chat: " + this.HideAppId(this.AppIdChat) + ", ", + String.IsNullOrEmpty(this.AppIdVoice) ? string.Empty : "Voice: " + this.HideAppId(this.AppIdVoice) + ", ", + String.IsNullOrEmpty(this.AppVersion) ? string.Empty : "AppVersion: " + this.AppVersion + ", ", + "UseNameServer: " + this.UseNameServer + ", ", + "Fixed Region: " + this.FixedRegion + ", ", + //this.BestRegionSummaryFromStorage, + String.IsNullOrEmpty(this.Server) ? string.Empty : "Server: " + this.Server + ", ", + this.IsDefaultPort ? string.Empty : "Port: " + this.Port + ", ", + String.IsNullOrEmpty(ProxyServer) ? string.Empty : "Proxy: " + this.ProxyServer + ", ", + this.Protocol, + this.AuthMode + //this.EnableLobbyStatistics, + //this.NetworkLogging, + ); + } + + + /// Checks if a string is a Guid by attempting to create one. + /// The potential guid to check. + /// True if new Guid(val) did not fail. + public static bool IsAppId(string val) + { + try + { + new Guid(val); + } + catch + { + return false; + } + + return true; + } + + + private string HideAppId(string appId) + { + return string.IsNullOrEmpty(appId) || appId.Length < 8 + ? appId + : string.Concat(appId.Substring(0, 8), "***"); + } + + public AppSettings CopyTo(AppSettings d) + { + d.AppIdRealtime = this.AppIdRealtime; + d.AppIdFusion = this.AppIdFusion; + d.AppIdChat = this.AppIdChat; + d.AppIdVoice = this.AppIdVoice; + d.AppVersion = this.AppVersion; + d.UseNameServer = this.UseNameServer; + d.FixedRegion = this.FixedRegion; + d.BestRegionSummaryFromStorage = this.BestRegionSummaryFromStorage; + d.Server = this.Server; + d.Port = this.Port; + d.ProxyServer = this.ProxyServer; + d.Protocol = this.Protocol; + d.AuthMode = this.AuthMode; + d.EnableLobbyStatistics = this.EnableLobbyStatistics; + d.NetworkLogging = this.NetworkLogging; + d.EnableProtocolFallback = this.EnableProtocolFallback; + return d; + } + } +} diff --git a/Assets/Photon/PhotonRealtime/Code/AppSettings.cs.meta b/Assets/Photon/PhotonRealtime/Code/AppSettings.cs.meta new file mode 100644 index 00000000..ab5e5c1d --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/AppSettings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 272beb7315eb9fc4daecafe2ff373baf +timeCreated: 1521804700 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/ConnectionHandler.cs b/Assets/Photon/PhotonRealtime/Code/ConnectionHandler.cs new file mode 100644 index 00000000..8a535760 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/ConnectionHandler.cs @@ -0,0 +1,199 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// If the game logic does not call Service() for whatever reason, this keeps the connection. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System; + using System.Diagnostics; + using SupportClass = ExitGames.Client.Photon.SupportClass; + + #if SUPPORTED_UNITY + using UnityEngine; + #endif + + + #if SUPPORTED_UNITY + public class ConnectionHandler : MonoBehaviour + #else + public class ConnectionHandler + #endif + { + /// + /// Photon client to log information and statistics from. + /// + public LoadBalancingClient Client { get; set; } + + /// Option to let the fallback thread call Disconnect after the KeepAliveInBackground time. Default: false. + /// + /// If set to true, the thread will disconnect the client regularly, should the client not call SendOutgoingCommands / Service. + /// This may happen due to an app being in background (and not getting a lot of CPU time) or when loading assets. + /// + /// If false, a regular timeout time will have to pass (on top) to time out the client. + /// + public bool DisconnectAfterKeepAlive = false; + + /// Defines for how long the Fallback Thread should keep the connection, before it may time out as usual. + /// We want to the Client to keep it's connection when an app is in the background (and doesn't call Update / Service Clients should not keep their connection indefinitely in the background, so after some milliseconds, the Fallback Thread should stop keeping it up. + public int KeepAliveInBackground = 60000; + + /// Counts how often the Fallback Thread called SendAcksOnly, which is purely of interest to monitor if the game logic called SendOutgoingCommands as intended. + public int CountSendAcksOnly { get; private set; } + + /// True if a fallback thread is running. Will call the client's SendAcksOnly() method to keep the connection up. + public bool FallbackThreadRunning + { + get { return this.fallbackThreadId < 255; } + } + + /// Keeps the ConnectionHandler, even if a new scene gets loaded. + public bool ApplyDontDestroyOnLoad = true; + + /// Indicates that the app is closing. Set in OnApplicationQuit(). + [NonSerialized] + public static bool AppQuits; + + + private byte fallbackThreadId = 255; + private bool didSendAcks; + private readonly Stopwatch backgroundStopwatch = new Stopwatch(); + + + #if SUPPORTED_UNITY + + #if UNITY_2019_4_OR_NEWER + + /// + /// Resets statics for Domain Reload + /// + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] + static void StaticReset() + { + AppQuits = false; + } + + #endif + + + /// Called by Unity when the application gets closed. The UnityEngine will also call OnDisable, which disconnects. + protected void OnApplicationQuit() + { + AppQuits = true; + } + + + /// + protected virtual void Awake() + { + if (this.ApplyDontDestroyOnLoad) + { + DontDestroyOnLoad(this.gameObject); + } + } + + /// Called by Unity when the application gets closed. Disconnects if OnApplicationQuit() was called before. + protected virtual void OnDisable() + { + this.StopFallbackSendAckThread(); + + if (AppQuits) + { + if (this.Client != null && this.Client.IsConnected) + { + this.Client.Disconnect(DisconnectCause.ApplicationQuit); + this.Client.LoadBalancingPeer.StopThread(); + } + + SupportClass.StopAllBackgroundCalls(); + } + } + + #endif + + + public void StartFallbackSendAckThread() + { + #if !UNITY_WEBGL + if (this.FallbackThreadRunning) + { + return; + } + + #if UNITY_SWITCH + this.fallbackThreadId = SupportClass.StartBackgroundCalls(this.RealtimeFallbackThread, 50); // as workaround, we don't name the Thread. + #else + this.fallbackThreadId = SupportClass.StartBackgroundCalls(this.RealtimeFallbackThread, 50, "RealtimeFallbackThread"); + #endif + #endif + } + + public void StopFallbackSendAckThread() + { + #if !UNITY_WEBGL + if (!this.FallbackThreadRunning) + { + return; + } + + SupportClass.StopBackgroundCalls(this.fallbackThreadId); + this.fallbackThreadId = 255; + #endif + } + + + /// A thread which runs independent from the Update() calls. Keeps connections online while loading or in background. See . + public bool RealtimeFallbackThread() + { + if (this.Client != null) + { + if (!this.Client.IsConnected) + { + this.didSendAcks = false; + return true; + } + + if (this.Client.LoadBalancingPeer.ConnectionTime - this.Client.LoadBalancingPeer.LastSendOutgoingTime > 100) + { + if (!this.didSendAcks) + { + backgroundStopwatch.Reset(); + backgroundStopwatch.Start(); + } + + // check if the client should disconnect after some seconds in background + if (backgroundStopwatch.ElapsedMilliseconds > this.KeepAliveInBackground) + { + if (this.DisconnectAfterKeepAlive) + { + this.Client.Disconnect(); + } + return true; + } + + + this.didSendAcks = true; + this.CountSendAcksOnly++; + this.Client.LoadBalancingPeer.SendAcksOnly(); + } + else + { + this.didSendAcks = false; + } + } + + return true; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/ConnectionHandler.cs.meta b/Assets/Photon/PhotonRealtime/Code/ConnectionHandler.cs.meta new file mode 100644 index 00000000..961a59c3 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/ConnectionHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f0b3ce6748186d3468e0dbaecb38b04c +timeCreated: 1527243846 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/CustomTypesUnity.cs b/Assets/Photon/PhotonRealtime/Code/CustomTypesUnity.cs new file mode 100644 index 00000000..fafdb352 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/CustomTypesUnity.cs @@ -0,0 +1,167 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Sets up support for Unity-specific types. Can be a blueprint how to register your own Custom Types for sending. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + +#if SUPPORTED_UNITY +namespace Photon.Realtime +{ + using Photon.Realtime; + using ExitGames.Client.Photon; + using UnityEngine; + using Debug = UnityEngine.Debug; + + + /// + /// Internally used class, containing de/serialization methods for various Unity-specific classes. + /// Adding those to the Photon serialization protocol allows you to send them in events, etc. + /// + internal static class CustomTypesUnity + { + private const int SizeV2 = 2 * 4; + private const int SizeV3 = 3 * 4; + private const int SizeQuat = 4 * 4; + + + /// Register de/serializer methods for Unity specific types. Makes the types usable in RaiseEvent and PUN. + internal static void Register() + { + PhotonPeer.RegisterType(typeof(Vector2), (byte) 'W', SerializeVector2, DeserializeVector2); + PhotonPeer.RegisterType(typeof(Vector3), (byte) 'V', SerializeVector3, DeserializeVector3); + PhotonPeer.RegisterType(typeof(Quaternion), (byte) 'Q', SerializeQuaternion, DeserializeQuaternion); + } + + + #region Custom De/Serializer Methods + + public static readonly byte[] memVector3 = new byte[SizeV3]; + + private static short SerializeVector3(StreamBuffer outStream, object customobject) + { + Vector3 vo = (Vector3) customobject; + + int index = 0; + lock (memVector3) + { + byte[] bytes = memVector3; + Protocol.Serialize(vo.x, bytes, ref index); + Protocol.Serialize(vo.y, bytes, ref index); + Protocol.Serialize(vo.z, bytes, ref index); + outStream.Write(bytes, 0, SizeV3); + } + + return SizeV3; + } + + private static object DeserializeVector3(StreamBuffer inStream, short length) + { + Vector3 vo = new Vector3(); + if (length != SizeV3) + { + return vo; + } + + lock (memVector3) + { + inStream.Read(memVector3, 0, SizeV3); + int index = 0; + Protocol.Deserialize(out vo.x, memVector3, ref index); + Protocol.Deserialize(out vo.y, memVector3, ref index); + Protocol.Deserialize(out vo.z, memVector3, ref index); + } + + return vo; + } + + + public static readonly byte[] memVector2 = new byte[SizeV2]; + + private static short SerializeVector2(StreamBuffer outStream, object customobject) + { + Vector2 vo = (Vector2) customobject; + lock (memVector2) + { + byte[] bytes = memVector2; + int index = 0; + Protocol.Serialize(vo.x, bytes, ref index); + Protocol.Serialize(vo.y, bytes, ref index); + outStream.Write(bytes, 0, SizeV2); + } + + return SizeV2; + } + + private static object DeserializeVector2(StreamBuffer inStream, short length) + { + Vector2 vo = new Vector2(); + if (length != SizeV2) + { + return vo; + } + + lock (memVector2) + { + inStream.Read(memVector2, 0, SizeV2); + int index = 0; + Protocol.Deserialize(out vo.x, memVector2, ref index); + Protocol.Deserialize(out vo.y, memVector2, ref index); + } + + return vo; + } + + + public static readonly byte[] memQuarternion = new byte[SizeQuat]; + + private static short SerializeQuaternion(StreamBuffer outStream, object customobject) + { + Quaternion o = (Quaternion) customobject; + + lock (memQuarternion) + { + byte[] bytes = memQuarternion; + int index = 0; + Protocol.Serialize(o.w, bytes, ref index); + Protocol.Serialize(o.x, bytes, ref index); + Protocol.Serialize(o.y, bytes, ref index); + Protocol.Serialize(o.z, bytes, ref index); + outStream.Write(bytes, 0, SizeQuat); + } + + return 4 * 4; + } + + private static object DeserializeQuaternion(StreamBuffer inStream, short length) + { + Quaternion o = Quaternion.identity; + if (length != SizeQuat) + { + return o; + } + + lock (memQuarternion) + { + inStream.Read(memQuarternion, 0, SizeQuat); + int index = 0; + Protocol.Deserialize(out o.w, memQuarternion, ref index); + Protocol.Deserialize(out o.x, memQuarternion, ref index); + Protocol.Deserialize(out o.y, memQuarternion, ref index); + Protocol.Deserialize(out o.z, memQuarternion, ref index); + } + + return o; + } + + #endregion + } +} +#endif \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/CustomTypesUnity.cs.meta b/Assets/Photon/PhotonRealtime/Code/CustomTypesUnity.cs.meta new file mode 100644 index 00000000..660c3f07 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/CustomTypesUnity.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c41ee868d8540674982e160cf16e0775 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/Extensions.cs b/Assets/Photon/PhotonRealtime/Code/Extensions.cs new file mode 100644 index 00000000..3c7a531f --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Extensions.cs @@ -0,0 +1,269 @@ +// ---------------------------------------------------------------------------- +// +// Photon Extensions - Copyright (C) 2018 Exit Games GmbH +// +// +// Provides some helpful methods and extensions for Hashtables, etc. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System.Collections; + using System.Collections.Generic; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY + using UnityEngine; + using Debug = UnityEngine.Debug; + #endif + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// This static class defines some useful extension methods for several existing classes (e.g. Vector3, float and others). + /// + public static class Extensions + { + /// + /// Merges all keys from addHash into the target. Adds new keys and updates the values of existing keys in target. + /// + /// The IDictionary to update. + /// The IDictionary containing data to merge into target. + public static void Merge(this IDictionary target, IDictionary addHash) + { + if (addHash == null || target.Equals(addHash)) + { + return; + } + + foreach (object key in addHash.Keys) + { + target[key] = addHash[key]; + } + } + + /// + /// Merges keys of type string to target Hashtable. + /// + /// + /// Does not remove keys from target (so non-string keys CAN be in target if they were before). + /// + /// The target IDictionary passed in plus all string-typed keys from the addHash. + /// A IDictionary that should be merged partly into target to update it. + public static void MergeStringKeys(this IDictionary target, IDictionary addHash) + { + if (addHash == null || target.Equals(addHash)) + { + return; + } + + foreach (object key in addHash.Keys) + { + // only merge keys of type string + if (key is string) + { + target[key] = addHash[key]; + } + } + } + + /// Helper method for debugging of IDictionary content, including type-information. Using this is not performant. + /// Should only be used for debugging as necessary. + /// Some Dictionary or Hashtable. + /// String of the content of the IDictionary. + public static string ToStringFull(this IDictionary origin) + { + return SupportClass.DictionaryToString(origin, false); + } + + /// Helper method for debugging of List content. Using this is not performant. + /// Should only be used for debugging as necessary. + /// Any List where T implements .ToString(). + /// A comma-separated string containing each value's ToString(). + public static string ToStringFull(this List data) + { + if (data == null) return "null"; + + string[] sb = new string[data.Count]; + for (int i = 0; i < data.Count; i++) + { + object o = data[i]; + sb[i] = (o != null) ? o.ToString() : "null"; + } + + return string.Join(", ", sb); + } + + /// Helper method for debugging of object[] content. Using this is not performant. + /// Should only be used for debugging as necessary. + /// Any object[]. + /// A comma-separated string containing each value's ToString(). + public static string ToStringFull(this object[] data) + { + if (data == null) return "null"; + + string[] sb = new string[data.Length]; + for (int i = 0; i < data.Length; i++) + { + object o = data[i]; + sb[i] = (o != null) ? o.ToString() : "null"; + } + + return string.Join(", ", sb); + } + + + /// + /// This method copies all string-typed keys of the original into a new Hashtable. + /// + /// + /// Does not recurse (!) into hashes that might be values in the root-hash. + /// This does not modify the original. + /// + /// The original IDictonary to get string-typed keys from. + /// New Hashtable containing only string-typed keys of the original. + public static Hashtable StripToStringKeys(this IDictionary original) + { + Hashtable target = new Hashtable(); + if (original != null) + { + foreach (object key in original.Keys) + { + if (key is string) + { + target[key] = original[key]; + } + } + } + + return target; + } + + /// + /// This method copies all string-typed keys of the original into a new Hashtable. + /// + /// + /// Does not recurse (!) into hashes that might be values in the root-hash. + /// This does not modify the original. + /// + /// The original IDictonary to get string-typed keys from. + /// New Hashtable containing only string-typed keys of the original. + public static Hashtable StripToStringKeys(this Hashtable original) + { + Hashtable target = new Hashtable(); + if (original != null) + { + foreach (DictionaryEntry entry in original) + { + if (entry.Key is string) + { + target[entry.Key] = original[entry.Key]; + } + } + } + + return target; + } + + + /// Used by StripKeysWithNullValues. + /// + /// By making keysWithNullValue a static variable to clear before using, allocations only happen during the warm-up phase + /// as the list needs to grow. Once it hit the high water mark for keys you need to remove. + /// + private static readonly List keysWithNullValue = new List(); + + /// Removes all keys with null values. + /// + /// Photon properties are removed by setting their value to null. Changes the original IDictionary! + /// Uses lock(keysWithNullValue), which should be no problem in expected use cases. + /// + /// The IDictionary to strip of keys with null value. + public static void StripKeysWithNullValues(this IDictionary original) + { + lock (keysWithNullValue) + { + keysWithNullValue.Clear(); + + foreach (DictionaryEntry entry in original) + { + if (entry.Value == null) + { + keysWithNullValue.Add(entry.Key); + } + } + + for (int i = 0; i < keysWithNullValue.Count; i++) + { + var key = keysWithNullValue[i]; + original.Remove(key); + } + } + } + + /// Removes all keys with null values. + /// + /// Photon properties are removed by setting their value to null. Changes the original IDictionary! + /// Uses lock(keysWithNullValue), which should be no problem in expected use cases. + /// + /// The IDictionary to strip of keys with null value. + public static void StripKeysWithNullValues(this Hashtable original) + { + lock (keysWithNullValue) + { + keysWithNullValue.Clear(); + + foreach (DictionaryEntry entry in original) + { + if (entry.Value == null) + { + keysWithNullValue.Add(entry.Key); + } + } + + for (int i = 0; i < keysWithNullValue.Count; i++) + { + var key = keysWithNullValue[i]; + original.Remove(key); + } + } + } + + + /// + /// Checks if a particular integer value is in an int-array. + /// + /// This might be useful to look up if a particular actorNumber is in the list of players of a room. + /// The array of ints to check. + /// The number to lookup in target. + /// True if nr was found in target. + public static bool Contains(this int[] target, int nr) + { + if (target == null) + { + return false; + } + + for (int index = 0; index < target.Length; index++) + { + if (target[index] == nr) + { + return true; + } + } + + return false; + } + } +} + diff --git a/Assets/Photon/PhotonRealtime/Code/Extensions.cs.meta b/Assets/Photon/PhotonRealtime/Code/Extensions.cs.meta new file mode 100644 index 00000000..2025f005 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Extensions.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3c0464991e33a70498abdd85c150cc59 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/FriendInfo.cs b/Assets/Photon/PhotonRealtime/Code/FriendInfo.cs new file mode 100644 index 00000000..378e9201 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/FriendInfo.cs @@ -0,0 +1,48 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// Collection of values related to a user / friend. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// Used to store info about a friend's online state and in which room he/she is. + /// + public class FriendInfo + { + [System.Obsolete("Use UserId.")] + public string Name { get { return this.UserId; } } + public string UserId { get; internal protected set; } + + public bool IsOnline { get; internal protected set; } + public string Room { get; internal protected set; } + + public bool IsInRoom + { + get { return this.IsOnline && !string.IsNullOrEmpty(this.Room); } + } + + public override string ToString() + { + return string.Format("{0}\t is: {1}", this.UserId, (!this.IsOnline) ? "offline" : this.IsInRoom ? "playing" : "on master"); + } + } +} diff --git a/Assets/Photon/PhotonRealtime/Code/FriendInfo.cs.meta b/Assets/Photon/PhotonRealtime/Code/FriendInfo.cs.meta new file mode 100644 index 00000000..b810efc6 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/FriendInfo.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 94ba1138c322ea04c8c37cfbcf87f468 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs b/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs new file mode 100644 index 00000000..0ec77f89 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs @@ -0,0 +1,4469 @@ +// ----------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// Provides the operations and a state for games using the +// Photon LoadBalancing server. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Diagnostics; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY + using UnityEngine; + using Debug = UnityEngine.Debug; + #endif + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + #region Enums + + /// + /// State values for a client, which handles switching Photon server types, some operations, etc. + /// + /// \ingroup publicApi + public enum ClientState + { + /// Peer is created but not used yet. + PeerCreated, + + /// Transition state while connecting to a server. On the Photon Cloud this sends the AppId and AuthenticationValues (UserID). + Authenticating, + + /// Not Used. + Authenticated, + + /// The client sent an OpJoinLobby and if this was done on the Master Server, it will result in. Depending on the lobby, it gets room listings. + JoiningLobby, + + /// The client is in a lobby, connected to the MasterServer. Depending on the lobby, it gets room listings. + JoinedLobby, + + /// Transition from MasterServer to GameServer. + DisconnectingFromMasterServer, + [Obsolete("Renamed to DisconnectingFromMasterServer")] + DisconnectingFromMasterserver = DisconnectingFromMasterServer, + + /// Transition to GameServer (client authenticates and joins/creates a room). + ConnectingToGameServer, + [Obsolete("Renamed to ConnectingToGameServer")] + ConnectingToGameserver = ConnectingToGameServer, + + /// Connected to GameServer (going to auth and join game). + ConnectedToGameServer, + [Obsolete("Renamed to ConnectedToGameServer")] + ConnectedToGameserver = ConnectedToGameServer, + + /// Transition state while joining or creating a room on GameServer. + Joining, + + /// The client entered a room. The CurrentRoom and Players are known and you can now raise events. + Joined, + + /// Transition state when leaving a room. + Leaving, + + /// Transition from GameServer to MasterServer (after leaving a room/game). + DisconnectingFromGameServer, + [Obsolete("Renamed to DisconnectingFromGameServer")] + DisconnectingFromGameserver = DisconnectingFromGameServer, + + /// Connecting to MasterServer (includes sending authentication values). + ConnectingToMasterServer, + [Obsolete("Renamed to ConnectingToMasterServer.")] + ConnectingToMasterserver = ConnectingToMasterServer, + + /// The client disconnects (from any server). This leads to state Disconnected. + Disconnecting, + + /// The client is no longer connected (to any server). Connect to MasterServer to go on. + Disconnected, + + /// Connected to MasterServer. You might use matchmaking or join a lobby now. + ConnectedToMasterServer, + [Obsolete("Renamed to ConnectedToMasterServer.")] + ConnectedToMasterserver = ConnectedToMasterServer, + [Obsolete("Renamed to ConnectedToMasterServer.")] + ConnectedToMaster = ConnectedToMasterServer, + + /// Client connects to the NameServer. This process includes low level connecting and setting up encryption. When done, state becomes ConnectedToNameServer. + ConnectingToNameServer, + + /// Client is connected to the NameServer and established encryption already. You should call OpGetRegions or ConnectToRegionMaster. + ConnectedToNameServer, + + /// Clients disconnects (specifically) from the NameServer (usually to connect to the MasterServer). + DisconnectingFromNameServer, + + /// Client was unable to connect to Name Server and will attempt to connect with an alternative network protocol (TCP). + ConnectWithFallbackProtocol + } + + + /// + /// Internal state, how this peer gets into a particular room (joining it or creating it). + /// + internal enum JoinType + { + /// This client creates a room, gets into it (no need to join) and can set room properties. + CreateRoom, + /// The room existed already and we join into it (not setting room properties). + JoinRoom, + /// Done on Master Server and (if successful) followed by a Join on Game Server. + JoinRandomRoom, + /// Done on Master Server and (if successful) followed by a Join or Create on Game Server. + JoinRandomOrCreateRoom, + /// Client is either joining or creating a room. On Master- and Game-Server. + JoinOrCreateRoom + } + + /// Enumeration of causes for Disconnects (used in LoadBalancingClient.DisconnectedCause). + /// Read the individual descriptions to find out what to do about this type of disconnect. + public enum DisconnectCause + { + /// No error was tracked. + None, + + /// OnStatusChanged: The server is not available or the address is wrong. Make sure the port is provided and the server is up. + ExceptionOnConnect, + + /// OnStatusChanged: Dns resolution for a hostname failed. The exception for this is being caught and logged with error level. + DnsExceptionOnConnect, + + /// OnStatusChanged: The server address was parsed as IPv4 illegally. An illegal address would be e.g. 192.168.1.300. IPAddress.TryParse() will let this pass but our check won't. + ServerAddressInvalid, + + /// OnStatusChanged: Some internal exception caused the socket code to fail. This may happen if you attempt to connect locally but the server is not available. In doubt: Contact Exit Games. + Exception, + + /// OnStatusChanged: The server disconnected this client due to timing out (missing acknowledgement from the client). + ServerTimeout, + + /// OnStatusChanged: This client detected that the server's responses are not received in due time. + ClientTimeout, + + /// OnStatusChanged: The server disconnected this client from within the room's logic (the C# code). + DisconnectByServerLogic, + + /// OnStatusChanged: The server disconnected this client for unknown reasons. + DisconnectByServerReasonUnknown, + + /// OnOperationResponse: Authenticate in the Photon Cloud with invalid AppId. Update your subscription or contact Exit Games. + InvalidAuthentication, + + /// OnOperationResponse: Authenticate in the Photon Cloud with invalid client values or custom authentication setup in Cloud Dashboard. + CustomAuthenticationFailed, + + /// The authentication ticket should provide access to any Photon Cloud server without doing another authentication-service call. However, the ticket expired. + AuthenticationTicketExpired, + + /// OnOperationResponse: Authenticate (temporarily) failed when using a Photon Cloud subscription without CCU Burst. Update your subscription. + MaxCcuReached, + + /// OnOperationResponse: Authenticate when the app's Photon Cloud subscription is locked to some (other) region(s). Update your subscription or master server address. + InvalidRegion, + + /// OnOperationResponse: Operation that's (currently) not available for this client (not authorized usually). Only tracked for op Authenticate. + OperationNotAllowedInCurrentState, + + /// OnStatusChanged: The client disconnected from within the logic (the C# code). + DisconnectByClientLogic, + + /// The client called an operation too frequently and got disconnected due to hitting the OperationLimit. This triggers a client-side disconnect, too. + /// To protect the server, some operations have a limit. When an OperationResponse fails with ErrorCode.OperationLimitReached, the client disconnects. + DisconnectByOperationLimit, + + /// The client received a "Disconnect Message" from the server. Check the debug logs for details. + DisconnectByDisconnectMessage, + + /// Used in case the application quits. Can be useful to not load new scenes or re-connect in OnDisconnected. + /// ConnectionHandler.OnDisable() will use this, if the Unity engine already called OnApplicationQuit (ConnectionHandler.AppQuits = true). + ApplicationQuit + } + + /// Available server (types) for internally used field: server. + /// Photon uses 3 different roles of servers: Name Server, Master Server and Game Server. + public enum ServerConnection + { + /// This server is where matchmaking gets done and where clients can get lists of rooms in lobbies. + MasterServer, + /// This server handles a number of rooms to execute and relay the messages between players (in a room). + GameServer, + /// This server is used initially to get the address (IP) of a Master Server for a specific region. Not used for Photon OnPremise (self hosted). + NameServer + } + + /// Defines which sort of app the LoadBalancingClient is used for: Realtime or Voice. + public enum ClientAppType + { + /// Realtime apps are for gaming / interaction. Also used by PUN 2. + Realtime, + /// Voice apps stream audio. + Voice, + /// Fusion clients are for matchmaking and relay in Photon Fusion. + Fusion + } + + /// + /// Defines how the communication gets encrypted. + /// + public enum EncryptionMode + { + /// + /// This is the default encryption mode: Messages get encrypted only on demand (when you send operations with the "encrypt" parameter set to true). + /// + PayloadEncryption, + /// + /// With this encryption mode for UDP, the connection gets setup and all further datagrams get encrypted almost entirely. On-demand message encryption (like in PayloadEncryption) is unavailable. + /// + DatagramEncryption = 10, + /// + /// With this encryption mode for UDP, the connection gets setup with random sequence numbers and all further datagrams get encrypted almost entirely. On-demand message encryption (like in PayloadEncryption) is unavailable. + /// + DatagramEncryptionRandomSequence = 11, + ///// + ///// Same as above except that GCM mode is used to encrypt data. + ///// + //DatagramEncryptionGCMRandomSequence = 12, + /// + /// Datagram Encryption with GCM. + /// + DatagramEncryptionGCM = 13, + } + + /// Container for port definitions. + public struct PhotonPortDefinition + { + public static readonly PhotonPortDefinition AlternativeUdpPorts = new PhotonPortDefinition() { NameServerPort = 27000, MasterServerPort = 27001, GameServerPort = 27002}; + + /// Typical ports: UDP: 5058 or 27000, TCP: 4533, WSS: 19093 or 443. + public ushort NameServerPort; + /// Typical ports: UDP: 5056 or 27002, TCP: 4530, WSS: 19090 or 443. + public ushort MasterServerPort; + /// Typical ports: UDP: 5055 or 27001, TCP: 4531, WSS: 19091 or 443. + public ushort GameServerPort; + } + + + #endregion + + + /// + /// This class implements the Photon LoadBalancing workflow by using a LoadBalancingPeer. + /// It keeps a state and will automatically execute transitions between the Master and Game Servers. + /// + /// + /// This class (and the Player class) should be extended to implement your own game logic. + /// You can override CreatePlayer as "factory" method for Players and return your own Player instances. + /// The State of this class is essential to know when a client is in a lobby (or just on the master) + /// and when in a game where the actual gameplay should take place. + /// Extension notes: + /// An extension of this class should override the methods of the IPhotonPeerListener, as they + /// are called when the state changes. Call base.method first, then pick the operation or state you + /// want to react to and put it in a switch-case. + /// We try to provide demo to each platform where this api can be used, so lookout for those. + /// + public class LoadBalancingClient : IPhotonPeerListener + { + /// + /// The client uses a LoadBalancingPeer as API to communicate with the server. + /// This is public for ease-of-use: Some methods like OpRaiseEvent are not relevant for the connection state and don't need a override. + /// + public LoadBalancingPeer LoadBalancingPeer { get; private set; } + + /// + /// Gets or sets the binary protocol version used by this client + /// + /// + /// Use this always instead of setting it via + /// () directly, especially when WSS protocol is used. + /// + public SerializationProtocol SerializationProtocol + { + get + { + return this.LoadBalancingPeer.SerializationProtocolType; + } + set + { + this.LoadBalancingPeer.SerializationProtocolType = value; + } + } + + /// The version of your client. A new version also creates a new "virtual app" to separate players from older client versions. + public string AppVersion { get; set; } + + /// The AppID as assigned from the Photon Cloud. If you host yourself, this is the "regular" Photon Server Application Name (most likely: "LoadBalancing"). + public string AppId { get; set; } + + /// The ClientAppType defines which sort of AppId should be expected. The LoadBalancingClient supports Realtime and Voice app types. Default: Realtime. + public ClientAppType ClientType { get; set; } + + /// User authentication values to be sent to the Photon server right after connecting. + /// Set this property or pass AuthenticationValues by Connect(..., authValues). + public AuthenticationValues AuthValues { get; set; } + + /// Enables the new Authentication workflow. + public AuthModeOption AuthMode = AuthModeOption.Auth; + + /// Defines how the communication gets encrypted. + public EncryptionMode EncryptionMode = EncryptionMode.PayloadEncryption; + + /// Optionally contains a protocol which will be used on Master- and GameServer. + /// + /// When using AuthMode = AuthModeOption.AuthOnceWss, the client uses a wss-connection on the NameServer but another protocol on the other servers. + /// As the NameServer sends an address, which is different per protocol, it needs to know the expected protocol. + /// + /// This is nullable by design. In many cases, the protocol on the NameServer is not different from the other servers. + /// If set, the operation AuthOnce will contain this value and the OpAuth response on the NameServer will execute a protocol switch. + /// + public ConnectionProtocol? ExpectedProtocol { get; set; } + + + ///Simplifies getting the token for connect/init requests, if this feature is enabled. + private object TokenForInit + { + get + { + if (this.AuthMode == AuthModeOption.Auth) + { + return null; + } + return (this.AuthValues != null) ? this.AuthValues.Token : null; + } + } + + /// Internally used cache for the server's token. Identifies a user/session and can be used to rejoin. + private object tokenCache; + + + /// True if this client uses a NameServer to get the Master Server address. + /// This value is public, despite being an internal value, which should only be set by this client. + public bool IsUsingNameServer { get; set; } + + /// Name Server Host Name for Photon Cloud. Without port and without any prefix. + public string NameServerHost = "ns.photonengine.io"; + + /// Name Server Address for Photon Cloud (based on current protocol). You can use the default values and usually won't have to set this value. + public string NameServerAddress { get { return this.GetNameServerAddress(); } } + + /// Name Server port per protocol (the UDP port is different than TCP, etc). + private static readonly Dictionary ProtocolToNameServerPort = new Dictionary() { { ConnectionProtocol.Udp, 5058 }, { ConnectionProtocol.Tcp, 4533 }, { ConnectionProtocol.WebSocket, 9093 }, { ConnectionProtocol.WebSocketSecure, 19093 } }; //, { ConnectionProtocol.RHttp, 6063 } }; + + + /// Replaced by ServerPortOverrides. + [Obsolete("Set port overrides in ServerPortOverrides. Not used anymore!")] + public bool UseAlternativeUdpPorts { get; set; } + + + /// Defines overrides for server ports. Used per server-type if > 0. Important: You must change these when the protocol changes! + /// + /// Typical ports are listed in PhotonPortDefinition. + /// + /// Instead of using the port provided from the servers, the specified port is used (independent of the protocol). + /// If a value is 0 (default), the port is not being replaced. + /// + /// Different protocols have different typical ports per server-type. + /// https://doc.photonengine.com/en-us/pun/current/reference/tcp-and-udp-port-numbers + /// + /// In case of using the AuthMode AutOnceWss, the name server's protocol is wss, while udp or tcp will be used on the master server and game server. + /// Set the ports accordingly per protocol and server. + /// + public PhotonPortDefinition ServerPortOverrides; + + + /// Enables a fallback to another protocol in case a connect to the Name Server fails. + /// + /// When connecting to the Name Server fails for a first time, the client will select an alternative + /// network protocol and re-try to connect. + /// + /// The fallback will use the default Name Server port as defined by ProtocolToNameServerPort. + /// + /// The fallback for TCP is UDP. All other protocols fallback to TCP. + /// + public bool EnableProtocolFallback { get; set; } + + /// The currently used server address (if any). The type of server is define by Server property. + public string CurrentServerAddress { get { return this.LoadBalancingPeer.ServerAddress; } } + + /// Your Master Server address. In PhotonCloud, call ConnectToRegionMaster() to find your Master Server. + /// + /// In the Photon Cloud, explicit definition of a Master Server Address is not best practice. + /// The Photon Cloud has a "Name Server" which redirects clients to a specific Master Server (per Region and AppId). + /// + public string MasterServerAddress { get; set; } + + /// The game server's address for a particular room. In use temporarily, as assigned by master. + public string GameServerAddress { get; protected internal set; } + + /// The server this client is currently connected or connecting to. + /// + /// Each server (NameServer, MasterServer, GameServer) allow some operations and reject others. + /// + public ServerConnection Server { get; private set; } + + /// + /// Defines a proxy URL for WebSocket connections. Can be the proxy or point to a .pac file. + /// + /// + /// This URL supports various definitions: + /// + /// "user:pass@proxyaddress:port"
+ /// "proxyaddress:port"
+ /// "system:"
+ /// "pac:"
+ /// "pac:http://host/path/pacfile.pac"
+ /// + /// Important: Don't define a protocol, except to point to a pac file. the proxy address should not begin with http:// or https://. + ///
+ public string ProxyServerAddress; + + /// Backing field for property. + private ClientState state = ClientState.PeerCreated; + + /// Current state this client is in. Careful: several states are "transitions" that lead to other states. + public ClientState State + { + get + { + return this.state; + } + + set + { + if (this.state == value) + { + return; + } + ClientState previousState = this.state; + this.state = value; + if (StateChanged != null) StateChanged(previousState, this.state); + } + } + + /// Returns if this client is currently connected or connecting to some type of server. + /// This is even true while switching servers. Use IsConnectedAndReady to check only for those states that enable you to send Operations. + public bool IsConnected { get { return this.LoadBalancingPeer != null && this.State != ClientState.PeerCreated && this.State != ClientState.Disconnected; } } + + + /// + /// A refined version of IsConnected which is true only if your connection is ready to send operations. + /// + /// + /// Not all operations can be called on all types of servers. If an operation is unavailable on the currently connected server, + /// this will result in a OperationResponse with ErrorCode != 0. + /// + /// Examples: The NameServer allows OpGetRegions which is not available anywhere else. + /// The MasterServer does not allow you to send events (OpRaiseEvent) and on the GameServer you are unable to join a lobby (OpJoinLobby). + /// + /// To check which server you are on, use: . + /// + public bool IsConnectedAndReady + { + get + { + if (this.LoadBalancingPeer == null) + { + return false; + } + + switch (this.State) + { + case ClientState.PeerCreated: + case ClientState.Disconnected: + case ClientState.Disconnecting: + case ClientState.DisconnectingFromGameServer: + case ClientState.DisconnectingFromMasterServer: + case ClientState.DisconnectingFromNameServer: + case ClientState.Authenticating: + case ClientState.ConnectingToGameServer: + case ClientState.ConnectingToMasterServer: + case ClientState.ConnectingToNameServer: + case ClientState.Joining: + case ClientState.Leaving: + return false; // we are not ready to execute any operations + } + + return true; + } + } + + + /// Register a method to be called when this client's ClientState gets set. + /// This can be useful to react to being connected, joined into a room, etc. + public event Action StateChanged; + + /// Register a method to be called when an event got dispatched. Gets called after the LoadBalancingClient handled the internal events first. + /// + /// This is an alternative to extending LoadBalancingClient to override OnEvent(). + /// + /// Note that OnEvent is calling EventReceived after it handled internal events first. + /// That means for example: Joining players will already be in the player list but leaving + /// players will already be removed from the room. + /// + public event Action EventReceived; + + /// Register a method to be called when an operation response is received. + /// + /// This is an alternative to extending LoadBalancingClient to override OnOperationResponse(). + /// + /// Note that OnOperationResponse gets executed before your Action is called. + /// That means for example: The OpJoinLobby response already set the state to "JoinedLobby" + /// and the response to OpLeave already triggered the Disconnect before this is called. + /// + public event Action OpResponseReceived; + + + /// Wraps up the target objects for a group of callbacks, so they can be called conveniently. + /// By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks. + public ConnectionCallbacksContainer ConnectionCallbackTargets; + + /// Wraps up the target objects for a group of callbacks, so they can be called conveniently. + /// By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks. + public MatchMakingCallbacksContainer MatchMakingCallbackTargets; + + /// Wraps up the target objects for a group of callbacks, so they can be called conveniently. + /// By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks. + internal InRoomCallbacksContainer InRoomCallbackTargets; + + /// Wraps up the target objects for a group of callbacks, so they can be called conveniently. + /// By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks. + internal LobbyCallbacksContainer LobbyCallbackTargets; + + /// Wraps up the target objects for a group of callbacks, so they can be called conveniently. + /// By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks. + internal WebRpcCallbacksContainer WebRpcCallbackTargets; + + + /// Wraps up the target objects for a group of callbacks, so they can be called conveniently. + /// By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks. + internal ErrorInfoCallbacksContainer ErrorInfoCallbackTargets; + + /// Summarizes (aggregates) the different causes for disconnects of a client. + /// + /// A disconnect can be caused by: errors in the network connection or some vital operation failing + /// (which is considered "high level"). While operations always trigger a call to OnOperationResponse, + /// connection related changes are treated in OnStatusChanged. + /// The DisconnectCause is set in either case and summarizes the causes for any disconnect in a single + /// state value which can be used to display (or debug) the cause for disconnection. + /// + public DisconnectCause DisconnectedCause { get; protected set; } + + + /// Internal value if the client is in a lobby. + /// This is used to re-set this.State, when joining/creating a room fails. + public bool InLobby + { + get { return this.State == ClientState.JoinedLobby; } + } + + /// The lobby this client currently uses. Defined when joining a lobby or creating rooms + public TypedLobby CurrentLobby { get; internal set; } + + /// + /// If enabled, the client will get a list of available lobbies from the Master Server. + /// + /// + /// Set this value before the client connects to the Master Server. While connected to the Master + /// Server, a change has no effect. + /// + /// Implement OptionalInfoCallbacks.OnLobbyStatisticsUpdate, to get the list of used lobbies. + /// + /// The lobby statistics can be useful if your title dynamically uses lobbies, depending (e.g.) + /// on current player activity or such. + /// In this case, getting a list of available lobbies, their room-count and player-count can + /// be useful info. + /// + /// ConnectUsingSettings sets this to the PhotonServerSettings value. + /// + public bool EnableLobbyStatistics; + + /// Internal lobby stats cache, used by LobbyStatistics. + private readonly List lobbyStatistics = new List(); + + + /// The local player is never null but not valid unless the client is in a room, too. The ID will be -1 outside of rooms. + public Player LocalPlayer { get; internal set; } + + /// + /// The nickname of the player (synced with others). Same as client.LocalPlayer.NickName. + /// + public string NickName + { + get + { + return this.LocalPlayer.NickName; + } + + set + { + if (this.LocalPlayer == null) + { + return; + } + + this.LocalPlayer.NickName = value; + } + } + + + /// An ID for this user. Sent in OpAuthenticate when you connect. If not set, the PlayerName is applied during connect. + /// + /// On connect, if the UserId is null or empty, the client will copy the PlayName to UserId. If PlayerName is not set either + /// (before connect), the server applies a temporary ID which stays unknown to this client and other clients. + /// + /// The UserId is what's used in FindFriends and for fetching data for your account (with WebHooks e.g.). + /// + /// By convention, set this ID before you connect, not while being connected. + /// There is no error but the ID won't change while being connected. + /// + public string UserId + { + get + { + if (this.AuthValues != null) + { + return this.AuthValues.UserId; + } + return null; + } + set + { + if (this.AuthValues == null) + { + this.AuthValues = new AuthenticationValues(); + } + this.AuthValues.UserId = value; + } + } + + /// The current room this client is connected to (null if none available). + public Room CurrentRoom { get; set; } + + + /// Is true while being in a room (this.state == ClientState.Joined). + /// + /// Aside from polling this value, game logic should implement IMatchmakingCallbacks in some class + /// and react when that gets called.
+ /// OpRaiseEvent, OpLeave and some other operations can only be used (successfully) when the client is in a room.. + ///
+ public bool InRoom + { + get + { + return this.state == ClientState.Joined && this.CurrentRoom != null; + } + } + + /// Statistic value available on master server: Players on master (looking for games). + public int PlayersOnMasterCount { get; internal set; } + + /// Statistic value available on master server: Players in rooms (playing). + public int PlayersInRoomsCount { get; internal set; } + + /// Statistic value available on master server: Rooms currently created. + public int RoomsCount { get; internal set; } + + + /// Internally used to decide if a room must be created or joined on game server. + private JoinType lastJoinType; + + /// Used when the client arrives on the GS, to join the room with the correct values. + private EnterRoomParams enterRoomParamsCache; + + /// Used to cache a failed "enter room" operation on the Game Server, to return to the Master Server before calling a fail-callback. + private OperationResponse failedRoomEntryOperation; + + + /// Maximum of userIDs that can be sent in one friend list request. + private const int FriendRequestListMax = 512; + + /// Contains the list of names of friends to look up their state on the server. + private string[] friendListRequested; + + /// Internal flag to know if the client currently fetches a friend list. + public bool IsFetchingFriendList { get { return this.friendListRequested != null; } } + + + /// The cloud region this client connects to. Set by ConnectToRegionMaster(). Not set if you don't use a NameServer! + public string CloudRegion { get; private set; } + + /// The cluster name provided by the Name Server. + /// + /// The value is provided by the OpResponse for OpAuthenticate/OpAuthenticateOnce. + /// Default: null. This value only ever updates from the Name Server authenticate response. + /// + public string CurrentCluster { get; private set; } + + /// Contains the list if enabled regions this client may use. Null, unless the client got a response to OpGetRegions. + public RegionHandler RegionHandler; + + /// Stores the best region summary of a previous session to speed up connecting. + private string bestRegionSummaryFromStorage; + + /// Set when the best region pinging is done. + public string SummaryToCache; + + /// Internal connection setting/flag. If the client should connect to the best region or not. + /// + /// It's set in the Connect...() methods. Only ConnectUsingSettings() sets it to true. + /// If true, client will ping available regions and select the best. + /// A bestRegionSummaryFromStorage can be used to cut the ping time short. + /// + private bool connectToBestRegion = true; + + + /// Definition of parameters for encryption data (included in Authenticate operation response). + private class EncryptionDataParameters + { + /// + /// Key for encryption mode + /// + public const byte Mode = 0; + /// + /// Key for first secret + /// + public const byte Secret1 = 1; + /// + /// Key for second secret + /// + public const byte Secret2 = 2; + } + + + private class CallbackTargetChange + { + public readonly object Target; + /// Add if true, remove if false. + public readonly bool AddTarget; + + public CallbackTargetChange(object target, bool addTarget) + { + this.Target = target; + this.AddTarget = addTarget; + } + } + + private readonly Queue callbackTargetChanges = new Queue(); + private readonly HashSet callbackTargets = new HashSet(); + + + /// Creates a LoadBalancingClient with UDP protocol or the one specified. + /// Specifies the network protocol to use for connections. + public LoadBalancingClient(ConnectionProtocol protocol = ConnectionProtocol.Udp) + { + this.ConnectionCallbackTargets = new ConnectionCallbacksContainer(this); + this.MatchMakingCallbackTargets = new MatchMakingCallbacksContainer(this); + this.InRoomCallbackTargets = new InRoomCallbacksContainer(this); + this.LobbyCallbackTargets = new LobbyCallbacksContainer(this); + this.WebRpcCallbackTargets = new WebRpcCallbacksContainer(this); + this.ErrorInfoCallbackTargets = new ErrorInfoCallbacksContainer(this); + + this.LoadBalancingPeer = new LoadBalancingPeer(this, protocol); + this.LoadBalancingPeer.OnDisconnectMessage += this.OnDisconnectMessageReceived; + this.SerializationProtocol = SerializationProtocol.GpBinaryV18; + this.LocalPlayer = this.CreatePlayer(string.Empty, -1, true, null); //TODO: Check if we can do this later + + + #if SUPPORTED_UNITY + CustomTypesUnity.Register(); + #endif + + #if UNITY_WEBGL + if (this.LoadBalancingPeer.TransportProtocol == ConnectionProtocol.Tcp || this.LoadBalancingPeer.TransportProtocol == ConnectionProtocol.Udp) + { + this.LoadBalancingPeer.Listener.DebugReturn(DebugLevel.WARNING, "WebGL requires WebSockets. Switching TransportProtocol to WebSocketSecure."); + this.LoadBalancingPeer.TransportProtocol = ConnectionProtocol.WebSocketSecure; + } + #endif + + this.State = ClientState.PeerCreated; + } + + + /// Creates a LoadBalancingClient, setting various values needed before connecting. + /// The Master Server's address to connect to. Used in Connect. + /// The AppId of this title. Needed for the Photon Cloud. Find it in the Dashboard. + /// A version for this client/build. In the Photon Cloud, players are separated by AppId, GameVersion and Region. + /// Specifies the network protocol to use for connections. + public LoadBalancingClient(string masterAddress, string appId, string gameVersion, ConnectionProtocol protocol = ConnectionProtocol.Udp) : this(protocol) + { + this.MasterServerAddress = masterAddress; + this.AppId = appId; + this.AppVersion = gameVersion; + } + + public int NameServerPortInAppSettings; + + /// + /// Gets the NameServer Address (with prefix and port), based on the set protocol (this.LoadBalancingPeer.UsedProtocol). + /// + /// NameServer Address (with prefix and port). + private string GetNameServerAddress() + { + var protocolPort = 0; + ProtocolToNameServerPort.TryGetValue(this.LoadBalancingPeer.TransportProtocol, out protocolPort); + + if (this.NameServerPortInAppSettings != 0) + { + this.DebugReturn(DebugLevel.INFO, string.Format("Using NameServerPortInAppSettings: {0}", this.NameServerPortInAppSettings)); + protocolPort = this.NameServerPortInAppSettings; + } + + if (this.ServerPortOverrides.NameServerPort > 0) + { + protocolPort = this.ServerPortOverrides.NameServerPort; + } + + switch (this.LoadBalancingPeer.TransportProtocol) + { + case ConnectionProtocol.Udp: + case ConnectionProtocol.Tcp: + return string.Format("{0}:{1}", NameServerHost, protocolPort); + case ConnectionProtocol.WebSocket: + return string.Format("ws://{0}:{1}", NameServerHost, protocolPort); + case ConnectionProtocol.WebSocketSecure: + return string.Format("wss://{0}:{1}", NameServerHost, protocolPort); + default: + throw new ArgumentOutOfRangeException(); + } + } + + + #region Operations and Commands + + + // needed connect variants: + // connect to Name Server only (could include getregions) -> end after getregions + // connect to Region Master via Name Server (specific region/cluster) -> no getregions! authenticates and ends after on connected to master + // connect to Best Region via Name Server + // connect to Master Server (no Name Server, no appid) + + public virtual bool ConnectUsingSettings(AppSettings appSettings) + { + if (this.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + this.DebugReturn(DebugLevel.WARNING, "ConnectUsingSettings() failed. Can only connect while in state 'Disconnected'. Current state: " + this.LoadBalancingPeer.PeerState); + return false; + } + + if (appSettings == null) + { + this.DebugReturn(DebugLevel.ERROR, "ConnectUsingSettings failed. The appSettings can't be null.'"); + return false; + } + + switch (this.ClientType) + { + case ClientAppType.Realtime: + this.AppId = appSettings.AppIdRealtime; + break; + case ClientAppType.Voice: + this.AppId = appSettings.AppIdVoice; + break; + case ClientAppType.Fusion: + this.AppId = appSettings.AppIdFusion; + break; + } + + this.AppVersion = appSettings.AppVersion; + + this.IsUsingNameServer = appSettings.UseNameServer; + this.CloudRegion = appSettings.FixedRegion; + this.connectToBestRegion = string.IsNullOrEmpty(this.CloudRegion); + + this.EnableLobbyStatistics = appSettings.EnableLobbyStatistics; + this.LoadBalancingPeer.DebugOut = appSettings.NetworkLogging; + + this.AuthMode = appSettings.AuthMode; + if (appSettings.AuthMode == AuthModeOption.AuthOnceWss) + { + this.LoadBalancingPeer.TransportProtocol = ConnectionProtocol.WebSocketSecure; + this.ExpectedProtocol = appSettings.Protocol; + } + else + { + this.LoadBalancingPeer.TransportProtocol = appSettings.Protocol; + this.ExpectedProtocol = null; + } + + this.EnableProtocolFallback = appSettings.EnableProtocolFallback; + + this.bestRegionSummaryFromStorage = appSettings.BestRegionSummaryFromStorage; + this.DisconnectedCause = DisconnectCause.None; + + + this.CheckConnectSetupWebGl(); + + + if (this.IsUsingNameServer) + { + this.Server = ServerConnection.NameServer; + if (!appSettings.IsDefaultNameServer) + { + this.NameServerHost = appSettings.Server; + } + + this.ProxyServerAddress = appSettings.ProxyServer; + this.NameServerPortInAppSettings = appSettings.Port; + if (!this.LoadBalancingPeer.Connect(this.NameServerAddress, this.ProxyServerAddress, this.AppId, this.TokenForInit)) + { + return false; + } + + this.State = ClientState.ConnectingToNameServer; + } + else + { + this.Server = ServerConnection.MasterServer; + int portToUse = appSettings.IsDefaultPort ? 5055 : appSettings.Port; // TODO: setup new (default) port config + this.MasterServerAddress = string.Format("{0}:{1}", appSettings.Server, portToUse); + + if (!this.LoadBalancingPeer.Connect(this.MasterServerAddress, this.ProxyServerAddress, this.AppId, this.TokenForInit)) + { + return false; + } + + this.State = ClientState.ConnectingToMasterServer; + } + + return true; + } + + + [Obsolete("Use ConnectToMasterServer() instead.")] + public bool Connect() + { + return this.ConnectToMasterServer(); + } + + /// + /// Starts the "process" to connect to a Master Server, using MasterServerAddress and AppId properties. + /// + /// + /// To connect to the Photon Cloud, use ConnectUsingSettings() or ConnectToRegionMaster(). + /// + /// The process to connect includes several steps: the actual connecting, establishing encryption, authentification + /// (of app and optionally the user) and connecting to the MasterServer + /// + /// Users can connect either anonymously or use "Custom Authentication" to verify each individual player's login. + /// Custom Authentication in Photon uses external services and communities to verify users. While the client provides a user's info, + /// the service setup is done in the Photon Cloud Dashboard. + /// The parameter authValues will set this.AuthValues and use them in the connect process. + /// + /// Connecting to the Photon Cloud might fail due to: + /// - Network issues (OnStatusChanged() StatusCode.ExceptionOnConnect) + /// - Region not available (OnOperationResponse() for OpAuthenticate with ReturnCode == ErrorCode.InvalidRegion) + /// - Subscription CCU limit reached (OnOperationResponse() for OpAuthenticate with ReturnCode == ErrorCode.MaxCcuReached) + /// + public virtual bool ConnectToMasterServer() + { + if (this.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + this.DebugReturn(DebugLevel.WARNING, "ConnectToMasterServer() failed. Can only connect while in state 'Disconnected'. Current state: " + this.LoadBalancingPeer.PeerState); + return false; + } + + // when using authMode AuthOnce or AuthOnceWSS, the token must be available for the init request. if it's null in that case, don't connect + if (this.AuthMode != AuthModeOption.Auth && this.TokenForInit == null) + { + this.DebugReturn(DebugLevel.ERROR, "Connect() failed. Can't connect to MasterServer with Token == null in AuthMode: " + this.AuthMode); + return false; + } + + this.CheckConnectSetupWebGl(); + + if (this.LoadBalancingPeer.Connect(this.MasterServerAddress, this.ProxyServerAddress, this.AppId, this.TokenForInit)) + { + this.DisconnectedCause = DisconnectCause.None; + this.connectToBestRegion = false; + this.State = ClientState.ConnectingToMasterServer; + this.Server = ServerConnection.MasterServer; + return true; + } + + return false; + } + + + /// + /// Connects to the NameServer for Photon Cloud, where a region and server list can be obtained. + /// + /// + /// If the workflow was started or failed right away. + public bool ConnectToNameServer() + { + if (this.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + this.DebugReturn(DebugLevel.WARNING, "ConnectToNameServer() failed. Can only connect while in state 'Disconnected'. Current state: " + this.LoadBalancingPeer.PeerState); + return false; + } + + this.IsUsingNameServer = true; + this.CloudRegion = null; + + + this.CheckConnectSetupWebGl(); + + + if (this.AuthMode == AuthModeOption.AuthOnceWss) + { + if (this.ExpectedProtocol == null) + { + this.ExpectedProtocol = this.LoadBalancingPeer.TransportProtocol; + } + this.LoadBalancingPeer.TransportProtocol = ConnectionProtocol.WebSocketSecure; + } + + if (this.LoadBalancingPeer.Connect(this.NameServerAddress, this.ProxyServerAddress, "NameServer", this.TokenForInit)) + { + this.DisconnectedCause = DisconnectCause.None; + this.connectToBestRegion = false; + this.State = ClientState.ConnectingToNameServer; + this.Server = ServerConnection.NameServer; + return true; + } + + return false; + } + + /// + /// Connects you to a specific region's Master Server, using the Name Server to get the IP. + /// + /// + /// If the region is null or empty, no connection will be made. + /// If the region (code) provided is not available, the connection process will fail on the Name Server. + /// This method connects only to the region defined. Any "Best Region" pinging should get done beforehand. + /// + /// To support "sharding", a region string may contain a "/*" to pick a random cluster or "/clustername" + /// to connect to a specific cluster. + /// With a "/" or no cluster postfix, the client connects to the default cluster (a specific one + /// for a region). + /// + /// By default, the region string provided by the Name Server does not contain a cluster (and only the + /// default cluster is used). + /// + /// If the operation could be sent. If false, no operation was sent. + public bool ConnectToRegionMaster(string region) + { + if (string.IsNullOrEmpty(region)) + { + this.DebugReturn(DebugLevel.ERROR, "ConnectToRegionMaster() failed. The region can not be null or empty."); + return false; + } + + this.IsUsingNameServer = true; + + if (this.State == ClientState.Authenticating) + { + if (this.LoadBalancingPeer.DebugOut >= DebugLevel.INFO) + { + this.DebugReturn(DebugLevel.INFO, "ConnectToRegionMaster() will skip calling authenticate, as the current state is 'Authenticating'. Just wait for the result."); + } + return true; + } + + if (this.State == ClientState.ConnectedToNameServer) + { + this.CloudRegion = region; + + bool authenticating = this.CallAuthenticate(); + if (authenticating) + { + this.State = ClientState.Authenticating; + } + + return authenticating; + } + + + this.LoadBalancingPeer.Disconnect(); + + //if (!string.IsNullOrEmpty(region) && !region.Contains("/")) + //{ + // region = region + "/*"; + //} + this.CloudRegion = region; + + + this.CheckConnectSetupWebGl(); + + + if (this.AuthMode == AuthModeOption.AuthOnceWss) + { + if (this.ExpectedProtocol == null) + { + this.ExpectedProtocol = this.LoadBalancingPeer.TransportProtocol; + } + this.LoadBalancingPeer.TransportProtocol = ConnectionProtocol.WebSocketSecure; + } + + this.connectToBestRegion = false; + this.DisconnectedCause = DisconnectCause.None; + if (!this.LoadBalancingPeer.Connect(this.NameServerAddress, this.ProxyServerAddress, "NameServer", null)) + { + return false; + } + + this.State = ClientState.ConnectingToNameServer; + this.Server = ServerConnection.NameServer; + return true; + } + + [Conditional("UNITY_WEBGL")] + private void CheckConnectSetupWebGl() + { + #if UNITY_WEBGL + if (this.LoadBalancingPeer.TransportProtocol != ConnectionProtocol.WebSocket && this.LoadBalancingPeer.TransportProtocol != ConnectionProtocol.WebSocketSecure) + { + this.DebugReturn(DebugLevel.WARNING, "WebGL requires WebSockets. Switching TransportProtocol to WebSocketSecure."); + this.LoadBalancingPeer.TransportProtocol = ConnectionProtocol.WebSocketSecure; + } + + this.EnableProtocolFallback = false; // no fallback on WebGL + #endif + } + + /// + /// Privately used only for reconnecting. + /// + private bool Connect(string serverAddress, string proxyServerAddress, ServerConnection serverType) + { + // TODO: Make sure app doesn't quit right now + + if (this.State == ClientState.Disconnecting) + { + this.DebugReturn(DebugLevel.ERROR, "Connect() failed. Can't connect while disconnecting (still). Current state: " + this.State); + return false; + } + + // when using authMode AuthOnce or AuthOnceWSS, the token must be available for the init request. if it's null in that case, don't connect + if (this.AuthMode != AuthModeOption.Auth && serverType != ServerConnection.NameServer && this.TokenForInit == null) + { + this.DebugReturn(DebugLevel.ERROR, "Connect() failed. Can't connect to " + serverType + " with Token == null in AuthMode: " + this.AuthMode); + return false; + } + + // connect might fail, if the DNS name can't be resolved or if no network connection is available, etc. + bool connecting = this.LoadBalancingPeer.Connect(serverAddress, proxyServerAddress, this.AppId, this.TokenForInit); + + if (connecting) + { + this.DisconnectedCause = DisconnectCause.None; + this.Server = serverType; + + switch (serverType) + { + case ServerConnection.NameServer: + State = ClientState.ConnectingToNameServer; + break; + case ServerConnection.MasterServer: + State = ClientState.ConnectingToMasterServer; + break; + case ServerConnection.GameServer: + State = ClientState.ConnectingToGameServer; + break; + } + } + + return connecting; + } + + + /// Can be used to reconnect to the master server after a disconnect. + /// Common use case: Press the Lock Button on a iOS device and you get disconnected immediately. + public bool ReconnectToMaster() + { + if (this.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + this.DebugReturn(DebugLevel.WARNING, "ReconnectToMaster() failed. Can only connect while in state 'Disconnected'. Current state: " + this.LoadBalancingPeer.PeerState); + return false; + } + + if (string.IsNullOrEmpty(this.MasterServerAddress)) + { + this.DebugReturn(DebugLevel.WARNING, "ReconnectToMaster() failed. MasterServerAddress is null or empty."); + return false; + } + if (this.tokenCache == null) + { + this.DebugReturn(DebugLevel.WARNING, "ReconnectToMaster() failed. It seems the client doesn't have any previous authentication token to re-connect."); + return false; + } + + if (this.AuthValues == null) + { + this.DebugReturn(DebugLevel.WARNING, "ReconnectToMaster() with AuthValues == null is not correct!"); + this.AuthValues = new AuthenticationValues(); + } + this.AuthValues.Token = this.tokenCache; + + return this.Connect(this.MasterServerAddress, this.ProxyServerAddress, ServerConnection.MasterServer); + } + + /// + /// Can be used to return to a room quickly by directly reconnecting to a game server to rejoin a room. + /// + /// + /// Rejoining room will not send any player properties. Instead client will receive up-to-date ones from server. + /// If you want to set new player properties, do it once rejoined. + /// + /// False, if the conditions are not met. Then, this client does not attempt the ReconnectAndRejoin. + public bool ReconnectAndRejoin() + { + if (this.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + this.DebugReturn(DebugLevel.WARNING, "ReconnectAndRejoin() failed. Can only connect while in state 'Disconnected'. Current state: " + this.LoadBalancingPeer.PeerState); + return false; + } + + if (string.IsNullOrEmpty(this.GameServerAddress)) + { + this.DebugReturn(DebugLevel.WARNING, "ReconnectAndRejoin() failed. It seems the client wasn't connected to a game server before (no address)."); + return false; + } + if (this.enterRoomParamsCache == null) + { + this.DebugReturn(DebugLevel.WARNING, "ReconnectAndRejoin() failed. It seems the client doesn't have any previous room to re-join."); + return false; + } + if (this.tokenCache == null) + { + this.DebugReturn(DebugLevel.WARNING, "ReconnectAndRejoin() failed. It seems the client doesn't have any previous authentication token to re-connect."); + return false; + } + + if (this.AuthValues == null) + { + this.AuthValues = new AuthenticationValues(); + } + this.AuthValues.Token = this.tokenCache; + + + if (!string.IsNullOrEmpty(this.GameServerAddress) && this.enterRoomParamsCache != null) + { + this.lastJoinType = JoinType.JoinRoom; + this.enterRoomParamsCache.JoinMode = JoinMode.RejoinOnly; + return this.Connect(this.GameServerAddress, this.ProxyServerAddress, ServerConnection.GameServer); + } + + return false; + } + + + /// Disconnects the peer from a server or stays disconnected. If the client / peer was connected, a callback will be triggered. + /// + /// Disconnect will attempt to notify the server of the client closing the connection. + /// + /// Clients that are in a room, will leave the room. If the room's playerTTL > 0, the player will just become inactive (and may rejoin). + /// + /// This method will not change the current State, if this client State is PeerCreated, Disconnecting or Disconnected. + /// In those cases, there is also no callback for the disconnect. The DisconnectedCause will only change if the client was connected. + /// + public void Disconnect(DisconnectCause cause = DisconnectCause.DisconnectByClientLogic) + { + if (this.State == ClientState.Disconnecting || this.State == ClientState.PeerCreated) + { + this.DebugReturn(DebugLevel.INFO, "Disconnect() call gets skipped due to State " + this.State + ". DisconnectedCause: " + this.DisconnectedCause + " Parameter cause: " + cause); + return; + } + + if (this.State != ClientState.Disconnected) + { + this.State = ClientState.Disconnecting; + this.DisconnectedCause = cause; + this.LoadBalancingPeer.Disconnect(); + } + } + + + /// + /// Private Disconnect variant that sets the state, too. + /// + private void DisconnectToReconnect() + { + switch (this.Server) + { + case ServerConnection.NameServer: + this.State = ClientState.DisconnectingFromNameServer; + break; + case ServerConnection.MasterServer: + this.State = ClientState.DisconnectingFromMasterServer; + break; + case ServerConnection.GameServer: + this.State = ClientState.DisconnectingFromGameServer; + break; + } + + this.LoadBalancingPeer.Disconnect(); + } + + /// + /// Useful to test loss of connection which will end in a client timeout. This modifies LoadBalancingPeer.NetworkSimulationSettings. Read remarks. + /// + /// + /// Use with care as this sets LoadBalancingPeer.IsSimulationEnabled.
+ /// Read LoadBalancingPeer.IsSimulationEnabled to check if this is on or off, if needed.
+ /// + /// If simulateTimeout is true, LoadBalancingPeer.NetworkSimulationSettings.IncomingLossPercentage and + /// LoadBalancingPeer.NetworkSimulationSettings.OutgoingLossPercentage will be set to 100.
+ /// Obviously, this overrides any network simulation settings done before.
+ /// + /// If you want fine-grained network simulation control, use the NetworkSimulationSettings.
+ /// + /// The timeout will lead to a call to , as usual in a client timeout. + /// + /// You could modify this method (or use NetworkSimulationSettings) to deliberately run into a server timeout by + /// just setting the OutgoingLossPercentage = 100 and the IncomingLossPercentage = 0. + ///
+ /// If true, a connection loss is simulated. If false, the simulation ends. + public void SimulateConnectionLoss(bool simulateTimeout) + { + this.DebugReturn(DebugLevel.WARNING, "SimulateConnectionLoss() set to: "+simulateTimeout); + + if (simulateTimeout) + { + this.LoadBalancingPeer.NetworkSimulationSettings.IncomingLossPercentage = 100; + this.LoadBalancingPeer.NetworkSimulationSettings.OutgoingLossPercentage = 100; + } + + this.LoadBalancingPeer.IsSimulationEnabled = simulateTimeout; + } + + private bool CallAuthenticate() + { + if (this.IsUsingNameServer && this.Server != ServerConnection.NameServer && (this.AuthValues == null || this.AuthValues.Token == null)) + { + this.DebugReturn(DebugLevel.ERROR, "Authenticate without Token is only allowed on Name Server. Connecting to: " + this.Server + " on: " + this.CurrentServerAddress + ". State: " + this.State); + return false; + } + + if (this.AuthMode == AuthModeOption.Auth) + { + if (!this.CheckIfOpCanBeSent(OperationCode.Authenticate, this.Server, "Authenticate")) + { + return false; + } + return this.LoadBalancingPeer.OpAuthenticate(this.AppId, this.AppVersion, this.AuthValues, this.CloudRegion, (this.EnableLobbyStatistics && this.Server == ServerConnection.MasterServer)); + } + else + { + if (!this.CheckIfOpCanBeSent(OperationCode.AuthenticateOnce, this.Server, "AuthenticateOnce")) + { + return false; + } + + ConnectionProtocol targetProtocolPastNameServer = this.ExpectedProtocol != null ? (ConnectionProtocol) this.ExpectedProtocol : this.LoadBalancingPeer.TransportProtocol; + return this.LoadBalancingPeer.OpAuthenticateOnce(this.AppId, this.AppVersion, this.AuthValues, this.CloudRegion, this.EncryptionMode, targetProtocolPastNameServer); + } + } + + + /// + /// This method dispatches all available incoming commands and then sends this client's outgoing commands. + /// It uses DispatchIncomingCommands and SendOutgoingCommands to do that. + /// + /// + /// The Photon client libraries are designed to fit easily into a game or application. The application + /// is in control of the context (thread) in which incoming events and responses are executed and has + /// full control of the creation of UDP/TCP packages. + /// + /// Sending packages and dispatching received messages are two separate tasks. Service combines them + /// into one method at the cost of control. It calls DispatchIncomingCommands and SendOutgoingCommands. + /// + /// Call this method regularly (10..50 times a second). + /// + /// This will Dispatch ANY received commands (unless a reliable command in-order is still missing) and + /// events AND will send queued outgoing commands. Fewer calls might be more effective if a device + /// cannot send many packets per second, as multiple operations might be combined into one package. + /// + /// + /// You could replace Service by: + /// + /// while (DispatchIncomingCommands()); //Dispatch until everything is Dispatched... + /// SendOutgoingCommands(); //Send a UDP/TCP package with outgoing messages + /// + /// + /// + public void Service() + { + if (this.LoadBalancingPeer != null) + { + this.LoadBalancingPeer.Service(); + } + } + + + /// + /// While on the NameServer, this gets you the list of regional servers (short names and their IPs to ping them). + /// + /// If the operation could be sent. If false, no operation was sent (e.g. while not connected to the NameServer). + private bool OpGetRegions() + { + if (!this.CheckIfOpCanBeSent(OperationCode.GetRegions, this.Server, "GetRegions")) + { + return false; + } + + bool sent = this.LoadBalancingPeer.OpGetRegions(this.AppId); + return sent; + } + + + /// + /// Request the rooms and online status for a list of friends. All clients should set a unique UserId before connecting. The result is available in this.FriendList. + /// + /// + /// Used on Master Server to find the rooms played by a selected list of users. + /// The result will be stored in LoadBalancingClient.FriendList, which is null before the first server response. + /// + /// Users identify themselves by setting a UserId in the LoadBalancingClient instance. + /// This will send the ID in OpAuthenticate during connect (to master and game servers). + /// Note: Changing a player's name doesn't make sense when using a friend list. + /// + /// The list of usernames must be fetched from some other source (not provided by Photon). + /// + /// + /// Internal:
+ /// The server response includes 2 arrays of info (each index matching a friend from the request):
+ /// ParameterCode.FindFriendsResponseOnlineList = bool[] of online states
+ /// ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)
+ ///
+ /// The options may be used to define which state a room must match to be returned. + ///
+ /// Array of friend's names (make sure they are unique). + /// Options that affect the result of the FindFriends operation. + /// If the operation could be sent (requires connection). + public bool OpFindFriends(string[] friendsToFind, FindFriendsOptions options = null) + { + if (!this.CheckIfOpCanBeSent(OperationCode.FindFriends, this.Server, "FindFriends")) + { + return false; + } + + if (this.IsFetchingFriendList) + { + this.DebugReturn(DebugLevel.WARNING, "OpFindFriends skipped: already fetching friends list."); + return false; // fetching friends currently, so don't do it again (avoid changing the list while fetching friends) + } + + if (friendsToFind == null || friendsToFind.Length == 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpFindFriends skipped: friendsToFind array is null or empty."); + return false; + } + + if (friendsToFind.Length > FriendRequestListMax) + { + this.DebugReturn(DebugLevel.ERROR, string.Format("OpFindFriends skipped: friendsToFind array exceeds allowed length of {0}.", FriendRequestListMax)); + return false; + } + + List friendsList = new List(friendsToFind.Length); + for (int i = 0; i < friendsToFind.Length; i++) + { + string friendUserId = friendsToFind[i]; + if (string.IsNullOrEmpty(friendUserId)) + { + this.DebugReturn(DebugLevel.WARNING, + string.Format( + "friendsToFind array contains a null or empty UserId, element at position {0} skipped.", + i)); + } + else if (friendUserId.Equals(UserId)) + { + this.DebugReturn(DebugLevel.WARNING, + string.Format( + "friendsToFind array contains local player's UserId \"{0}\", element at position {1} skipped.", + friendUserId, + i)); + } + else if (friendsList.Contains(friendUserId)) + { + this.DebugReturn(DebugLevel.WARNING, + string.Format( + "friendsToFind array contains duplicate UserId \"{0}\", element at position {1} skipped.", + friendUserId, + i)); + } + else + { + friendsList.Add(friendUserId); + } + } + + if (friendsList.Count == 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpFindFriends skipped: friends list to find is empty."); + return false; + } + + string[] filteredArray = friendsList.ToArray(); + bool sent = this.LoadBalancingPeer.OpFindFriends(filteredArray, options); + this.friendListRequested = sent ? filteredArray : null; + + return sent; + } + + /// If already connected to a Master Server, this joins the specified lobby. This request triggers an OnOperationResponse() call and the callback OnJoinedLobby(). + /// The lobby to join. Use null for default lobby. + /// If the operation could be sent. False, if the client is not IsConnectedAndReady or when it's not connected to a Master Server. + public bool OpJoinLobby(TypedLobby lobby) + { + if (!this.CheckIfOpCanBeSent(OperationCode.JoinLobby, this.Server, "JoinLobby")) + { + return false; + } + + if (lobby == null) + { + lobby = TypedLobby.Default; + } + bool sent = this.LoadBalancingPeer.OpJoinLobby(lobby); + if (sent) + { + this.CurrentLobby = lobby; + this.State = ClientState.JoiningLobby; + } + + return sent; + } + + + /// Opposite of joining a lobby. You don't have to explicitly leave a lobby to join another (client can be in one max, at any time). + /// If the operation could be sent (has to be connected). + public bool OpLeaveLobby() + { + if (!this.CheckIfOpCanBeSent(OperationCode.LeaveLobby, this.Server, "LeaveLobby")) + { + return false; + } + return this.LoadBalancingPeer.OpLeaveLobby(); + } + + + /// + /// Joins a random room that matches the filter. Will callback: OnJoinedRoom or OnJoinRandomFailed. + /// + /// + /// Used for random matchmaking. You can join any room or one with specific properties defined in opJoinRandomRoomParams. + /// + /// You can use expectedCustomRoomProperties and expectedMaxPlayers as filters for accepting rooms. + /// If you set expectedCustomRoomProperties, a room must have the exact same key values set at Custom Properties. + /// You need to define which Custom Room Properties will be available for matchmaking when you create a room. + /// See: OpCreateRoom(string roomName, RoomOptions roomOptions, TypedLobby lobby) + /// + /// This operation fails if no rooms are fitting or available (all full, closed or not visible). + /// It may also fail when actually joining the room which was found. Rooms may close, become full or empty anytime. + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// + /// This client's State is set to ClientState.Joining immediately, when the operation could + /// be called. In the background, the client will switch servers and call various related operations. + /// + /// When you're in the room, this client's State will become ClientState.Joined. + /// + /// + /// When entering a room, this client's Player Custom Properties will be sent to the room. + /// Use LocalPlayer.SetCustomProperties to set them, even while not yet in the room. + /// Note that the player properties will be cached locally and are not wiped when leaving a room. + /// + /// More about matchmaking: + /// https://doc.photonengine.com/en-us/realtime/current/reference/matchmaking-and-lobby + /// + /// You can define an array of expectedUsers, to block player slots in the room for these users. + /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. + /// + /// Optional definition of properties to filter rooms in random matchmaking. + /// If the operation could be sent currently (requires connection to Master Server). + public bool OpJoinRandomRoom(OpJoinRandomRoomParams opJoinRandomRoomParams = null) + { + if (!this.CheckIfOpCanBeSent(OperationCode.JoinRandomGame, this.Server, "JoinRandomGame")) + { + return false; + } + + if (opJoinRandomRoomParams == null) + { + opJoinRandomRoomParams = new OpJoinRandomRoomParams(); + } + + this.enterRoomParamsCache = new EnterRoomParams(); + this.enterRoomParamsCache.Lobby = opJoinRandomRoomParams.TypedLobby; + this.enterRoomParamsCache.ExpectedUsers = opJoinRandomRoomParams.ExpectedUsers; + + + bool sending = this.LoadBalancingPeer.OpJoinRandomRoom(opJoinRandomRoomParams); + if (sending) + { + this.lastJoinType = JoinType.JoinRandomRoom; + this.State = ClientState.Joining; + } + return sending; + } + + + /// + /// Attempts to join a room that matches the specified filter and creates a room if none found. + /// + /// + /// This operation is a combination of filter-based random matchmaking with the option to create a new room, + /// if no fitting room exists. + /// The benefit of that is that the room creation is done by the same operation and the room can be found + /// by the very next client, looking for similar rooms. + /// + /// There are separate parameters for joining and creating a room. + /// + /// This method can only be called while connected to a Master Server. + /// This client's State is set to ClientState.Joining immediately. + /// + /// Either IMatchmakingCallbacks.OnJoinedRoom or IMatchmakingCallbacks.OnCreatedRoom get called. + /// + /// More about matchmaking: + /// https://doc.photonengine.com/en-us/realtime/current/reference/matchmaking-and-lobby + /// + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// If the operation will be sent (requires connection to Master Server). + public bool OpJoinRandomOrCreateRoom(OpJoinRandomRoomParams opJoinRandomRoomParams, EnterRoomParams createRoomParams) + { + if (!this.CheckIfOpCanBeSent(OperationCode.JoinRandomGame, this.Server, "OpJoinRandomOrCreateRoom")) + { + return false; + } + + if (opJoinRandomRoomParams == null) + { + opJoinRandomRoomParams = new OpJoinRandomRoomParams(); + } + if (createRoomParams == null) + { + createRoomParams = new EnterRoomParams(); + } + + createRoomParams.JoinMode = JoinMode.CreateIfNotExists; + this.enterRoomParamsCache = createRoomParams; + this.enterRoomParamsCache.Lobby = opJoinRandomRoomParams.TypedLobby; + this.enterRoomParamsCache.ExpectedUsers = opJoinRandomRoomParams.ExpectedUsers; + + + bool sending = this.LoadBalancingPeer.OpJoinRandomOrCreateRoom(opJoinRandomRoomParams, createRoomParams); + if (sending) + { + this.lastJoinType = JoinType.JoinRandomOrCreateRoom; + this.State = ClientState.Joining; + } + return sending; + } + + + + /// + /// Creates a new room. Will callback: OnCreatedRoom and OnJoinedRoom or OnCreateRoomFailed. + /// + /// + /// When successful, the client will enter the specified room and callback both OnCreatedRoom and OnJoinedRoom. + /// In all error cases, OnCreateRoomFailed gets called. + /// + /// Creating a room will fail if the room name is already in use or when the RoomOptions clashing + /// with one another. Check the EnterRoomParams reference for the various room creation options. + /// + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// + /// When you're in the room, this client's State will become ClientState.Joined. + /// + /// + /// When entering a room, this client's Player Custom Properties will be sent to the room. + /// Use LocalPlayer.SetCustomProperties to set them, even while not yet in the room. + /// Note that the player properties will be cached locally and are not wiped when leaving a room. + /// + /// You can define an array of expectedUsers, to block player slots in the room for these users. + /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. + /// + /// Definition of properties for the room to create. + /// If the operation could be sent currently (requires connection to Master Server). + public bool OpCreateRoom(EnterRoomParams enterRoomParams) + { + if (!this.CheckIfOpCanBeSent(OperationCode.CreateGame, this.Server, "CreateGame")) + { + return false; + } + bool onGameServer = this.Server == ServerConnection.GameServer; + enterRoomParams.OnGameServer = onGameServer; + if (!onGameServer) + { + this.enterRoomParamsCache = enterRoomParams; + } + + bool sending = this.LoadBalancingPeer.OpCreateRoom(enterRoomParams); + if (sending) + { + this.lastJoinType = JoinType.CreateRoom; + this.State = ClientState.Joining; + } + return sending; + } + + + /// + /// Joins a specific room by name and creates it on demand. Will callback: OnJoinedRoom or OnJoinRoomFailed. + /// + /// + /// Useful when players make up a room name to meet in: + /// All involved clients call the same method and whoever is first, also creates the room. + /// + /// When successful, the client will enter the specified room. + /// The client which creates the room, will callback both OnCreatedRoom and OnJoinedRoom. + /// Clients that join an existing room will only callback OnJoinedRoom. + /// In all error cases, OnJoinRoomFailed gets called. + /// + /// Joining a room will fail, if the room is full, closed or when the user + /// already is present in the room (checked by userId). + /// + /// To return to a room, use OpRejoinRoom. + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// This client's State is set to ClientState.Joining immediately, when the operation could + /// be called. In the background, the client will switch servers and call various related operations. + /// + /// When you're in the room, this client's State will become ClientState.Joined. + /// + /// + /// If you set room properties in roomOptions, they get ignored when the room is existing already. + /// This avoids changing the room properties by late joining players. + /// + /// When entering a room, this client's Player Custom Properties will be sent to the room. + /// Use LocalPlayer.SetCustomProperties to set them, even while not yet in the room. + /// Note that the player properties will be cached locally and are not wiped when leaving a room. + /// + /// You can define an array of expectedUsers, to block player slots in the room for these users. + /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. + /// + /// Definition of properties for the room to create or join. + /// If the operation could be sent currently (requires connection to Master Server). + public bool OpJoinOrCreateRoom(EnterRoomParams enterRoomParams) + { + if (!this.CheckIfOpCanBeSent(OperationCode.JoinGame, this.Server, "JoinOrCreateRoom")) + { + return false; + } + + bool onGameServer = this.Server == ServerConnection.GameServer; + enterRoomParams.JoinMode = JoinMode.CreateIfNotExists; + enterRoomParams.OnGameServer = onGameServer; + if (!onGameServer) + { + this.enterRoomParamsCache = enterRoomParams; + } + + bool sending = this.LoadBalancingPeer.OpJoinRoom(enterRoomParams); + if (sending) + { + this.lastJoinType = JoinType.JoinOrCreateRoom; + this.State = ClientState.Joining; + } + return sending; + } + + + /// + /// Joins a room by name. Will callback: OnJoinedRoom or OnJoinRoomFailed. + /// + /// + /// Useful when using lobbies or when players follow friends or invite each other. + /// + /// When successful, the client will enter the specified room and callback via OnJoinedRoom. + /// In all error cases, OnJoinRoomFailed gets called. + /// + /// Joining a room will fail if the room is full, closed, not existing or when the user + /// already is present in the room (checked by userId). + /// + /// To return to a room, use OpRejoinRoom. + /// When players invite each other and it's unclear who's first to respond, use OpJoinOrCreateRoom instead. + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// A room's name has to be unique (per region, appid and gameversion). + /// When your title uses a global matchmaking or invitations (e.g. an external solution), + /// keep regions and the game versions in mind to join a room. + /// + /// + /// This client's State is set to ClientState.Joining immediately, when the operation could + /// be called. In the background, the client will switch servers and call various related operations. + /// + /// When you're in the room, this client's State will become ClientState.Joined. + /// + /// + /// When entering a room, this client's Player Custom Properties will be sent to the room. + /// Use LocalPlayer.SetCustomProperties to set them, even while not yet in the room. + /// Note that the player properties will be cached locally and are not wiped when leaving a room. + /// + /// You can define an array of expectedUsers, to reserve player slots in the room for friends or party members. + /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. + /// + /// Definition of properties for the room to join. + /// If the operation could be sent currently (requires connection to Master Server). + public bool OpJoinRoom(EnterRoomParams enterRoomParams) + { + if (!this.CheckIfOpCanBeSent(OperationCode.JoinGame, this.Server, "JoinRoom")) + { + return false; + } + + bool onGameServer = this.Server == ServerConnection.GameServer; + enterRoomParams.OnGameServer = onGameServer; + if (!onGameServer) + { + this.enterRoomParamsCache = enterRoomParams; + } + + bool sending = this.LoadBalancingPeer.OpJoinRoom(enterRoomParams); + if (sending) + { + this.lastJoinType = enterRoomParams.JoinMode == JoinMode.CreateIfNotExists ? JoinType.JoinOrCreateRoom : JoinType.JoinRoom; + this.State = ClientState.Joining; + } + return sending; + } + + + /// + /// Rejoins a room by roomName (using the userID internally to return). Will callback: OnJoinedRoom or OnJoinRoomFailed. + /// + /// + /// Used to return to a room, before this user was removed from the players list. + /// Internally, the userID will be checked by the server, to make sure this user is in the room (active or inactice). + /// + /// In contrast to join, this operation never adds a players to a room. It will attempt to retake an existing + /// spot in the playerlist or fail. This makes sure the client doean't accidentally join a room when the + /// game logic meant to re-activate an existing actor in an existing room. + /// + /// This method will fail on the server, when the room does not exist, can't be loaded (persistent rooms) or + /// when the userId is not in the player list of this room. This will lead to a callback OnJoinRoomFailed. + /// + /// Rejoining room will not send any player properties. Instead client will receive up-to-date ones from server. + /// If you want to set new player properties, do it once rejoined. + /// + public bool OpRejoinRoom(string roomName) + { + if (!this.CheckIfOpCanBeSent(OperationCode.JoinGame, this.Server, "RejoinRoom")) + { + return false; + } + + bool onGameServer = this.Server == ServerConnection.GameServer; + + EnterRoomParams opParams = new EnterRoomParams(); + this.enterRoomParamsCache = opParams; + opParams.RoomName = roomName; + opParams.OnGameServer = onGameServer; + opParams.JoinMode = JoinMode.RejoinOnly; + + bool sending = this.LoadBalancingPeer.OpJoinRoom(opParams); + if (sending) + { + this.lastJoinType = JoinType.JoinRoom; + this.State = ClientState.Joining; + } + return sending; + } + + + /// + /// Leaves the current room, optionally telling the server that the user is just becoming inactive. Will callback: OnLeftRoom. + /// + /// + /// + /// OpLeaveRoom skips execution when the room is null or the server is not GameServer or the client is disconnecting from GS already. + /// OpLeaveRoom returns false in those cases and won't change the state, so check return of this method. + /// + /// In some cases, this method will skip the OpLeave call and just call Disconnect(), + /// which not only leaves the room but also the server. Disconnect also triggers a leave and so that workflow is is quicker. + /// + /// If true, this player becomes inactive in the game and can return later (if PlayerTTL of the room is != 0). + /// WebFlag: Securely transmit the encrypted object AuthCookie to the web service in PathLeave webhook when available + /// If the current room could be left (impossible while not in a room). + public bool OpLeaveRoom(bool becomeInactive, bool sendAuthCookie = false) + { + if (!this.CheckIfOpCanBeSent(OperationCode.Leave, this.Server, "LeaveRoom")) + { + return false; + } + + this.State = ClientState.Leaving; + this.GameServerAddress = String.Empty; + this.enterRoomParamsCache = null; + return this.LoadBalancingPeer.OpLeaveRoom(becomeInactive, sendAuthCookie); + } + + + /// Gets a list of rooms matching the (non empty) SQL filter for the given SQL-typed lobby. + /// + /// Operation is only available for lobbies of type SqlLobby and the filter can not be empty. + /// It will check those conditions and fail locally, returning false. + /// + /// This is an async request which triggers a OnOperationResponse() call. + /// + /// + /// The lobby to query. Has to be of type SqlLobby. + /// The sql query statement. + /// If the operation could be sent (has to be connected). + public bool OpGetGameList(TypedLobby typedLobby, string sqlLobbyFilter) + { + if (!this.CheckIfOpCanBeSent(OperationCode.GetGameList, this.Server, "GetGameList")) + { + return false; + } + + if (string.IsNullOrEmpty(sqlLobbyFilter)) + { + this.DebugReturn(DebugLevel.ERROR, "Operation GetGameList requires a filter."); + return false; + } + if (typedLobby.Type != LobbyType.SqlLobby) + { + this.DebugReturn(DebugLevel.ERROR, "Operation GetGameList can only be used for lobbies of type SqlLobby."); + return false; + } + + return this.LoadBalancingPeer.OpGetGameList(typedLobby, sqlLobbyFilter); + } + + + /// + /// Updates and synchronizes a Player's Custom Properties. Optionally, expectedProperties can be provided as condition. + /// + /// + /// Custom Properties are a set of string keys and arbitrary values which is synchronized + /// for the players in a Room. They are available when the client enters the room, as + /// they are in the response of OpJoin and OpCreate. + /// + /// Custom Properties either relate to the (current) Room or a Player (in that Room). + /// + /// Both classes locally cache the current key/values and make them available as + /// property: CustomProperties. This is provided only to read them. + /// You must use the method SetCustomProperties to set/modify them. + /// + /// Any client can set any Custom Properties anytime (when in a room). + /// It's up to the game logic to organize how they are best used. + /// + /// You should call SetCustomProperties only with key/values that are new or changed. This reduces + /// traffic and performance. + /// + /// Unless you define some expectedProperties, setting key/values is always permitted. + /// In this case, the property-setting client will not receive the new values from the server but + /// instead update its local cache in SetCustomProperties. + /// + /// If you define expectedProperties, the server will skip updates if the server property-cache + /// does not contain all expectedProperties with the same values. + /// In this case, the property-setting client will get an update from the server and update it's + /// cached key/values at about the same time as everyone else. + /// + /// The benefit of using expectedProperties can be only one client successfully sets a key from + /// one known value to another. + /// As example: Store who owns an item in a Custom Property "ownedBy". It's 0 initally. + /// When multiple players reach the item, they all attempt to change "ownedBy" from 0 to their + /// actorNumber. If you use expectedProperties {"ownedBy", 0} as condition, the first player to + /// take the item will have it (and the others fail to set the ownership). + /// + /// Properties get saved with the game state for Turnbased games (which use IsPersistent = true). + /// + /// Defines which player the Custom Properties belong to. ActorID of a player. + /// Hashtable of Custom Properties that changes. + /// Provide some keys/values to use as condition for setting the new values. Client must be in room. + /// Defines if the set properties should be forwarded to a WebHook. Client must be in room. + /// + /// False if propertiesToSet is null or empty or have zero string keys. + /// If not in a room, returns true if local player and expectedProperties and webFlags are null. + /// False if actorNr is lower than or equal to zero. + /// Otherwise, returns if the operation could be sent to the server. + /// + public bool OpSetCustomPropertiesOfActor(int actorNr, Hashtable propertiesToSet, Hashtable expectedProperties = null, WebFlags webFlags = null) + { + if (propertiesToSet == null || propertiesToSet.Count == 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpSetCustomPropertiesOfActor() failed. propertiesToSet must not be null nor empty."); + return false; + } + + if (this.CurrentRoom == null) + { + // if you attempt to set this player's values without conditions, then fine: + if (expectedProperties == null && webFlags == null && this.LocalPlayer != null && this.LocalPlayer.ActorNumber == actorNr) + { + return this.LocalPlayer.SetCustomProperties(propertiesToSet); + } + + if (this.LoadBalancingPeer.DebugOut >= DebugLevel.ERROR) + { + this.DebugReturn(DebugLevel.ERROR, "OpSetCustomPropertiesOfActor() failed. To use expectedProperties or webForward, you have to be in a room. State: " + this.State); + } + return false; + } + + Hashtable customActorProperties = new Hashtable(); + customActorProperties.MergeStringKeys(propertiesToSet); + if (customActorProperties.Count == 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpSetCustomPropertiesOfActor() failed. Only string keys allowed for custom properties."); + return false; + } + return this.OpSetPropertiesOfActor(actorNr, customActorProperties, expectedProperties, webFlags); + } + + + /// Internally used to cache and set properties (including well known properties). + /// Requires being in a room (because this attempts to send an operation which will fail otherwise). + protected internal bool OpSetPropertiesOfActor(int actorNr, Hashtable actorProperties, Hashtable expectedProperties = null, WebFlags webFlags = null) + { + if (!this.CheckIfOpCanBeSent(OperationCode.SetProperties, this.Server, "SetProperties")) + { + return false; + } + + if (actorProperties == null || actorProperties.Count == 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpSetPropertiesOfActor() failed. actorProperties must not be null nor empty."); + return false; + } + bool res = this.LoadBalancingPeer.OpSetPropertiesOfActor(actorNr, actorProperties, expectedProperties, webFlags); + if (res && !this.CurrentRoom.BroadcastPropertiesChangeToAll && (expectedProperties == null || expectedProperties.Count == 0)) + { + Player target = this.CurrentRoom.GetPlayer(actorNr); + if (target != null) + { + target.InternalCacheProperties(actorProperties); + this.InRoomCallbackTargets.OnPlayerPropertiesUpdate(target, actorProperties); + } + } + return res; + } + + + /// + /// Updates and synchronizes this Room's Custom Properties. Optionally, expectedProperties can be provided as condition. + /// + /// + /// Custom Properties are a set of string keys and arbitrary values which is synchronized + /// for the players in a Room. They are available when the client enters the room, as + /// they are in the response of OpJoin and OpCreate. + /// + /// Custom Properties either relate to the (current) Room or a Player (in that Room). + /// + /// Both classes locally cache the current key/values and make them available as + /// property: CustomProperties. This is provided only to read them. + /// You must use the method SetCustomProperties to set/modify them. + /// + /// Any client can set any Custom Properties anytime (when in a room). + /// It's up to the game logic to organize how they are best used. + /// + /// You should call SetCustomProperties only with key/values that are new or changed. This reduces + /// traffic and performance. + /// + /// Unless you define some expectedProperties, setting key/values is always permitted. + /// In this case, the property-setting client will not receive the new values from the server but + /// instead update its local cache in SetCustomProperties. + /// + /// If you define expectedProperties, the server will skip updates if the server property-cache + /// does not contain all expectedProperties with the same values. + /// In this case, the property-setting client will get an update from the server and update it's + /// cached key/values at about the same time as everyone else. + /// + /// The benefit of using expectedProperties can be only one client successfully sets a key from + /// one known value to another. + /// As example: Store who owns an item in a Custom Property "ownedBy". It's 0 initally. + /// When multiple players reach the item, they all attempt to change "ownedBy" from 0 to their + /// actorNumber. If you use expectedProperties {"ownedBy", 0} as condition, the first player to + /// take the item will have it (and the others fail to set the ownership). + /// + /// Properties get saved with the game state for Turnbased games (which use IsPersistent = true). + /// + /// Hashtable of Custom Properties that changes. + /// Provide some keys/values to use as condition for setting the new values. + /// Defines web flags for an optional PathProperties webhook. + /// + /// False if propertiesToSet is null or empty or have zero string keys. + /// Otherwise, returns if the operation could be sent to the server. + /// + public bool OpSetCustomPropertiesOfRoom(Hashtable propertiesToSet, Hashtable expectedProperties = null, WebFlags webFlags = null) + { + if (propertiesToSet == null || propertiesToSet.Count == 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpSetCustomPropertiesOfRoom() failed. propertiesToSet must not be null nor empty."); + return false; + } + Hashtable customGameProps = new Hashtable(); + customGameProps.MergeStringKeys(propertiesToSet); + if (customGameProps.Count == 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpSetCustomPropertiesOfRoom() failed. Only string keys are allowed for custom properties."); + return false; + } + return this.OpSetPropertiesOfRoom(customGameProps, expectedProperties, webFlags); + } + + + protected internal bool OpSetPropertyOfRoom(byte propCode, object value) + { + Hashtable properties = new Hashtable(); + properties[propCode] = value; + return this.OpSetPropertiesOfRoom(properties); + } + + /// Internally used to cache and set properties (including well known properties). + /// Requires being in a room (because this attempts to send an operation which will fail otherwise). + protected internal bool OpSetPropertiesOfRoom(Hashtable gameProperties, Hashtable expectedProperties = null, WebFlags webFlags = null) + { + if (!this.CheckIfOpCanBeSent(OperationCode.SetProperties, this.Server, "SetProperties")) + { + return false; + } + + if (gameProperties == null || gameProperties.Count == 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpSetPropertiesOfRoom() failed. gameProperties must not be null nor empty."); + return false; + } + bool res = this.LoadBalancingPeer.OpSetPropertiesOfRoom(gameProperties, expectedProperties, webFlags); + if (res && !this.CurrentRoom.BroadcastPropertiesChangeToAll && (expectedProperties == null || expectedProperties.Count == 0)) + { + this.CurrentRoom.InternalCacheProperties(gameProperties); + this.InRoomCallbackTargets.OnRoomPropertiesUpdate(gameProperties); + } + return res; + } + + + /// + /// Send an event with custom code/type and any content to the other players in the same room. + /// + /// Identifies this type of event (and the content). Your game's event codes can start with 0. + /// Any serializable datatype (including Hashtable like the other OpRaiseEvent overloads). + /// Contains used send options. If you pass null, the default options will be used. + /// Send options for reliable, encryption etc + /// If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands. + public virtual bool OpRaiseEvent(byte eventCode, object customEventContent, RaiseEventOptions raiseEventOptions, SendOptions sendOptions) + { + if (!this.CheckIfOpCanBeSent(OperationCode.RaiseEvent, this.Server, "RaiseEvent")) + { + return false; + } + + return this.LoadBalancingPeer.OpRaiseEvent(eventCode, customEventContent, raiseEventOptions, sendOptions); + } + + + + /// + /// Operation to handle this client's interest groups (for events in room). + /// + /// + /// Note the difference between passing null and byte[0]: + /// null won't add/remove any groups. + /// byte[0] will add/remove all (existing) groups. + /// First, removing groups is executed. This way, you could leave all groups and join only the ones provided. + /// + /// Changes become active not immediately but when the server executes this operation (approximately RTT/2). + /// + /// Groups to remove from interest. Null will not remove any. A byte[0] will remove all. + /// Groups to add to interest. Null will not add any. A byte[0] will add all current. + /// If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands. + public virtual bool OpChangeGroups(byte[] groupsToRemove, byte[] groupsToAdd) + { + if (!this.CheckIfOpCanBeSent(OperationCode.ChangeGroups, this.Server, "ChangeGroups")) + { + return false; + } + + return this.LoadBalancingPeer.OpChangeGroups(groupsToRemove, groupsToAdd); + } + + + #endregion + + #region Helpers + + /// + /// Privately used to read-out properties coming from the server in events and operation responses (which might be a bit tricky). + /// + private void ReadoutProperties(Hashtable gameProperties, Hashtable actorProperties, int targetActorNr) + { + // read game properties and cache them locally + if (this.CurrentRoom != null && gameProperties != null) + { + this.CurrentRoom.InternalCacheProperties(gameProperties); + if (this.InRoom) + { + this.InRoomCallbackTargets.OnRoomPropertiesUpdate(gameProperties); + } + } + + if (actorProperties != null && actorProperties.Count > 0) + { + if (targetActorNr > 0) + { + // we have a single entry in the actorProperties with one user's name + // targets MUST exist before you set properties + Player target = this.CurrentRoom.GetPlayer(targetActorNr); + if (target != null) + { + Hashtable props = this.ReadoutPropertiesForActorNr(actorProperties, targetActorNr); + target.InternalCacheProperties(props); + this.InRoomCallbackTargets.OnPlayerPropertiesUpdate(target, props); + } + } + else + { + // in this case, we've got a key-value pair per actor (each + // value is a hashtable with the actor's properties then) + int actorNr; + Hashtable props; + string newName; + Player target; + + foreach (object key in actorProperties.Keys) + { + actorNr = (int)key; + if (actorNr == 0) + { + continue; + } + + props = (Hashtable)actorProperties[key]; + newName = (string)props[ActorProperties.PlayerName]; + + target = this.CurrentRoom.GetPlayer(actorNr); + if (target == null) + { + target = this.CreatePlayer(newName, actorNr, false, props); + this.CurrentRoom.StorePlayer(target); + } + target.InternalCacheProperties(props); + } + } + } + } + + + /// + /// Privately used only to read properties for a distinct actor (which might be the hashtable OR a key-pair value IN the actorProperties). + /// + private Hashtable ReadoutPropertiesForActorNr(Hashtable actorProperties, int actorNr) + { + if (actorProperties.ContainsKey(actorNr)) + { + return (Hashtable)actorProperties[actorNr]; + } + + return actorProperties; + } + + /// + /// Internally used to set the LocalPlayer's ID (from -1 to the actual in-room ID). + /// + /// New actor ID (a.k.a actorNr) assigned when joining a room. + public void ChangeLocalID(int newID) + { + if (this.LocalPlayer == null) + { + this.DebugReturn(DebugLevel.WARNING, string.Format("Local actor is null or not in mActors! mLocalActor: {0} mActors==null: {1} newID: {2}", this.LocalPlayer, this.CurrentRoom.Players == null, newID)); + } + + if (this.CurrentRoom == null) + { + // change to new actor/player ID and make sure the player does not have a room reference left + this.LocalPlayer.ChangeLocalID(newID); + this.LocalPlayer.RoomReference = null; + } + else + { + // remove old actorId from actor list + this.CurrentRoom.RemovePlayer(this.LocalPlayer); + + // change to new actor/player ID + this.LocalPlayer.ChangeLocalID(newID); + + // update the room's list with the new reference + this.CurrentRoom.StorePlayer(this.LocalPlayer); + } + } + + + + /// + /// Called internally, when a game was joined or created on the game server successfully. + /// + /// + /// This reads the response, finds out the local player's actorNumber (a.k.a. Player.ID) and applies properties of the room and players. + /// Errors for these operations are to be handled before this method is called. + /// + /// Contains the server's response for an operation called by this peer. + private void GameEnteredOnGameServer(OperationResponse operationResponse) + { + this.CurrentRoom = this.CreateRoom(this.enterRoomParamsCache.RoomName, this.enterRoomParamsCache.RoomOptions); + this.CurrentRoom.LoadBalancingClient = this; + + // first change the local id, instead of first updating the actorList since actorList uses ID to update itself + + // the local player's actor-properties are not returned in join-result. add this player to the list + int localActorNr = (int)operationResponse[ParameterCode.ActorNr]; + this.ChangeLocalID(localActorNr); + + if (operationResponse.Parameters.ContainsKey(ParameterCode.ActorList)) + { + int[] actorsInRoom = (int[])operationResponse.Parameters[ParameterCode.ActorList]; + this.UpdatedActorList(actorsInRoom); + } + + + Hashtable actorProperties = (Hashtable)operationResponse[ParameterCode.PlayerProperties]; + Hashtable gameProperties = (Hashtable)operationResponse[ParameterCode.GameProperties]; + this.ReadoutProperties(gameProperties, actorProperties, 0); + + object temp; + if (operationResponse.Parameters.TryGetValue(ParameterCode.RoomOptionFlags, out temp)) + { + this.CurrentRoom.InternalCacheRoomFlags((int)temp); + } + + this.State = ClientState.Joined; + + + // the callbacks OnCreatedRoom and OnJoinedRoom are called in the event join. it contains important info about the room and players. + // unless there will be no room events (RoomOptions.SuppressRoomEvents = true) + if (this.CurrentRoom.SuppressRoomEvents) + { + if (this.lastJoinType == JoinType.CreateRoom || (this.lastJoinType == JoinType.JoinOrCreateRoom && this.LocalPlayer.ActorNumber == 1)) + { + this.MatchMakingCallbackTargets.OnCreatedRoom(); + } + + this.MatchMakingCallbackTargets.OnJoinedRoom(); + } + } + + + private void UpdatedActorList(int[] actorsInGame) + { + if (actorsInGame != null) + { + foreach (int actorNumber in actorsInGame) + { + if (actorNumber == 0) + { + continue; + } + + Player target = this.CurrentRoom.GetPlayer(actorNumber); + if (target == null) + { + this.CurrentRoom.StorePlayer(this.CreatePlayer(string.Empty, actorNumber, false, null)); + } + } + } + } + + /// + /// Factory method to create a player instance - override to get your own player-type with custom features. + /// + /// The name of the player to be created. + /// The player ID (a.k.a. actorNumber) of the player to be created. + /// Sets the distinction if the player to be created is your player or if its assigned to someone else. + /// The custom properties for this new player + /// The newly created player + protected internal virtual Player CreatePlayer(string actorName, int actorNumber, bool isLocal, Hashtable actorProperties) + { + Player newPlayer = new Player(actorName, actorNumber, isLocal, actorProperties); + return newPlayer; + } + + /// Internal "factory" method to create a room-instance. + protected internal virtual Room CreateRoom(string roomName, RoomOptions opt) + { + Room r = new Room(roomName, opt); + return r; + } + + private bool CheckIfOpAllowedOnServer(byte opCode, ServerConnection serverConnection) + { + switch (serverConnection) + { + case ServerConnection.MasterServer: + switch (opCode) + { + case OperationCode.CreateGame: + case OperationCode.Authenticate: + case OperationCode.AuthenticateOnce: + case OperationCode.FindFriends: + case OperationCode.GetGameList: + case OperationCode.GetLobbyStats: + case OperationCode.JoinGame: + case OperationCode.JoinLobby: + case OperationCode.LeaveLobby: + case OperationCode.WebRpc: + case OperationCode.ServerSettings: + case OperationCode.JoinRandomGame: + return true; + } + break; + case ServerConnection.GameServer: + switch (opCode) + { + case OperationCode.CreateGame: + case OperationCode.Authenticate: + case OperationCode.AuthenticateOnce: + case OperationCode.ChangeGroups: + case OperationCode.GetProperties: + case OperationCode.JoinGame: + case OperationCode.Leave: + case OperationCode.WebRpc: + case OperationCode.ServerSettings: + case OperationCode.SetProperties: + case OperationCode.RaiseEvent: + return true; + } + break; + case ServerConnection.NameServer: + switch (opCode) + { + case OperationCode.Authenticate: + case OperationCode.AuthenticateOnce: + case OperationCode.GetRegions: + case OperationCode.ServerSettings: + return true; + } + break; + default: + throw new ArgumentOutOfRangeException("serverConnection", serverConnection, null); + } + return false; + } + + private bool CheckIfOpCanBeSent(byte opCode, ServerConnection serverConnection, string opName) + { + if (this.LoadBalancingPeer == null) + { + this.DebugReturn(DebugLevel.ERROR, string.Format("Operation {0} ({1}) can't be sent because peer is null", opName, opCode)); + return false; + } + + if (!this.CheckIfOpAllowedOnServer(opCode, serverConnection)) + { + if (this.LoadBalancingPeer.DebugOut >= DebugLevel.ERROR) + { + this.DebugReturn(DebugLevel.ERROR, string.Format("Operation {0} ({1}) not allowed on current server ({2})", opName, opCode, serverConnection)); + } + return false; + } + + if (!this.CheckIfClientIsReadyToCallOperation(opCode)) + { + DebugLevel levelToReport = DebugLevel.ERROR; + if (opCode == OperationCode.RaiseEvent && (this.State == ClientState.Leaving || this.State == ClientState.Disconnecting || this.State == ClientState.DisconnectingFromGameServer)) + { + levelToReport = DebugLevel.INFO; + } + + if (this.LoadBalancingPeer.DebugOut >= levelToReport) + { + this.DebugReturn(levelToReport, string.Format("Operation {0} ({1}) not called because client is not connected or not ready yet, client state: {2}", opName, opCode, Enum.GetName(typeof(ClientState), this.State))); + } + + return false; + } + + if (this.LoadBalancingPeer.PeerState != PeerStateValue.Connected) + { + this.DebugReturn(DebugLevel.ERROR, string.Format("Operation {0} ({1}) can't be sent because peer is not connected, peer state: {2}", opName, opCode, this.LoadBalancingPeer.PeerState)); + return false; + } + return true; + } + + private bool CheckIfClientIsReadyToCallOperation(byte opCode) + { + switch (opCode) + { + //case OperationCode.ServerSettings: // ?? + //case OperationCode.WebRpc: // WebRPC works on MS and GS and I think it does not need the client to be ready + + case OperationCode.Authenticate: + case OperationCode.AuthenticateOnce: + return this.IsConnectedAndReady || + this.State == ClientState.ConnectingToNameServer || // this is required since we do not set state to ConnectedToNameServer before authentication + this.State == ClientState.ConnectingToMasterServer || // this is required since we do not set state to ConnectedToMasterServer before authentication + this.State == ClientState.ConnectingToGameServer; // this is required since we do not set state to ConnectedToGameServer before authentication + + case OperationCode.ChangeGroups: + case OperationCode.GetProperties: + case OperationCode.SetProperties: + case OperationCode.RaiseEvent: + case OperationCode.Leave: + return this.InRoom; + + case OperationCode.JoinGame: + case OperationCode.CreateGame: + return this.State == ClientState.ConnectedToMasterServer || this.InLobby || this.State == ClientState.ConnectedToGameServer; // CurrentRoom can be not null in case of quick rejoin + + case OperationCode.LeaveLobby: + return this.InLobby; + + case OperationCode.JoinRandomGame: + case OperationCode.FindFriends: + case OperationCode.GetGameList: + case OperationCode.GetLobbyStats: // do we need to be inside lobby to call this? + case OperationCode.JoinLobby: // You don't have to explicitly leave a lobby to join another (client can be in one max, at any time) + return this.State == ClientState.ConnectedToMasterServer || this.InLobby; + case OperationCode.GetRegions: + return this.State == ClientState.ConnectedToNameServer; + } + return this.IsConnected; + } + + #endregion + + #region Implementation of IPhotonPeerListener + + /// Debug output of low level api (and this client). + /// This method is not responsible to keep up the state of a LoadBalancingClient. Calling base.DebugReturn on overrides is optional. + public virtual void DebugReturn(DebugLevel level, string message) + { + if (this.LoadBalancingPeer.DebugOut != DebugLevel.ALL && level > this.LoadBalancingPeer.DebugOut) + { + return; + } + #if !SUPPORTED_UNITY + Debug.WriteLine(message); + #else + if (level == DebugLevel.ERROR) + { + Debug.LogError(message); + } + else if (level == DebugLevel.WARNING) + { + Debug.LogWarning(message); + } + else if (level == DebugLevel.INFO) + { + Debug.Log(message); + } + else if (level == DebugLevel.ALL) + { + Debug.Log(message); + } + #endif + } + + private void CallbackRoomEnterFailed(OperationResponse operationResponse) + { + if (operationResponse.ReturnCode != 0) + { + if (operationResponse.OperationCode == OperationCode.JoinGame) + { + this.MatchMakingCallbackTargets.OnJoinRoomFailed(operationResponse.ReturnCode, operationResponse.DebugMessage); + } + else if (operationResponse.OperationCode == OperationCode.CreateGame) + { + this.MatchMakingCallbackTargets.OnCreateRoomFailed(operationResponse.ReturnCode, operationResponse.DebugMessage); + } + else if (operationResponse.OperationCode == OperationCode.JoinRandomGame) + { + this.MatchMakingCallbackTargets.OnJoinRandomFailed(operationResponse.ReturnCode, operationResponse.DebugMessage); + } + } + } + + /// + /// Uses the OperationResponses provided by the server to advance the internal state and call ops as needed. + /// + /// + /// When this method finishes, it will call your OnOpResponseAction (if any). This way, you can get any + /// operation response without overriding this class. + /// + /// To implement a more complex game/app logic, you should implement your own class that inherits the + /// LoadBalancingClient. Override this method to use your own operation-responses easily. + /// + /// This method is essential to update the internal state of a LoadBalancingClient, so overriding methods + /// must call base.OnOperationResponse(). + /// + /// Contains the server's response for an operation called by this peer. + public virtual void OnOperationResponse(OperationResponse operationResponse) + { + // if (operationResponse.ReturnCode != 0) this.DebugReturn(DebugLevel.ERROR, operationResponse.ToStringFull()); + + // use the "secret" or "token" whenever we get it. doesn't really matter if it's in AuthResponse. + if (operationResponse.Parameters.ContainsKey(ParameterCode.Token)) + { + if (this.AuthValues == null) + { + this.AuthValues = new AuthenticationValues(); + //this.DebugReturn(DebugLevel.ERROR, "Server returned secret. Created AuthValues."); + } + + this.AuthValues.Token = operationResponse.Parameters[ParameterCode.Token]; + this.tokenCache = this.AuthValues.Token; + } + + // if the operation limit was reached, disconnect (but still execute the operation response). + if (operationResponse.ReturnCode == ErrorCode.OperationLimitReached) + { + this.Disconnect(DisconnectCause.DisconnectByOperationLimit); + } + + switch (operationResponse.OperationCode) + { + case OperationCode.Authenticate: + case OperationCode.AuthenticateOnce: + { + if (operationResponse.ReturnCode != 0) + { + this.DebugReturn(DebugLevel.ERROR, operationResponse.ToStringFull() + " Server: " + this.Server + " Address: " + this.LoadBalancingPeer.ServerAddress); + + switch (operationResponse.ReturnCode) + { + case ErrorCode.InvalidAuthentication: + this.DisconnectedCause = DisconnectCause.InvalidAuthentication; + break; + case ErrorCode.CustomAuthenticationFailed: + this.DisconnectedCause = DisconnectCause.CustomAuthenticationFailed; + this.ConnectionCallbackTargets.OnCustomAuthenticationFailed(operationResponse.DebugMessage); + break; + case ErrorCode.InvalidRegion: + this.DisconnectedCause = DisconnectCause.InvalidRegion; + break; + case ErrorCode.MaxCcuReached: + this.DisconnectedCause = DisconnectCause.MaxCcuReached; + break; + case ErrorCode.InvalidOperation: + case ErrorCode.OperationNotAllowedInCurrentState: + this.DisconnectedCause = DisconnectCause.OperationNotAllowedInCurrentState; + break; + case ErrorCode.AuthenticationTicketExpired: + this.DisconnectedCause = DisconnectCause.AuthenticationTicketExpired; + break; + } + + this.Disconnect(this.DisconnectedCause); + break; // if auth didn't succeed, we disconnect (above) and exit this operation's handling + } + + if (this.Server == ServerConnection.NameServer || this.Server == ServerConnection.MasterServer) + { + if (operationResponse.Parameters.ContainsKey(ParameterCode.UserId)) + { + string incomingId = (string)operationResponse.Parameters[ParameterCode.UserId]; + if (!string.IsNullOrEmpty(incomingId)) + { + this.UserId = incomingId; + this.LocalPlayer.UserId = incomingId; + this.DebugReturn(DebugLevel.INFO, string.Format("Received your UserID from server. Updating local value to: {0}", this.UserId)); + } + } + if (operationResponse.Parameters.ContainsKey(ParameterCode.NickName)) + { + this.NickName = (string)operationResponse.Parameters[ParameterCode.NickName]; + this.DebugReturn(DebugLevel.INFO, string.Format("Received your NickName from server. Updating local value to: {0}", this.NickName)); + } + + if (operationResponse.Parameters.ContainsKey(ParameterCode.EncryptionData)) + { + this.SetupEncryption((Dictionary)operationResponse.Parameters[ParameterCode.EncryptionData]); + } + } + + if (this.Server == ServerConnection.NameServer) + { + string receivedCluster = operationResponse[ParameterCode.Cluster] as string; + if (!string.IsNullOrEmpty(receivedCluster)) + { + this.CurrentCluster = receivedCluster; + } + + // on the NameServer, authenticate returns the MasterServer address for a region and we hop off to there + this.MasterServerAddress = operationResponse[ParameterCode.Address] as string; + if (this.ServerPortOverrides.MasterServerPort != 0) + { + //Debug.LogWarning("Incoming MasterServer Address: "+this.MasterServerAddress); + this.MasterServerAddress = ReplacePortWithAlternative(this.MasterServerAddress, this.ServerPortOverrides.MasterServerPort); + //Debug.LogWarning("New MasterServer Address: "+this.MasterServerAddress); + } + + if (this.AuthMode == AuthModeOption.AuthOnceWss && this.ExpectedProtocol != null) + { + this.DebugReturn(DebugLevel.INFO, string.Format("AuthOnceWss mode. Auth response switches TransportProtocol to ExpectedProtocol: {0}.", this.ExpectedProtocol)); + this.LoadBalancingPeer.TransportProtocol = (ConnectionProtocol)this.ExpectedProtocol; + this.ExpectedProtocol = null; + } + this.DisconnectToReconnect(); + } + else if (this.Server == ServerConnection.MasterServer) + { + this.State = ClientState.ConnectedToMasterServer; + if (this.failedRoomEntryOperation == null) + { + this.ConnectionCallbackTargets.OnConnectedToMaster(); + } + else + { + this.CallbackRoomEnterFailed(this.failedRoomEntryOperation); + this.failedRoomEntryOperation = null; + } + + if (this.AuthMode != AuthModeOption.Auth) + { + this.LoadBalancingPeer.OpSettings(this.EnableLobbyStatistics); + } + } + else if (this.Server == ServerConnection.GameServer) + { + this.State = ClientState.Joining; + + if (this.enterRoomParamsCache.JoinMode == JoinMode.RejoinOnly) + { + this.enterRoomParamsCache.PlayerProperties = null; + } + else + { + Hashtable allProps = new Hashtable(); + allProps.Merge(this.LocalPlayer.CustomProperties); + + if (!string.IsNullOrEmpty(this.LocalPlayer.NickName)) + { + allProps[ActorProperties.PlayerName] = this.LocalPlayer.NickName; + } + + this.enterRoomParamsCache.PlayerProperties = allProps; + } + + this.enterRoomParamsCache.OnGameServer = true; + + if (this.lastJoinType == JoinType.JoinRoom || this.lastJoinType == JoinType.JoinRandomRoom || this.lastJoinType == JoinType.JoinRandomOrCreateRoom || this.lastJoinType == JoinType.JoinOrCreateRoom) + { + this.LoadBalancingPeer.OpJoinRoom(this.enterRoomParamsCache); + } + else if (this.lastJoinType == JoinType.CreateRoom) + { + this.LoadBalancingPeer.OpCreateRoom(this.enterRoomParamsCache); + } + break; + } + + // optionally, OpAuth may return some data for the client to use. if it's available, call OnCustomAuthenticationResponse + Dictionary data = (Dictionary)operationResponse[ParameterCode.Data]; + if (data != null) + { + this.ConnectionCallbackTargets.OnCustomAuthenticationResponse(data); + } + break; + } + + case OperationCode.GetRegions: + // Debug.Log("GetRegions returned: " + operationResponse.ToStringFull()); + + if (operationResponse.ReturnCode == ErrorCode.InvalidAuthentication) + { + this.DebugReturn(DebugLevel.ERROR, string.Format("GetRegions failed. AppId is unknown on the (cloud) server. "+operationResponse.DebugMessage)); + this.Disconnect(DisconnectCause.InvalidAuthentication); + break; + } + if (operationResponse.ReturnCode != ErrorCode.Ok) + { + this.DebugReturn(DebugLevel.ERROR, "GetRegions failed. Can't provide regions list. ReturnCode: " + operationResponse.ReturnCode + ": " + operationResponse.DebugMessage); + this.Disconnect(DisconnectCause.InvalidAuthentication); + break; + } + if (this.RegionHandler == null) + { + this.RegionHandler = new RegionHandler(this.ServerPortOverrides.MasterServerPort); + } + + if (this.RegionHandler.IsPinging) + { + this.DebugReturn(DebugLevel.WARNING, "Received an response for OpGetRegions while the RegionHandler is pinging regions already. Skipping this response in favor of completing the current region-pinging."); + return; // in this particular case, we suppress the duplicate GetRegion response. we don't want a callback for this, cause there is a warning already. + } + + this.RegionHandler.SetRegions(operationResponse); + this.ConnectionCallbackTargets.OnRegionListReceived(this.RegionHandler); + + if (this.connectToBestRegion) + { + // ping minimal regions (if one is known) and connect + this.RegionHandler.PingMinimumOfRegions(this.OnRegionPingCompleted, this.bestRegionSummaryFromStorage); + } + break; + + case OperationCode.JoinRandomGame: // this happens only on the master server. on gameserver this is a "regular" join + case OperationCode.CreateGame: + case OperationCode.JoinGame: + + if (operationResponse.ReturnCode != 0) + { + if (this.Server == ServerConnection.GameServer) + { + this.failedRoomEntryOperation = operationResponse; + this.DisconnectToReconnect(); + } + else + { + this.State = (this.InLobby) ? ClientState.JoinedLobby : ClientState.ConnectedToMasterServer; + this.CallbackRoomEnterFailed(operationResponse); + } + } + else + { + if (this.Server == ServerConnection.GameServer) + { + this.GameEnteredOnGameServer(operationResponse); + } + else + { + this.GameServerAddress = (string)operationResponse[ParameterCode.Address]; + if (this.ServerPortOverrides.GameServerPort != 0) + { + //Debug.LogWarning("Incoming GameServer Address: " + this.GameServerAddress); + this.GameServerAddress = ReplacePortWithAlternative(this.GameServerAddress, this.ServerPortOverrides.GameServerPort); + //Debug.LogWarning("New GameServer Address: " + this.GameServerAddress); + } + + string roomName = operationResponse[ParameterCode.RoomName] as string; + if (!string.IsNullOrEmpty(roomName)) + { + this.enterRoomParamsCache.RoomName = roomName; + } + + this.DisconnectToReconnect(); + } + } + break; + + case OperationCode.GetGameList: + if (operationResponse.ReturnCode != 0) + { + this.DebugReturn(DebugLevel.ERROR, "GetGameList failed: " + operationResponse.ToStringFull()); + break; + } + + List _RoomInfoList = new List(); + + Hashtable games = (Hashtable)operationResponse[ParameterCode.GameList]; + foreach (string gameName in games.Keys) + { + _RoomInfoList.Add(new RoomInfo(gameName, (Hashtable)games[gameName])); + } + + this.LobbyCallbackTargets.OnRoomListUpdate(_RoomInfoList); + break; + + case OperationCode.JoinLobby: + this.State = ClientState.JoinedLobby; + this.LobbyCallbackTargets.OnJoinedLobby(); + break; + + case OperationCode.LeaveLobby: + this.State = ClientState.ConnectedToMasterServer; + this.LobbyCallbackTargets.OnLeftLobby(); + break; + + case OperationCode.Leave: + this.DisconnectToReconnect(); + break; + + case OperationCode.FindFriends: + if (operationResponse.ReturnCode != 0) + { + this.DebugReturn(DebugLevel.ERROR, "OpFindFriends failed: " + operationResponse.ToStringFull()); + this.friendListRequested = null; + break; + } + + bool[] onlineList = operationResponse[ParameterCode.FindFriendsResponseOnlineList] as bool[]; + string[] roomList = operationResponse[ParameterCode.FindFriendsResponseRoomIdList] as string[]; + + //if (onlineList == null || roomList == null || this.friendListRequested == null || onlineList.Length != this.friendListRequested.Length) + //{ + // // TODO: Check if we should handle this case better / more extensively + // this.DebugReturn(DebugLevel.ERROR, "OpFindFriends failed. Some list is not set. OpResponse: " + operationResponse.ToStringFull()); + // this.friendListRequested = null; + // this.isFetchingFriendList = false; + // break; + //} + + List friendList = new List(this.friendListRequested.Length); + for (int index = 0; index < this.friendListRequested.Length; index++) + { + FriendInfo friend = new FriendInfo(); + friend.UserId = this.friendListRequested[index]; + friend.Room = roomList[index]; + friend.IsOnline = onlineList[index]; + friendList.Insert(index, friend); + } + + this.friendListRequested = null; + + this.MatchMakingCallbackTargets.OnFriendListUpdate(friendList); + break; + + case OperationCode.WebRpc: + this.WebRpcCallbackTargets.OnWebRpcResponse(operationResponse); + break; + } + + if (this.OpResponseReceived != null) this.OpResponseReceived(operationResponse); + } + + /// + /// Uses the connection's statusCodes to advance the internal state and call operations as needed. + /// + /// This method is essential to update the internal state of a LoadBalancingClient. Overriding methods must call base.OnStatusChanged. + public virtual void OnStatusChanged(StatusCode statusCode) + { + switch (statusCode) + { + case StatusCode.Connect: + if (this.State == ClientState.ConnectingToNameServer) + { + if (this.LoadBalancingPeer.DebugOut >= DebugLevel.ALL) + { + this.DebugReturn(DebugLevel.ALL, "Connected to nameserver."); + } + + this.Server = ServerConnection.NameServer; + if (this.AuthValues != null) + { + this.AuthValues.Token = null; // when connecting to NameServer, invalidate the secret (only) + } + } + + if (this.State == ClientState.ConnectingToGameServer) + { + if (this.LoadBalancingPeer.DebugOut >= DebugLevel.ALL) + { + this.DebugReturn(DebugLevel.ALL, "Connected to gameserver."); + } + + this.Server = ServerConnection.GameServer; + } + + if (this.State == ClientState.ConnectingToMasterServer) + { + if (this.LoadBalancingPeer.DebugOut >= DebugLevel.ALL) + { + this.DebugReturn(DebugLevel.ALL, "Connected to masterserver."); + } + + this.Server = ServerConnection.MasterServer; + this.ConnectionCallbackTargets.OnConnected(); // if initial connect + } + + + if (this.LoadBalancingPeer.TransportProtocol != ConnectionProtocol.WebSocketSecure) + { + if (this.Server == ServerConnection.NameServer || this.AuthMode == AuthModeOption.Auth) + { + this.LoadBalancingPeer.EstablishEncryption(); + } + } + else + { + goto case StatusCode.EncryptionEstablished; + } + + break; + + case StatusCode.EncryptionEstablished: + if (this.Server == ServerConnection.NameServer) + { + this.State = ClientState.ConnectedToNameServer; + + // if there is no specific region to connect to, get available regions from the Name Server. the result triggers next actions in workflow + if (string.IsNullOrEmpty(this.CloudRegion)) + { + this.OpGetRegions(); + break; + } + } + else + { + // auth AuthOnce, no explicit authentication is needed on Master Server and Game Server. this is done via token, so: break + if (this.AuthMode == AuthModeOption.AuthOnce || this.AuthMode == AuthModeOption.AuthOnceWss) + { + break; + } + } + + // authenticate in all other cases (using the CloudRegion, if available) + bool authenticating = this.CallAuthenticate(); + if (authenticating) + { + this.State = ClientState.Authenticating; + } + else + { + this.DebugReturn(DebugLevel.ERROR, "OpAuthenticate failed. Check log output and AuthValues. State: " + this.State); + } + break; + + case StatusCode.Disconnect: + // disconnect due to connection exception is handled below (don't connect to GS or master in that case) + this.friendListRequested = null; + + bool wasInRoom = this.CurrentRoom != null; + this.CurrentRoom = null; // players get cleaned up inside this, too, except LocalPlayer (which we keep) + this.ChangeLocalID(-1); // depends on this.CurrentRoom, so it must be called after updating that + + if (this.Server == ServerConnection.GameServer && wasInRoom) + { + this.MatchMakingCallbackTargets.OnLeftRoom(); + } + + if (this.ExpectedProtocol != null && this.LoadBalancingPeer.TransportProtocol != this.ExpectedProtocol) + { + this.DebugReturn(DebugLevel.INFO, string.Format("On disconnect switches TransportProtocol to ExpectedProtocol: {0}.", this.ExpectedProtocol)); + this.LoadBalancingPeer.TransportProtocol = (ConnectionProtocol)this.ExpectedProtocol; + this.ExpectedProtocol = null; + } + + switch (this.State) + { + case ClientState.ConnectWithFallbackProtocol: + this.EnableProtocolFallback = false; // the client does a fallback only one time + this.LoadBalancingPeer.TransportProtocol = (this.LoadBalancingPeer.TransportProtocol == ConnectionProtocol.Tcp) ? ConnectionProtocol.Udp : ConnectionProtocol.Tcp; + this.NameServerPortInAppSettings = 0; // this does not affect the ServerSettings file, just a variable at runtime + this.ServerPortOverrides = new PhotonPortDefinition(); // use default ports for the fallback + + if (!this.LoadBalancingPeer.Connect(this.NameServerAddress, this.ProxyServerAddress, this.AppId, this.TokenForInit)) + { + return; + } + this.State = ClientState.ConnectingToNameServer; + break; + case ClientState.PeerCreated: + case ClientState.Disconnecting: + if (this.AuthValues != null) + { + this.AuthValues.Token = null; // when leaving the server, invalidate the secret (but not the auth values) + } + this.State = ClientState.Disconnected; + this.ConnectionCallbackTargets.OnDisconnected(this.DisconnectedCause); + break; + + case ClientState.DisconnectingFromGameServer: + case ClientState.DisconnectingFromNameServer: + this.ConnectToMasterServer(); // this gets the client back to the Master Server + break; + + case ClientState.DisconnectingFromMasterServer: + this.Connect(this.GameServerAddress, this.ProxyServerAddress, ServerConnection.GameServer); // this connects the client with the Game Server (when joining/creating a room) + break; + + case ClientState.Disconnected: + // this client is already Disconnected, so no further action is needed. + // this.DebugReturn(DebugLevel.INFO, "LBC.OnStatusChanged(Disconnect) this.State: " + this.State + ". Server: " + this.Server); + break; + + default: + string stacktrace = ""; + #if DEBUG && !NETFX_CORE + stacktrace = new System.Diagnostics.StackTrace(true).ToString(); + #endif + this.DebugReturn(DebugLevel.WARNING, "Got a unexpected Disconnect in LoadBalancingClient State: " + this.State + ". Server: " + this.Server + " Trace: " + stacktrace); + + if (this.AuthValues != null) + { + this.AuthValues.Token = null; // when leaving the server, invalidate the secret (but not the auth values) + } + this.State = ClientState.Disconnected; + this.ConnectionCallbackTargets.OnDisconnected(this.DisconnectedCause); + break; + } + break; + + case StatusCode.DisconnectByServerUserLimit: + this.DebugReturn(DebugLevel.ERROR, "This connection was rejected due to the apps CCU limit."); + this.DisconnectedCause = DisconnectCause.MaxCcuReached; + this.State = ClientState.Disconnecting; + break; + case StatusCode.DnsExceptionOnConnect: + this.DisconnectedCause = DisconnectCause.DnsExceptionOnConnect; + this.State = ClientState.Disconnecting; + break; + case StatusCode.ServerAddressInvalid: + this.DisconnectedCause = DisconnectCause.ServerAddressInvalid; + this.State = ClientState.Disconnecting; + break; + case StatusCode.ExceptionOnConnect: + case StatusCode.SecurityExceptionOnConnect: + case StatusCode.EncryptionFailedToEstablish: + this.DisconnectedCause = DisconnectCause.ExceptionOnConnect; + + // if enabled, the client can attempt to connect with another networking-protocol to check if that connects + if (this.EnableProtocolFallback && this.State == ClientState.ConnectingToNameServer) + { + this.State = ClientState.ConnectWithFallbackProtocol; + } + else + { + this.State = ClientState.Disconnecting; + } + break; + case StatusCode.Exception: + case StatusCode.ExceptionOnReceive: + case StatusCode.SendError: + this.DisconnectedCause = DisconnectCause.Exception; + this.State = ClientState.Disconnecting; + break; + case StatusCode.DisconnectByServerTimeout: + this.DisconnectedCause = DisconnectCause.ServerTimeout; + this.State = ClientState.Disconnecting; + break; + case StatusCode.DisconnectByServerLogic: + this.DisconnectedCause = DisconnectCause.DisconnectByServerLogic; + this.State = ClientState.Disconnecting; + break; + case StatusCode.DisconnectByServerReasonUnknown: + this.DisconnectedCause = DisconnectCause.DisconnectByServerReasonUnknown; + this.State = ClientState.Disconnecting; + break; + case StatusCode.TimeoutDisconnect: + this.DisconnectedCause = DisconnectCause.ClientTimeout; + + // if enabled, the client can attempt to connect with another networking-protocol to check if that connects + if (this.EnableProtocolFallback && this.State == ClientState.ConnectingToNameServer) + { + this.State = ClientState.ConnectWithFallbackProtocol; + } + else + { + this.State = ClientState.Disconnecting; + } + break; + } + } + + + /// + /// Uses the photonEvent's provided by the server to advance the internal state and call ops as needed. + /// + /// This method is essential to update the internal state of a LoadBalancingClient. Overriding methods must call base.OnEvent. + public virtual void OnEvent(EventData photonEvent) + { + int actorNr = photonEvent.Sender; + Player originatingPlayer = (this.CurrentRoom != null) ? this.CurrentRoom.GetPlayer(actorNr) : null; + + switch (photonEvent.Code) + { + case EventCode.GameList: + case EventCode.GameListUpdate: + List _RoomInfoList = new List(); + + Hashtable games = (Hashtable)photonEvent[ParameterCode.GameList]; + foreach (string gameName in games.Keys) + { + _RoomInfoList.Add(new RoomInfo(gameName, (Hashtable)games[gameName])); + } + + this.LobbyCallbackTargets.OnRoomListUpdate(_RoomInfoList); + + break; + + case EventCode.Join: + Hashtable actorProperties = (Hashtable)photonEvent[ParameterCode.PlayerProperties]; + + if (originatingPlayer == null) + { + if (actorNr > 0) + { + originatingPlayer = this.CreatePlayer(string.Empty, actorNr, false, actorProperties); + this.CurrentRoom.StorePlayer(originatingPlayer); + } + } + else + { + originatingPlayer.InternalCacheProperties(actorProperties); + originatingPlayer.IsInactive = false; + originatingPlayer.HasRejoined = actorNr != this.LocalPlayer.ActorNumber; // event is for non-local player, who is known (by ActorNumber), so it's a returning player + } + + if (actorNr == this.LocalPlayer.ActorNumber) + { + // in this player's own join event, we get a complete list of players in the room, so check if we know each of the + int[] actorsInRoom = (int[])photonEvent[ParameterCode.ActorList]; + this.UpdatedActorList(actorsInRoom); + + // any operation that does a "rejoin" will set this value to true. this can indicate if the local player returns to a room. + originatingPlayer.HasRejoined = this.enterRoomParamsCache.JoinMode == JoinMode.RejoinOnly; + + // joinWithCreateOnDemand can turn an OpJoin into creating the room. Then actorNumber is 1 and callback: OnCreatedRoom() + if (this.lastJoinType == JoinType.CreateRoom || (this.lastJoinType == JoinType.JoinOrCreateRoom && this.LocalPlayer.ActorNumber == 1)) + { + this.MatchMakingCallbackTargets.OnCreatedRoom(); + } + + this.MatchMakingCallbackTargets.OnJoinedRoom(); + } + else + { + this.InRoomCallbackTargets.OnPlayerEnteredRoom(originatingPlayer); + } + break; + + case EventCode.Leave: + if (originatingPlayer != null) + { + bool isInactive = false; + if (photonEvent.Parameters.ContainsKey(ParameterCode.IsInactive)) + { + isInactive = (bool)photonEvent.Parameters[ParameterCode.IsInactive]; + } + + if (isInactive) + { + originatingPlayer.IsInactive = true; + } + else + { + originatingPlayer.IsInactive = false; + this.CurrentRoom.RemovePlayer(actorNr); + } + } + + if (photonEvent.Parameters.ContainsKey(ParameterCode.MasterClientId)) + { + int newMaster = (int)photonEvent[ParameterCode.MasterClientId]; + if (newMaster != 0) + { + this.CurrentRoom.masterClientId = newMaster; + this.InRoomCallbackTargets.OnMasterClientSwitched(this.CurrentRoom.GetPlayer(newMaster)); + } + } + // finally, send notification that a player left + this.InRoomCallbackTargets.OnPlayerLeftRoom(originatingPlayer); + break; + + case EventCode.PropertiesChanged: + // whenever properties are sent in-room, they can be broadcasted as event (which we handle here) + // we get PLAYERproperties if actorNr > 0 or ROOMproperties if actorNumber is not set or 0 + int targetActorNr = 0; + if (photonEvent.Parameters.ContainsKey(ParameterCode.TargetActorNr)) + { + targetActorNr = (int)photonEvent[ParameterCode.TargetActorNr]; + } + + Hashtable gameProperties = null; + Hashtable actorProps = null; + if (targetActorNr == 0) + { + gameProperties = (Hashtable)photonEvent[ParameterCode.Properties]; + } + else + { + actorProps = (Hashtable)photonEvent[ParameterCode.Properties]; + } + + this.ReadoutProperties(gameProperties, actorProps, targetActorNr); + break; + + case EventCode.AppStats: + // only the master server sends these in (1 minute) intervals + this.PlayersInRoomsCount = (int)photonEvent[ParameterCode.PeerCount]; + this.RoomsCount = (int)photonEvent[ParameterCode.GameCount]; + this.PlayersOnMasterCount = (int)photonEvent[ParameterCode.MasterPeerCount]; + break; + + case EventCode.LobbyStats: + string[] names = photonEvent[ParameterCode.LobbyName] as string[]; + int[] peers = photonEvent[ParameterCode.PeerCount] as int[]; + int[] rooms = photonEvent[ParameterCode.GameCount] as int[]; + + byte[] types; + ByteArraySlice slice = photonEvent[ParameterCode.LobbyType] as ByteArraySlice; + bool useByteArraySlice = slice != null; + + if (useByteArraySlice) + { + types = slice.Buffer; + } + else + { + types = photonEvent[ParameterCode.LobbyType] as byte[]; + } + + this.lobbyStatistics.Clear(); + for (int i = 0; i < names.Length; i++) + { + TypedLobbyInfo info = new TypedLobbyInfo(); + info.Name = names[i]; + info.Type = (LobbyType)types[i]; + info.PlayerCount = peers[i]; + info.RoomCount = rooms[i]; + + this.lobbyStatistics.Add(info); + } + + if (useByteArraySlice) + { + slice.Release(); + } + + this.LobbyCallbackTargets.OnLobbyStatisticsUpdate(this.lobbyStatistics); + break; + + case EventCode.ErrorInfo: + this.ErrorInfoCallbackTargets.OnErrorInfo(new ErrorInfo(photonEvent)); + break; + + case EventCode.AuthEvent: + if (this.AuthValues == null) + { + this.AuthValues = new AuthenticationValues(); + } + + this.AuthValues.Token = photonEvent[ParameterCode.Token]; + this.tokenCache = this.AuthValues.Token; + break; + + } + + this.UpdateCallbackTargets(); + if (this.EventReceived != null) + { + this.EventReceived(photonEvent); + } + } + + /// In Photon 4, "raw messages" will get their own callback method in the interface. Not used yet. + public virtual void OnMessage(object message) + { + this.DebugReturn(DebugLevel.ALL, string.Format("got OnMessage {0}", message)); + } + + #endregion + + + private void OnDisconnectMessageReceived(DisconnectMessage obj) + { + this.DebugReturn(DebugLevel.ERROR, string.Format("Got DisconnectMessage. Code: {0} Msg: \"{1}\". Debug Info: {2}", obj.Code, obj.DebugMessage, obj.Parameters.ToStringFull())); + this.Disconnect(DisconnectCause.DisconnectByDisconnectMessage); + } + + + /// A callback of the RegionHandler, provided in OnRegionListReceived. + /// The regionHandler wraps up best region and other region relevant info. + private void OnRegionPingCompleted(RegionHandler regionHandler) + { + //Debug.Log("OnRegionPingCompleted " + regionHandler.BestRegion); + //Debug.Log("RegionPingSummary: " + regionHandler.SummaryToCache); + this.SummaryToCache = regionHandler.SummaryToCache; + this.ConnectToRegionMaster(regionHandler.BestRegion.Code); + } + + + protected internal static string ReplacePortWithAlternative(string address, ushort replacementPort) + { + bool webSocket = address.StartsWith("ws"); + if (webSocket) + { + UriBuilder urib = new UriBuilder(address); + urib.Port = replacementPort; + return urib.ToString(); + } + else + { + UriBuilder urib = new UriBuilder(string.Format("scheme://{0}", address)); + return string.Format("{0}:{1}", urib.Host, replacementPort); + } + } + + private void SetupEncryption(Dictionary encryptionData) + { + var mode = (EncryptionMode)(byte)encryptionData[EncryptionDataParameters.Mode]; + switch (mode) + { + case EncryptionMode.PayloadEncryption: + byte[] encryptionSecret = (byte[])encryptionData[EncryptionDataParameters.Secret1]; + this.LoadBalancingPeer.InitPayloadEncryption(encryptionSecret); + break; + case EncryptionMode.DatagramEncryption: + case EncryptionMode.DatagramEncryptionRandomSequence: + { + byte[] secret1 = (byte[])encryptionData[EncryptionDataParameters.Secret1]; + byte[] secret2 = (byte[])encryptionData[EncryptionDataParameters.Secret2]; + this.LoadBalancingPeer.InitDatagramEncryption(secret1, secret2, mode == EncryptionMode.DatagramEncryptionRandomSequence); + } + break; + case EncryptionMode.DatagramEncryptionGCM: + { + byte[] secret1 = (byte[])encryptionData[EncryptionDataParameters.Secret1]; + this.LoadBalancingPeer.InitDatagramEncryption(secret1, null, true, true); + } + break; + default: + throw new ArgumentOutOfRangeException(); + } + } + + + + /// + /// This operation makes Photon call your custom web-service by path/name with the given parameters (converted into Json). + /// Use as a callback. + /// + /// + /// A WebRPC calls a custom, http-based function on a server you provide. The uriPath is relative to a "base path" + /// which is configured server-side. The sent parameters get converted from C# types to Json. Vice versa, the response + /// of the web-service will be converted to C# types and sent back as normal operation response. + /// + /// To use this feature, you have to setup your server: + /// + /// For a Photon Cloud application, + /// visit the Dashboard and setup "WebHooks". The BaseUrl is used for WebRPCs as well. + /// + /// The class is a helper-class that extracts the most valuable content from the WebRPC + /// response. + /// + /// The url path to call, relative to the baseUrl configured on Photon's server-side. + /// The parameters to send to the web-service method. + /// Defines if the authentication cookie gets sent to a WebHook (if setup). + public bool OpWebRpc(string uriPath, object parameters, bool sendAuthCookie = false) + { + if (string.IsNullOrEmpty(uriPath)) + { + this.DebugReturn(DebugLevel.ERROR, "WebRPC method name must not be null nor empty."); + return false; + } + if (!this.CheckIfOpCanBeSent(OperationCode.WebRpc, this.Server, "WebRpc")) + { + return false; + } + Dictionary opParameters = new Dictionary(); + opParameters.Add(ParameterCode.UriPath, uriPath); + if (parameters != null) + { + opParameters.Add(ParameterCode.WebRpcParameters, parameters); + } + if (sendAuthCookie) + { + opParameters.Add(ParameterCode.EventForward, WebFlags.SendAuthCookieConst); + } + + //return this.LoadBalancingPeer.OpCustom(OperationCode.WebRpc, opParameters, true); + return this.LoadBalancingPeer.SendOperation(OperationCode.WebRpc, opParameters, SendOptions.SendReliable); + } + + + /// + /// Registers an object for callbacks for the implemented callback-interfaces. + /// + /// + /// Adding and removing callback targets is queued to not mess with callbacks in execution. + /// Internally, this means that the addition/removal is done before the LoadBalancingClient + /// calls the next callbacks. This detail should not affect a game's workflow. + /// + /// The covered callback interfaces are: IConnectionCallbacks, IMatchmakingCallbacks, + /// ILobbyCallbacks, IInRoomCallbacks, IOnEventCallback and IWebRpcCallback. + /// + /// See: + /// + /// The object that registers to get callbacks from this client. + public void AddCallbackTarget(object target) + { + this.callbackTargetChanges.Enqueue(new CallbackTargetChange(target, true)); + } + + /// + /// Unregisters an object from callbacks for the implemented callback-interfaces. + /// + /// + /// Adding and removing callback targets is queued to not mess with callbacks in execution. + /// Internally, this means that the addition/removal is done before the LoadBalancingClient + /// calls the next callbacks. This detail should not affect a game's workflow. + /// + /// The covered callback interfaces are: IConnectionCallbacks, IMatchmakingCallbacks, + /// ILobbyCallbacks, IInRoomCallbacks, IOnEventCallback and IWebRpcCallback. + /// + /// See: + /// + /// The object that unregisters from getting callbacks. + public void RemoveCallbackTarget(object target) + { + this.callbackTargetChanges.Enqueue(new CallbackTargetChange(target, false)); + } + + + /// + /// Applies queued callback cahnges from a queue to the actual containers. Will cause exceptions if used while callbacks execute. + /// + /// + /// There is no explicit check that this is not called during callbacks, however the implemented, private logic takes care of this. + /// + protected internal void UpdateCallbackTargets() + { + while (this.callbackTargetChanges.Count > 0) + { + CallbackTargetChange change = this.callbackTargetChanges.Dequeue(); + + if (change.AddTarget) + { + if (this.callbackTargets.Contains(change.Target)) + { + //Debug.Log("UpdateCallbackTargets skipped adding a target, as the object is already registered. Target: " + change.Target); + continue; + } + + this.callbackTargets.Add(change.Target); + } + else + { + if (!this.callbackTargets.Contains(change.Target)) + { + //Debug.Log("UpdateCallbackTargets skipped removing a target, as the object is not registered. Target: " + change.Target); + continue; + } + + this.callbackTargets.Remove(change.Target); + } + + this.UpdateCallbackTarget(change, this.InRoomCallbackTargets); + this.UpdateCallbackTarget(change, this.ConnectionCallbackTargets); + this.UpdateCallbackTarget(change, this.MatchMakingCallbackTargets); + this.UpdateCallbackTarget(change, this.LobbyCallbackTargets); + this.UpdateCallbackTarget(change, this.WebRpcCallbackTargets); + this.UpdateCallbackTarget(change, this.ErrorInfoCallbackTargets); + + IOnEventCallback onEventCallback = change.Target as IOnEventCallback; + if (onEventCallback != null) + { + if (change.AddTarget) + { + EventReceived += onEventCallback.OnEvent; + } + else + { + EventReceived -= onEventCallback.OnEvent; + } + } + } + } + + /// Helper method to cast and apply a target per (interface) type. + /// Either of the interfaces for callbacks. + /// The queued change to apply (add or remove) some target. + /// The container that calls callbacks on it's list of targets. + private void UpdateCallbackTarget(CallbackTargetChange change, List container) where T : class + { + T target = change.Target as T; + if (target != null) + { + if (change.AddTarget) + { + container.Add(target); + } + else + { + container.Remove(target); + } + } + } + } + + + /// + /// Collection of "organizational" callbacks for the Realtime Api to cover: Connection and Regions. + /// + /// + /// Classes that implement this interface must be registered to get callbacks for various situations. + /// + /// To register for callbacks, call and pass the class implementing this interface + /// To stop getting callbacks, call and pass the class implementing this interface + /// + /// + /// \ingroup callbacks + public interface IConnectionCallbacks + { + /// + /// Called to signal that the "low level connection" got established but before the client can call operation on the server. + /// + /// + /// After the (low level transport) connection is established, the client will automatically send + /// the Authentication operation, which needs to get a response before the client can call other operations. + /// + /// Your logic should wait for either: OnRegionListReceived or OnConnectedToMaster. + /// + /// This callback is useful to detect if the server can be reached at all (technically). + /// Most often, it's enough to implement OnDisconnected(DisconnectCause cause) and check for the cause. + /// + /// This is not called for transitions from the masterserver to game servers. + /// + void OnConnected(); + + /// + /// Called when the client is connected to the Master Server and ready for matchmaking and other tasks. + /// + /// + /// The list of available rooms won't become available unless you join a lobby via LoadBalancingClient.OpJoinLobby. + /// You can join rooms and create them even without being in a lobby. The default lobby is used in that case. + /// + void OnConnectedToMaster(); + + /// + /// Called after disconnecting from the Photon server. It could be a failure or an explicit disconnect call + /// + /// + /// The reason for this disconnect is provided as DisconnectCause. + /// + void OnDisconnected(DisconnectCause cause); + + /// + /// Called when the Name Server provided a list of regions for your title. + /// + /// + /// This callback is called as soon as the list is available. No pings were sent for Best Region selection yet. + /// If the client is set to connect to the Best Region (lowest ping), one or more regions get pinged. + /// Not all regions are pinged. As soon as the results are final, the client will connect to the best region, + /// so you can check the ping results when connected to the Master Server. + /// + /// Check the RegionHandler class description, to make use of the provided values. + /// + /// The currently used RegionHandler. + void OnRegionListReceived(RegionHandler regionHandler); + + + /// + /// Called when your Custom Authentication service responds with additional data. + /// + /// + /// Custom Authentication services can include some custom data in their response. + /// When present, that data is made available in this callback as Dictionary. + /// While the keys of your data have to be strings, the values can be either string or a number (in Json). + /// You need to make extra sure, that the value type is the one you expect. Numbers become (currently) int64. + /// + /// Example: void OnCustomAuthenticationResponse(Dictionary<string, object> data) { ... } + /// + /// + void OnCustomAuthenticationResponse(Dictionary data); + + /// + /// Called when the custom authentication failed. Followed by disconnect! + /// + /// + /// Custom Authentication can fail due to user-input, bad tokens/secrets. + /// If authentication is successful, this method is not called. Implement OnJoinedLobby() or OnConnectedToMaster() (as usual). + /// + /// During development of a game, it might also fail due to wrong configuration on the server side. + /// In those cases, logging the debugMessage is very important. + /// + /// Unless you setup a custom authentication service for your app (in the [Dashboard](https://dashboard.photonengine.com)), + /// this won't be called! + /// + /// Contains a debug message why authentication failed. This has to be fixed during development. + void OnCustomAuthenticationFailed(string debugMessage); + + } + + + /// + /// Collection of "organizational" callbacks for the Realtime Api to cover the Lobby. + /// + /// + /// Classes that implement this interface must be registered to get callbacks for various situations. + /// + /// To register for callbacks, call and pass the class implementing this interface + /// To stop getting callbacks, call and pass the class implementing this interface + /// + /// + /// \ingroup callbacks + public interface ILobbyCallbacks + { + + /// + /// Called on entering a lobby on the Master Server. The actual room-list updates will call OnRoomListUpdate. + /// + /// + /// While in the lobby, the roomlist is automatically updated in fixed intervals (which you can't modify in the public cloud). + /// The room list gets available via OnRoomListUpdate. + /// + void OnJoinedLobby(); + + /// + /// Called after leaving a lobby. + /// + /// + /// When you leave a lobby, [OpCreateRoom](@ref OpCreateRoom) and [OpJoinRandomRoom](@ref OpJoinRandomRoom) + /// automatically refer to the default lobby. + /// + void OnLeftLobby(); + + /// + /// Called for any update of the room-listing while in a lobby (InLobby) on the Master Server. + /// + /// + /// Each item is a RoomInfo which might include custom properties (provided you defined those as lobby-listed when creating a room). + /// Not all types of lobbies provide a listing of rooms to the client. Some are silent and specialized for server-side matchmaking. + /// + /// The list is sorted using two criteria: open or closed, full or not. So the list is composed of three groups, in this order: + /// + /// first group: open and not full (joinable).
+ /// second group: full but not closed (not joinable).
+ /// third group: closed (not joinable, could be full or not).
+ /// + /// In each group, entries do not have any particular order (random). + /// + /// The list of rooms (or rooms' updates) is also limited in number, see Lobby Limits. + ///
+ void OnRoomListUpdate(List roomList); + + /// + /// Called when the Master Server sent an update for the Lobby Statistics. + /// + /// + /// This callback has two preconditions: + /// EnableLobbyStatistics must be set to true, before this client connects. + /// And the client has to be connected to the Master Server, which is providing the info about lobbies. + /// + void OnLobbyStatisticsUpdate(List lobbyStatistics); + } + + + /// + /// Collection of "organizational" callbacks for the Realtime Api to cover Matchmaking. + /// + /// + /// Classes that implement this interface must be registered to get callbacks for various situations. + /// + /// To register for callbacks, call and pass the class implementing this interface + /// To stop getting callbacks, call and pass the class implementing this interface + /// + /// + /// \ingroup callbacks + public interface IMatchmakingCallbacks + { + + /// + /// Called when the server sent the response to a FindFriends request. + /// + /// + /// After calling OpFindFriends, the Master Server will cache the friend list and send updates to the friend + /// list. The friends includes the name, userId, online state and the room (if any) for each requested user/friend. + /// + /// Use the friendList to update your UI and store it, if the UI should highlight changes. + /// + void OnFriendListUpdate(List friendList); + + /// + /// Called when this client created a room and entered it. OnJoinedRoom() will be called as well. + /// + /// + /// This callback is only called on the client which created a room (see OpCreateRoom). + /// + /// As any client might close (or drop connection) anytime, there is a chance that the + /// creator of a room does not execute OnCreatedRoom. + /// + /// If you need specific room properties or a "start signal", implement OnMasterClientSwitched() + /// and make each new MasterClient check the room's state. + /// + void OnCreatedRoom(); + + /// + /// Called when the server couldn't create a room (OpCreateRoom failed). + /// + /// + /// Creating a room may fail for various reasons. Most often, the room already exists (roomname in use) or + /// the RoomOptions clash and it's impossible to create the room. + /// + /// When creating a room fails on a Game Server: + /// The client will cache the failure internally and returns to the Master Server before it calls the fail-callback. + /// This way, the client is ready to find/create a room at the moment of the callback. + /// In this case, the client skips calling OnConnectedToMaster but returning to the Master Server will still call OnConnected. + /// Treat callbacks of OnConnected as pure information that the client could connect. + /// + /// Operation ReturnCode from the server. + /// Debug message for the error. + void OnCreateRoomFailed(short returnCode, string message); + + /// + /// Called when the LoadBalancingClient entered a room, no matter if this client created it or simply joined. + /// + /// + /// When this is called, you can access the existing players in Room.Players, their custom properties and Room.CustomProperties. + /// + /// In this callback, you could create player objects. For example in Unity, instantiate a prefab for the player. + /// + /// If you want a match to be started "actively", enable the user to signal "ready" (using OpRaiseEvent or a Custom Property). + /// + void OnJoinedRoom(); + + /// + /// Called when a previous OpJoinRoom call failed on the server. + /// + /// + /// Joining a room may fail for various reasons. Most often, the room is full or does not exist anymore + /// (due to someone else being faster or closing the room). + /// + /// When joining a room fails on a Game Server: + /// The client will cache the failure internally and returns to the Master Server before it calls the fail-callback. + /// This way, the client is ready to find/create a room at the moment of the callback. + /// In this case, the client skips calling OnConnectedToMaster but returning to the Master Server will still call OnConnected. + /// Treat callbacks of OnConnected as pure information that the client could connect. + /// + /// Operation ReturnCode from the server. + /// Debug message for the error. + void OnJoinRoomFailed(short returnCode, string message); + + /// + /// Called when a previous OpJoinRandom call failed on the server. + /// + /// + /// The most common causes are that a room is full or does not exist (due to someone else being faster or closing the room). + /// + /// This operation is only ever sent to the Master Server. Once a room is found by the Master Server, the client will + /// head off to the designated Game Server and use the operation Join on the Game Server. + /// + /// When using multiple lobbies (via OpJoinLobby or a TypedLobby parameter), another lobby might have more/fitting rooms.
+ ///
+ /// Operation ReturnCode from the server. + /// Debug message for the error. + void OnJoinRandomFailed(short returnCode, string message); + + /// + /// Called when the local user/client left a room, so the game's logic can clean up it's internal state. + /// + /// + /// When leaving a room, the LoadBalancingClient will disconnect the Game Server and connect to the Master Server. + /// This wraps up multiple internal actions. + /// + /// Wait for the callback OnConnectedToMaster, before you use lobbies and join or create rooms. + /// + /// OnLeftRoom also gets called, when the application quits. + /// It makes sense to check static ConnectionHandler.AppQuits before loading scenes in OnLeftRoom(). + /// + void OnLeftRoom(); + } + + /// + /// Collection of "in room" callbacks for the Realtime Api to cover: Players entering or leaving, property updates and Master Client switching. + /// + /// + /// Classes that implement this interface must be registered to get callbacks for various situations. + /// + /// To register for callbacks, call and pass the class implementing this interface + /// To stop getting callbacks, call and pass the class implementing this interface + /// + /// + /// \ingroup callbacks + public interface IInRoomCallbacks + { + /// + /// Called when a remote player entered the room. This Player is already added to the playerlist. + /// + /// + /// If your game starts with a certain number of players, this callback can be useful to check the + /// Room.playerCount and find out if you can start. + /// + void OnPlayerEnteredRoom(Player newPlayer); + + /// + /// Called when a remote player left the room or became inactive. Check otherPlayer.IsInactive. + /// + /// + /// If another player leaves the room or if the server detects a lost connection, this callback will + /// be used to notify your game logic. + /// + /// Depending on the room's setup, players may become inactive, which means they may return and retake + /// their spot in the room. In such cases, the Player stays in the Room.Players dictionary. + /// + /// If the player is not just inactive, it gets removed from the Room.Players dictionary, before + /// the callback is called. + /// + void OnPlayerLeftRoom(Player otherPlayer); + + + /// + /// Called when room properties changed. The propertiesThatChanged contain only the keys that changed. + /// + /// + /// In most cases, this method gets called when some player changes the Room Properties. + /// However, there are also "Well Known Properties" (which use byte keys) and this callback may include them. + /// Especially when entering a room, the server will also send the required Well Known Properties and they + /// are not filtered out for the OnRoomPropertiesUpdate callback. + /// + /// You can safely ignore the byte typed keys in propertiesThatChanged. + /// + /// Changing properties is usually done by Room.SetCustomProperties. + /// + /// + void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged); + + /// + /// Called when custom player-properties are changed. + /// + /// + /// Changing properties must be done by Player.SetCustomProperties, which causes this callback locally, too. + /// + /// Contains Player that changed. + /// Contains the properties that changed. + void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps); + + /// + /// Called after switching to a new MasterClient when the current one leaves. + /// + /// + /// This is not called when this client enters a room. + /// The former MasterClient is still in the player list when this method get called. + /// + void OnMasterClientSwitched(Player newMasterClient); + } + + + /// + /// Event callback for the Realtime Api. Covers events from the server and those sent by clients via OpRaiseEvent. + /// + /// + /// Classes that implement this interface must be registered to get callbacks for various situations. + /// + /// To register for callbacks, call and pass the class implementing this interface + /// To stop getting callbacks, call and pass the class implementing this interface + /// + /// + /// \ingroup callbacks + public interface IOnEventCallback + { + /// Called for any incoming events. + /// + /// To receive events, implement IOnEventCallback in any class and register it via AddCallbackTarget + /// (either in LoadBalancingClient or PhotonNetwork). + /// + /// With the EventData.Sender you can look up the Player who sent the event. + /// + /// It is best practice to assign an eventCode for each different type of content and action, so the Code + /// will be essential to read the incoming events. + /// + void OnEvent(EventData photonEvent); + } + + /// + /// Interface for "WebRpc" callbacks for the Realtime Api. Currently includes only responses for Web RPCs. + /// + /// + /// Classes that implement this interface must be registered to get callbacks for various situations. + /// + /// To register for callbacks, call and pass the class implementing this interface + /// To stop getting callbacks, call and pass the class implementing this interface + /// + /// + /// \ingroup callbacks + public interface IWebRpcCallback + { + /// + /// Called when the response to a WebRPC is available. See . + /// + /// + /// Important: The response.ReturnCode is 0 if Photon was able to reach your web-service.
+ /// The content of the response is what your web-service sent. You can create a WebRpcResponse from it.
+ /// Example: WebRpcResponse webResponse = new WebRpcResponse(operationResponse);
+ /// + /// Please note: Class OperationResponse is in a namespace which needs to be "used":
+ /// using ExitGames.Client.Photon; // includes OperationResponse (and other classes) + ///
+ /// + /// public void OnWebRpcResponse(OperationResponse response) + /// { + /// Debug.LogFormat("WebRPC operation response {0}", response.ToStringFull()); + /// switch (response.ReturnCode) + /// { + /// case ErrorCode.Ok: + /// WebRpcResponse webRpcResponse = new WebRpcResponse(response); + /// Debug.LogFormat("Parsed WebRPC response {0}", response.ToStringFull()); + /// if (string.IsNullOrEmpty(webRpcResponse.Name)) + /// { + /// Debug.LogError("Unexpected: WebRPC response did not contain WebRPC method name"); + /// } + /// if (webRpcResponse.ResultCode == 0) // success + /// { + /// switch (webRpcResponse.Name) + /// { + /// // todo: add your code here + /// case GetGameListWebRpcMethodName: // example + /// // ... + /// break; + /// } + /// } + /// else if (webRpcResponse.ResultCode == -1) + /// { + /// Debug.LogErrorFormat("Web server did not return ResultCode for WebRPC method=\"{0}\", Message={1}", webRpcResponse.Name, webRpcResponse.Message); + /// } + /// else + /// { + /// Debug.LogErrorFormat("Web server returned ResultCode={0} for WebRPC method=\"{1}\", Message={2}", webRpcResponse.ResultCode, webRpcResponse.Name, webRpcResponse.Message); + /// } + /// break; + /// case ErrorCode.ExternalHttpCallFailed: // web service unreachable + /// Debug.LogErrorFormat("WebRPC call failed as request could not be sent to the server. {0}", response.DebugMessage); + /// break; + /// case ErrorCode.HttpLimitReached: // too many WebRPCs in a short period of time + /// // the debug message should contain the limit exceeded + /// Debug.LogErrorFormat("WebRPCs rate limit exceeded: {0}", response.DebugMessage); + /// break; + /// case ErrorCode.InvalidOperation: // WebRPC not configured at all OR not configured properly OR trying to send on name server + /// if (PhotonNetwork.Server == ServerConnection.NameServer) + /// { + /// Debug.LogErrorFormat("WebRPC not supported on NameServer. {0}", response.DebugMessage); + /// } + /// else + /// { + /// Debug.LogErrorFormat("WebRPC not properly configured or not configured at all. {0}", response.DebugMessage); + /// } + /// break; + /// default: + /// // other unknown error, unexpected + /// Debug.LogErrorFormat("Unexpected error, {0} {1}", response.ReturnCode, response.DebugMessage); + /// break; + /// } + /// } + /// + /// + void OnWebRpcResponse(OperationResponse response); + } + + /// + /// Interface for event callback for the Realtime Api. + /// + /// + /// Classes that implement this interface must be registered to get callbacks for various situations. + /// + /// To register for callbacks, call and pass the class implementing this interface + /// To stop getting callbacks, call and pass the class implementing this interface + /// + /// + /// \ingroup callbacks + public interface IErrorInfoCallback + { + /// + /// Called when the client receives an event from the server indicating that an error happened there. + /// + /// + /// In most cases this could be either: + /// 1. an error from webhooks plugin (if HasErrorInfo is enabled), read more here: + /// https://doc.photonengine.com/en-us/realtime/current/gameplay/web-extensions/webhooks#options + /// 2. an error sent from a custom server plugin via PluginHost.BroadcastErrorInfoEvent, see example here: + /// https://doc.photonengine.com/en-us/server/current/plugins/manual#handling_http_response + /// 3. an error sent from the server, for example, when the limit of cached events has been exceeded in the room + /// (all clients will be disconnected and the room will be closed in this case) + /// read more here: https://doc.photonengine.com/en-us/realtime/current/gameplay/cached-events#special_considerations + /// + /// If you implement or you will also get this event. + /// + /// Object containing information about the error + void OnErrorInfo(ErrorInfo errorInfo); + } + + /// + /// Container type for callbacks defined by IConnectionCallbacks. See LoadBalancingCallbackTargets. + /// + /// + /// While the interfaces of callbacks wrap up the methods that will be called, + /// the container classes implement a simple way to call a method on all registered objects. + /// + public class ConnectionCallbacksContainer : List, IConnectionCallbacks + { + private readonly LoadBalancingClient client; + + public ConnectionCallbacksContainer(LoadBalancingClient client) + { + this.client = client; + } + + public void OnConnected() + { + this.client.UpdateCallbackTargets(); + + foreach (IConnectionCallbacks target in this) + { + target.OnConnected(); + } + } + + public void OnConnectedToMaster() + { + this.client.UpdateCallbackTargets(); + + foreach (IConnectionCallbacks target in this) + { + target.OnConnectedToMaster(); + } + } + + public void OnRegionListReceived(RegionHandler regionHandler) + { + this.client.UpdateCallbackTargets(); + + foreach (IConnectionCallbacks target in this) + { + target.OnRegionListReceived(regionHandler); + } + } + + public void OnDisconnected(DisconnectCause cause) + { + this.client.UpdateCallbackTargets(); + + foreach (IConnectionCallbacks target in this) + { + target.OnDisconnected(cause); + } + } + + public void OnCustomAuthenticationResponse(Dictionary data) + { + this.client.UpdateCallbackTargets(); + + foreach (IConnectionCallbacks target in this) + { + target.OnCustomAuthenticationResponse(data); + } + } + + public void OnCustomAuthenticationFailed(string debugMessage) + { + this.client.UpdateCallbackTargets(); + + foreach (IConnectionCallbacks target in this) + { + target.OnCustomAuthenticationFailed(debugMessage); + } + } + } + + /// + /// Container type for callbacks defined by IMatchmakingCallbacks. See MatchMakingCallbackTargets. + /// + /// + /// While the interfaces of callbacks wrap up the methods that will be called, + /// the container classes implement a simple way to call a method on all registered objects. + /// + public class MatchMakingCallbacksContainer : List, IMatchmakingCallbacks + { + private readonly LoadBalancingClient client; + + public MatchMakingCallbacksContainer(LoadBalancingClient client) + { + this.client = client; + } + + public void OnCreatedRoom() + { + this.client.UpdateCallbackTargets(); + + foreach (IMatchmakingCallbacks target in this) + { + target.OnCreatedRoom(); + } + } + + public void OnJoinedRoom() + { + this.client.UpdateCallbackTargets(); + + foreach (IMatchmakingCallbacks target in this) + { + target.OnJoinedRoom(); + } + } + + public void OnCreateRoomFailed(short returnCode, string message) + { + this.client.UpdateCallbackTargets(); + + foreach (IMatchmakingCallbacks target in this) + { + target.OnCreateRoomFailed(returnCode, message); + } + } + + public void OnJoinRandomFailed(short returnCode, string message) + { + this.client.UpdateCallbackTargets(); + + foreach (IMatchmakingCallbacks target in this) + { + target.OnJoinRandomFailed(returnCode, message); + } + } + + public void OnJoinRoomFailed(short returnCode, string message) + { + this.client.UpdateCallbackTargets(); + + foreach (IMatchmakingCallbacks target in this) + { + target.OnJoinRoomFailed(returnCode, message); + } + } + + public void OnLeftRoom() + { + this.client.UpdateCallbackTargets(); + + foreach (IMatchmakingCallbacks target in this) + { + target.OnLeftRoom(); + } + } + + public void OnFriendListUpdate(List friendList) + { + this.client.UpdateCallbackTargets(); + + foreach (IMatchmakingCallbacks target in this) + { + target.OnFriendListUpdate(friendList); + } + } + } + + + /// + /// Container type for callbacks defined by IInRoomCallbacks. See InRoomCallbackTargets. + /// + /// + /// While the interfaces of callbacks wrap up the methods that will be called, + /// the container classes implement a simple way to call a method on all registered objects. + /// + internal class InRoomCallbacksContainer : List, IInRoomCallbacks + { + private readonly LoadBalancingClient client; + + public InRoomCallbacksContainer(LoadBalancingClient client) + { + this.client = client; + } + + public void OnPlayerEnteredRoom(Player newPlayer) + { + this.client.UpdateCallbackTargets(); + + foreach (IInRoomCallbacks target in this) + { + target.OnPlayerEnteredRoom(newPlayer); + } + } + + public void OnPlayerLeftRoom(Player otherPlayer) + { + this.client.UpdateCallbackTargets(); + + foreach (IInRoomCallbacks target in this) + { + target.OnPlayerLeftRoom(otherPlayer); + } + } + + public void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) + { + this.client.UpdateCallbackTargets(); + + foreach (IInRoomCallbacks target in this) + { + target.OnRoomPropertiesUpdate(propertiesThatChanged); + } + } + + public void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProp) + { + this.client.UpdateCallbackTargets(); + + foreach (IInRoomCallbacks target in this) + { + target.OnPlayerPropertiesUpdate(targetPlayer, changedProp); + } + } + + public void OnMasterClientSwitched(Player newMasterClient) + { + this.client.UpdateCallbackTargets(); + + foreach (IInRoomCallbacks target in this) + { + target.OnMasterClientSwitched(newMasterClient); + } + } + } + + /// + /// Container type for callbacks defined by ILobbyCallbacks. See LobbyCallbackTargets. + /// + /// + /// While the interfaces of callbacks wrap up the methods that will be called, + /// the container classes implement a simple way to call a method on all registered objects. + /// + internal class LobbyCallbacksContainer : List, ILobbyCallbacks + { + private readonly LoadBalancingClient client; + + public LobbyCallbacksContainer(LoadBalancingClient client) + { + this.client = client; + } + + public void OnJoinedLobby() + { + this.client.UpdateCallbackTargets(); + + foreach (ILobbyCallbacks target in this) + { + target.OnJoinedLobby(); + } + } + + public void OnLeftLobby() + { + this.client.UpdateCallbackTargets(); + + foreach (ILobbyCallbacks target in this) + { + target.OnLeftLobby(); + } + } + + public void OnRoomListUpdate(List roomList) + { + this.client.UpdateCallbackTargets(); + + foreach (ILobbyCallbacks target in this) + { + target.OnRoomListUpdate(roomList); + } + } + + public void OnLobbyStatisticsUpdate(List lobbyStatistics) + { + this.client.UpdateCallbackTargets(); + + foreach (ILobbyCallbacks target in this) + { + target.OnLobbyStatisticsUpdate(lobbyStatistics); + } + } + } + + /// + /// Container type for callbacks defined by IWebRpcCallback. See WebRpcCallbackTargets. + /// + /// + /// While the interfaces of callbacks wrap up the methods that will be called, + /// the container classes implement a simple way to call a method on all registered objects. + /// + internal class WebRpcCallbacksContainer : List, IWebRpcCallback + { + private LoadBalancingClient client; + + public WebRpcCallbacksContainer(LoadBalancingClient client) + { + this.client = client; + } + + public void OnWebRpcResponse(OperationResponse response) + { + this.client.UpdateCallbackTargets(); + + foreach (IWebRpcCallback target in this) + { + target.OnWebRpcResponse(response); + } + } + } + + + /// + /// Container type for callbacks defined by . See . + /// + /// + /// While the interfaces of callbacks wrap up the methods that will be called, + /// the container classes implement a simple way to call a method on all registered objects. + /// + internal class ErrorInfoCallbacksContainer : List, IErrorInfoCallback + { + private LoadBalancingClient client; + + public ErrorInfoCallbacksContainer(LoadBalancingClient client) + { + this.client = client; + } + + public void OnErrorInfo(ErrorInfo errorInfo) + { + this.client.UpdateCallbackTargets(); + foreach (IErrorInfoCallback target in this) + { + target.OnErrorInfo(errorInfo); + } + } + } + + /// + /// Class wrapping the received event. + /// + /// + /// This is passed inside callback. + /// If you implement or you will also get but not parsed. + /// + /// In most cases this could be either: + /// 1. an error from webhooks plugin (if HasErrorInfo is enabled), read more here: + /// https://doc.photonengine.com/en-us/realtime/current/gameplay/web-extensions/webhooks#options + /// 2. an error sent from a custom server plugin via PluginHost.BroadcastErrorInfoEvent, see example here: + /// https://doc.photonengine.com/en-us/server/current/plugins/manual#handling_http_response + /// 3. an error sent from the server, for example, when the limit of cached events has been exceeded in the room + /// (all clients will be disconnected and the room will be closed in this case) + /// read more here: https://doc.photonengine.com/en-us/realtime/current/gameplay/cached-events#special_considerations + /// + public class ErrorInfo + { + /// + /// String containing information about the error. + /// + public readonly string Info; + + public ErrorInfo(EventData eventData) + { + this.Info = eventData[ParameterCode.Info] as string; + } + + public override string ToString() + { + return string.Format("ErrorInfo: {0}", this.Info); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs.meta b/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs.meta new file mode 100644 index 00000000..91a2d99b --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f4e65968c7102bf42a77b6a5cade8743 +timeCreated: 1497614756 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs b/Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs new file mode 100644 index 00000000..89688c51 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs @@ -0,0 +1,2242 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// Provides operations to use the LoadBalancing and Cloud photon servers. +// No logic is implemented here. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY + using UnityEngine; + using Debug = UnityEngine.Debug; + #endif + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// A LoadBalancingPeer provides the operations and enum definitions needed to use the LoadBalancing server application which is also used in Photon Cloud. + /// + /// + /// This class is internally used. + /// The LoadBalancingPeer does not keep a state, instead this is done by a LoadBalancingClient. + /// + public class LoadBalancingPeer : PhotonPeer + { + /// Obsolete accessor to the RegionHandler.PingImplementation. + [Obsolete("Use RegionHandler.PingImplementation directly.")] + protected internal static Type PingImplementation + { + get { return RegionHandler.PingImplementation; } + set { RegionHandler.PingImplementation = value; } + } + + + private readonly Pool paramDictionaryPool = new Pool( + () => new ParameterDictionary(), + x => x.Clear(), + 1); // used in OpRaiseEvent() (avoids lots of new Dictionary() calls) + + + /// + /// Creates a Peer with specified connection protocol. You need to set the Listener before using the peer. + /// + /// Each connection protocol has it's own default networking ports for Photon. + /// The preferred option is UDP. + public LoadBalancingPeer(ConnectionProtocol protocolType) : base(protocolType) + { + // this does not require a Listener, so: + // make sure to set this.Listener before using a peer! + + this.ConfigUnitySockets(); + } + + /// + /// Creates a Peer with specified connection protocol and a Listener for callbacks. + /// + public LoadBalancingPeer(IPhotonPeerListener listener, ConnectionProtocol protocolType) : this(protocolType) + { + this.Listener = listener; + } + + + // Sets up the socket implementations to use, depending on platform + [System.Diagnostics.Conditional("SUPPORTED_UNITY")] + private void ConfigUnitySockets() + { + Type websocketType = null; + #if (UNITY_XBOXONE || UNITY_GAMECORE) && !UNITY_EDITOR + websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, Assembly-CSharp", false); + if (websocketType == null) + { + websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, Assembly-CSharp-firstpass", false); + } + if (websocketType == null) + { + websocketType = Type.GetType("ExitGames.Client.Photon.SocketNativeSource, PhotonRealtime", false); + } + if (websocketType != null) + { + this.SocketImplementationConfig[ConnectionProtocol.Udp] = websocketType; // on Xbox, the native socket plugin supports UDP as well + } + #else + // to support WebGL export in Unity, we find and assign the SocketWebTcp class (if it's in the project). + // alternatively class SocketWebTcp might be in the Photon3Unity3D.dll + websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, PhotonWebSocket", false); + if (websocketType == null) + { + websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp-firstpass", false); + } + if (websocketType == null) + { + websocketType = Type.GetType("ExitGames.Client.Photon.SocketWebTcp, Assembly-CSharp", false); + } + #if UNITY_WEBGL + if (websocketType == null && this.DebugOut >= DebugLevel.WARNING) + { + this.Listener.DebugReturn(DebugLevel.WARNING, "SocketWebTcp type not found in the usual Assemblies. This is required as wrapper for the browser WebSocket API. Make sure to make the PhotonLibs\\WebSocket code available."); + } + #endif + #endif + + if (websocketType != null) + { + this.SocketImplementationConfig[ConnectionProtocol.WebSocket] = websocketType; + this.SocketImplementationConfig[ConnectionProtocol.WebSocketSecure] = websocketType; + } + + #if NET_4_6 && (UNITY_EDITOR || !ENABLE_IL2CPP) && !NETFX_CORE + this.SocketImplementationConfig[ConnectionProtocol.Udp] = typeof(SocketUdpAsync); + this.SocketImplementationConfig[ConnectionProtocol.Tcp] = typeof(SocketTcpAsync); + #endif + } + + + public virtual bool OpGetRegions(string appId) + { + Dictionary parameters = new Dictionary(1); + parameters[(byte)ParameterCode.ApplicationId] = appId; + + return this.SendOperation(OperationCode.GetRegions, parameters, new SendOptions() { Reliability = true, Encrypt = true }); + } + + /// + /// Joins the lobby on the Master Server, where you get a list of RoomInfos of currently open rooms. + /// This is an async request which triggers a OnOperationResponse() call. + /// + /// The lobby join to. + /// If the operation could be sent (has to be connected). + public virtual bool OpJoinLobby(TypedLobby lobby = null) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpJoinLobby()"); + } + + Dictionary parameters = null; + if (lobby != null && !lobby.IsDefault) + { + parameters = new Dictionary(); + parameters[(byte)ParameterCode.LobbyName] = lobby.Name; + parameters[(byte)ParameterCode.LobbyType] = (byte)lobby.Type; + } + + return this.SendOperation(OperationCode.JoinLobby, parameters, SendOptions.SendReliable); + } + + + /// + /// Leaves the lobby on the Master Server. + /// This is an async request which triggers a OnOperationResponse() call. + /// + /// If the operation could be sent (requires connection). + public virtual bool OpLeaveLobby() + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpLeaveLobby()"); + } + + return this.SendOperation(OperationCode.LeaveLobby, (Dictionary)null, SendOptions.SendReliable); + } + + + /// Used by OpJoinRoom and by OpCreateRoom alike. + private void RoomOptionsToOpParameters(Dictionary op, RoomOptions roomOptions, bool usePropertiesKey = false) + { + if (roomOptions == null) + { + roomOptions = new RoomOptions(); + } + + Hashtable gameProperties = new Hashtable(); + gameProperties[GamePropertyKey.IsOpen] = roomOptions.IsOpen; + gameProperties[GamePropertyKey.IsVisible] = roomOptions.IsVisible; + gameProperties[GamePropertyKey.PropsListedInLobby] = (roomOptions.CustomRoomPropertiesForLobby == null) ? new string[0] : roomOptions.CustomRoomPropertiesForLobby; + gameProperties.MergeStringKeys(roomOptions.CustomRoomProperties); + if (roomOptions.MaxPlayers > 0) + { + gameProperties[GamePropertyKey.MaxPlayers] = roomOptions.MaxPlayers; + } + + if (!usePropertiesKey) + { + op[ParameterCode.GameProperties] = gameProperties; // typically, the key for game props is 248 + } + else + { + op[ParameterCode.Properties] = gameProperties; // when an op uses 248 as filter, the "create room" props can be set as 251 + } + + + int flags = 0; // a new way to send the room options as bitwise-flags + + if (roomOptions.CleanupCacheOnLeave) + { + op[ParameterCode.CleanupCacheOnLeave] = true; // this defines the server's room settings and logic + flags = flags | (int)RoomOptionBit.DeleteCacheOnLeave; // this defines the server's room settings and logic (for servers that support flags) + } + else + { + op[ParameterCode.CleanupCacheOnLeave] = false; // this defines the server's room settings and logic + gameProperties[GamePropertyKey.CleanupCacheOnLeave] = false; // this is only informational for the clients which join + } + + #if SERVERSDK + op[ParameterCode.CheckUserOnJoin] = roomOptions.CheckUserOnJoin; + if (roomOptions.CheckUserOnJoin) + { + flags = flags | (int) RoomOptionBit.CheckUserOnJoin; + } + #else + // in PUN v1.88 and PUN 2, CheckUserOnJoin is set by default: + flags = flags | (int) RoomOptionBit.CheckUserOnJoin; + op[ParameterCode.CheckUserOnJoin] = true; + #endif + + if (roomOptions.PlayerTtl > 0 || roomOptions.PlayerTtl == -1) + { + op[ParameterCode.PlayerTTL] = roomOptions.PlayerTtl; // TURNBASED + } + + if (roomOptions.EmptyRoomTtl > 0) + { + op[ParameterCode.EmptyRoomTTL] = roomOptions.EmptyRoomTtl; //TURNBASED + } + + if (roomOptions.SuppressRoomEvents) + { + flags = flags | (int)RoomOptionBit.SuppressRoomEvents; + op[ParameterCode.SuppressRoomEvents] = true; + } + if (roomOptions.SuppressPlayerInfo) + { + flags = flags | (int)RoomOptionBit.SuppressPlayerInfo; + } + + if (roomOptions.Plugins != null) + { + op[ParameterCode.Plugins] = roomOptions.Plugins; + } + if (roomOptions.PublishUserId) + { + flags = flags | (int)RoomOptionBit.PublishUserId; + op[ParameterCode.PublishUserId] = true; + } + if (roomOptions.DeleteNullProperties) + { + flags = flags | (int)RoomOptionBit.DeleteNullProps; // this is only settable as flag + } + if (roomOptions.BroadcastPropsChangeToAll) + { + flags = flags | (int)RoomOptionBit.BroadcastPropsChangeToAll; // this is only settable as flag + } + + op[ParameterCode.RoomOptionFlags] = flags; + } + + + /// + /// Creates a room (on either Master or Game Server). + /// The OperationResponse depends on the server the peer is connected to: + /// Master will return a Game Server to connect to. + /// Game Server will return the joined Room's data. + /// This is an async request which triggers a OnOperationResponse() call. + /// + /// + /// If the room is already existing, the OperationResponse will have a returnCode of ErrorCode.GameAlreadyExists. + /// + public virtual bool OpCreateRoom(EnterRoomParams opParams) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpCreateRoom()"); + } + + Dictionary op = new Dictionary(); + + if (!string.IsNullOrEmpty(opParams.RoomName)) + { + op[ParameterCode.RoomName] = opParams.RoomName; + } + if (opParams.Lobby != null && !opParams.Lobby.IsDefault) + { + op[ParameterCode.LobbyName] = opParams.Lobby.Name; + op[ParameterCode.LobbyType] = (byte)opParams.Lobby.Type; + } + + if (opParams.ExpectedUsers != null && opParams.ExpectedUsers.Length > 0) + { + op[ParameterCode.Add] = opParams.ExpectedUsers; + } + if (opParams.OnGameServer) + { + if (opParams.PlayerProperties != null && opParams.PlayerProperties.Count > 0) + { + op[ParameterCode.PlayerProperties] = opParams.PlayerProperties; + } + op[ParameterCode.Broadcast] = true; // broadcast actor properties + + this.RoomOptionsToOpParameters(op, opParams.RoomOptions); + } + + //this.Listener.DebugReturn(DebugLevel.INFO, "OpCreateRoom: " + SupportClass.DictionaryToString(op)); + return this.SendOperation(OperationCode.CreateGame, op, SendOptions.SendReliable); + } + + /// + /// Joins a room by name or creates new room if room with given name not exists. + /// The OperationResponse depends on the server the peer is connected to: + /// Master will return a Game Server to connect to. + /// Game Server will return the joined Room's data. + /// This is an async request which triggers a OnOperationResponse() call. + /// + /// + /// If the room is not existing (anymore), the OperationResponse will have a returnCode of ErrorCode.GameDoesNotExist. + /// Other possible ErrorCodes are: GameClosed, GameFull. + /// + /// If the operation could be sent (requires connection). + public virtual bool OpJoinRoom(EnterRoomParams opParams) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpJoinRoom()"); + } + Dictionary op = new Dictionary(); + + if (!string.IsNullOrEmpty(opParams.RoomName)) + { + op[ParameterCode.RoomName] = opParams.RoomName; + } + + if (opParams.JoinMode == JoinMode.CreateIfNotExists) + { + op[ParameterCode.JoinMode] = (byte)JoinMode.CreateIfNotExists; + if (opParams.Lobby != null && !opParams.Lobby.IsDefault) + { + op[ParameterCode.LobbyName] = opParams.Lobby.Name; + op[ParameterCode.LobbyType] = (byte)opParams.Lobby.Type; + } + } + else if (opParams.JoinMode == JoinMode.RejoinOnly) + { + op[ParameterCode.JoinMode] = (byte)JoinMode.RejoinOnly; // changed from JoinMode.JoinOrRejoin + } + + if (opParams.ExpectedUsers != null && opParams.ExpectedUsers.Length > 0) + { + op[ParameterCode.Add] = opParams.ExpectedUsers; + } + + if (opParams.OnGameServer) + { + if (opParams.PlayerProperties != null && opParams.PlayerProperties.Count > 0) + { + op[ParameterCode.PlayerProperties] = opParams.PlayerProperties; + } + op[ParameterCode.Broadcast] = true; // broadcast actor properties + } + + if (opParams.OnGameServer || opParams.JoinMode == JoinMode.CreateIfNotExists) + { + this.RoomOptionsToOpParameters(op, opParams.RoomOptions); + } + + //this.Listener.DebugReturn(DebugLevel.INFO, "OpJoinRoom: " + SupportClass.DictionaryToString(op)); + return this.SendOperation(OperationCode.JoinGame, op, SendOptions.SendReliable); + } + + + /// + /// Operation to join a random, available room. Overloads take additional player properties. + /// This is an async request which triggers a OnOperationResponse() call. + /// If all rooms are closed or full, the OperationResponse will have a returnCode of ErrorCode.NoRandomMatchFound. + /// If successful, the OperationResponse contains a gameserver address and the name of some room. + /// + /// If the operation could be sent currently (requires connection). + public virtual bool OpJoinRandomRoom(OpJoinRandomRoomParams opJoinRandomRoomParams) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpJoinRandomRoom()"); + } + + Hashtable expectedRoomProperties = new Hashtable(); + expectedRoomProperties.MergeStringKeys(opJoinRandomRoomParams.ExpectedCustomRoomProperties); + if (opJoinRandomRoomParams.ExpectedMaxPlayers > 0) + { + expectedRoomProperties[GamePropertyKey.MaxPlayers] = opJoinRandomRoomParams.ExpectedMaxPlayers; + } + + Dictionary opParameters = new Dictionary(); + if (expectedRoomProperties.Count > 0) + { + opParameters[ParameterCode.GameProperties] = expectedRoomProperties; + } + + if (opJoinRandomRoomParams.MatchingType != MatchmakingMode.FillRoom) + { + opParameters[ParameterCode.MatchMakingType] = (byte)opJoinRandomRoomParams.MatchingType; + } + + if (opJoinRandomRoomParams.TypedLobby != null && !opJoinRandomRoomParams.TypedLobby.IsDefault) + { + opParameters[ParameterCode.LobbyName] = opJoinRandomRoomParams.TypedLobby.Name; + opParameters[ParameterCode.LobbyType] = (byte)opJoinRandomRoomParams.TypedLobby.Type; + } + + if (!string.IsNullOrEmpty(opJoinRandomRoomParams.SqlLobbyFilter)) + { + opParameters[ParameterCode.Data] = opJoinRandomRoomParams.SqlLobbyFilter; + } + + if (opJoinRandomRoomParams.ExpectedUsers != null && opJoinRandomRoomParams.ExpectedUsers.Length > 0) + { + opParameters[ParameterCode.Add] = opJoinRandomRoomParams.ExpectedUsers; + } + + //this.Listener.DebugReturn(DebugLevel.INFO, "OpJoinRandomRoom: " + SupportClass.DictionaryToString(opParameters)); + return this.SendOperation(OperationCode.JoinRandomGame, opParameters, SendOptions.SendReliable); + } + + /// + /// Only used on the Master Server. It will assign a game server and room to join-or-create. + /// On the Game Server, the OpJoin is used with option "create if not exists". + /// + public virtual bool OpJoinRandomOrCreateRoom(OpJoinRandomRoomParams opJoinRandomRoomParams, EnterRoomParams createRoomParams) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpJoinRandomOrCreateRoom()"); + } + + // join random room parameters: + + Hashtable expectedRoomProperties = new Hashtable(); + expectedRoomProperties.MergeStringKeys(opJoinRandomRoomParams.ExpectedCustomRoomProperties); + if (opJoinRandomRoomParams.ExpectedMaxPlayers > 0) + { + expectedRoomProperties[GamePropertyKey.MaxPlayers] = opJoinRandomRoomParams.ExpectedMaxPlayers; + } + + Dictionary opParameters = new Dictionary(); + if (expectedRoomProperties.Count > 0) + { + opParameters[ParameterCode.GameProperties] = expectedRoomProperties; // used as filter. below, RoomOptionsToOpParameters has usePropertiesKey = true + } + + if (opJoinRandomRoomParams.MatchingType != MatchmakingMode.FillRoom) + { + opParameters[ParameterCode.MatchMakingType] = (byte)opJoinRandomRoomParams.MatchingType; + } + + if (opJoinRandomRoomParams.TypedLobby != null && !opJoinRandomRoomParams.TypedLobby.IsDefault) + { + opParameters[ParameterCode.LobbyName] = opJoinRandomRoomParams.TypedLobby.Name; + opParameters[ParameterCode.LobbyType] = (byte)opJoinRandomRoomParams.TypedLobby.Type; + } + + if (!string.IsNullOrEmpty(opJoinRandomRoomParams.SqlLobbyFilter)) + { + opParameters[ParameterCode.Data] = opJoinRandomRoomParams.SqlLobbyFilter; + } + + if (opJoinRandomRoomParams.ExpectedUsers != null && opJoinRandomRoomParams.ExpectedUsers.Length > 0) + { + opParameters[ParameterCode.Add] = opJoinRandomRoomParams.ExpectedUsers; + } + + + // parameters for creating a room if needed ("or create" part of the operation) + // partial copy of OpCreateRoom + + opParameters[ParameterCode.JoinMode] = (byte)JoinMode.CreateIfNotExists; + + if (createRoomParams != null) + { + if (!string.IsNullOrEmpty(createRoomParams.RoomName)) + { + opParameters[ParameterCode.RoomName] = createRoomParams.RoomName; + } + + this.RoomOptionsToOpParameters(opParameters, createRoomParams.RoomOptions, true); + } + + //this.Listener.DebugReturn(DebugLevel.INFO, "OpJoinRandomOrCreateRoom: " + SupportClass.DictionaryToString(opParameters, false)); + return this.SendOperation(OperationCode.JoinRandomGame, opParameters, SendOptions.SendReliable); + } + + + /// + /// Leaves a room with option to come back later or "for good". + /// + /// Async games can be re-joined (loaded) later on. Set to false, if you want to abandon a game entirely. + /// WebFlag: Securely transmit the encrypted object AuthCookie to the web service in PathLeave webhook when available + /// If the opteration can be send currently. + public virtual bool OpLeaveRoom(bool becomeInactive, bool sendAuthCookie = false) + { + Dictionary opParameters = new Dictionary(); + if (becomeInactive) + { + opParameters[ParameterCode.IsInactive] = true; + } + if (sendAuthCookie) + { + opParameters[ParameterCode.EventForward] = WebFlags.SendAuthCookieConst; + } + return this.SendOperation(OperationCode.Leave, opParameters, SendOptions.SendReliable); + } + + /// Gets a list of games matching a SQL-like where clause. + /// + /// Operation is only available in lobbies of type SqlLobby. + /// This is an async request which triggers a OnOperationResponse() call. + /// Returned game list is stored in RoomInfoList. + /// + /// + /// The lobby to query. Has to be of type SqlLobby. + /// The sql query statement. + /// If the operation could be sent (has to be connected). + public virtual bool OpGetGameList(TypedLobby lobby, string queryData) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpGetGameList()"); + } + + if (lobby == null) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpGetGameList not sent. Lobby cannot be null."); + } + return false; + } + + if (lobby.Type != LobbyType.SqlLobby) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpGetGameList not sent. LobbyType must be SqlLobby."); + } + return false; + } + + if (lobby.IsDefault) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpGetGameList not sent. LobbyName must be not null and not empty."); + } + return false; + } + + if (string.IsNullOrEmpty(queryData)) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpGetGameList not sent. queryData must be not null and not empty."); + } + return false; + } + + Dictionary opParameters = new Dictionary(); + opParameters[(byte)ParameterCode.LobbyName] = lobby.Name; + opParameters[(byte)ParameterCode.LobbyType] = (byte)lobby.Type; + opParameters[(byte)ParameterCode.Data] = queryData; + + return this.SendOperation(OperationCode.GetGameList, opParameters, SendOptions.SendReliable); + } + + /// + /// Request the rooms and online status for a list of friends (each client must set a unique username via OpAuthenticate). + /// + /// + /// Used on Master Server to find the rooms played by a selected list of users. + /// Users identify themselves by using OpAuthenticate with a unique user ID. + /// The list of user IDs must be fetched from some other source (not provided by Photon). + /// + /// The server response includes 2 arrays of info (each index matching a friend from the request):
+ /// ParameterCode.FindFriendsResponseOnlineList = bool[] of online states
+ /// ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)
+ ///
+ /// The options may be used to define which state a room must match to be returned. + ///
+ /// Array of friend's names (make sure they are unique). + /// Options that affect the result of the FindFriends operation. + /// If the operation could be sent (requires connection). + public virtual bool OpFindFriends(string[] friendsToFind, FindFriendsOptions options = null) + { + Dictionary opParameters = new Dictionary(); + if (friendsToFind != null && friendsToFind.Length > 0) + { + opParameters[ParameterCode.FindFriendsRequestList] = friendsToFind; + } + + if (options != null) + { + opParameters[ParameterCode.FindFriendsOptions] = options.ToIntFlags(); + } + + return this.SendOperation(OperationCode.FindFriends, opParameters, SendOptions.SendReliable); + } + + public bool OpSetCustomPropertiesOfActor(int actorNr, Hashtable actorProperties) + { + return this.OpSetPropertiesOfActor(actorNr, actorProperties.StripToStringKeys(), null); + } + + /// + /// Sets properties of a player / actor. + /// Internally this uses OpSetProperties, which can be used to either set room or player properties. + /// + /// The payer ID (a.k.a. actorNumber) of the player to attach these properties to. + /// The properties to add or update. + /// If set, these must be in the current properties-set (on the server) to set actorProperties: CAS. + /// Set these to forward the properties to a WebHook as defined for this app (in Dashboard). + /// If the operation could be sent (requires connection). + protected internal bool OpSetPropertiesOfActor(int actorNr, Hashtable actorProperties, Hashtable expectedProperties = null, WebFlags webflags = null) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpSetPropertiesOfActor()"); + } + + if (actorNr <= 0 || actorProperties == null || actorProperties.Count == 0) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpSetPropertiesOfActor not sent. ActorNr must be > 0 and actorProperties must be not null nor empty."); + } + return false; + } + + Dictionary opParameters = new Dictionary(); + opParameters.Add(ParameterCode.Properties, actorProperties); + opParameters.Add(ParameterCode.ActorNr, actorNr); + opParameters.Add(ParameterCode.Broadcast, true); + if (expectedProperties != null && expectedProperties.Count != 0) + { + opParameters.Add(ParameterCode.ExpectedValues, expectedProperties); + } + + if (webflags != null && webflags.HttpForward) + { + opParameters[ParameterCode.EventForward] = webflags.WebhookFlags; + } + + return this.SendOperation(OperationCode.SetProperties, opParameters, SendOptions.SendReliable); + } + + + protected bool OpSetPropertyOfRoom(byte propCode, object value) + { + Hashtable properties = new Hashtable(); + properties[propCode] = value; + return this.OpSetPropertiesOfRoom(properties); + } + + public bool OpSetCustomPropertiesOfRoom(Hashtable gameProperties) + { + return this.OpSetPropertiesOfRoom(gameProperties.StripToStringKeys()); + } + + /// + /// Sets properties of a room. + /// Internally this uses OpSetProperties, which can be used to either set room or player properties. + /// + /// The properties to add or update. + /// The properties expected when update occurs. (CAS : "Check And Swap") + /// WebFlag to indicate if request should be forwarded as "PathProperties" webhook or not. + /// If the operation could be sent (has to be connected). + protected internal bool OpSetPropertiesOfRoom(Hashtable gameProperties, Hashtable expectedProperties = null, WebFlags webflags = null) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpSetPropertiesOfRoom()"); + } + if (gameProperties == null || gameProperties.Count == 0) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpSetPropertiesOfRoom not sent. gameProperties must be not null nor empty."); + } + return false; + } + + Dictionary opParameters = new Dictionary(); + opParameters.Add(ParameterCode.Properties, gameProperties); + opParameters.Add(ParameterCode.Broadcast, true); + if (expectedProperties != null && expectedProperties.Count != 0) + { + opParameters.Add(ParameterCode.ExpectedValues, expectedProperties); + } + + if (webflags!=null && webflags.HttpForward) + { + opParameters[ParameterCode.EventForward] = webflags.WebhookFlags; + } + + return this.SendOperation(OperationCode.SetProperties, opParameters, SendOptions.SendReliable); + } + + /// + /// Sends this app's appId and appVersion to identify this application server side. + /// This is an async request which triggers a OnOperationResponse() call. + /// + /// + /// This operation makes use of encryption, if that is established before. + /// See: EstablishEncryption(). Check encryption with IsEncryptionAvailable. + /// This operation is allowed only once per connection (multiple calls will have ErrorCode != Ok). + /// + /// Your application's name or ID to authenticate. This is assigned by Photon Cloud (webpage). + /// The client's version (clients with differing client appVersions are separated and players don't meet). + /// Contains all values relevant for authentication. Even without account system (external Custom Auth), the clients are allowed to identify themselves. + /// Optional region code, if the client should connect to a specific Photon Cloud Region. + /// Set to true on Master Server to receive "Lobby Statistics" events. + /// If the operation could be sent (has to be connected). + public virtual bool OpAuthenticate(string appId, string appVersion, AuthenticationValues authValues, string regionCode, bool getLobbyStatistics) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpAuthenticate()"); + } + + Dictionary opParameters = new Dictionary(); + if (getLobbyStatistics) + { + // must be sent in operation, even if a Token is available + opParameters[ParameterCode.LobbyStats] = true; + } + + // shortcut, if we have a Token + if (authValues != null && authValues.Token != null) + { + opParameters[ParameterCode.Token] = authValues.Token; + return this.SendOperation(OperationCode.Authenticate, opParameters, SendOptions.SendReliable); // we don't have to encrypt, when we have a token (which is encrypted) + } + + + // without a token, we send a complete op auth + + opParameters[ParameterCode.AppVersion] = appVersion; + opParameters[ParameterCode.ApplicationId] = appId; + + if (!string.IsNullOrEmpty(regionCode)) + { + opParameters[ParameterCode.Region] = regionCode; + } + + if (authValues != null) + { + + if (!string.IsNullOrEmpty(authValues.UserId)) + { + opParameters[ParameterCode.UserId] = authValues.UserId; + } + + if (authValues.AuthType != CustomAuthenticationType.None) + { + opParameters[ParameterCode.ClientAuthenticationType] = (byte)authValues.AuthType; + // if we had a token, the code above would use it. here, we send parameters: + if (!string.IsNullOrEmpty(authValues.AuthGetParameters)) + { + opParameters[ParameterCode.ClientAuthenticationParams] = authValues.AuthGetParameters; + } + if (authValues.AuthPostData != null) + { + opParameters[ParameterCode.ClientAuthenticationData] = authValues.AuthPostData; + } + } + } + + return this.SendOperation(OperationCode.Authenticate, opParameters, new SendOptions() { Reliability = true, Encrypt = true }); + } + + + /// + /// Sends this app's appId and appVersion to identify this application server side. + /// This is an async request which triggers a OnOperationResponse() call. + /// + /// + /// This operation makes use of encryption, if that is established before. + /// See: EstablishEncryption(). Check encryption with IsEncryptionAvailable. + /// This operation is allowed only once per connection (multiple calls will have ErrorCode != Ok). + /// + /// Your application's name or ID to authenticate. This is assigned by Photon Cloud (webpage). + /// The client's version (clients with differing client appVersions are separated and players don't meet). + /// Optional authentication values. The client can set no values or a UserId or some parameters for Custom Authentication by a server. + /// Optional region code, if the client should connect to a specific Photon Cloud Region. + /// + /// + /// If the operation could be sent (has to be connected). + public virtual bool OpAuthenticateOnce(string appId, string appVersion, AuthenticationValues authValues, string regionCode, EncryptionMode encryptionMode, ConnectionProtocol expectedProtocol) + { + if (this.DebugOut >= DebugLevel.INFO) + { + this.Listener.DebugReturn(DebugLevel.INFO, "OpAuthenticateOnce(): authValues = " + authValues + ", region = " + regionCode + ", encryption = " + encryptionMode); + } + + var opParameters = new Dictionary(); + + // shortcut, if we have a Token + if (authValues != null && authValues.Token != null) + { + opParameters[ParameterCode.Token] = authValues.Token; + return this.SendOperation(OperationCode.AuthenticateOnce, opParameters, SendOptions.SendReliable); // we don't have to encrypt, when we have a token (which is encrypted) + } + + if (encryptionMode == EncryptionMode.DatagramEncryption && expectedProtocol != ConnectionProtocol.Udp) + { + // TODO disconnect?! + throw new NotSupportedException("Expected protocol set to UDP, due to encryption mode DatagramEncryption."); // TODO use some other form of callback?! + } + + opParameters[ParameterCode.ExpectedProtocol] = (byte)expectedProtocol; + opParameters[ParameterCode.EncryptionMode] = (byte)encryptionMode; + + opParameters[ParameterCode.AppVersion] = appVersion; + opParameters[ParameterCode.ApplicationId] = appId; + + if (!string.IsNullOrEmpty(regionCode)) + { + opParameters[ParameterCode.Region] = regionCode; + } + + if (authValues != null) + { + if (!string.IsNullOrEmpty(authValues.UserId)) + { + opParameters[ParameterCode.UserId] = authValues.UserId; + } + + if (authValues.AuthType != CustomAuthenticationType.None) + { + opParameters[ParameterCode.ClientAuthenticationType] = (byte)authValues.AuthType; + if (authValues.Token != null) + { + opParameters[ParameterCode.Token] = authValues.Token; + } + else + { + if (!string.IsNullOrEmpty(authValues.AuthGetParameters)) + { + opParameters[ParameterCode.ClientAuthenticationParams] = authValues.AuthGetParameters; + } + if (authValues.AuthPostData != null) + { + opParameters[ParameterCode.ClientAuthenticationData] = authValues.AuthPostData; + } + } + } + } + + return this.SendOperation(OperationCode.AuthenticateOnce, opParameters, new SendOptions() { Reliability = true, Encrypt = true }); + } + + /// + /// Operation to handle this client's interest groups (for events in room). + /// + /// + /// Note the difference between passing null and byte[0]: + /// null won't add/remove any groups. + /// byte[0] will add/remove all (existing) groups. + /// First, removing groups is executed. This way, you could leave all groups and join only the ones provided. + /// + /// Changes become active not immediately but when the server executes this operation (approximately RTT/2). + /// + /// Groups to remove from interest. Null will not remove any. A byte[0] will remove all. + /// Groups to add to interest. Null will not add any. A byte[0] will add all current. + /// If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands. + public virtual bool OpChangeGroups(byte[] groupsToRemove, byte[] groupsToAdd) + { + if (this.DebugOut >= DebugLevel.ALL) + { + this.Listener.DebugReturn(DebugLevel.ALL, "OpChangeGroups()"); + } + + Dictionary opParameters = new Dictionary(); + if (groupsToRemove != null) + { + opParameters[(byte)ParameterCode.Remove] = groupsToRemove; + } + if (groupsToAdd != null) + { + opParameters[(byte)ParameterCode.Add] = groupsToAdd; + } + + return this.SendOperation(OperationCode.ChangeGroups, opParameters, SendOptions.SendReliable); + } + + + /// + /// Send an event with custom code/type and any content to the other players in the same room. + /// + /// This override explicitly uses another parameter order to not mix it up with the implementation for Hashtable only. + /// Identifies this type of event (and the content). Your game's event codes can start with 0. + /// Any serializable datatype (including Hashtable like the other OpRaiseEvent overloads). + /// Contains (slightly) less often used options. If you pass null, the default options will be used. + /// Send options for reliable, encryption etc + /// If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands. + public virtual bool OpRaiseEvent(byte eventCode, object customEventContent, RaiseEventOptions raiseEventOptions, SendOptions sendOptions) + { + var paramDict = this.paramDictionaryPool.Acquire(); + try + { + if (raiseEventOptions != null) + { + if (raiseEventOptions.CachingOption != EventCaching.DoNotCache) + { + paramDict.Add(ParameterCode.Cache, (byte)raiseEventOptions.CachingOption); + } + switch (raiseEventOptions.CachingOption) + { + case EventCaching.SliceSetIndex: + case EventCaching.SlicePurgeIndex: + case EventCaching.SlicePurgeUpToIndex: + //this.opParameters[(byte) ParameterCode.CacheSliceIndex] = + // (byte) raiseEventOptions.CacheSliceIndex; + return this.SendOperation(OperationCode.RaiseEvent, paramDict, sendOptions); + case EventCaching.SliceIncreaseIndex: + case EventCaching.RemoveFromRoomCacheForActorsLeft: + return this.SendOperation(OperationCode.RaiseEvent, paramDict, sendOptions); + case EventCaching.RemoveFromRoomCache: + if (raiseEventOptions.TargetActors != null) + { + paramDict.Add(ParameterCode.ActorList, raiseEventOptions.TargetActors); + } + break; + default: + if (raiseEventOptions.TargetActors != null) + { + paramDict.Add(ParameterCode.ActorList, raiseEventOptions.TargetActors); + } + else if (raiseEventOptions.InterestGroup != 0) + { + paramDict.Add(ParameterCode.Group, (byte)raiseEventOptions.InterestGroup); + } + else if (raiseEventOptions.Receivers != ReceiverGroup.Others) + { + paramDict.Add(ParameterCode.ReceiverGroup, (byte)raiseEventOptions.Receivers); + } + if (raiseEventOptions.Flags.HttpForward) + { + paramDict.Add(ParameterCode.EventForward, (byte)raiseEventOptions.Flags.WebhookFlags); + } + break; + } + } + paramDict.Add(ParameterCode.Code, (byte)eventCode); + if (customEventContent != null) + { + paramDict.Add(ParameterCode.Data, (object)customEventContent); + } + return this.SendOperation(OperationCode.RaiseEvent, paramDict, sendOptions); + } + finally + { + this.paramDictionaryPool.Release(paramDict); + } + } + + + /// + /// Internally used operation to set some "per server" settings. This is for the Master Server. + /// + /// Set to true, to get Lobby Statistics (lists of existing lobbies). + /// False if the operation could not be sent. + public virtual bool OpSettings(bool receiveLobbyStats) + { + if (this.DebugOut >= DebugLevel.ALL) + { + this.Listener.DebugReturn(DebugLevel.ALL, "OpSettings()"); + } + + Dictionary opParameters = new Dictionary(); + + // implementation for Master Server: + if (receiveLobbyStats) + { + opParameters[(byte)0] = receiveLobbyStats; + } + + if (opParameters.Count == 0) + { + // no need to send op in case we set the default values + return true; + } + + return this.SendOperation(OperationCode.ServerSettings, opParameters, SendOptions.SendReliable); + } + } + + /// Used in the RoomOptionFlags parameter, this bitmask toggles options in the room. + internal enum RoomOptionBit : int + { + CheckUserOnJoin = 0x01, // toggles a check of the UserId when joining (enabling returning to a game) + DeleteCacheOnLeave = 0x02, // deletes cache on leave + SuppressRoomEvents = 0x04, // suppresses all room events + PublishUserId = 0x08, // signals that we should publish userId + DeleteNullProps = 0x10, // signals that we should remove property if its value was set to null. see RoomOption to Delete Null Properties + BroadcastPropsChangeToAll = 0x20, // signals that we should send PropertyChanged event to all room players including initiator + SuppressPlayerInfo = 0x40, // disables events join and leave from the server as well as property broadcasts in a room (to minimize traffic) + } + + /// + /// Options for OpFindFriends can be combined to filter which rooms of friends are returned. + /// + public class FindFriendsOptions + { + /// Include a friend's room only if it is created and confirmed by the game server. + public bool CreatedOnGs = false; //flag: 0x01 + /// Include a friend's room only if it is visible (using Room.IsVisible). + public bool Visible = false; //flag: 0x02 + /// Include a friend's room only if it is open (using Room.IsOpen). + public bool Open = false; //flag: 0x04 + + /// Turns the bool options into an integer, which is sent as option flags for Op FindFriends. + /// The options applied to bits of an integer. + internal int ToIntFlags() + { + int optionFlags = 0; + if (this.CreatedOnGs) + { + optionFlags = optionFlags | 0x1; + } + if (this.Visible) + { + optionFlags = optionFlags | 0x2; + } + if (this.Open) + { + optionFlags = optionFlags | 0x4; + } + return optionFlags; + } + } + + + /// + /// Parameters for the matchmaking of JoinRandomRoom and JoinRandomOrCreateRoom. + /// + /// + /// More about matchmaking: . + /// + public class OpJoinRandomRoomParams + { + /// The custom room properties a room must have to fit. All key-values must be present to match. In SQL Lobby, use SqlLobbyFilter instead. + public Hashtable ExpectedCustomRoomProperties; + /// Filters by the MaxPlayers value of rooms. + public byte ExpectedMaxPlayers; + /// The MatchmakingMode affects how rooms get filled. By default, the server fills rooms. + public MatchmakingMode MatchingType; + /// The lobby in which to match. The type affects how filters are applied. + public TypedLobby TypedLobby; + /// SQL query to filter room matches. For default-typed lobbies, use ExpectedCustomRoomProperties instead. + public string SqlLobbyFilter; + /// The expected users list blocks player slots for your friends or team mates to join the room, too. + /// See: https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby#matchmaking_slot_reservation + public string[] ExpectedUsers; + } + + /// Parameters for creating rooms. + public class EnterRoomParams + { + /// The name of the room to create. If null, the server generates a unique name. If not null, it must be unique and new or will cause an error. + public string RoomName; + /// The RoomOptions define the optional behaviour of rooms. + public RoomOptions RoomOptions; + /// A lobby to attach the new room to. If set, this overrides a joined lobby (if any). + public TypedLobby Lobby; + /// The custom player properties that describe this client / user. Keys must be strings. + public Hashtable PlayerProperties; + /// Internally used value to skip some values when the operation is sent to the Master Server. + protected internal bool OnGameServer = true; // defaults to true! better send more parameter than too few (GS needs all) + /// Internally used value to check which join mode we should call. + protected internal JoinMode JoinMode; + /// A list of users who are expected to join the room along with this client. Reserves slots for rooms with MaxPlayers value. + public string[] ExpectedUsers; + } + + + /// + /// ErrorCode defines the default codes associated with Photon client/server communication. + /// + public class ErrorCode + { + /// (0) is always "OK", anything else an error or specific situation. + public const int Ok = 0; + + // server - Photon low(er) level: <= 0 + + /// + /// (-3) Operation can't be executed yet (e.g. OpJoin can't be called before being authenticated, RaiseEvent cant be used before getting into a room). + /// + /// + /// Before you call any operations on the Cloud servers, the automated client workflow must complete its authorization. + /// Wait until State is: JoinedLobby or ConnectedToMasterServer + /// + public const int OperationNotAllowedInCurrentState = -3; + + /// (-2) The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications. + [Obsolete("Use InvalidOperation.")] + public const int InvalidOperationCode = -2; + + /// (-2) The operation you called could not be executed on the server. + /// + /// Make sure you are connected to the server you expect. + /// + /// This code is used in several cases: + /// The arguments/parameters of the operation might be out of range, missing entirely or conflicting. + /// The operation you called is not implemented on the server (application). Server-side plugins affect the available operations. + /// + public const int InvalidOperation = -2; + + /// (-1) Something went wrong in the server. Try to reproduce and contact Exit Games. + public const int InternalServerError = -1; + + // server - client: 0x7FFF and down + // logic-level error codes start with short.max + + /// (32767) Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service). + public const int InvalidAuthentication = 0x7FFF; + + /// (32766) GameId (name) already in use (can't create another). Change name. + public const int GameIdAlreadyExists = 0x7FFF - 1; + + /// (32765) Game is full. This rarely happens when some player joined the room before your join completed. + public const int GameFull = 0x7FFF - 2; + + /// (32764) Game is closed and can't be joined. Join another game. + public const int GameClosed = 0x7FFF - 3; + + [Obsolete("No longer used, cause random matchmaking is no longer a process.")] + public const int AlreadyMatched = 0x7FFF - 4; + + /// (32762) All servers are busy. This is a temporary issue and the game logic should try again after a brief wait time. + /// + /// This error may happen for all operations that create rooms. The operation response will contain this error code. + /// + /// This error is very unlikely to happen as we monitor load on all servers and add them on demand. + /// However, it's good to be prepared for a shortage of machines or surge in CCUs. + /// + public const int ServerFull = 0x7FFF - 5; + + /// (32761) Not in use currently. + public const int UserBlocked = 0x7FFF - 6; + + /// (32760) Random matchmaking only succeeds if a room exists thats neither closed nor full. Repeat in a few seconds or create a new room. + public const int NoRandomMatchFound = 0x7FFF - 7; + + /// (32758) Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join. + public const int GameDoesNotExist = 0x7FFF - 9; + + /// (32757) Authorization on the Photon Cloud failed because the concurrent users (CCU) limit of the app's subscription is reached. + /// + /// Unless you have a plan with "CCU Burst", clients might fail the authentication step during connect. + /// Affected client are unable to call operations. Please note that players who end a game and return + /// to the master server will disconnect and re-connect, which means that they just played and are rejected + /// in the next minute / re-connect. + /// This is a temporary measure. Once the CCU is below the limit, players will be able to connect an play again. + /// + /// OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen. + /// Self-hosted Photon servers with a CCU limited license won't let a client connect at all. + /// + public const int MaxCcuReached = 0x7FFF - 10; + + /// (32756) Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server. + /// + /// Some subscription plans for the Photon Cloud are region-bound. Servers of other regions can't be used then. + /// Check your master server address and compare it with your Photon Cloud Dashboard's info. + /// https://dashboard.photonengine.com + /// + /// OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen. + /// Self-hosted Photon servers with a CCU limited license won't let a client connect at all. + /// + public const int InvalidRegion = 0x7FFF - 11; + + /// + /// (32755) Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token). Check error message for details. + /// + public const int CustomAuthenticationFailed = 0x7FFF - 12; + + /// (32753) The Authentication ticket expired. Usually, this is refreshed behind the scenes. Connect (and authorize) again. + public const int AuthenticationTicketExpired = 0x7FF1; + + /// + /// (32752) A server-side plugin (or webhook) failed to execute and reported an error. Check the OperationResponse.DebugMessage. + /// + public const int PluginReportedError = 0x7FFF - 15; + + /// + /// (32751) CreateGame/JoinGame/Join operation fails if expected plugin does not correspond to loaded one. + /// + public const int PluginMismatch = 0x7FFF - 16; + + /// + /// (32750) for join requests. Indicates the current peer already called join and is joined to the room. + /// + public const int JoinFailedPeerAlreadyJoined = 32750; // 0x7FFF - 17, + + /// + /// (32749) for join requests. Indicates the list of InactiveActors already contains an actor with the requested ActorNr or UserId. + /// + public const int JoinFailedFoundInactiveJoiner = 32749; // 0x7FFF - 18, + + /// + /// (32748) for join requests. Indicates the list of Actors (active and inactive) did not contain an actor with the requested ActorNr or UserId. + /// + public const int JoinFailedWithRejoinerNotFound = 32748; // 0x7FFF - 19, + + /// + /// (32747) for join requests. Note: for future use - Indicates the requested UserId was found in the ExcludedList. + /// + public const int JoinFailedFoundExcludedUserId = 32747; // 0x7FFF - 20, + + /// + /// (32746) for join requests. Indicates the list of ActiveActors already contains an actor with the requested ActorNr or UserId. + /// + public const int JoinFailedFoundActiveJoiner = 32746; // 0x7FFF - 21, + + /// + /// (32745) for SetProperties and RaiseEvent (if flag HttpForward is true) requests. Indicates the maximum allowed http requests per minute was reached. + /// + public const int HttpLimitReached = 32745; // 0x7FFF - 22, + + /// + /// (32744) for WebRpc requests. Indicates the the call to the external service failed. + /// + public const int ExternalHttpCallFailed = 32744; // 0x7FFF - 23, + + /// + /// (32743) for operations with defined limits (as in calls per second, content count or size). + /// + public const int OperationLimitReached = 32743; // 0x7FFF - 24, + + /// + /// (32742) Server error during matchmaking with slot reservation. E.g. the reserved slots can not exceed MaxPlayers. + /// + public const int SlotError = 32742; // 0x7FFF - 25, + + /// + /// (32741) Server will react with this error if invalid encryption parameters provided by token + /// + public const int InvalidEncryptionParameters = 32741; // 0x7FFF - 24, + +} + + + /// + /// Class for constants. These (byte) values define "well known" properties for an Actor / Player. + /// + /// + /// These constants are used internally. + /// "Custom properties" have to use a string-type as key. They can be assigned at will. + /// + public class ActorProperties + { + /// (255) Name of a player/actor. + public const byte PlayerName = 255; // was: 1 + + /// (254) Tells you if the player is currently in this game (getting events live). + /// A server-set value for async games, where players can leave the game and return later. + public const byte IsInactive = 254; + + /// (253) UserId of the player. Sent when room gets created with RoomOptions.PublishUserId = true. + public const byte UserId = 253; + } + + + /// + /// Class for constants. These (byte) values are for "well known" room/game properties used in Photon LoadBalancing. + /// + /// + /// These constants are used internally. + /// "Custom properties" have to use a string-type as key. They can be assigned at will. + /// + public class GamePropertyKey + { + /// (255) Max number of players that "fit" into this room. 0 is for "unlimited". + public const byte MaxPlayers = 255; + + /// (254) Makes this room listed or not in the lobby on master. + public const byte IsVisible = 254; + + /// (253) Allows more players to join a room (or not). + public const byte IsOpen = 253; + + /// (252) Current count of players in the room. Used only in the lobby on master. + public const byte PlayerCount = 252; + + /// (251) True if the room is to be removed from room listing (used in update to room list in lobby on master) + public const byte Removed = 251; + + /// (250) A list of the room properties to pass to the RoomInfo list in a lobby. This is used in CreateRoom, which defines this list once per room. + public const byte PropsListedInLobby = 250; + + /// (249) Equivalent of Operation Join parameter CleanupCacheOnLeave. + public const byte CleanupCacheOnLeave = 249; + + /// (248) Code for MasterClientId, which is synced by server. When sent as op-parameter this is (byte)203. As room property this is (byte)248. + /// Tightly related to ParameterCode.MasterClientId. + public const byte MasterClientId = (byte)248; + + /// (247) Code for ExpectedUsers in a room. Matchmaking keeps a slot open for the players with these userIDs. + public const byte ExpectedUsers = (byte)247; + + /// (246) Player Time To Live. How long any player can be inactive (due to disconnect or leave) before the user gets removed from the playerlist (freeing a slot). + public const byte PlayerTtl = (byte)246; + + /// (245) Room Time To Live. How long a room stays available (and in server-memory), after the last player becomes inactive. After this time, the room gets persisted or destroyed. + public const byte EmptyRoomTtl = (byte)245; + } + + + /// + /// Class for constants. These values are for events defined by Photon LoadBalancing. + /// + /// They start at 255 and go DOWN. Your own in-game events can start at 0. These constants are used internally. + public class EventCode + { + /// (230) Initial list of RoomInfos (in lobby on Master) + public const byte GameList = 230; + + /// (229) Update of RoomInfos to be merged into "initial" list (in lobby on Master) + public const byte GameListUpdate = 229; + + /// (228) Currently not used. State of queueing in case of server-full + public const byte QueueState = 228; + + /// (227) Currently not used. Event for matchmaking + public const byte Match = 227; + + /// (226) Event with stats about this application (players, rooms, etc) + public const byte AppStats = 226; + + /// (224) This event provides a list of lobbies with their player and game counts. + public const byte LobbyStats = 224; + + /// (210) Internally used in case of hosting by Azure + [Obsolete("TCP routing was removed after becoming obsolete.")] + public const byte AzureNodeInfo = 210; + + /// (255) Event Join: someone joined the game. The new actorNumber is provided as well as the properties of that actor (if set in OpJoin). + public const byte Join = (byte)255; + + /// (254) Event Leave: The player who left the game can be identified by the actorNumber. + public const byte Leave = (byte)254; + + /// (253) When you call OpSetProperties with the broadcast option "on", this event is fired. It contains the properties being set. + public const byte PropertiesChanged = (byte)253; + + /// (253) When you call OpSetProperties with the broadcast option "on", this event is fired. It contains the properties being set. + [Obsolete("Use PropertiesChanged now.")] + public const byte SetProperties = (byte)253; + + /// (252) When player left game unexpected and the room has a playerTtl != 0, this event is fired to let everyone know about the timeout. + /// Obsolete. Replaced by Leave. public const byte Disconnect = LiteEventCode.Disconnect; + + /// (251) Sent by Photon Cloud when a plugin-call or webhook-call failed or events cache limit exceeded. Usually, the execution on the server continues, despite the issue. Contains: ParameterCode.Info. + /// + public const byte ErrorInfo = 251; + + /// (250) Sent by Photon whent he event cache slice was changed. Done by OpRaiseEvent. + public const byte CacheSliceChanged = 250; + + /// (223) Sent by Photon to update a token before it times out. + public const byte AuthEvent = 223; + } + + + /// Class for constants. Codes for parameters of Operations and Events. + /// These constants are used internally. + public class ParameterCode + { + /// (237) A bool parameter for creating games. If set to true, no room events are sent to the clients on join and leave. Default: false (and not sent). + public const byte SuppressRoomEvents = 237; + + /// (236) Time To Live (TTL) for a room when the last player leaves. Keeps room in memory for case a player re-joins soon. In milliseconds. + public const byte EmptyRoomTTL = 236; + + /// (235) Time To Live (TTL) for an 'actor' in a room. If a client disconnects, this actor is inactive first and removed after this timeout. In milliseconds. + public const byte PlayerTTL = 235; + + /// (234) Optional parameter of OpRaiseEvent and OpSetCustomProperties to forward the event/operation to a web-service. + public const byte EventForward = 234; + + /// (233) Optional parameter of OpLeave in async games. If false, the player does abandons the game (forever). By default players become inactive and can re-join. + [Obsolete("Use: IsInactive")] + public const byte IsComingBack = (byte)233; + + /// (233) Used in EvLeave to describe if a user is inactive (and might come back) or not. In rooms with PlayerTTL, becoming inactive is the default case. + public const byte IsInactive = (byte)233; + + /// (232) Used when creating rooms to define if any userid can join the room only once. + public const byte CheckUserOnJoin = (byte)232; + + /// (231) Code for "Check And Swap" (CAS) when changing properties. + public const byte ExpectedValues = (byte)231; + + /// (230) Address of a (game) server to use. + public const byte Address = 230; + + /// (229) Count of players in this application in a rooms (used in stats event) + public const byte PeerCount = 229; + + /// (228) Count of games in this application (used in stats event) + public const byte GameCount = 228; + + /// (227) Count of players on the master server (in this app, looking for rooms) + public const byte MasterPeerCount = 227; + + /// (225) User's ID + public const byte UserId = 225; + + /// (224) Your application's ID: a name on your own Photon or a GUID on the Photon Cloud + public const byte ApplicationId = 224; + + /// (223) Not used currently (as "Position"). If you get queued before connect, this is your position + public const byte Position = 223; + + /// (223) Modifies the matchmaking algorithm used for OpJoinRandom. Allowed parameter values are defined in enum MatchmakingMode. + public const byte MatchMakingType = 223; + + /// (222) List of RoomInfos about open / listed rooms + public const byte GameList = 222; + + /// (221) Internally used to establish encryption + public const byte Token = 221; + + /// (220) Version of your application + public const byte AppVersion = 220; + + /// (210) Internally used in case of hosting by Azure + [Obsolete("TCP routing was removed after becoming obsolete.")] + public const byte AzureNodeInfo = 210; // only used within events, so use: EventCode.AzureNodeInfo + + /// (209) Internally used in case of hosting by Azure + [Obsolete("TCP routing was removed after becoming obsolete.")] + public const byte AzureLocalNodeId = 209; + + /// (208) Internally used in case of hosting by Azure + [Obsolete("TCP routing was removed after becoming obsolete.")] + public const byte AzureMasterNodeId = 208; + + /// (255) Code for the gameId/roomName (a unique name per room). Used in OpJoin and similar. + public const byte RoomName = (byte)255; + + /// (250) Code for broadcast parameter of OpSetProperties method. + public const byte Broadcast = (byte)250; + + /// (252) Code for list of players in a room. + public const byte ActorList = (byte)252; + + /// (254) Code of the Actor of an operation. Used for property get and set. + public const byte ActorNr = (byte)254; + + /// (249) Code for property set (Hashtable). + public const byte PlayerProperties = (byte)249; + + /// (245) Code of data/custom content of an event. Used in OpRaiseEvent. + public const byte CustomEventContent = (byte)245; + + /// (245) Code of data of an event. Used in OpRaiseEvent. + public const byte Data = (byte)245; + + /// (244) Code used when sending some code-related parameter, like OpRaiseEvent's event-code. + /// This is not the same as the Operation's code, which is no longer sent as part of the parameter Dictionary in Photon 3. + public const byte Code = (byte)244; + + /// (248) Code for property set (Hashtable). + public const byte GameProperties = (byte)248; + + /// + /// (251) Code for property-set (Hashtable). This key is used when sending only one set of properties. + /// If either ActorProperties or GameProperties are used (or both), check those keys. + /// + public const byte Properties = (byte)251; + + /// (253) Code of the target Actor of an operation. Used for property set. Is 0 for game + public const byte TargetActorNr = (byte)253; + + /// (246) Code to select the receivers of events (used in Lite, Operation RaiseEvent). + public const byte ReceiverGroup = (byte)246; + + /// (247) Code for caching events while raising them. + public const byte Cache = (byte)247; + + /// (241) Bool parameter of CreateGame Operation. If true, server cleans up roomcache of leaving players (their cached events get removed). + public const byte CleanupCacheOnLeave = (byte)241; + + /// (240) Code for "group" operation-parameter (as used in Op RaiseEvent). + public const byte Group = 240; + + /// (239) The "Remove" operation-parameter can be used to remove something from a list. E.g. remove groups from player's interest groups. + public const byte Remove = 239; + + /// (239) Used in Op Join to define if UserIds of the players are broadcast in the room. Useful for FindFriends and reserving slots for expected users. + public const byte PublishUserId = 239; + + /// (238) The "Add" operation-parameter can be used to add something to some list or set. E.g. add groups to player's interest groups. + public const byte Add = 238; + + /// (218) Content for EventCode.ErrorInfo and internal debug operations. + public const byte Info = 218; + + /// (217) This key's (byte) value defines the target custom authentication type/service the client connects with. Used in OpAuthenticate + public const byte ClientAuthenticationType = 217; + + /// (216) This key's (string) value provides parameters sent to the custom authentication type/service the client connects with. Used in OpAuthenticate + public const byte ClientAuthenticationParams = 216; + + /// (215) Makes the server create a room if it doesn't exist. OpJoin uses this to always enter a room, unless it exists and is full/closed. + // public const byte CreateIfNotExists = 215; + + /// (215) The JoinMode enum defines which variant of joining a room will be executed: Join only if available, create if not exists or re-join. + /// Replaces CreateIfNotExists which was only a bool-value. + public const byte JoinMode = 215; + + /// (214) This key's (string or byte[]) value provides parameters sent to the custom authentication service setup in Photon Dashboard. Used in OpAuthenticate + public const byte ClientAuthenticationData = 214; + + /// (203) Code for MasterClientId, which is synced by server. When sent as op-parameter this is code 203. + /// Tightly related to GamePropertyKey.MasterClientId. + public const byte MasterClientId = (byte)203; + + /// (1) Used in Op FindFriends request. Value must be string[] of friends to look up. + public const byte FindFriendsRequestList = (byte)1; + + /// (2) Used in Op FindFriends request. An integer containing option-flags to filter the results. + public const byte FindFriendsOptions = (byte)2; + + /// (1) Used in Op FindFriends response. Contains bool[] list of online states (false if not online). + public const byte FindFriendsResponseOnlineList = (byte)1; + + /// (2) Used in Op FindFriends response. Contains string[] of room names ("" where not known or no room joined). + public const byte FindFriendsResponseRoomIdList = (byte)2; + + /// (213) Used in matchmaking-related methods and when creating a room to name a lobby (to join or to attach a room to). + public const byte LobbyName = (byte)213; + + /// (212) Used in matchmaking-related methods and when creating a room to define the type of a lobby. Combined with the lobby name this identifies the lobby. + public const byte LobbyType = (byte)212; + + /// (211) This (optional) parameter can be sent in Op Authenticate to turn on Lobby Stats (info about lobby names and their user- and game-counts). + public const byte LobbyStats = (byte)211; + + /// (210) Used for region values in OpAuth and OpGetRegions. + public const byte Region = (byte)210; + + /// (209) Path of the WebRPC that got called. Also known as "WebRpc Name". Type: string. + public const byte UriPath = 209; + + /// (208) Parameters for a WebRPC as: Dictionary<string, object>. This will get serialized to JSon. + public const byte WebRpcParameters = 208; + + /// (207) ReturnCode for the WebRPC, as sent by the web service (not by Photon, which uses ErrorCode). Type: byte. + public const byte WebRpcReturnCode = 207; + + /// (206) Message returned by WebRPC server. Analog to Photon's debug message. Type: string. + public const byte WebRpcReturnMessage = 206; + + /// (205) Used to define a "slice" for cached events. Slices can easily be removed from cache. Type: int. + public const byte CacheSliceIndex = 205; + + /// (204) Informs the server of the expected plugin setup. + /// + /// The operation will fail in case of a plugin mismatch returning error code PluginMismatch 32751(0x7FFF - 16). + /// Setting string[]{} means the client expects no plugin to be setup. + /// Note: for backwards compatibility null omits any check. + /// + public const byte Plugins = 204; + + /// (202) Used by the server in Operation Responses, when it sends the nickname of the client (the user's nickname). + public const byte NickName = 202; + + /// (201) Informs user about name of plugin load to game + public const byte PluginName = 201; + + /// (200) Informs user about version of plugin load to game + public const byte PluginVersion = 200; + + /// (196) Cluster info provided in OpAuthenticate/OpAuthenticateOnce responses. + public const byte Cluster = 196; + + /// (195) Protocol which will be used by client to connect master/game servers. Used for nameserver. + public const byte ExpectedProtocol = 195; + + /// (194) Set of custom parameters which are sent in auth request. + public const byte CustomInitData = 194; + + /// (193) How are we going to encrypt data. + public const byte EncryptionMode = 193; + + /// (192) Parameter of Authentication, which contains encryption keys (depends on AuthMode and EncryptionMode). + public const byte EncryptionData = 192; + + /// (191) An int parameter summarizing several boolean room-options with bit-flags. + public const byte RoomOptionFlags = 191; + } + + + /// + /// Class for constants. Contains operation codes. + /// + /// These constants are used internally. + public class OperationCode + { + [Obsolete("Exchanging encrpytion keys is done internally in the lib now. Don't expect this operation-result.")] + public const byte ExchangeKeysForEncryption = 250; + + /// (255) Code for OpJoin, to get into a room. + [Obsolete] + public const byte Join = 255; + + /// (231) Authenticates this peer and connects to a virtual application + public const byte AuthenticateOnce = 231; + + /// (230) Authenticates this peer and connects to a virtual application + public const byte Authenticate = 230; + + /// (229) Joins lobby (on master) + public const byte JoinLobby = 229; + + /// (228) Leaves lobby (on master) + public const byte LeaveLobby = 228; + + /// (227) Creates a game (or fails if name exists) + public const byte CreateGame = 227; + + /// (226) Join game (by name) + public const byte JoinGame = 226; + + /// (225) Joins random game (on master) + public const byte JoinRandomGame = 225; + + // public const byte CancelJoinRandom = 224; // obsolete, cause JoinRandom no longer is a "process". now provides result immediately + + /// (254) Code for OpLeave, to get out of a room. + public const byte Leave = (byte)254; + + /// (253) Raise event (in a room, for other actors/players) + public const byte RaiseEvent = (byte)253; + + /// (252) Set Properties (of room or actor/player) + public const byte SetProperties = (byte)252; + + /// (251) Get Properties + public const byte GetProperties = (byte)251; + + /// (248) Operation code to change interest groups in Rooms (Lite application and extending ones). + public const byte ChangeGroups = (byte)248; + + /// (222) Request the rooms and online status for a list of friends (by name, which should be unique). + public const byte FindFriends = 222; + + /// (221) Request statistics about a specific list of lobbies (their user and game count). + public const byte GetLobbyStats = 221; + + /// (220) Get list of regional servers from a NameServer. + public const byte GetRegions = 220; + + /// (219) WebRpc Operation. + public const byte WebRpc = 219; + + /// (218) Operation to set some server settings. Used with different parameters on various servers. + public const byte ServerSettings = 218; + + /// (217) Get the game list matching a supplied sql filter (SqlListLobby only) + public const byte GetGameList = 217; + } + + /// Defines possible values for OpJoinRoom and OpJoinOrCreate. It tells the server if the room can be only be joined normally, created implicitly or found on a web-service for Turnbased games. + /// These values are not directly used by a game but implicitly set. + public enum JoinMode : byte + { + /// Regular join. The room must exist. + Default = 0, + + /// Join or create the room if it's not existing. Used for OpJoinOrCreate for example. + CreateIfNotExists = 1, + + /// The room might be out of memory and should be loaded (if possible) from a Turnbased web-service. + JoinOrRejoin = 2, + + /// Only re-join will be allowed. If the user is not yet in the room, this will fail. + RejoinOnly = 3, + } + + /// + /// Options for matchmaking rules for OpJoinRandom. + /// + public enum MatchmakingMode : byte + { + /// Fills up rooms (oldest first) to get players together as fast as possible. Default. + /// Makes most sense with MaxPlayers > 0 and games that can only start with more players. + FillRoom = 0, + + /// Distributes players across available rooms sequentially but takes filter into account. Without filter, rooms get players evenly distributed. + SerialMatching = 1, + + /// Joins a (fully) random room. Expected properties must match but aside from this, any available room might be selected. + RandomMatching = 2 + } + + + /// + /// Lite - OpRaiseEvent lets you chose which actors in the room should receive events. + /// By default, events are sent to "Others" but you can overrule this. + /// + public enum ReceiverGroup : byte + { + /// Default value (not sent). Anyone else gets my event. + Others = 0, + + /// Everyone in the current room (including this peer) will get this event. + All = 1, + + /// The server sends this event only to the actor with the lowest actorNumber. + /// The "master client" does not have special rights but is the one who is in this room the longest time. + MasterClient = 2, + } + + /// + /// Lite - OpRaiseEvent allows you to cache events and automatically send them to joining players in a room. + /// Events are cached per event code and player: Event 100 (example!) can be stored once per player. + /// Cached events can be modified, replaced and removed. + /// + /// + /// Caching works only combination with ReceiverGroup options Others and All. + /// + public enum EventCaching : byte + { + /// Default value (not sent). + DoNotCache = 0, + + /// Will merge this event's keys with those already cached. + [Obsolete] + MergeCache = 1, + + /// Replaces the event cache for this eventCode with this event's content. + [Obsolete] + ReplaceCache = 2, + + /// Removes this event (by eventCode) from the cache. + [Obsolete] + RemoveCache = 3, + + /// Adds an event to the room's cache + AddToRoomCache = 4, + + /// Adds this event to the cache for actor 0 (becoming a "globally owned" event in the cache). + AddToRoomCacheGlobal = 5, + + /// Remove fitting event from the room's cache. + RemoveFromRoomCache = 6, + + /// Removes events of players who already left the room (cleaning up). + RemoveFromRoomCacheForActorsLeft = 7, + + /// Increase the index of the sliced cache. + SliceIncreaseIndex = 10, + + /// Set the index of the sliced cache. You must set RaiseEventOptions.CacheSliceIndex for this. + SliceSetIndex = 11, + + /// Purge cache slice with index. Exactly one slice is removed from cache. You must set RaiseEventOptions.CacheSliceIndex for this. + SlicePurgeIndex = 12, + + /// Purge cache slices with specified index and anything lower than that. You must set RaiseEventOptions.CacheSliceIndex for this. + SlicePurgeUpToIndex = 13, + } + + /// + /// Flags for "types of properties", being used as filter in OpGetProperties. + /// + [Flags] + public enum PropertyTypeFlag : byte + { + /// (0x00) Flag type for no property type. + None = 0x00, + + /// (0x01) Flag type for game-attached properties. + Game = 0x01, + + /// (0x02) Flag type for actor related propeties. + Actor = 0x02, + + /// (0x01) Flag type for game AND actor properties. Equal to 'Game' + GameAndActor = Game | Actor + } + + + /// Wraps up common room properties needed when you create rooms. Read the individual entries for more details. + /// This directly maps to the fields in the Room class. + public class RoomOptions + { + /// Defines if this room is listed in the lobby. If not, it also is not joined randomly. + /// + /// A room that is not visible will be excluded from the room lists that are sent to the clients in lobbies. + /// An invisible room can be joined by name but is excluded from random matchmaking. + /// + /// Use this to "hide" a room and simulate "private rooms". Players can exchange a roomname and create it + /// invisble to avoid anyone else joining it. + /// + public bool IsVisible { get { return this.isVisible; } set { this.isVisible = value; } } + private bool isVisible = true; + + /// Defines if this room can be joined at all. + /// + /// If a room is closed, no player can join this. As example this makes sense when 3 of 4 possible players + /// start their gameplay early and don't want anyone to join during the game. + /// The room can still be listed in the lobby (set isVisible to control lobby-visibility). + /// + public bool IsOpen { get { return this.isOpen; } set { this.isOpen = value; } } + private bool isOpen = true; + + /// Max number of players that can be in the room at any time. 0 means "no limit". + public byte MaxPlayers; + + /// Time To Live (TTL) for an 'actor' in a room. If a client disconnects, this actor is inactive first and removed after this timeout. In milliseconds. + public int PlayerTtl; + + /// Time To Live (TTL) for a room when the last player leaves. Keeps room in memory for case a player re-joins soon. In milliseconds. + public int EmptyRoomTtl; + + /// Removes a user's events and properties from the room when a user leaves. + /// + /// This makes sense when in rooms where players can't place items in the room and just vanish entirely. + /// When you disable this, the event history can become too long to load if the room stays in use indefinitely. + /// Default: true. Cleans up the cache and props of leaving users. + /// + public bool CleanupCacheOnLeave { get { return this.cleanupCacheOnLeave; } set { this.cleanupCacheOnLeave = value; } } + private bool cleanupCacheOnLeave = true; + + /// The room's custom properties to set. Use string keys! + /// + /// Custom room properties are any key-values you need to define the game's setup. + /// The shorter your keys are, the better. + /// Example: Map, Mode (could be "m" when used with "Map"), TileSet (could be "t"). + /// + public Hashtable CustomRoomProperties; + + /// Defines the custom room properties that get listed in the lobby. + /// + /// Name the custom room properties that should be available to clients that are in a lobby. + /// Use with care. Unless a custom property is essential for matchmaking or user info, it should + /// not be sent to the lobby, which causes traffic and delays for clients in the lobby. + /// + /// Default: No custom properties are sent to the lobby. + /// + public string[] CustomRoomPropertiesForLobby = new string[0]; + + /// Informs the server of the expected plugin setup. + /// + /// The operation will fail in case of a plugin missmatch returning error code PluginMismatch 32757(0x7FFF - 10). + /// Setting string[]{} means the client expects no plugin to be setup. + /// Note: for backwards compatibility null omits any check. + /// + public string[] Plugins; + + /// + /// Tells the server to skip room events for joining and leaving players. + /// + /// + /// Using this makes the client unaware of the other players in a room. + /// That can save some traffic if you have some server logic that updates players + /// but it can also limit the client's usability. + /// + public bool SuppressRoomEvents { get; set; } + + /// Disables events join and leave from the server as well as property broadcasts in a room (to minimize traffic) + public bool SuppressPlayerInfo { get; set; } + + /// + /// Defines if the UserIds of players get "published" in the room. Useful for FindFriends, if players want to play another game together. + /// + /// + /// When you set this to true, Photon will publish the UserIds of the players in that room. + /// In that case, you can use PhotonPlayer.userId, to access any player's userID. + /// This is useful for FindFriends and to set "expected users" to reserve slots in a room. + /// + public bool PublishUserId { get; set; } + + /// Optionally, properties get deleted, when null gets assigned as value. Defaults to off / false. + /// + /// When Op SetProperties is setting a key's value to null, the server and clients should remove the key/value from the Custom Properties. + /// By default, the server keeps the keys (and null values) and sends them to joining players. + /// + /// Important: Only when SetProperties does a "broadcast", the change (key, value = null) is sent to clients to update accordingly. + /// This applies to Custom Properties for rooms and actors/players. + /// + public bool DeleteNullProperties { get; set; } + + /// By default, property changes are sent back to the client that's setting them to avoid de-sync when properties are set concurrently. + /// + /// This option is enables by default to fix this scenario: + /// + /// 1) On server, room property ABC is set to value FOO, which triggers notifications to all the clients telling them that the property changed. + /// 2) While that notification is in flight, a client sets the ABC property to value BAR. + /// 3) Client receives notification from the server and changes it�s local copy of ABC to FOO. + /// 4) Server receives the set operation and changes the official value of ABC to BAR, but never notifies the client that sent the set operation that the value is now BAR. + /// + /// Without this option, the client that set the value to BAR never hears from the server that the official copy has been updated to BAR, and thus gets stuck with a value of FOO. + /// + public bool BroadcastPropsChangeToAll { get { return this.broadcastPropsChangeToAll; } set { this.broadcastPropsChangeToAll = value; } } + private bool broadcastPropsChangeToAll = true; + + #if SERVERSDK + public bool CheckUserOnJoin { get; set; } + #endif + } + + + /// Aggregates several less-often used options for operation RaiseEvent. See field descriptions for usage details. + public class RaiseEventOptions + { + /// Default options: CachingOption: DoNotCache, InterestGroup: 0, targetActors: null, receivers: Others, sequenceChannel: 0. + public readonly static RaiseEventOptions Default = new RaiseEventOptions(); + + /// Defines if the server should simply send the event, put it in the cache or remove events that are like this one. + /// + /// When using option: SliceSetIndex, SlicePurgeIndex or SlicePurgeUpToIndex, set a CacheSliceIndex. All other options except SequenceChannel get ignored. + /// + public EventCaching CachingOption; + + /// The number of the Interest Group to send this to. 0 goes to all users but to get 1 and up, clients must subscribe to the group first. + public byte InterestGroup; + + /// A list of Player.ActorNumbers to send this event to. You can implement events that just go to specific users this way. + public int[] TargetActors; + + /// Sends the event to All, MasterClient or Others (default). Be careful with MasterClient, as the client might disconnect before it got the event and it gets lost. + public ReceiverGroup Receivers; + + /// Events are ordered per "channel". If you have events that are independent of others, they can go into another sequence or channel. + [Obsolete("Not used where SendOptions are a parameter too. Use SendOptions.Channel instead.")] + public byte SequenceChannel; + + /// Optional flags to be used in Photon client SDKs with Op RaiseEvent and Op SetProperties. + /// Introduced mainly for webhooks 1.2 to control behavior of forwarded HTTP requests. + public WebFlags Flags = WebFlags.Default; + + ///// Used along with CachingOption SliceSetIndex, SlicePurgeIndex or SlicePurgeUpToIndex if you want to set or purge a specific cache-slice. + //public int CacheSliceIndex; + } + + /// Types of lobbies define their behaviour and capabilities. Check each value for details. + /// Values of this enum must be matched by the server. + public enum LobbyType :byte + { + /// Standard type and behaviour: While joined to this lobby clients get room-lists and JoinRandomRoom can use a simple filter to match properties (perfectly). + Default = 0, + /// This lobby type lists rooms like Default but JoinRandom has a parameter for SQL-like "where" clauses for filtering. This allows bigger, less, or and and combinations. + SqlLobby = 2, + /// This lobby does not send lists of games. It is only used for OpJoinRandomRoom. It keeps rooms available for a while when there are only inactive users left. + AsyncRandomLobby = 3 + } + + /// Refers to a specific lobby on the server. + /// + /// Name and Type combined are the unique identifier for a lobby.
+ /// The server will create lobbies "on demand", so no registration or setup is required.
+ /// An empty or null Name always points to the "default lobby" as special case. + ///
+ public class TypedLobby + { + /// + /// Name of the lobby. Default: null, pointing to the "default lobby". + /// + /// + /// If Name is null or empty, a TypedLobby will point to the "default lobby". This ignores the Type value and always acts as . + /// + public string Name; + + /// + /// Type (and behaviour) of the lobby. + /// + /// + /// An empty or null Name always points to the "default lobby" as special case. + /// + public LobbyType Type; + + /// + /// A reference to the default lobby which is the unique lobby that uses null as name and is of type . + /// + /// + /// There is only a single lobby with an empty name on the server. It is always of type .
+ /// On the other hand, this is a shortcut and reusable reference to the default lobby.
+ /// Do not change Name or Type.
+ ///
+ public static readonly TypedLobby Default = new TypedLobby(); + + /// + /// Returns whether or not this instance points to the "default lobby" (). + /// + /// + /// This comes up to checking if the Name is null or empty. + /// is not the same thing as the "default lobby" (). + /// + public bool IsDefault { get { return string.IsNullOrEmpty(this.Name); } } + + + /// + /// Creates a TypedLobby instance. Unless Name is changed, this points to the "default lobby" (). + /// + internal TypedLobby() + { + } + + /// + /// Sets Name and Type of the new instance. Make sure name is not empty or null, as that always points to the "default lobby" (). + /// + /// Some string to identify a lobby. + /// The type of a lobby defines it's capabilities and behaviour. + public TypedLobby(string name, LobbyType type) + { + this.Name = name; + this.Type = type; + } + + public override string ToString() + { + return string.Format("lobby '{0}'[{1}]", this.Name, this.Type); + } + } + + + /// + /// Info for a lobby on the server. Used when is true. + /// + public class TypedLobbyInfo : TypedLobby + { + /// Count of players that currently joined this lobby. + public int PlayerCount; + + /// Count of rooms currently associated with this lobby. + public int RoomCount; + + public override string ToString() + { + return string.Format("TypedLobbyInfo '{0}'[{1}] rooms: {2} players: {3}", this.Name, this.Type, this.RoomCount, this.PlayerCount); + } + } + + + /// + /// Options for authentication modes. From "classic" auth on each server to AuthOnce (on NameServer). + /// + public enum AuthModeOption { Auth, AuthOnce, AuthOnceWss } + + + /// + /// Options for optional "Custom Authentication" services used with Photon. Used by OpAuthenticate after connecting to Photon. + /// + public enum CustomAuthenticationType : byte + { + /// Use a custom authentication service. Currently the only implemented option. + Custom = 0, + + /// Authenticates users by their Steam Account. Set Steam's ticket as "ticket" via AddAuthParameter(). + Steam = 1, + + /// Authenticates users by their Facebook Account. Set Facebooks's tocken as "token" via AddAuthParameter(). + Facebook = 2, + + /// Authenticates users by their Oculus Account and token. Set Oculus' userid as "userid" and nonce as "nonce" via AddAuthParameter(). + Oculus = 3, + + /// Authenticates users by their PSN Account and token on PS4. Set token as "token", env as "env" and userName as "userName" via AddAuthParameter(). + PlayStation4 = 4, + [Obsolete("Use PlayStation4 or PlayStation5 as needed")] + PlayStation = 4, + + /// Authenticates users by their Xbox Account. Pass the XSTS token via SetAuthPostData(). + Xbox = 5, + + /// Authenticates users by their HTC Viveport Account. Set userToken as "userToken" via AddAuthParameter(). + Viveport = 10, + + /// Authenticates users by their NSA ID. Set token as "token" and appversion as "appversion" via AddAuthParameter(). The appversion is optional. + NintendoSwitch = 11, + + /// Authenticates users by their PSN Account and token on PS5. Set token as "token", env as "env" and userName as "userName" via AddAuthParameter(). + PlayStation5 = 12, + [Obsolete("Use PlayStation4 or PlayStation5 as needed")] + Playstation5 = 12, + + /// Authenticates users with Epic Online Services (EOS). Set token as "token" and ownershipToken as "ownershipToken" via AddAuthParameter(). The ownershipToken is optional. + Epic = 13, + + /// Authenticates users with Facebook Gaming api. Set token as "token" via AddAuthParameter(). + FacebookGaming = 15, + + /// Disables custom authentication. Same as not providing any AuthenticationValues for connect (more precisely for: OpAuthenticate). + None = byte.MaxValue + } + + + /// + /// Container for user authentication in Photon. Set AuthValues before you connect - all else is handled. + /// + /// + /// On Photon, user authentication is optional but can be useful in many cases. + /// If you want to FindFriends, a unique ID per user is very practical. + /// + /// There are basically three options for user authentication: None at all, the client sets some UserId + /// or you can use some account web-service to authenticate a user (and set the UserId server-side). + /// + /// Custom Authentication lets you verify end-users by some kind of login or token. It sends those + /// values to Photon which will verify them before granting access or disconnecting the client. + /// + /// The AuthValues are sent in OpAuthenticate when you connect, so they must be set before you connect. + /// If the AuthValues.UserId is null or empty when it's sent to the server, then the Photon Server assigns a UserId! + /// + /// The Photon Cloud Dashboard will let you enable this feature and set important server values for it. + /// https://dashboard.photonengine.com + /// + public class AuthenticationValues + { + /// See AuthType. + private CustomAuthenticationType authType = CustomAuthenticationType.None; + + /// The type of authentication provider that should be used. Defaults to None (no auth whatsoever). + /// Several auth providers are available and CustomAuthenticationType.Custom can be used if you build your own service. + public CustomAuthenticationType AuthType + { + get { return authType; } + set { authType = value; } + } + + /// This string must contain any (http get) parameters expected by the used authentication service. By default, username and token. + /// + /// Maps to operation parameter 216. + /// Standard http get parameters are used here and passed on to the service that's defined in the server (Photon Cloud Dashboard). + /// + public string AuthGetParameters { get; set; } + + /// Data to be passed-on to the auth service via POST. Default: null (not sent). Either string or byte[] (see setters). + /// Maps to operation parameter 214. + public object AuthPostData { get; private set; } + + /// Internal Photon token. After initial authentication, Photon provides a token for this client, subsequently used as (cached) validation. + /// Any token for custom authentication should be set via SetAuthPostData or AddAuthParameter. + public object Token { get; protected internal set; } + + /// The UserId should be a unique identifier per user. This is for finding friends, etc.. + /// See remarks of AuthValues for info about how this is set and used. + public string UserId { get; set; } + + + /// Creates empty auth values without any info. + public AuthenticationValues() + { + } + + /// Creates minimal info about the user. If this is authenticated or not, depends on the set AuthType. + /// Some UserId to set in Photon. + public AuthenticationValues(string userId) + { + this.UserId = userId; + } + + /// Sets the data to be passed-on to the auth service via POST. + /// AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary. + /// String data to be used in the body of the POST request. Null or empty string will set AuthPostData to null. + public virtual void SetAuthPostData(string stringData) + { + this.AuthPostData = (string.IsNullOrEmpty(stringData)) ? null : stringData; + } + + /// Sets the data to be passed-on to the auth service via POST. + /// AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary. + /// Binary token / auth-data to pass on. + public virtual void SetAuthPostData(byte[] byteData) + { + this.AuthPostData = byteData; + } + + /// Sets data to be passed-on to the auth service as Json (Content-Type: "application/json") via Post. + /// AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary. + /// A authentication-data dictionary will be converted to Json and passed to the Auth webservice via HTTP Post. + public virtual void SetAuthPostData(Dictionary dictData) + { + this.AuthPostData = dictData; + } + + /// Adds a key-value pair to the get-parameters used for Custom Auth (AuthGetParameters). + /// This method does uri-encoding for you. + /// Key for the value to set. + /// Some value relevant for Custom Authentication. + public virtual void AddAuthParameter(string key, string value) + { + string ampersand = string.IsNullOrEmpty(this.AuthGetParameters) ? "" : "&"; + this.AuthGetParameters = string.Format("{0}{1}{2}={3}", this.AuthGetParameters, ampersand, System.Uri.EscapeDataString(key), System.Uri.EscapeDataString(value)); + } + + /// + /// Transform this object into string. + /// + /// String info about this object's values. + public override string ToString() + { + return string.Format("AuthenticationValues = AuthType: {0} UserId: {1}{2}{3}{4}", + this.AuthType, + this.UserId, + string.IsNullOrEmpty(this.AuthGetParameters) ? " GetParameters: yes" : "", + this.AuthPostData == null ? "" : " PostData: yes", + this.Token == null ? "" : " Token: yes"); + } + + /// + /// Make a copy of the current object. + /// + /// The object to be copied into. + /// The copied object. + public AuthenticationValues CopyTo(AuthenticationValues copy) + { + copy.AuthType = this.AuthType; + copy.AuthGetParameters = this.AuthGetParameters; + copy.AuthPostData = this.AuthPostData; + copy.UserId = this.UserId; + return copy; + } + } +} diff --git a/Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs.meta b/Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs.meta new file mode 100644 index 00000000..989f399e --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 35c989013c977244186e524a4c90dcee +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/PhotonPing.cs b/Assets/Photon/PhotonRealtime/Code/PhotonPing.cs new file mode 100644 index 00000000..5ac5c879 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/PhotonPing.cs @@ -0,0 +1,481 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This file includes various PhotonPing implementations for different APIs, +// platforms and protocols. +// The RegionPinger class is the instance which selects the Ping implementation +// to use. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Realtime +{ + using System; + using System.Collections; + using System.Threading; + + #if NETFX_CORE + using System.Diagnostics; + using Windows.Foundation; + using Windows.Networking; + using Windows.Networking.Sockets; + using Windows.Storage.Streams; + #endif + + #if !NO_SOCKET && !NETFX_CORE + using System.Collections.Generic; + using System.Diagnostics; + using System.Net.Sockets; + #endif + + #if UNITY_WEBGL + // import UnityWebRequest + using UnityEngine.Networking; + #endif + + /// + /// Abstract implementation of PhotonPing, ase for pinging servers to find the "Best Region". + /// + public abstract class PhotonPing : IDisposable + { + public string DebugString = ""; + + public bool Successful; + + protected internal bool GotResult; + + protected internal int PingLength = 13; + + protected internal byte[] PingBytes = new byte[] { 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x7d, 0x00 }; + + protected internal byte PingId; + + private static readonly System.Random RandomIdProvider = new System.Random(); + + public virtual bool StartPing(string ip) + { + throw new NotImplementedException(); + } + + public virtual bool Done() + { + throw new NotImplementedException(); + } + + public virtual void Dispose() + { + throw new NotImplementedException(); + } + + protected internal void Init() + { + this.GotResult = false; + this.Successful = false; + this.PingId = (byte)(RandomIdProvider.Next(255)); + } + } + + + #if !NETFX_CORE && !NO_SOCKET + /// Uses C# Socket class from System.Net.Sockets (as Unity usually does). + /// Incompatible with Windows 8 Store/Phone API. + public class PingMono : PhotonPing + { + private Socket sock; + + /// + /// Sends a "Photon Ping" to a server. + /// + /// Address in IPv4 or IPv6 format. An address containing a '.' will be interpreted as IPv4. + /// True if the Photon Ping could be sent. + public override bool StartPing(string ip) + { + this.Init(); + + try + { + if (this.sock == null) + { + if (ip.Contains(".")) + { + this.sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); + } + else + { + this.sock = new Socket(AddressFamily.InterNetworkV6, SocketType.Dgram, ProtocolType.Udp); + } + + this.sock.ReceiveTimeout = 5000; + int port = (RegionHandler.PortToPingOverride != 0) ? RegionHandler.PortToPingOverride : 5055; + this.sock.Connect(ip, port); + } + + + this.PingBytes[this.PingBytes.Length - 1] = this.PingId; + this.sock.Send(this.PingBytes); + this.PingBytes[this.PingBytes.Length - 1] = (byte)(this.PingId+1); // this buffer is re-used for the result/receive. invalidate the result now. + } + catch (Exception e) + { + this.sock = null; + Console.WriteLine(e); + } + + return false; + } + + public override bool Done() + { + if (this.GotResult || this.sock == null) + { + return true; // this just indicates the ping is no longer waiting. this.Successful value defines if the roundtrip completed + } + + int read = 0; + try + { + if (!this.sock.Poll(0, SelectMode.SelectRead)) + { + return false; + } + + read = this.sock.Receive(this.PingBytes, SocketFlags.None); + } + catch (Exception ex) + { + if (this.sock != null) + { + this.sock.Close(); + this.sock = null; + } + this.DebugString += " Exception of socket! " + ex.GetType() + " "; + return true; // this just indicates the ping is no longer waiting. this.Successful value defines if the roundtrip completed + } + + bool replyMatch = this.PingBytes[this.PingBytes.Length - 1] == this.PingId && read == this.PingLength; + if (!replyMatch) + { + this.DebugString += " ReplyMatch is false! "; + } + + + this.Successful = replyMatch; + this.GotResult = true; + return true; + } + + public override void Dispose() + { + try + { + this.sock.Close(); + } + catch + { + } + + this.sock = null; + } + + } + #endif + + + #if NETFX_CORE + /// Windows store API implementation of PhotonPing, based on DatagramSocket for UDP. + public class PingWindowsStore : PhotonPing + { + private DatagramSocket sock; + private readonly object syncer = new object(); + + public override bool StartPing(string host) + { + lock (this.syncer) + { + this.Init(); + + int port = (RegionHandler.PortToPingOverride != 0) ? RegionHandler.PortToPingOverride : 5055; + EndpointPair endPoint = new EndpointPair(null, string.Empty, new HostName(host), port.ToString()); + this.sock = new DatagramSocket(); + this.sock.MessageReceived += this.OnMessageReceived; + + IAsyncAction result = this.sock.ConnectAsync(endPoint); + result.Completed = this.OnConnected; + this.DebugString += " End StartPing"; + return true; + } + } + + public override bool Done() + { + lock (this.syncer) + { + return this.GotResult || this.sock == null; // this just indicates the ping is no longer waiting. this.Successful value defines if the roundtrip completed + } + } + + public override void Dispose() + { + lock (this.syncer) + { + this.sock = null; + } + } + + private void OnConnected(IAsyncAction asyncinfo, AsyncStatus asyncstatus) + { + lock (this.syncer) + { + if (asyncinfo.AsTask().IsCompleted && !asyncinfo.AsTask().IsFaulted && this.sock != null && this.sock.Information.RemoteAddress != null) + { + this.PingBytes[this.PingBytes.Length - 1] = this.PingId; + + DataWriter writer; + writer = new DataWriter(this.sock.OutputStream); + writer.WriteBytes(this.PingBytes); + DataWriterStoreOperation res = writer.StoreAsync(); + res.AsTask().Wait(100); + + this.PingBytes[this.PingBytes.Length - 1] = (byte)(this.PingId + 1); // this buffer is re-used for the result/receive. invalidate the result now. + + writer.DetachStream(); + writer.Dispose(); + } + else + { + this.sock = null; // will cause Done() to return true but this.Successful defines if the roundtrip completed + } + } + } + + private void OnMessageReceived(DatagramSocket sender, DatagramSocketMessageReceivedEventArgs args) + { + lock (this.syncer) + { + DataReader reader = null; + try + { + reader = args.GetDataReader(); + uint receivedByteCount = reader.UnconsumedBufferLength; + if (receivedByteCount > 0) + { + byte[] resultBytes = new byte[receivedByteCount]; + reader.ReadBytes(resultBytes); + + //TODO: check result bytes! + + + this.Successful = receivedByteCount == this.PingLength && resultBytes[resultBytes.Length - 1] == this.PingId; + this.GotResult = true; + } + } + catch + { + // TODO: handle error + } + } + } + } + #endif + + + #if NATIVE_SOCKETS + /// Abstract base class to provide proper resource management for the below native ping implementations + public abstract class PingNative : PhotonPing + { + // Native socket states - according to EnetConnect.h state definitions + protected enum NativeSocketState : byte + { + Disconnected = 0, + Connecting = 1, + Connected = 2, + ConnectionError = 3, + SendError = 4, + ReceiveError = 5, + Disconnecting = 6 + } + + protected IntPtr pConnectionHandler = IntPtr.Zero; + + ~PingNative() + { + Dispose(); + } + } + + /// Uses dynamic linked native Photon socket library via DllImport("PhotonSocketPlugin") attribute (as done by Unity Android and Unity PS3). + public class PingNativeDynamic : PingNative + { + public override bool StartPing(string ip) + { + lock (SocketUdpNativeDynamic.syncer) + { + base.Init(); + + if(pConnectionHandler == IntPtr.Zero) + { + pConnectionHandler = SocketUdpNativeDynamic.egconnect(ip); + SocketUdpNativeDynamic.egservice(pConnectionHandler); + byte state = SocketUdpNativeDynamic.eggetState(pConnectionHandler); + while (state == (byte) NativeSocketState.Connecting) + { + SocketUdpNativeDynamic.egservice(pConnectionHandler); + state = SocketUdpNativeDynamic.eggetState(pConnectionHandler); + } + } + + PingBytes[PingBytes.Length - 1] = PingId; + SocketUdpNativeDynamic.egsend(pConnectionHandler, PingBytes, PingBytes.Length); + SocketUdpNativeDynamic.egservice(pConnectionHandler); + + PingBytes[PingBytes.Length - 1] = (byte) (PingId - 1); + return true; + } + } + + public override bool Done() + { + lock (SocketUdpNativeDynamic.syncer) + { + if (this.GotResult || pConnectionHandler == IntPtr.Zero) + { + return true; + } + + int available = SocketUdpNativeDynamic.egservice(pConnectionHandler); + if (available < PingLength) + { + return false; + } + + int pingBytesLength = PingBytes.Length; + int bytesInRemainginDatagrams = SocketUdpNativeDynamic.egread(pConnectionHandler, PingBytes, ref pingBytesLength); + this.Successful = (PingBytes != null && PingBytes[PingBytes.Length - 1] == PingId); + //Debug.Log("Successful: " + this.Successful + " bytesInRemainginDatagrams: " + bytesInRemainginDatagrams + " PingId: " + PingId); + + this.GotResult = true; + return true; + } + } + + public override void Dispose() + { + lock (SocketUdpNativeDynamic.syncer) + { + if (this.pConnectionHandler != IntPtr.Zero) + SocketUdpNativeDynamic.egdisconnect(this.pConnectionHandler); + this.pConnectionHandler = IntPtr.Zero; + } + GC.SuppressFinalize(this); + } + } + + #if NATIVE_SOCKETS && NATIVE_SOCKETS_STATIC + /// Uses static linked native Photon socket library via DllImport("__Internal") attribute (as done by Unity iOS and Unity Switch). + public class PingNativeStatic : PingNative + { + public override bool StartPing(string ip) + { + base.Init(); + + lock (SocketUdpNativeStatic.syncer) + { + if(pConnectionHandler == IntPtr.Zero) + { + pConnectionHandler = SocketUdpNativeStatic.egconnect(ip); + SocketUdpNativeStatic.egservice(pConnectionHandler); + byte state = SocketUdpNativeStatic.eggetState(pConnectionHandler); + while (state == (byte) NativeSocketState.Connecting) + { + SocketUdpNativeStatic.egservice(pConnectionHandler); + state = SocketUdpNativeStatic.eggetState(pConnectionHandler); + Thread.Sleep(0); // suspending execution for a moment is critical on Switch for the OS to update the socket + } + } + + PingBytes[PingBytes.Length - 1] = PingId; + SocketUdpNativeStatic.egsend(pConnectionHandler, PingBytes, PingBytes.Length); + SocketUdpNativeStatic.egservice(pConnectionHandler); + + PingBytes[PingBytes.Length - 1] = (byte) (PingId - 1); + return true; + } + } + + public override bool Done() + { + lock (SocketUdpNativeStatic.syncer) + { + if (this.GotResult || pConnectionHandler == IntPtr.Zero) + { + return true; + } + + int available = SocketUdpNativeStatic.egservice(pConnectionHandler); + if (available < PingLength) + { + return false; + } + + int pingBytesLength = PingBytes.Length; + int bytesInRemainginDatagrams = SocketUdpNativeStatic.egread(pConnectionHandler, PingBytes, ref pingBytesLength); + this.Successful = (PingBytes != null && PingBytes[PingBytes.Length - 1] == PingId); + //Debug.Log("Successful: " + this.Successful + " bytesInRemainginDatagrams: " + bytesInRemainginDatagrams + " PingId: " + PingId); + + this.GotResult = true; + return true; + } + } + + public override void Dispose() + { + lock (SocketUdpNativeStatic.syncer) + { + if (pConnectionHandler != IntPtr.Zero) + SocketUdpNativeStatic.egdisconnect(pConnectionHandler); + pConnectionHandler = IntPtr.Zero; + } + GC.SuppressFinalize(this); + } + } + #endif + #endif + + + #if UNITY_WEBGL + public class PingHttp : PhotonPing + { + private UnityWebRequest webRequest; + + public override bool StartPing(string address) + { + base.Init(); + + address = "https://" + address + "/photon/m/?ping&r=" + UnityEngine.Random.Range(0, 10000); + this.webRequest = UnityWebRequest.Get(address); + this.webRequest.SendWebRequest(); + return true; + } + + public override bool Done() + { + if (this.webRequest.isDone) + { + Successful = true; + return true; + } + + return false; + } + + public override void Dispose() + { + this.webRequest.Dispose(); + } + } + #endif +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/PhotonPing.cs.meta b/Assets/Photon/PhotonRealtime/Code/PhotonPing.cs.meta new file mode 100644 index 00000000..060b0063 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/PhotonPing.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5a2f6055139b44142954461627d344bc +timeCreated: 1524653911 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/PhotonPingClasses.cs b/Assets/Photon/PhotonRealtime/Code/PhotonPingClasses.cs new file mode 100644 index 00000000..70f03374 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/PhotonPingClasses.cs @@ -0,0 +1 @@ +// this file is no longer used. it can be deleted safely. \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/PhotonPingClasses.cs.meta b/Assets/Photon/PhotonRealtime/Code/PhotonPingClasses.cs.meta new file mode 100644 index 00000000..a60b48a6 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/PhotonPingClasses.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d93148764d7961d4a8b8112bd166cf35 +timeCreated: 1494420905 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef b/Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef new file mode 100644 index 00000000..b472f01b --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef @@ -0,0 +1,6 @@ +{ + "name": "PhotonRealtime", + "references": [], + "includePlatforms": [], + "excludePlatforms": [] +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef.meta b/Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef.meta new file mode 100644 index 00000000..dff23ae8 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 831409e8f9d13b5479a3baef9822ad34 +timeCreated: 1537459565 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/Player.cs b/Assets/Photon/PhotonRealtime/Code/Player.cs new file mode 100644 index 00000000..40588890 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Player.cs @@ -0,0 +1,452 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// Per client in a room, a Player is created. This client's Player is also +// known as PhotonClient.LocalPlayer and the only one you might change +// properties for. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY + using UnityEngine; + #endif + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// Summarizes a "player" within a room, identified (in that room) by ID (or "actorNumber"). + /// + /// + /// Each player has a actorNumber, valid for that room. It's -1 until assigned by server (and client logic). + /// + public class Player + { + /// + /// Used internally to identify the masterclient of a room. + /// + protected internal Room RoomReference { get; set; } + + + /// Backing field for property. + private int actorNumber = -1; + + /// Identifier of this player in current room. Also known as: actorNumber or actorNumber. It's -1 outside of rooms. + /// The ID is assigned per room and only valid in that context. It will change even on leave and re-join. IDs are never re-used per room. + public int ActorNumber + { + get { return this.actorNumber; } + } + + + /// Only one player is controlled by each client. Others are not local. + public readonly bool IsLocal; + + + public bool HasRejoined + { + get; internal set; + } + + + /// Background field for nickName. + private string nickName = string.Empty; + + /// Non-unique nickname of this player. Synced automatically in a room. + /// + /// A player might change his own playername in a room (it's only a property). + /// Setting this value updates the server and other players (using an operation). + /// + public string NickName + { + get + { + return this.nickName; + } + set + { + if (!string.IsNullOrEmpty(this.nickName) && this.nickName.Equals(value)) + { + return; + } + + this.nickName = value; + + // update a room, if we changed our nickName locally + if (this.IsLocal) + { + this.SetPlayerNameProperty(); + } + } + } + + /// UserId of the player, available when the room got created with RoomOptions.PublishUserId = true. + /// Useful for and blocking slots in a room for expected players (e.g. in ). + public string UserId { get; internal set; } + + /// + /// True if this player is the Master Client of the current room. + /// + public bool IsMasterClient + { + get + { + if (this.RoomReference == null) + { + return false; + } + + return this.ActorNumber == this.RoomReference.MasterClientId; + } + } + + /// If this player is active in the room (and getting events which are currently being sent). + /// + /// Inactive players keep their spot in a room but otherwise behave as if offline (no matter what their actual connection status is). + /// The room needs a PlayerTTL != 0. If a player is inactive for longer than PlayerTTL, the server will remove this player from the room. + /// For a client "rejoining" a room, is the same as joining it: It gets properties, cached events and then the live events. + /// + public bool IsInactive { get; protected internal set; } + + /// Read-only cache for custom properties of player. Set via Player.SetCustomProperties. + /// + /// Don't modify the content of this Hashtable. Use SetCustomProperties and the + /// properties of this class to modify values. When you use those, the client will + /// sync values with the server. + /// + /// + public Hashtable CustomProperties { get; set; } + + /// Can be used to store a reference that's useful to know "by player". + /// Example: Set a player's character as Tag by assigning the GameObject on Instantiate. + public object TagObject; + + + /// + /// Creates a player instance. + /// To extend and replace this Player, override LoadBalancingPeer.CreatePlayer(). + /// + /// NickName of the player (a "well known property"). + /// ID or ActorNumber of this player in the current room (a shortcut to identify each player in room) + /// If this is the local peer's player (or a remote one). + protected internal Player(string nickName, int actorNumber, bool isLocal) : this(nickName, actorNumber, isLocal, null) + { + } + + /// + /// Creates a player instance. + /// To extend and replace this Player, override LoadBalancingPeer.CreatePlayer(). + /// + /// NickName of the player (a "well known property"). + /// ID or ActorNumber of this player in the current room (a shortcut to identify each player in room) + /// If this is the local peer's player (or a remote one). + /// A Hashtable of custom properties to be synced. Must use String-typed keys and serializable datatypes as values. + protected internal Player(string nickName, int actorNumber, bool isLocal, Hashtable playerProperties) + { + this.IsLocal = isLocal; + this.actorNumber = actorNumber; + this.NickName = nickName; + + this.CustomProperties = new Hashtable(); + this.InternalCacheProperties(playerProperties); + } + + + /// + /// Get a Player by ActorNumber (Player.ID). + /// + /// ActorNumber of the a player in this room. + /// Player or null. + public Player Get(int id) + { + if (this.RoomReference == null) + { + return null; + } + + return this.RoomReference.GetPlayer(id); + } + + /// Gets this Player's next Player, as sorted by ActorNumber (Player.ID). Wraps around. + /// Player or null. + public Player GetNext() + { + return GetNextFor(this.ActorNumber); + } + + /// Gets a Player's next Player, as sorted by ActorNumber (Player.ID). Wraps around. + /// Useful when you pass something to the next player. For example: passing the turn to the next player. + /// The Player for which the next is being needed. + /// Player or null. + public Player GetNextFor(Player currentPlayer) + { + if (currentPlayer == null) + { + return null; + } + return GetNextFor(currentPlayer.ActorNumber); + } + + /// Gets a Player's next Player, as sorted by ActorNumber (Player.ID). Wraps around. + /// Useful when you pass something to the next player. For example: passing the turn to the next player. + /// The ActorNumber (Player.ID) for which the next is being needed. + /// Player or null. + public Player GetNextFor(int currentPlayerId) + { + if (this.RoomReference == null || this.RoomReference.Players == null || this.RoomReference.Players.Count < 2) + { + return null; + } + + Dictionary players = this.RoomReference.Players; + int nextHigherId = int.MaxValue; // we look for the next higher ID + int lowestId = currentPlayerId; // if we are the player with the highest ID, there is no higher and we return to the lowest player's id + + foreach (int playerid in players.Keys) + { + if (playerid < lowestId) + { + lowestId = playerid; // less than any other ID (which must be at least less than this player's id). + } + else if (playerid > currentPlayerId && playerid < nextHigherId) + { + nextHigherId = playerid; // more than our ID and less than those found so far. + } + } + + //UnityEngine.Debug.LogWarning("Debug. " + currentPlayerId + " lower: " + lowestId + " higher: " + nextHigherId + " "); + //UnityEngine.Debug.LogWarning(this.RoomReference.GetPlayer(currentPlayerId)); + //UnityEngine.Debug.LogWarning(this.RoomReference.GetPlayer(lowestId)); + //if (nextHigherId != int.MaxValue) UnityEngine.Debug.LogWarning(this.RoomReference.GetPlayer(nextHigherId)); + return (nextHigherId != int.MaxValue) ? players[nextHigherId] : players[lowestId]; + } + + + /// Caches properties for new Players or when updates of remote players are received. Use SetCustomProperties() for a synced update. + /// + /// This only updates the CustomProperties and doesn't send them to the server. + /// Mostly used when creating new remote players, where the server sends their properties. + /// + protected internal virtual void InternalCacheProperties(Hashtable properties) + { + if (properties == null || properties.Count == 0 || this.CustomProperties.Equals(properties)) + { + return; + } + + if (properties.ContainsKey(ActorProperties.PlayerName)) + { + string nameInServersProperties = (string)properties[ActorProperties.PlayerName]; + if (nameInServersProperties != null) + { + if (this.IsLocal) + { + // the local playername is different than in the properties coming from the server + // so the local nickName was changed and the server is outdated -> update server + // update property instead of using the outdated nickName coming from server + if (!nameInServersProperties.Equals(this.nickName)) + { + this.SetPlayerNameProperty(); + } + } + else + { + this.NickName = nameInServersProperties; + } + } + } + if (properties.ContainsKey(ActorProperties.UserId)) + { + this.UserId = (string)properties[ActorProperties.UserId]; + } + if (properties.ContainsKey(ActorProperties.IsInactive)) + { + this.IsInactive = (bool)properties[ActorProperties.IsInactive]; //TURNBASED new well-known propery for players + } + + this.CustomProperties.MergeStringKeys(properties); + this.CustomProperties.StripKeysWithNullValues(); + } + + + /// + /// Brief summary string of the Player: ActorNumber and NickName + /// + public override string ToString() + { + return string.Format("#{0:00} '{1}'",this.ActorNumber, this.NickName); + } + + /// + /// String summary of the Player: player.ID, name and all custom properties of this user. + /// + /// + /// Use with care and not every frame! + /// Converts the customProperties to a String on every single call. + /// + public string ToStringFull() + { + return string.Format("#{0:00} '{1}'{2} {3}", this.ActorNumber, this.NickName, this.IsInactive ? " (inactive)" : "", this.CustomProperties.ToStringFull()); + } + + /// + /// If players are equal (by GetHasCode, which returns this.ID). + /// + public override bool Equals(object p) + { + Player pp = p as Player; + return (pp != null && this.GetHashCode() == pp.GetHashCode()); + } + + /// + /// Accompanies Equals, using the ID (actorNumber) as HashCode to return. + /// + public override int GetHashCode() + { + return this.ActorNumber; + } + + /// + /// Used internally, to update this client's playerID when assigned (doesn't change after assignment). + /// + protected internal void ChangeLocalID(int newID) + { + if (!this.IsLocal) + { + //Debug.LogError("ERROR You should never change Player IDs!"); + return; + } + + this.actorNumber = newID; + } + + + + /// + /// Updates and synchronizes this Player's Custom Properties. Optionally, expectedProperties can be provided as condition. + /// + /// + /// Custom Properties are a set of string keys and arbitrary values which is synchronized + /// for the players in a Room. They are available when the client enters the room, as + /// they are in the response of OpJoin and OpCreate. + /// + /// Custom Properties either relate to the (current) Room or a Player (in that Room). + /// + /// Both classes locally cache the current key/values and make them available as + /// property: CustomProperties. This is provided only to read them. + /// You must use the method SetCustomProperties to set/modify them. + /// + /// Any client can set any Custom Properties anytime (when in a room). + /// It's up to the game logic to organize how they are best used. + /// + /// You should call SetCustomProperties only with key/values that are new or changed. This reduces + /// traffic and performance. + /// + /// Unless you define some expectedProperties, setting key/values is always permitted. + /// In this case, the property-setting client will not receive the new values from the server but + /// instead update its local cache in SetCustomProperties. + /// + /// If you define expectedProperties, the server will skip updates if the server property-cache + /// does not contain all expectedProperties with the same values. + /// In this case, the property-setting client will get an update from the server and update it's + /// cached key/values at about the same time as everyone else. + /// + /// The benefit of using expectedProperties can be only one client successfully sets a key from + /// one known value to another. + /// As example: Store who owns an item in a Custom Property "ownedBy". It's 0 initally. + /// When multiple players reach the item, they all attempt to change "ownedBy" from 0 to their + /// actorNumber. If you use expectedProperties {"ownedBy", 0} as condition, the first player to + /// take the item will have it (and the others fail to set the ownership). + /// + /// Properties get saved with the game state for Turnbased games (which use IsPersistent = true). + /// + /// Hashtable of Custom Properties to be set. + /// If non-null, these are the property-values the server will check as condition for this update. + /// Defines if this SetCustomProperties-operation gets forwarded to your WebHooks. Client must be in room. + /// + /// False if propertiesToSet is null or empty or have zero string keys. + /// True in offline mode even if expectedProperties or webFlags are used. + /// If not in a room, returns true if local player and expectedValues and webFlags are null. + /// (Use this to cache properties to be sent when joining a room). + /// Otherwise, returns if this operation could be sent to the server. + /// + public bool SetCustomProperties(Hashtable propertiesToSet, Hashtable expectedValues = null, WebFlags webFlags = null) + { + if (propertiesToSet == null || propertiesToSet.Count == 0) + { + return false; + } + + Hashtable customProps = propertiesToSet.StripToStringKeys() as Hashtable; + + if (this.RoomReference != null) + { + if (this.RoomReference.IsOffline) + { + if (customProps.Count == 0) + { + return false; + } + this.CustomProperties.Merge(customProps); + this.CustomProperties.StripKeysWithNullValues(); + // invoking callbacks + this.RoomReference.LoadBalancingClient.InRoomCallbackTargets.OnPlayerPropertiesUpdate(this, customProps); + return true; + } + else + { + Hashtable customPropsToCheck = expectedValues.StripToStringKeys() as Hashtable; + + // send (sync) these new values if in online room + return this.RoomReference.LoadBalancingClient.OpSetPropertiesOfActor(this.actorNumber, customProps, customPropsToCheck, webFlags); + } + } + if (this.IsLocal) + { + if (customProps.Count == 0) + { + return false; + } + if (expectedValues == null && webFlags == null) + { + this.CustomProperties.Merge(customProps); + this.CustomProperties.StripKeysWithNullValues(); + return true; + } + } + + return false; + } + + + /// Uses OpSetPropertiesOfActor to sync this player's NickName (server is being updated with this.NickName). + private bool SetPlayerNameProperty() + { + if (this.RoomReference != null && !this.RoomReference.IsOffline) + { + Hashtable properties = new Hashtable(); + properties[ActorProperties.PlayerName] = this.nickName; + return this.RoomReference.LoadBalancingClient.OpSetPropertiesOfActor(this.ActorNumber, properties); + } + + return false; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/Player.cs.meta b/Assets/Photon/PhotonRealtime/Code/Player.cs.meta new file mode 100644 index 00000000..d494ca76 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Player.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e3e4b5bebc687044b9c6c2803c36be3d +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/Region.cs b/Assets/Photon/PhotonRealtime/Code/Region.cs new file mode 100644 index 00000000..94ec853e --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Region.cs @@ -0,0 +1,95 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// Represents regions in the Photon Cloud. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + public class Region + { + public string Code { get; private set; } + + /// Unlike the CloudRegionCode, this may contain cluster information. + public string Cluster { get; private set; } + + public string HostAndPort { get; protected internal set; } + + /// Weighted ping time. + /// + /// Regions gets pinged 5 times (RegionPinger.Attempts). + /// Out of those, the worst rtt is discarded and the best will be counted two times for a weighted average. + /// + public int Ping { get; set; } + + public bool WasPinged { get { return this.Ping != int.MaxValue; } } + + public Region(string code, string address) + { + this.SetCodeAndCluster(code); + this.HostAndPort = address; + this.Ping = int.MaxValue; + } + + public Region(string code, int ping) + { + this.SetCodeAndCluster(code); + this.Ping = ping; + } + + private void SetCodeAndCluster(string codeAsString) + { + if (codeAsString == null) + { + this.Code = ""; + this.Cluster = ""; + return; + } + + codeAsString = codeAsString.ToLower(); + int slash = codeAsString.IndexOf('/'); + this.Code = slash <= 0 ? codeAsString : codeAsString.Substring(0, slash); + this.Cluster = slash <= 0 ? "" : codeAsString.Substring(slash+1, codeAsString.Length-slash-1); + } + + public override string ToString() + { + return this.ToString(false); + } + + public string ToString(bool compact = false) + { + string regionCluster = this.Code; + if (!string.IsNullOrEmpty(this.Cluster)) + { + regionCluster += "/" + this.Cluster; + } + + if (compact) + { + return string.Format("{0}:{1}", regionCluster, this.Ping); + } + else + { + return string.Format("{0}[{2}]: {1}ms", regionCluster, this.Ping, this.HostAndPort); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/Region.cs.meta b/Assets/Photon/PhotonRealtime/Code/Region.cs.meta new file mode 100644 index 00000000..49030f54 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Region.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: bddf4f4bde2f8dd46927411229ce1302 +timeCreated: 1494420905 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/RegionHandler.cs b/Assets/Photon/PhotonRealtime/Code/RegionHandler.cs new file mode 100644 index 00000000..237d959a --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/RegionHandler.cs @@ -0,0 +1,714 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// The RegionHandler class provides methods to ping a list of regions, +// to find the one with best ping. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + +#if UNITY_WEBGL +#define PING_VIA_COROUTINE +#endif + +namespace Photon.Realtime +{ + using System; + using System.Text; + using System.Threading; + using System.Net; + using System.Collections; + using System.Collections.Generic; + using System.Diagnostics; + using ExitGames.Client.Photon; + using System.Linq; + + #if SUPPORTED_UNITY + using UnityEngine; + using Debug = UnityEngine.Debug; + #endif + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + /// + /// Provides methods to work with Photon's regions (Photon Cloud) and can be use to find the one with best ping. + /// + /// + /// When a client uses a Name Server to fetch the list of available regions, the LoadBalancingClient will create a RegionHandler + /// and provide it via the OnRegionListReceived callback, as soon as the list is available. No pings were sent for Best Region selection yet. + /// + /// Your logic can decide to either connect to one of those regional servers, or it may use PingMinimumOfRegions to test + /// which region provides the best ping. Alternatively the client may be set to connect to the Best Region (lowest ping), one or + /// more regions get pinged. + /// Not all regions will be pinged. As soon as the results are final, the client will connect to the best region, + /// so you can check the ping results when connected to the Master Server. + /// + /// Regions gets pinged 5 times (RegionPinger.Attempts). + /// Out of those, the worst rtt is discarded and the best will be counted two times for a weighted average. + /// + /// Usually UDP will be used to ping the Master Servers. In WebGL, WSS is used instead. + /// + /// It makes sense to make clients "sticky" to a region when one gets selected. + /// This can be achieved by storing the SummaryToCache value, once pinging was done. + /// When the client connects again, the previous SummaryToCache helps limiting the number of regions to ping. + /// In best case, only the previously selected region gets re-pinged and if the current ping is not much worse, this one region is used again. + /// + public class RegionHandler + { + /// The implementation of PhotonPing to use for region pinging (Best Region detection). + /// Defaults to null, which means the Type is set automatically. + public static Type PingImplementation; + + /// A list of region names for the Photon Cloud. Set by the result of OpGetRegions(). + /// + /// Implement ILoadBalancingCallbacks and register for the callbacks to get OnRegionListReceived(RegionHandler regionHandler). + /// You can also put a "case OperationCode.GetRegions:" into your OnOperationResponse method to notice when the result is available. + /// + public List EnabledRegions { get; protected internal set; } + + private string availableRegionCodes; + + private Region bestRegionCache; + + /// + /// When PingMinimumOfRegions was called and completed, the BestRegion is identified by best ping. + /// + public Region BestRegion + { + get + { + if (this.EnabledRegions == null) + { + return null; + } + if (this.bestRegionCache != null) + { + return this.bestRegionCache; + } + + this.EnabledRegions.Sort((a, b) => a.Ping.CompareTo(b.Ping) ); + + this.bestRegionCache = this.EnabledRegions[0]; + return this.bestRegionCache; + } + } + + /// + /// This value summarizes the results of pinging currently available regions (after PingMinimumOfRegions finished). + /// + /// + /// This value should be stored in the client by the game logic. + /// When connecting again, use it as previous summary to speed up pinging regions and to make the best region sticky for the client. + /// + public string SummaryToCache + { + get + { + if (this.BestRegion != null) { + return this.BestRegion.Code + ";" + this.BestRegion.Ping + ";" + this.availableRegionCodes; + } + + return this.availableRegionCodes; + } + } + + public string GetResults() + { + StringBuilder sb = new StringBuilder(); + + sb.AppendFormat("Region Pinging Result: {0}\n", this.BestRegion.ToString()); + foreach (RegionPinger region in this.pingerList) + { + sb.AppendFormat(region.GetResults() + "\n"); + } + sb.AppendFormat("Previous summary: {0}", this.previousSummaryProvided); + + return sb.ToString(); + } + + public void SetRegions(OperationResponse opGetRegions) + { + if (opGetRegions.OperationCode != OperationCode.GetRegions) + { + return; + } + if (opGetRegions.ReturnCode != ErrorCode.Ok) + { + return; + } + + string[] regions = opGetRegions[ParameterCode.Region] as string[]; + string[] servers = opGetRegions[ParameterCode.Address] as string[]; + if (regions == null || servers == null || regions.Length != servers.Length) + { + //TODO: log error + //Debug.LogError("The region arrays from Name Server are not ok. Must be non-null and same length. " + (regions == null) + " " + (servers == null) + "\n" + opGetRegions.ToStringFull()); + return; + } + + this.bestRegionCache = null; + this.EnabledRegions = new List(regions.Length); + + for (int i = 0; i < regions.Length; i++) + { + string server = servers[i]; + if (PortToPingOverride != 0) + { + server = LoadBalancingClient.ReplacePortWithAlternative(servers[i], PortToPingOverride); + } + + Region tmp = new Region(regions[i], server); + if (string.IsNullOrEmpty(tmp.Code)) + { + continue; + } + + this.EnabledRegions.Add(tmp); + } + + Array.Sort(regions); + this.availableRegionCodes = string.Join(",", regions); + } + + private List pingerList = new List(); + private Action onCompleteCall; + private int previousPing; + public bool IsPinging { get; private set; } + private string previousSummaryProvided; + + protected internal static ushort PortToPingOverride; + + + public RegionHandler(ushort masterServerPortOverride = 0) + { + PortToPingOverride = masterServerPortOverride; + } + + + public bool PingMinimumOfRegions(Action onCompleteCallback, string previousSummary) + { + if (this.EnabledRegions == null || this.EnabledRegions.Count == 0) + { + //TODO: log error + //Debug.LogError("No regions available. Maybe all got filtered out or the AppId is not correctly configured."); + return false; + } + + if (this.IsPinging) + { + //TODO: log warning + //Debug.LogWarning("PingMinimumOfRegions() skipped, because this RegionHandler is already pinging some regions."); + return false; + } + + this.IsPinging = true; + this.onCompleteCall = onCompleteCallback; + this.previousSummaryProvided = previousSummary; + + if (string.IsNullOrEmpty(previousSummary)) + { + return this.PingEnabledRegions(); + } + + string[] values = previousSummary.Split(';'); + if (values.Length < 3) + { + return this.PingEnabledRegions(); + } + + int prevBestRegionPing; + bool secondValueIsInt = Int32.TryParse(values[1], out prevBestRegionPing); + if (!secondValueIsInt) + { + return this.PingEnabledRegions(); + } + + string prevBestRegionCode = values[0]; + string prevAvailableRegionCodes = values[2]; + + + if (string.IsNullOrEmpty(prevBestRegionCode)) + { + return this.PingEnabledRegions(); + } + if (string.IsNullOrEmpty(prevAvailableRegionCodes)) + { + return this.PingEnabledRegions(); + } + if (!this.availableRegionCodes.Equals(prevAvailableRegionCodes) || !this.availableRegionCodes.Contains(prevBestRegionCode)) + { + return this.PingEnabledRegions(); + } + if (prevBestRegionPing >= RegionPinger.PingWhenFailed) + { + return this.PingEnabledRegions(); + } + + // let's check only the preferred region to detect if it's still "good enough" + this.previousPing = prevBestRegionPing; + + + Region preferred = this.EnabledRegions.Find(r => r.Code.Equals(prevBestRegionCode)); + RegionPinger singlePinger = new RegionPinger(preferred, this.OnPreferredRegionPinged); + + lock (this.pingerList) + { + this.pingerList.Add(singlePinger); + } + + singlePinger.Start(); + return true; + } + + private void OnPreferredRegionPinged(Region preferredRegion) + { + if (preferredRegion.Ping > this.previousPing * 1.50f) + { + this.PingEnabledRegions(); + } + else + { + this.IsPinging = false; + this.onCompleteCall(this); + #if PING_VIA_COROUTINE + MonoBehaviourEmpty.SelfDestroy(); + #endif + } + } + + + private bool PingEnabledRegions() + { + if (this.EnabledRegions == null || this.EnabledRegions.Count == 0) + { + //TODO: log + //Debug.LogError("No regions available. Maybe all got filtered out or the AppId is not correctly configured."); + return false; + } + + lock (this.pingerList) + { + this.pingerList.Clear(); + + foreach (Region region in this.EnabledRegions) + { + RegionPinger rp = new RegionPinger(region, this.OnRegionDone); + this.pingerList.Add(rp); + rp.Start(); // TODO: check return value + } + } + + return true; + } + + private void OnRegionDone(Region region) + { + lock (this.pingerList) + { + if (this.IsPinging == false) + { + return; + } + + this.bestRegionCache = null; + foreach (RegionPinger pinger in this.pingerList) + { + if (!pinger.Done) + { + return; + } + } + + this.IsPinging = false; + } + + this.onCompleteCall(this); + #if PING_VIA_COROUTINE + MonoBehaviourEmpty.SelfDestroy(); + #endif + } + } + + public class RegionPinger + { + public static int Attempts = 5; + public static int MaxMilliseconsPerPing = 800; // enter a value you're sure some server can beat (have a lower rtt) + public static int PingWhenFailed = Attempts * MaxMilliseconsPerPing; + + private Region region; + private string regionAddress; + public int CurrentAttempt = 0; + + public bool Done { get; private set; } + private Action onDoneCall; + + private PhotonPing ping; + + private List rttResults; + + public RegionPinger(Region region, Action onDoneCallback) + { + this.region = region; + this.region.Ping = PingWhenFailed; + this.Done = false; + this.onDoneCall = onDoneCallback; + } + + /// Selects the best fitting ping implementation or uses the one set in RegionHandler.PingImplementation. + /// PhotonPing instance to use. + private PhotonPing GetPingImplementation() + { + PhotonPing ping = null; + + // using each type explicitly in the conditional code, makes sure Unity doesn't strip the class / constructor. + + #if !UNITY_EDITOR && NETFX_CORE + if (RegionHandler.PingImplementation == null || RegionHandler.PingImplementation == typeof(PingWindowsStore)) + { + ping = new PingWindowsStore(); + } + #elif NATIVE_SOCKETS || NO_SOCKET + if (RegionHandler.PingImplementation == null || RegionHandler.PingImplementation == typeof(PingNativeDynamic)) + { + ping = new PingNativeDynamic(); + } + #elif UNITY_WEBGL + if (RegionHandler.PingImplementation == null || RegionHandler.PingImplementation == typeof(PingHttp)) + { + ping = new PingHttp(); + } + #else + if (RegionHandler.PingImplementation == null || RegionHandler.PingImplementation == typeof(PingMono)) + { + ping = new PingMono(); + } + #endif + + if (ping == null) + { + if (RegionHandler.PingImplementation != null) + { + ping = (PhotonPing)Activator.CreateInstance(RegionHandler.PingImplementation); + } + } + + return ping; + } + + + /// + /// Starts the ping routine for the assigned region. + /// + /// + /// Pinging runs in a ThreadPool worker item or (if needed) in a Thread. + /// WebGL runs pinging on the Main Thread as coroutine. + /// + /// Always true. + public bool Start() + { + // all addresses for Photon region servers will contain a :port ending. this needs to be removed first. + // PhotonPing.StartPing() requires a plain (IP) address without port or protocol-prefix (on all but Windows 8.1 and WebGL platforms). + string address = this.region.HostAndPort; + int indexOfColon = address.LastIndexOf(':'); + if (indexOfColon > 1) + { + address = address.Substring(0, indexOfColon); + } + this.regionAddress = ResolveHost(address); + + + this.ping = this.GetPingImplementation(); + + + this.Done = false; + this.CurrentAttempt = 0; + this.rttResults = new List(Attempts); + + + #if PING_VIA_COROUTINE + MonoBehaviourEmpty.Instance.StartCoroutine(this.RegionPingCoroutine()); + #else + bool queued = false; + #if !NETFX_CORE + try + { + queued = ThreadPool.QueueUserWorkItem(o => this.RegionPingThreaded()); + } + catch + { + queued = false; + } + #endif + if (!queued) + { + SupportClass.StartBackgroundCalls(this.RegionPingThreaded, 0, "RegionPing_" + this.region.Code + "_" + this.region.Cluster); + } + #endif + + + return true; + } + + + protected internal bool RegionPingThreaded() + { + this.region.Ping = PingWhenFailed; + + int rttSum = 0; + int replyCount = 0; + + + Stopwatch sw = new Stopwatch(); + for (this.CurrentAttempt = 0; this.CurrentAttempt < Attempts; this.CurrentAttempt++) + { + bool overtime = false; + sw.Reset(); + sw.Start(); + + try + { + this.ping.StartPing(this.regionAddress); + } + catch (Exception e) + { + System.Diagnostics.Debug.WriteLine("RegionPinger.RegionPingThreaded() caught exception for ping.StartPing(). Exception: " + e + " Source: " + e.Source + " Message: " + e.Message); + break; + } + + + while (!this.ping.Done()) + { + if (sw.ElapsedMilliseconds >= MaxMilliseconsPerPing) + { + overtime = true; + break; + } + #if !NETFX_CORE + System.Threading.Thread.Sleep(1); + #endif + } + + + sw.Stop(); + int rtt = this.ping.Successful ? (int)sw.ElapsedMilliseconds : MaxMilliseconsPerPing; // if the reply didn't match the sent ping + this.rttResults.Add(rtt); + + rttSum += rtt; + replyCount++; + this.region.Ping = (int)((rttSum) / replyCount); + + #if !NETFX_CORE + int i = 4; + while (!this.ping.Done() && i > 0) + { + i--; + System.Threading.Thread.Sleep(100); + } + System.Threading.Thread.Sleep(10); + #endif + } + + + //Debug.Log("Done: "+ this.region.Code); + this.Done = true; + this.ping.Dispose(); + + int bestRtt = this.rttResults.Min(); + int worstRtt = this.rttResults.Max(); + int weighedRttSum = rttSum - worstRtt + bestRtt; + this.region.Ping = (int)(weighedRttSum / replyCount); // now, we can create a weighted ping value + + this.onDoneCall(this.region); + return false; + } + + + #if SUPPORTED_UNITY + + /// + /// Affected by frame-rate of app, as this Coroutine checks the socket for a result once per frame. + /// + protected internal IEnumerator RegionPingCoroutine() + { + this.region.Ping = PingWhenFailed; + + int rttSum = 0; + int replyCount = 0; + + + Stopwatch sw = new Stopwatch(); + for (this.CurrentAttempt = 0; this.CurrentAttempt < Attempts; this.CurrentAttempt++) + { + bool overtime = false; + sw.Reset(); + sw.Start(); + + try + { + this.ping.StartPing(this.regionAddress); + } + catch (Exception e) + { + Debug.Log("RegionPinger.RegionPingCoroutine() caught exception for ping.StartPing(). Exception: " + e + " Source: " + e.Source + " Message: " + e.Message); + break; + } + + + while (!this.ping.Done()) + { + if (sw.ElapsedMilliseconds >= MaxMilliseconsPerPing) + { + overtime = true; + break; + } + + yield return new WaitForSecondsRealtime(0.01f); // keep this loop tight, to avoid adding local lag to rtt. + } + + + sw.Stop(); + int rtt = this.ping.Successful ? (int)sw.ElapsedMilliseconds : MaxMilliseconsPerPing; // if the reply didn't match the sent ping + this.rttResults.Add(rtt); + + + rttSum += rtt; + replyCount++; + this.region.Ping = (int)((rttSum) / replyCount); + + int i = 4; + while (!this.ping.Done() && i > 0) + { + i--; + yield return new WaitForSeconds(0.1f); + } + + yield return new WaitForSeconds(0.1f); + } + + + //Debug.Log("Done: "+ this.region.Code); + this.Done = true; + this.ping.Dispose(); + int bestRtt = this.rttResults.Min(); + int worstRtt = this.rttResults.Max(); + int weighedRttSum = rttSum - worstRtt + bestRtt; + this.region.Ping = (int)(weighedRttSum / replyCount); // now, we can create a weighted ping value + this.onDoneCall(this.region); + yield return null; + } + + #endif + + + + public string GetResults() + { + return string.Format("{0}: {1} ({2})", this.region.Code, this.region.Ping, this.rttResults.ToStringFull()); + } + + /// + /// Attempts to resolve a hostname into an IP string or returns empty string if that fails. + /// + /// + /// To be compatible with most platforms, the address family is checked like this:
+ /// if (ipAddress.AddressFamily.ToString().Contains("6")) // ipv6... + ///
+ /// Hostname to resolve. + /// IP string or empty string if resolution fails + public static string ResolveHost(string hostName) + { + + if (hostName.StartsWith("wss://")) + { + hostName = hostName.Substring(6); + } + if (hostName.StartsWith("ws://")) + { + hostName = hostName.Substring(5); + } + + string ipv4Address = string.Empty; + + try + { + #if UNITY_WSA || NETFX_CORE || UNITY_WEBGL + return hostName; + #else + + IPAddress[] address = Dns.GetHostAddresses(hostName); + if (address.Length == 1) + { + return address[0].ToString(); + } + + // if we got more addresses, try to pick a IPv6 one + // checking ipAddress.ToString() means we don't have to import System.Net.Sockets, which is not available on some platforms (Metro) + for (int index = 0; index < address.Length; index++) + { + IPAddress ipAddress = address[index]; + if (ipAddress != null) + { + if (ipAddress.ToString().Contains(":")) + { + return ipAddress.ToString(); + } + if (string.IsNullOrEmpty(ipv4Address)) + { + ipv4Address = address.ToString(); + } + } + } + #endif + } + catch (System.Exception e) + { + System.Diagnostics.Debug.WriteLine("RegionPinger.ResolveHost() caught an exception for Dns.GetHostAddresses(). Exception: " + e + " Source: " + e.Source + " Message: " + e.Message); + } + + return ipv4Address; + } + } + + #if PING_VIA_COROUTINE + internal class MonoBehaviourEmpty : MonoBehaviour + { + private static bool instanceSet; // to avoid instance null check which may be incorrect + private static MonoBehaviourEmpty instance; + + public static MonoBehaviourEmpty Instance + { + get + { + if (instanceSet) + { + return instance; + } + GameObject go = new GameObject(); + DontDestroyOnLoad(go); + go.name = "RegionPinger"; + instance = go.AddComponent(); + instanceSet = true; + return instance; + } + } + + public static void SelfDestroy() + { + if (instanceSet) + { + instanceSet = false; + Destroy(instance.gameObject); + } + } + } + #endif +} diff --git a/Assets/Photon/PhotonRealtime/Code/RegionHandler.cs.meta b/Assets/Photon/PhotonRealtime/Code/RegionHandler.cs.meta new file mode 100644 index 00000000..2e900019 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/RegionHandler.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 207807222df026f40ac3688a3a051e38 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/Room.cs b/Assets/Photon/PhotonRealtime/Code/Room.cs new file mode 100644 index 00000000..5f4036f5 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Room.cs @@ -0,0 +1,630 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// The Room class resembles the properties known about the room in which +// a game/match happens. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// This class represents a room a client joins/joined. + /// + /// + /// Contains a list of current players, their properties and those of this room, too. + /// A room instance has a number of "well known" properties like IsOpen, MaxPlayers which can be changed. + /// Your own, custom properties can be set via SetCustomProperties() while being in the room. + /// + /// Typically, this class should be extended by a game-specific implementation with logic and extra features. + /// + public class Room : RoomInfo + { + /// + /// A reference to the LoadBalancingClient which is currently keeping the connection and state. + /// + public LoadBalancingClient LoadBalancingClient { get; set; } + + /// The name of a room. Unique identifier (per region and virtual appid) for a room/match. + /// The name can't be changed once it's set by the server. + public new string Name + { + get + { + return this.name; + } + + internal set + { + this.name = value; + } + } + + private bool isOffline; + + public bool IsOffline + { + get + { + return isOffline; + } + + private set + { + isOffline = value; + } + } + + /// + /// Defines if the room can be joined. + /// + /// + /// This does not affect listing in a lobby but joining the room will fail if not open. + /// If not open, the room is excluded from random matchmaking. + /// Due to racing conditions, found matches might become closed while users are trying to join. + /// Simply re-connect to master and find another. + /// Use property "IsVisible" to not list the room. + /// + /// As part of RoomInfo this can't be set. + /// As part of a Room (which the player joined), the setter will update the server and all clients. + /// + public new bool IsOpen + { + get + { + return this.isOpen; + } + + set + { + if (value != this.isOpen) + { + if (!this.isOffline) + { + this.LoadBalancingClient.OpSetPropertiesOfRoom(new Hashtable() { { GamePropertyKey.IsOpen, value } }); + } + } + + this.isOpen = value; + } + } + + /// + /// Defines if the room is listed in its lobby. + /// + /// + /// Rooms can be created invisible, or changed to invisible. + /// To change if a room can be joined, use property: open. + /// + /// As part of RoomInfo this can't be set. + /// As part of a Room (which the player joined), the setter will update the server and all clients. + /// + public new bool IsVisible + { + get + { + return this.isVisible; + } + + set + { + if (value != this.isVisible) + { + if (!this.isOffline) + { + this.LoadBalancingClient.OpSetPropertiesOfRoom(new Hashtable() { { GamePropertyKey.IsVisible, value } }); + } + } + + this.isVisible = value; + } + } + + /// + /// Sets a limit of players to this room. This property is synced and shown in lobby, too. + /// If the room is full (players count == maxplayers), joining this room will fail. + /// + /// + /// As part of RoomInfo this can't be set. + /// As part of a Room (which the player joined), the setter will update the server and all clients. + /// + public new byte MaxPlayers + { + get + { + return this.maxPlayers; + } + + set + { + if (value != this.maxPlayers) + { + if (!this.isOffline) + { + this.LoadBalancingClient.OpSetPropertiesOfRoom(new Hashtable() { { GamePropertyKey.MaxPlayers, value } }); + } + } + + this.maxPlayers = value; + } + } + + /// The count of players in this Room (using this.Players.Count). + public new byte PlayerCount + { + get + { + if (this.Players == null) + { + return 0; + } + + return (byte)this.Players.Count; + } + } + + /// While inside a Room, this is the list of players who are also in that room. + private Dictionary players = new Dictionary(); + + /// While inside a Room, this is the list of players who are also in that room. + public Dictionary Players + { + get + { + return this.players; + } + + private set + { + this.players = value; + } + } + + /// + /// List of users who are expected to join this room. In matchmaking, Photon blocks a slot for each of these UserIDs out of the MaxPlayers. + /// + /// + /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. + /// Define expected players in the methods: , and . + /// + public string[] ExpectedUsers + { + get { return this.expectedUsers; } + } + + /// Player Time To Live. How long any player can be inactive (due to disconnect or leave) before the user gets removed from the playerlist (freeing a slot). + public int PlayerTtl + { + get { return this.playerTtl; } + + set + { + if (value != this.playerTtl) + { + if (!this.isOffline) + { + this.LoadBalancingClient.OpSetPropertyOfRoom(GamePropertyKey.PlayerTtl, value); // TODO: implement Offline Mode + } + } + + this.playerTtl = value; + } + } + + /// Room Time To Live. How long a room stays available (and in server-memory), after the last player becomes inactive. After this time, the room gets persisted or destroyed. + public int EmptyRoomTtl + { + get { return this.emptyRoomTtl; } + + set + { + if (value != this.emptyRoomTtl) + { + if (!this.isOffline) + { + this.LoadBalancingClient.OpSetPropertyOfRoom(GamePropertyKey.EmptyRoomTtl, value); // TODO: implement Offline Mode + } + } + + this.emptyRoomTtl = value; + } + } + + /// + /// The ID (actorNumber, actorNumber) of the player who's the master of this Room. + /// Note: This changes when the current master leaves the room. + /// + public int MasterClientId { get { return this.masterClientId; } } + + /// + /// Gets a list of custom properties that are in the RoomInfo of the Lobby. + /// This list is defined when creating the room and can't be changed afterwards. Compare: LoadBalancingClient.OpCreateRoom() + /// + /// You could name properties that are not set from the beginning. Those will be synced with the lobby when added later on. + public string[] PropertiesListedInLobby + { + get + { + return this.propertiesListedInLobby; + } + + private set + { + this.propertiesListedInLobby = value; + } + } + + /// + /// Gets if this room cleans up the event cache when a player (actor) leaves. + /// + /// + /// This affects which events joining players get. + /// + /// Set in room creation via RoomOptions.CleanupCacheOnLeave. + /// + /// Within PUN, auto cleanup of events means that cached RPCs and instantiated networked objects are deleted from the room. + /// + public bool AutoCleanUp + { + get + { + return this.autoCleanUp; + } + } + + /// Define if the client who calls SetProperties should receive the properties update event or not. + public bool BroadcastPropertiesChangeToAll { get; private set; } + /// Define if Join and Leave events should not be sent to clients in the room. + public bool SuppressRoomEvents { get; private set; } + /// Extends SuppressRoomEvents: Define if Join and Leave events but also the actors' list and their respective properties should not be sent to clients. + public bool SuppressPlayerInfo { get; private set; } + /// Define if UserIds of the players are broadcast in the room. Useful for FindFriends and reserving slots for expected users. + public bool PublishUserId { get; private set; } + /// Define if actor or room properties with null values are removed on the server or kept. + public bool DeleteNullProperties { get; private set; } + + #if SERVERSDK + /// Define if rooms should have unique UserId per actor and that UserIds are used instead of actor number in rejoin. + public bool CheckUserOnJoin { get; private set; } + #endif + + + /// Creates a Room (representation) with given name and properties and the "listing options" as provided by parameters. + /// Name of the room (can be null until it's actually created on server). + /// Room options. + public Room(string roomName, RoomOptions options, bool isOffline = false) : base(roomName, options != null ? options.CustomRoomProperties : null) + { + // base() sets name and (custom)properties. here we set "well known" properties + if (options != null) + { + this.isVisible = options.IsVisible; + this.isOpen = options.IsOpen; + this.maxPlayers = options.MaxPlayers; + this.propertiesListedInLobby = options.CustomRoomPropertiesForLobby; + //this.playerTtl = options.PlayerTtl; // set via well known properties + //this.emptyRoomTtl = options.EmptyRoomTtl; // set via well known properties + } + + this.isOffline = isOffline; + } + + + /// Read (received) room option flags into related bool parameters. + /// This is for internal use. The operation response for join and create room operations is read this way. + /// + internal void InternalCacheRoomFlags(int roomFlags) + { + this.BroadcastPropertiesChangeToAll = (roomFlags & (int)RoomOptionBit.BroadcastPropsChangeToAll) != 0; + this.SuppressRoomEvents = (roomFlags & (int)RoomOptionBit.SuppressRoomEvents) != 0; + this.SuppressPlayerInfo = (roomFlags & (int)RoomOptionBit.SuppressPlayerInfo) != 0; + this.PublishUserId = (roomFlags & (int)RoomOptionBit.PublishUserId) != 0; + this.DeleteNullProperties = (roomFlags & (int)RoomOptionBit.DeleteNullProps) != 0; + #if SERVERSDK + this.CheckUserOnJoin = (roomFlags & (int)RoomOptionBit.CheckUserOnJoin) != 0; + #endif + this.autoCleanUp = (roomFlags & (int)RoomOptionBit.DeleteCacheOnLeave) != 0; + } + + protected internal override void InternalCacheProperties(Hashtable propertiesToCache) + { + int oldMasterId = this.masterClientId; + + base.InternalCacheProperties(propertiesToCache); // important: updating the properties fields has no way to do callbacks on change + + if (oldMasterId != 0 && this.masterClientId != oldMasterId) + { + this.LoadBalancingClient.InRoomCallbackTargets.OnMasterClientSwitched(this.GetPlayer(this.masterClientId)); + } + } + + /// + /// Updates and synchronizes this Room's Custom Properties. Optionally, expectedProperties can be provided as condition. + /// + /// + /// Custom Properties are a set of string keys and arbitrary values which is synchronized + /// for the players in a Room. They are available when the client enters the room, as + /// they are in the response of OpJoin and OpCreate. + /// + /// Custom Properties either relate to the (current) Room or a Player (in that Room). + /// + /// Both classes locally cache the current key/values and make them available as + /// property: CustomProperties. This is provided only to read them. + /// You must use the method SetCustomProperties to set/modify them. + /// + /// Any client can set any Custom Properties anytime (when in a room). + /// It's up to the game logic to organize how they are best used. + /// + /// You should call SetCustomProperties only with key/values that are new or changed. This reduces + /// traffic and performance. + /// + /// Unless you define some expectedProperties, setting key/values is always permitted. + /// In this case, the property-setting client will not receive the new values from the server but + /// instead update its local cache in SetCustomProperties. + /// + /// If you define expectedProperties, the server will skip updates if the server property-cache + /// does not contain all expectedProperties with the same values. + /// In this case, the property-setting client will get an update from the server and update it's + /// cached key/values at about the same time as everyone else. + /// + /// The benefit of using expectedProperties can be only one client successfully sets a key from + /// one known value to another. + /// As example: Store who owns an item in a Custom Property "ownedBy". It's 0 initally. + /// When multiple players reach the item, they all attempt to change "ownedBy" from 0 to their + /// actorNumber. If you use expectedProperties {"ownedBy", 0} as condition, the first player to + /// take the item will have it (and the others fail to set the ownership). + /// + /// Properties get saved with the game state for Turnbased games (which use IsPersistent = true). + /// + /// Hashtable of Custom Properties that changes. + /// Provide some keys/values to use as condition for setting the new values. Client must be in room. + /// Defines if this SetCustomProperties-operation gets forwarded to your WebHooks. Client must be in room. + /// + /// False if propertiesToSet is null or empty or have zero string keys. + /// True in offline mode even if expectedProperties or webFlags are used. + /// Otherwise, returns if this operation could be sent to the server. + /// + public virtual bool SetCustomProperties(Hashtable propertiesToSet, Hashtable expectedProperties = null, WebFlags webFlags = null) + { + if (propertiesToSet == null || propertiesToSet.Count == 0) + { + return false; + } + Hashtable customProps = propertiesToSet.StripToStringKeys() as Hashtable; + + if (this.isOffline) + { + if (customProps.Count == 0) + { + return false; + } + // Merge and delete values. + this.CustomProperties.Merge(customProps); + this.CustomProperties.StripKeysWithNullValues(); + + // invoking callbacks + this.LoadBalancingClient.InRoomCallbackTargets.OnRoomPropertiesUpdate(propertiesToSet); + + } + else + { + // send (sync) these new values if in online room + return this.LoadBalancingClient.OpSetPropertiesOfRoom(customProps, expectedProperties, webFlags); + } + + return true; + } + + /// + /// Enables you to define the properties available in the lobby if not all properties are needed to pick a room. + /// + /// + /// Limit the amount of properties sent to users in the lobby to improve speed and stability. + /// + /// An array of custom room property names to forward to the lobby. + /// If the operation could be sent to the server. + public bool SetPropertiesListedInLobby(string[] lobbyProps) + { + if (this.isOffline) + { + return false; + } + Hashtable customProps = new Hashtable(); + customProps[GamePropertyKey.PropsListedInLobby] = lobbyProps; + return this.LoadBalancingClient.OpSetPropertiesOfRoom(customProps); + } + + + /// + /// Removes a player from this room's Players Dictionary. + /// This is internally used by the LoadBalancing API. There is usually no need to remove players yourself. + /// This is not a way to "kick" players. + /// + protected internal virtual void RemovePlayer(Player player) + { + this.Players.Remove(player.ActorNumber); + player.RoomReference = null; + } + + /// + /// Removes a player from this room's Players Dictionary. + /// + protected internal virtual void RemovePlayer(int id) + { + this.RemovePlayer(this.GetPlayer(id)); + } + + /// + /// Asks the server to assign another player as Master Client of your current room. + /// + /// + /// RaiseEvent has the option to send messages only to the Master Client of a room. + /// SetMasterClient affects which client gets those messages. + /// + /// This method calls an operation on the server to set a new Master Client, which takes a roundtrip. + /// In case of success, this client and the others get the new Master Client from the server. + /// + /// SetMasterClient tells the server which current Master Client should be replaced with the new one. + /// It will fail, if anything switches the Master Client moments earlier. There is no callback for this + /// error. All clients should get the new Master Client assigned by the server anyways. + /// + /// See also: MasterClientId + /// + /// The player to become the next Master Client. + /// False when this operation couldn't be done currently. Requires a v4 Photon Server. + public bool SetMasterClient(Player masterClientPlayer) + { + if (this.isOffline) + { + return false; + } + Hashtable newProps = new Hashtable() { { GamePropertyKey.MasterClientId, masterClientPlayer.ActorNumber } }; + Hashtable prevProps = new Hashtable() { { GamePropertyKey.MasterClientId, this.MasterClientId } }; + return this.LoadBalancingClient.OpSetPropertiesOfRoom(newProps, prevProps); + } + + /// + /// Checks if the player is in the room's list already and calls StorePlayer() if not. + /// + /// The new player - identified by ID. + /// False if the player could not be added (cause it was in the list already). + public virtual bool AddPlayer(Player player) + { + if (!this.Players.ContainsKey(player.ActorNumber)) + { + this.StorePlayer(player); + return true; + } + + return false; + } + + /// + /// Updates a player reference in the Players dictionary (no matter if it existed before or not). + /// + /// The Player instance to insert into the room. + public virtual Player StorePlayer(Player player) + { + this.Players[player.ActorNumber] = player; + player.RoomReference = this; + + //// while initializing the room, the players are not guaranteed to be added in-order + //if (this.MasterClientId == 0 || player.ActorNumber < this.MasterClientId) + //{ + // this.masterClientId = player.ActorNumber; + //} + + return player; + } + + /// + /// Tries to find the player with given actorNumber (a.k.a. ID). + /// Only useful when in a Room, as IDs are only valid per Room. + /// + /// ID to look for. + /// If true, the Master Client is returned for ID == 0. + /// The player with the ID or null. + public virtual Player GetPlayer(int id, bool findMaster = false) + { + int idToFind = (findMaster && id == 0) ? this.MasterClientId : id; + + Player result = null; + this.Players.TryGetValue(idToFind, out result); + + return result; + } + + /// + /// Attempts to remove all current expected users from the server's Slot Reservation list. + /// + /// + /// Note that this operation can conflict with new/other users joining. They might be + /// adding users to the list of expected users before or after this client called ClearExpectedUsers. + /// + /// This room's expectedUsers value will update, when the server sends a successful update. + /// + /// Internals: This methods wraps up setting the ExpectedUsers property of a room. + /// + /// If the operation could be sent to the server. + public bool ClearExpectedUsers() + { + if (this.ExpectedUsers == null || this.ExpectedUsers.Length == 0) + { + return false; + } + return this.SetExpectedUsers(new string[0], this.ExpectedUsers); + } + + /// + /// Attempts to update the expected users from the server's Slot Reservation list. + /// + /// + /// Note that this operation can conflict with new/other users joining. They might be + /// adding users to the list of expected users before or after this client called SetExpectedUsers. + /// + /// This room's expectedUsers value will update, when the server sends a successful update. + /// + /// Internals: This methods wraps up setting the ExpectedUsers property of a room. + /// + /// The new array of UserIDs to be reserved in the room. + /// If the operation could be sent to the server. + public bool SetExpectedUsers(string[] newExpectedUsers) + { + if (newExpectedUsers == null || newExpectedUsers.Length == 0) + { + this.LoadBalancingClient.DebugReturn(DebugLevel.ERROR, "newExpectedUsers array is null or empty, call Room.ClearExpectedUsers() instead if this is what you want."); + return false; + } + return this.SetExpectedUsers(newExpectedUsers, this.ExpectedUsers); + } + + private bool SetExpectedUsers(string[] newExpectedUsers, string[] oldExpectedUsers) + { + if (this.isOffline) + { + return false; + } + Hashtable gameProperties = new Hashtable(1); + gameProperties.Add(GamePropertyKey.ExpectedUsers, newExpectedUsers); + Hashtable expectedProperties = null; + if (oldExpectedUsers != null) + { + expectedProperties = new Hashtable(1); + expectedProperties.Add(GamePropertyKey.ExpectedUsers, oldExpectedUsers); + } + return this.LoadBalancingClient.OpSetPropertiesOfRoom(gameProperties, expectedProperties); + } + + /// Returns a summary of this Room instance as string. + /// Summary of this Room instance. + public override string ToString() + { + return string.Format("Room: '{0}' {1},{2} {4}/{3} players.", this.name, this.isVisible ? "visible" : "hidden", this.isOpen ? "open" : "closed", this.maxPlayers, this.PlayerCount); + } + + /// Returns a summary of this Room instance as longer string, including Custom Properties. + /// Summary of this Room instance. + public new string ToStringFull() + { + return string.Format("Room: '{0}' {1},{2} {4}/{3} players.\ncustomProps: {5}", this.name, this.isVisible ? "visible" : "hidden", this.isOpen ? "open" : "closed", this.maxPlayers, this.PlayerCount, this.CustomProperties.ToStringFull()); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/Room.cs.meta b/Assets/Photon/PhotonRealtime/Code/Room.cs.meta new file mode 100644 index 00000000..66ccb6ca --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Room.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 17568a7a5552c09428dd48e73548b8b8 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/RoomInfo.cs b/Assets/Photon/PhotonRealtime/Code/RoomInfo.cs new file mode 100644 index 00000000..6d775452 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/RoomInfo.cs @@ -0,0 +1,274 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// This class resembles info about available rooms, as sent by the Master +// server's lobby. Consider all values as readonly. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System.Collections; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// + /// A simplified room with just the info required to list and join, used for the room listing in the lobby. + /// The properties are not settable (IsOpen, MaxPlayers, etc). + /// + /// + /// This class resembles info about available rooms, as sent by the Master server's lobby. + /// Consider all values as readonly. None are synced (only updated by events by server). + /// + public class RoomInfo + { + /// Used in lobby, to mark rooms that are no longer listed (for being full, closed or hidden). + public bool RemovedFromList; + + /// Backing field for property. + private Hashtable customProperties = new Hashtable(); + + /// Backing field for property. + protected byte maxPlayers = 0; + + /// Backing field for property. + protected int emptyRoomTtl = 0; + + /// Backing field for property. + protected int playerTtl = 0; + + /// Backing field for property. + protected string[] expectedUsers; + + /// Backing field for property. + protected bool isOpen = true; + + /// Backing field for property. + protected bool isVisible = true; + + /// Backing field for property. False unless the GameProperty is set to true (else it's not sent). + protected bool autoCleanUp = true; + + /// Backing field for property. + protected string name; + + /// Backing field for master client id (actorNumber). defined by server in room props and ev leave. + public int masterClientId; + + /// Backing field for property. + protected string[] propertiesListedInLobby; + + /// Read-only "cache" of custom properties of a room. Set via Room.SetCustomProperties (not available for RoomInfo class!). + /// All keys are string-typed and the values depend on the game/application. + /// + public Hashtable CustomProperties + { + get + { + return this.customProperties; + } + } + + /// The name of a room. Unique identifier for a room/match (per AppId + game-Version). + public string Name + { + get + { + return this.name; + } + } + + /// + /// Count of players currently in room. This property is overwritten by the Room class (used when you're in a Room). + /// + public int PlayerCount { get; private set; } + + /// + /// The limit of players for this room. This property is shown in lobby, too. + /// If the room is full (players count == maxplayers), joining this room will fail. + /// + /// + /// As part of RoomInfo this can't be set. + /// As part of a Room (which the player joined), the setter will update the server and all clients. + /// + public byte MaxPlayers + { + get + { + return this.maxPlayers; + } + } + + /// + /// Defines if the room can be joined. + /// This does not affect listing in a lobby but joining the room will fail if not open. + /// If not open, the room is excluded from random matchmaking. + /// Due to racing conditions, found matches might become closed even while you join them. + /// Simply re-connect to master and find another. + /// Use property "IsVisible" to not list the room. + /// + /// + /// As part of RoomInfo this can't be set. + /// As part of a Room (which the player joined), the setter will update the server and all clients. + /// + public bool IsOpen + { + get + { + return this.isOpen; + } + } + + /// + /// Defines if the room is listed in its lobby. + /// Rooms can be created invisible, or changed to invisible. + /// To change if a room can be joined, use property: open. + /// + /// + /// As part of RoomInfo this can't be set. + /// As part of a Room (which the player joined), the setter will update the server and all clients. + /// + public bool IsVisible + { + get + { + return this.isVisible; + } + } + + /// + /// Constructs a RoomInfo to be used in room listings in lobby. + /// + /// Name of the room and unique ID at the same time. + /// Properties for this room. + protected internal RoomInfo(string roomName, Hashtable roomProperties) + { + this.InternalCacheProperties(roomProperties); + + this.name = roomName; + } + + /// + /// Makes RoomInfo comparable (by name). + /// + public override bool Equals(object other) + { + RoomInfo otherRoomInfo = other as RoomInfo; + return (otherRoomInfo != null && this.Name.Equals(otherRoomInfo.name)); + } + + /// + /// Accompanies Equals, using the name's HashCode as return. + /// + /// + public override int GetHashCode() + { + return this.name.GetHashCode(); + } + + + /// Returns most interesting room values as string. + /// Summary of this RoomInfo instance. + public override string ToString() + { + return string.Format("Room: '{0}' {1},{2} {4}/{3} players.", this.name, this.isVisible ? "visible" : "hidden", this.isOpen ? "open" : "closed", this.maxPlayers, this.PlayerCount); + } + + /// Returns most interesting room values as string, including custom properties. + /// Summary of this RoomInfo instance. + public string ToStringFull() + { + return string.Format("Room: '{0}' {1},{2} {4}/{3} players.\ncustomProps: {5}", this.name, this.isVisible ? "visible" : "hidden", this.isOpen ? "open" : "closed", this.maxPlayers, this.PlayerCount, this.customProperties.ToStringFull()); + } + + /// Copies "well known" properties to fields (IsVisible, etc) and caches the custom properties (string-keys only) in a local hashtable. + /// New or updated properties to store in this RoomInfo. + protected internal virtual void InternalCacheProperties(Hashtable propertiesToCache) + { + if (propertiesToCache == null || propertiesToCache.Count == 0 || this.customProperties.Equals(propertiesToCache)) + { + return; + } + + // check of this game was removed from the list. in that case, we don't + // need to read any further properties + // list updates will remove this game from the game listing + if (propertiesToCache.ContainsKey(GamePropertyKey.Removed)) + { + this.RemovedFromList = (bool)propertiesToCache[GamePropertyKey.Removed]; + if (this.RemovedFromList) + { + return; + } + } + + // fetch the "well known" properties of the room, if available + if (propertiesToCache.ContainsKey(GamePropertyKey.MaxPlayers)) + { + this.maxPlayers = (byte)propertiesToCache[GamePropertyKey.MaxPlayers]; + } + + if (propertiesToCache.ContainsKey(GamePropertyKey.IsOpen)) + { + this.isOpen = (bool)propertiesToCache[GamePropertyKey.IsOpen]; + } + + if (propertiesToCache.ContainsKey(GamePropertyKey.IsVisible)) + { + this.isVisible = (bool)propertiesToCache[GamePropertyKey.IsVisible]; + } + + if (propertiesToCache.ContainsKey(GamePropertyKey.PlayerCount)) + { + this.PlayerCount = (int)((byte)propertiesToCache[GamePropertyKey.PlayerCount]); + } + + if (propertiesToCache.ContainsKey(GamePropertyKey.CleanupCacheOnLeave)) + { + this.autoCleanUp = (bool)propertiesToCache[GamePropertyKey.CleanupCacheOnLeave]; + } + + if (propertiesToCache.ContainsKey(GamePropertyKey.MasterClientId)) + { + this.masterClientId = (int)propertiesToCache[GamePropertyKey.MasterClientId]; + } + + if (propertiesToCache.ContainsKey(GamePropertyKey.PropsListedInLobby)) + { + this.propertiesListedInLobby = propertiesToCache[GamePropertyKey.PropsListedInLobby] as string[]; + } + + if (propertiesToCache.ContainsKey((byte)GamePropertyKey.ExpectedUsers)) + { + this.expectedUsers = (string[])propertiesToCache[GamePropertyKey.ExpectedUsers]; + } + + if (propertiesToCache.ContainsKey((byte)GamePropertyKey.EmptyRoomTtl)) + { + this.emptyRoomTtl = (int)propertiesToCache[GamePropertyKey.EmptyRoomTtl]; + } + + if (propertiesToCache.ContainsKey((byte)GamePropertyKey.PlayerTtl)) + { + this.playerTtl = (int)propertiesToCache[GamePropertyKey.PlayerTtl]; + } + + // merge the custom properties (from your application) to the cache (only string-typed keys will be kept) + this.customProperties.MergeStringKeys(propertiesToCache); + this.customProperties.StripKeysWithNullValues(); + } + } +} diff --git a/Assets/Photon/PhotonRealtime/Code/RoomInfo.cs.meta b/Assets/Photon/PhotonRealtime/Code/RoomInfo.cs.meta new file mode 100644 index 00000000..a1188f0c --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/RoomInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 71760b65ad7d5b842942c797a0366fa7 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/SupportLogger.cs b/Assets/Photon/PhotonRealtime/Code/SupportLogger.cs new file mode 100644 index 00000000..36fb0dd0 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/SupportLogger.cs @@ -0,0 +1,434 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// Implements callbacks of the Realtime API to logs selected information +// for support cases. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + + + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System; + using System.Text; + using System.Collections; + using System.Collections.Generic; + + using Stopwatch = System.Diagnostics.Stopwatch; + + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY + using UnityEngine; + #endif + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + /// + /// Helper class to debug log basic information about Photon client and vital traffic statistics. + /// + /// + /// Set SupportLogger.Client for this to work. + /// + #if SUPPORTED_UNITY + [DisallowMultipleComponent] + #if PUN_2_OR_NEWER || FUSION_UNITY + [AddComponentMenu("")] // hide from Unity Menus and searches + #endif + public class SupportLogger : MonoBehaviour, IConnectionCallbacks , IMatchmakingCallbacks , IInRoomCallbacks, ILobbyCallbacks, IErrorInfoCallback + #else + public class SupportLogger : IConnectionCallbacks, IInRoomCallbacks, IMatchmakingCallbacks , ILobbyCallbacks + #endif + { + /// + /// Toggle to enable or disable traffic statistics logging. + /// + public bool LogTrafficStats = true; + //private bool loggedStillOfflineMessage; + + private LoadBalancingClient client; + + private Stopwatch startStopwatch; + + /// helps skip the initial OnApplicationPause call, which is not really of interest on start + private bool initialOnApplicationPauseSkipped = false; + + private int pingMax; + private int pingMin; + + /// + /// Photon client to log information and statistics from. + /// + public LoadBalancingClient Client + { + get { return this.client; } + set + { + if (this.client != value) + { + if (this.client != null) + { + this.client.RemoveCallbackTarget(this); + } + this.client = value; + if (this.client != null) + { + this.client.AddCallbackTarget(this); + } + } + } + } + + + #if SUPPORTED_UNITY + protected void Start() + { + this.LogBasics(); + + if (this.startStopwatch == null) + { + this.startStopwatch = new Stopwatch(); + this.startStopwatch.Start(); + } + } + + protected void OnDestroy() + { + this.Client = null; // will remove this SupportLogger as callback target + } + + protected void OnApplicationPause(bool pause) + { + if (!this.initialOnApplicationPauseSkipped) + { + this.initialOnApplicationPauseSkipped = true; + return; + } + + Debug.Log(string.Format("{0} SupportLogger OnApplicationPause({1}). Client: {2}.", this.GetFormattedTimestamp(), pause, this.client == null ? "null" : this.client.State.ToString())); + } + + protected void OnApplicationQuit() + { + this.CancelInvoke(); + } + #endif + + public void StartLogStats() + { + #if SUPPORTED_UNITY + this.InvokeRepeating("LogStats", 10, 10); + #else + Debug.Log("Not implemented for non-Unity projects."); + #endif + } + + public void StopLogStats() + { + #if SUPPORTED_UNITY + this.CancelInvoke("LogStats"); + #else + Debug.Log("Not implemented for non-Unity projects."); + #endif + } + + private void StartTrackValues() + { + #if SUPPORTED_UNITY + this.InvokeRepeating("TrackValues", 0.5f, 0.5f); + #else + Debug.Log("Not implemented for non-Unity projects."); + #endif + } + + private void StopTrackValues() + { + #if SUPPORTED_UNITY + this.CancelInvoke("TrackValues"); + #else + Debug.Log("Not implemented for non-Unity projects."); + #endif + } + + private string GetFormattedTimestamp() + { + if (this.startStopwatch == null) + { + this.startStopwatch = new Stopwatch(); + this.startStopwatch.Start(); + } + + TimeSpan span = this.startStopwatch.Elapsed; + if (span.Minutes > 0) + { + return string.Format("[{0}:{1}.{1}]", span.Minutes, span.Seconds, span.Milliseconds); + } + + return string.Format("[{0}.{1}]", span.Seconds, span.Milliseconds); + } + + + // called via InvokeRepeatedly + private void TrackValues() + { + if (this.client != null) + { + int currentRtt = this.client.LoadBalancingPeer.RoundTripTime; + if (currentRtt > this.pingMax) + { + this.pingMax = currentRtt; + } + if (currentRtt < this.pingMin) + { + this.pingMin = currentRtt; + } + } + } + + + /// + /// Debug logs vital traffic statistics about the attached Photon Client. + /// + public void LogStats() + { + if (this.client == null || this.client.State == ClientState.PeerCreated) + { + return; + } + + if (this.LogTrafficStats) + { + Debug.Log(string.Format("{0} SupportLogger {1} Ping min/max: {2}/{3}", this.GetFormattedTimestamp() , this.client.LoadBalancingPeer.VitalStatsToString(false) , this.pingMin , this.pingMax)); + } + } + + /// + /// Debug logs basic information (AppId, AppVersion, PeerID, Server address, Region) about the attached Photon Client. + /// + private void LogBasics() + { + if (this.client != null) + { + List buildProperties = new List(10); + #if SUPPORTED_UNITY + buildProperties.Add(Application.unityVersion); + buildProperties.Add(Application.platform.ToString()); + #endif + #if ENABLE_IL2CPP + buildProperties.Add("ENABLE_IL2CPP"); + #endif + #if ENABLE_MONO + buildProperties.Add("ENABLE_MONO"); + #endif + #if DEBUG + buildProperties.Add("DEBUG"); + #endif + #if MASTER + buildProperties.Add("MASTER"); + #endif + #if NET_4_6 + buildProperties.Add("NET_4_6"); + #endif + #if NET_STANDARD_2_0 + buildProperties.Add("NET_STANDARD_2_0"); + #endif + #if NETFX_CORE + buildProperties.Add("NETFX_CORE"); + #endif + #if NET_LEGACY + buildProperties.Add("NET_LEGACY"); + #endif + #if UNITY_64 + buildProperties.Add("UNITY_64"); + #endif + #if UNITY_FUSION + buildProperties.Add("UNITY_FUSION"); + #endif + + + StringBuilder sb = new StringBuilder(); + + string appIdShort = string.IsNullOrEmpty(this.client.AppId) || this.client.AppId.Length < 8 ? this.client.AppId : string.Concat(this.client.AppId.Substring(0, 8), "***"); + + sb.AppendFormat("{0} SupportLogger Info: ", this.GetFormattedTimestamp()); + sb.AppendFormat("AppID: \"{0}\" AppVersion: \"{1}\" Client: v{2} ({4}) Build: {3} ", appIdShort, this.client.AppVersion, PhotonPeer.Version, string.Join(", ", buildProperties.ToArray()), this.client.LoadBalancingPeer.TargetFramework); + if (this.client != null && this.client.LoadBalancingPeer != null && this.client.LoadBalancingPeer.SocketImplementation != null) + { + sb.AppendFormat("Socket: {0} ", this.client.LoadBalancingPeer.SocketImplementation.Name); + } + + sb.AppendFormat("UserId: \"{0}\" AuthType: {1} AuthMode: {2} {3} ", this.client.UserId, (this.client.AuthValues != null) ? this.client.AuthValues.AuthType.ToString() : "N/A", this.client.AuthMode, this.client.EncryptionMode); + + sb.AppendFormat("State: {0} ", this.client.State); + sb.AppendFormat("PeerID: {0} ", this.client.LoadBalancingPeer.PeerID); + sb.AppendFormat("NameServer: {0} Current Server: {1} IP: {2} Region: {3} ", this.client.NameServerHost, this.client.CurrentServerAddress, this.client.LoadBalancingPeer.ServerIpAddress, this.client.CloudRegion); + + Debug.LogWarning(sb.ToString()); + } + } + + + public void OnConnected() + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnConnected()."); + this.pingMax = 0; + this.pingMin = this.client.LoadBalancingPeer.RoundTripTime; + this.LogBasics(); + + if (this.LogTrafficStats) + { + this.client.LoadBalancingPeer.TrafficStatsEnabled = false; + this.client.LoadBalancingPeer.TrafficStatsEnabled = true; + this.StartLogStats(); + } + + this.StartTrackValues(); + } + + public void OnConnectedToMaster() + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnConnectedToMaster()."); + } + + public void OnFriendListUpdate(List friendList) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnFriendListUpdate(friendList)."); + } + + public void OnJoinedLobby() + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnJoinedLobby(" + this.client.CurrentLobby + ")."); + } + + public void OnLeftLobby() + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnLeftLobby()."); + } + + public void OnCreateRoomFailed(short returnCode, string message) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnCreateRoomFailed(" + returnCode+","+message+")."); + } + + public void OnJoinedRoom() + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnJoinedRoom(" + this.client.CurrentRoom + "). " + this.client.CurrentLobby + " GameServer:" + this.client.GameServerAddress); + } + + public void OnJoinRoomFailed(short returnCode, string message) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnJoinRoomFailed(" + returnCode+","+message+")."); + } + + public void OnJoinRandomFailed(short returnCode, string message) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnJoinRandomFailed(" + returnCode+","+message+")."); + } + + public void OnCreatedRoom() + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnCreatedRoom(" + this.client.CurrentRoom + "). " + this.client.CurrentLobby + " GameServer:" + this.client.GameServerAddress); + } + + public void OnLeftRoom() + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnLeftRoom()."); + } + + public void OnDisconnected(DisconnectCause cause) + { + this.StopLogStats(); + this.StopTrackValues(); + + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnDisconnected(" + cause + ")."); + this.LogBasics(); + this.LogStats(); + } + + public void OnRegionListReceived(RegionHandler regionHandler) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnRegionListReceived(regionHandler)."); + } + + public void OnRoomListUpdate(List roomList) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnRoomListUpdate(roomList). roomList.Count: " + roomList.Count); + } + + public void OnPlayerEnteredRoom(Player newPlayer) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnPlayerEnteredRoom(" + newPlayer+")."); + } + + public void OnPlayerLeftRoom(Player otherPlayer) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnPlayerLeftRoom(" + otherPlayer+")."); + } + + public void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnRoomPropertiesUpdate(propertiesThatChanged)."); + } + + public void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnPlayerPropertiesUpdate(targetPlayer,changedProps)."); + } + + public void OnMasterClientSwitched(Player newMasterClient) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnMasterClientSwitched(" + newMasterClient+")."); + } + + public void OnCustomAuthenticationResponse(Dictionary data) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnCustomAuthenticationResponse(" + data.ToStringFull()+")."); + } + + public void OnCustomAuthenticationFailed (string debugMessage) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnCustomAuthenticationFailed(" + debugMessage+")."); + } + + public void OnLobbyStatisticsUpdate(List lobbyStatistics) + { + Debug.Log(this.GetFormattedTimestamp() + " SupportLogger OnLobbyStatisticsUpdate(lobbyStatistics)."); + } + + + #if !SUPPORTED_UNITY + private static class Debug + { + public static void Log(string msg) + { + System.Diagnostics.Debug.WriteLine(msg); + } + public static void LogWarning(string msg) + { + System.Diagnostics.Debug.WriteLine(msg); + } + public static void LogError(string msg) + { + System.Diagnostics.Debug.WriteLine(msg); + } + } + #endif + + public void OnErrorInfo(ErrorInfo errorInfo) + { + Debug.LogError(errorInfo.ToString()); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/SupportLogger.cs.meta b/Assets/Photon/PhotonRealtime/Code/SupportLogger.cs.meta new file mode 100644 index 00000000..7e8b7ccb --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/SupportLogger.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9b61c60d38639484ebbd7f2100dd3d08 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/Unity.meta b/Assets/Photon/PhotonRealtime/Code/Unity.meta new file mode 100644 index 00000000..96bf0eed --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fa14aa576f7e18f4bb6c4c93368a235d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/Unity/Editor.meta b/Assets/Photon/PhotonRealtime/Code/Unity/Editor.meta new file mode 100644 index 00000000..4d10118c --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Unity/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a02814c0303a60f488813e6111993aaa +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/Unity/Editor/AccountService.cs b/Assets/Photon/PhotonRealtime/Code/Unity/Editor/AccountService.cs new file mode 100644 index 00000000..e3f2397b --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Unity/Editor/AccountService.cs @@ -0,0 +1,260 @@ +// ---------------------------------------------------------------------------- +// +// Photon Cloud Account Service - Copyright (C) 2012 Exit Games GmbH +// +// +// Provides methods to register a new user-account for the Photon Cloud and +// get the resulting appId. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + +#if UNITY_2017_4_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +#if UNITY_EDITOR + +namespace Photon.Realtime +{ + using System; + using UnityEngine; + using System.Collections.Generic; + using System.Text.RegularExpressions; + using ExitGames.Client.Photon; + + + /// + /// Creates a instance of the Account Service to register Photon Cloud accounts. + /// + public class AccountService + { + private const string ServiceUrl = "https://partner.photonengine.com/api/{0}/User/RegisterEx"; + + private readonly Dictionary RequestHeaders = new Dictionary + { + { "Content-Type", "application/json" }, + { "x-functions-key", "" } + }; + + private const string DefaultContext = "Unity"; + + private const string DefaultToken = "VQ920wVUieLHT9c3v1ZCbytaLXpXbktUztKb3iYLCdiRKjUagcl6eg=="; + + /// + /// third parties custom context, if null, defaults to DefaultContext property value + /// + public string CustomContext = null; // "PartnerCode" on the server + + /// + /// third parties custom token. If null, defaults to DefaultToken property value + /// + public string CustomToken = null; + + /// + /// If this AccountService instance is currently waiting for a response. While pending, RegisterByEmail is blocked. + /// + public bool RequestPendingResult = false; + + /// + /// Attempts to create a Photon Cloud Account asynchronously. Blocked while RequestPendingResult is true. + /// + /// + /// Once your callback is called, check ReturnCode, Message and AppId to get the result of this attempt. + /// + /// Email of the account. + /// Defines which type of Photon-service is being requested. + /// Called when the result is available. + /// Called when the request failed. + /// Can be used to identify the origin of the registration (which package is being used). + public bool RegisterByEmail(string email, List serviceTypes, Action callback = null, Action errorCallback = null, string origin = null) + { + if (this.RequestPendingResult) + { + Debug.LogError("Registration request pending result. Not sending another."); + return false; + } + + if (!IsValidEmail(email)) + { + Debug.LogErrorFormat("Email \"{0}\" is not valid", email); + return false; + } + + string serviceTypeString = GetServiceTypesFromList(serviceTypes); + if (string.IsNullOrEmpty(serviceTypeString)) + { + Debug.LogError("serviceTypes string is null or empty"); + return false; + } + + string fullUrl = GetUrlWithQueryStringEscaped(email, serviceTypeString, origin); + + RequestHeaders["x-functions-key"] = string.IsNullOrEmpty(CustomToken) ? DefaultToken : CustomToken; + + + this.RequestPendingResult = true; + + PhotonEditorUtils.StartCoroutine( + PhotonEditorUtils.HttpPost(fullUrl, + RequestHeaders, + null, + s => + { + this.RequestPendingResult = false; + //Debug.LogWarningFormat("received response {0}", s); + if (string.IsNullOrEmpty(s)) + { + if (errorCallback != null) + { + errorCallback("Server's response was empty. Please register through account website during this service interruption."); + } + } + else + { + AccountServiceResponse ase = this.ParseResult(s); + if (ase == null) + { + if (errorCallback != null) + { + errorCallback("Error parsing registration response. Please try registering from account website"); + } + } + else if (callback != null) + { + callback(ase); + } + } + }, + e => + { + this.RequestPendingResult = false; + if (errorCallback != null) + { + errorCallback(e); + } + }) + ); + return true; + } + + + private string GetUrlWithQueryStringEscaped(string email, string serviceTypes, string originAv) + { + string emailEscaped = UnityEngine.Networking.UnityWebRequest.EscapeURL(email); + string st = UnityEngine.Networking.UnityWebRequest.EscapeURL(serviceTypes); + string uv = UnityEngine.Networking.UnityWebRequest.EscapeURL(Application.unityVersion); + string serviceUrl = string.Format(ServiceUrl, string.IsNullOrEmpty(CustomContext) ? DefaultContext : CustomContext ); + + return string.Format("{0}?email={1}&st={2}&uv={3}&av={4}", serviceUrl, emailEscaped, st, uv, originAv); + } + + /// + /// Reads the Json response and applies it to local properties. + /// + /// + private AccountServiceResponse ParseResult(string result) + { + try + { + AccountServiceResponse res = JsonUtility.FromJson(result); + // Unity's JsonUtility does not support deserializing Dictionary, we manually parse it, dirty & ugly af, better then using a 3rd party lib + if (res.ReturnCode == AccountServiceReturnCodes.Success) + { + string[] parts = result.Split(new[] { "\"ApplicationIds\":{" }, StringSplitOptions.RemoveEmptyEntries); + parts = parts[1].Split('}'); + string applicationIds = parts[0]; + if (!string.IsNullOrEmpty(applicationIds)) + { + parts = applicationIds.Split(new[] { ',', '"', ':' }, StringSplitOptions.RemoveEmptyEntries); + res.ApplicationIds = new Dictionary(parts.Length / 2); + for (int i = 0; i < parts.Length; i = i + 2) + { + res.ApplicationIds.Add(parts[i], parts[i + 1]); + } + } + else + { + Debug.LogError("The server did not return any AppId, ApplicationIds was empty in the response."); + return null; + } + } + return res; + } + catch (Exception ex) // probably JSON parsing exception, check if returned string is valid JSON + { + Debug.LogException(ex); + return null; + } + } + + /// + /// Turns the list items to a comma separated string. Returns null if list is null or empty. + /// + /// List of service types. + /// Returns null if list is null or empty. + private static string GetServiceTypesFromList(List appTypes) + { + if (appTypes == null || appTypes.Count <= 0) + { + return null; + } + + string serviceTypes = ((int)appTypes[0]).ToString(); + for (int i = 1; i < appTypes.Count; i++) + { + int appType = (int)appTypes[i]; + serviceTypes = string.Format("{0},{1}", serviceTypes, appType); + } + + return serviceTypes; + } + + // RFC2822 compliant matching 99.9% of all email addresses in actual use today + // according to http://www.regular-expressions.info/email.html [22.02.2012] + private static Regex reg = new Regex("^((?>[a-zA-Z\\d!#$%&'*+\\-/=?^_{|}~]+\\x20*|\"((?=[\\x01-\\x7f])[^\"\\]|\\[\\x01-\\x7f])*\"\\x20*)*(?<))?((?!\\.)(?>\\.?[a-zA-Z\\d!#$%&'*+\\-/=?^_{|}~]+)+|\"((?=[\\x01-\\x7f])[^\"\\]|\\[\\x01-\\x7f])*\")@(((?!-)[a-zA-Z\\d\\-]+(?)$", + RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); + public static bool IsValidEmail(string mailAddress) + { + if (string.IsNullOrEmpty(mailAddress)) + { + return false; + } + var result = reg.Match(mailAddress); + return result.Success; + } + } + + [Serializable] + public class AccountServiceResponse + { + public int ReturnCode; + public string Message; + public Dictionary ApplicationIds; // Unity's JsonUtility does not support deserializing Dictionary + } + + + public class AccountServiceReturnCodes + { + public static int Success = 0; + public static int EmailAlreadyRegistered = 8; + public static int InvalidParameters = 12; + } + + public enum ServiceTypes + { + Realtime = 0, + Turnbased = 1, + Chat = 2, + Voice = 3, + TrueSync = 4, + Pun = 5, + Thunder = 6, + Quantum = 7, + Fusion = 8, + Bolt = 20 + } +} + +#endif \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/Unity/Editor/AccountService.cs.meta b/Assets/Photon/PhotonRealtime/Code/Unity/Editor/AccountService.cs.meta new file mode 100644 index 00000000..a070b17d --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Unity/Editor/AccountService.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 166dfe22956ef0341b28e18d0499e363 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonRealtime/Code/Unity/Editor/PhotonEditorUtils.cs b/Assets/Photon/PhotonRealtime/Code/Unity/Editor/PhotonEditorUtils.cs new file mode 100644 index 00000000..ced6a0f5 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Unity/Editor/PhotonEditorUtils.cs @@ -0,0 +1,333 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Unity Editor Utils +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + +#pragma warning disable 618 // Deprecation warnings + + +#if UNITY_2017_4_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +#if UNITY_EDITOR + +namespace Photon.Realtime +{ + using System; + using System.Collections.Generic; + using System.Linq; + + using UnityEditor; + using UnityEngine; + + using System.IO; + using System.Text; + using UnityEngine.Networking; + + + [InitializeOnLoad] + public static class PhotonEditorUtils + { + /// Stores a flag which tells Editor scripts if the PhotonEditor.OnProjectChanged got called since initialization. + /// If not, the AssetDatabase is likely not usable yet and instances of ScriptableObject can't be loaded. + public static bool ProjectChangedWasCalled; + + + /// True if the ChatClient of the Photon Chat API is available. If so, the editor may (e.g.) show additional options in settings. + public static bool HasChat; + + /// True if the VoiceClient of the Photon Voice API is available. If so, the editor may (e.g.) show additional options in settings. + public static bool HasVoice; + + /// True if PUN is in the project. + public static bool HasPun; + + /// True if Photon Fusion is available in the project (and enabled). + public static bool HasFusion; + + /// True if the PhotonEditorUtils checked the available products / APIs. If so, the editor may (e.g.) show additional options in settings. + public static bool HasCheckedProducts; + + static PhotonEditorUtils() + { + HasVoice = Type.GetType("Photon.Voice.VoiceClient, Assembly-CSharp") != null || Type.GetType("Photon.Voice.VoiceClient, Assembly-CSharp-firstpass") != null || Type.GetType("Photon.Voice.VoiceClient, PhotonVoice.API") != null; + HasChat = Type.GetType("Photon.Chat.ChatClient, Assembly-CSharp") != null || Type.GetType("Photon.Chat.ChatClient, Assembly-CSharp-firstpass") != null || Type.GetType("Photon.Chat.ChatClient, PhotonChat") != null; + HasPun = Type.GetType("Photon.Pun.PhotonNetwork, Assembly-CSharp") != null || Type.GetType("Photon.Pun.PhotonNetwork, Assembly-CSharp-firstpass") != null || Type.GetType("Photon.Pun.PhotonNetwork, PhotonUnityNetworking") != null; + #if FUSION_WEAVER + HasFusion = true; + #endif + PhotonEditorUtils.HasCheckedProducts = true; + + if (EditorPrefs.HasKey("DisablePun") && EditorPrefs.GetBool("DisablePun")) + { + HasPun = false; + } + + if (HasPun) + { + // MOUNTING SYMBOLS + #if !PHOTON_UNITY_NETWORKING + AddScriptingDefineSymbolToAllBuildTargetGroups("PHOTON_UNITY_NETWORKING"); + #endif + + #if !PUN_2_0_OR_NEWER + AddScriptingDefineSymbolToAllBuildTargetGroups("PUN_2_0_OR_NEWER"); + #endif + + #if !PUN_2_OR_NEWER + AddScriptingDefineSymbolToAllBuildTargetGroups("PUN_2_OR_NEWER"); + #endif + + #if !PUN_2_19_OR_NEWER + AddScriptingDefineSymbolToAllBuildTargetGroups("PUN_2_19_OR_NEWER"); + #endif + } + } + + /// + /// Adds a given scripting define symbol to all build target groups + /// You can see all scripting define symbols ( not the internal ones, only the one for this project), in the PlayerSettings inspector + /// + /// Define symbol. + public static void AddScriptingDefineSymbolToAllBuildTargetGroups(string defineSymbol) + { + foreach (BuildTarget target in Enum.GetValues(typeof(BuildTarget))) + { + BuildTargetGroup group = BuildPipeline.GetBuildTargetGroup(target); + + if (group == BuildTargetGroup.Unknown) + { + continue; + } + + var defineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(group).Split(';').Select(d => d.Trim()).ToList(); + + if (!defineSymbols.Contains(defineSymbol)) + { + defineSymbols.Add(defineSymbol); + + try + { + PlayerSettings.SetScriptingDefineSymbolsForGroup(group, string.Join(";", defineSymbols.ToArray())); + } + catch (Exception e) + { + Debug.Log("Could not set Photon " + defineSymbol + " defines for build target: " + target + " group: " + group + " " + e); + } + } + } + } + + + /// + /// Removes PUN2's Script Define Symbols from project + /// + public static void CleanUpPunDefineSymbols() + { + foreach (BuildTarget target in Enum.GetValues(typeof(BuildTarget))) + { + BuildTargetGroup group = BuildPipeline.GetBuildTargetGroup(target); + + if (group == BuildTargetGroup.Unknown) + { + continue; + } + + var defineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(group) + .Split(';') + .Select(d => d.Trim()) + .ToList(); + + List newDefineSymbols = new List(); + foreach (var symbol in defineSymbols) + { + if ("PHOTON_UNITY_NETWORKING".Equals(symbol) || symbol.StartsWith("PUN_2_")) + { + continue; + } + + newDefineSymbols.Add(symbol); + } + + try + { + PlayerSettings.SetScriptingDefineSymbolsForGroup(group, string.Join(";", newDefineSymbols.ToArray())); + } + catch (Exception e) + { + Debug.LogErrorFormat("Could not set clean up PUN2's define symbols for build target: {0} group: {1}, {2}", target, group, e); + } + } + } + + + /// + /// Gets the parent directory of a path. Recursive Function, will return null if parentName not found + /// + /// The parent directory + /// Path. + /// Parent name. + public static string GetParent(string path, string parentName) + { + var dir = new DirectoryInfo(path); + + if (dir.Parent == null) + { + return null; + } + + if (string.IsNullOrEmpty(parentName)) + { + return dir.Parent.FullName; + } + + if (dir.Parent.Name == parentName) + { + return dir.Parent.FullName; + } + + return GetParent(dir.Parent.FullName, parentName); + } + + /// + /// Check if a GameObject is a prefab asset or part of a prefab asset, as opposed to an instance in the scene hierarchy + /// + /// true, if a prefab asset or part of it, false otherwise. + /// The GameObject to check + public static bool IsPrefab(GameObject go) + { + #if UNITY_2021_2_OR_NEWER + return UnityEditor.SceneManagement.PrefabStageUtility.GetPrefabStage(go) != null || EditorUtility.IsPersistent(go); + #elif UNITY_2018_3_OR_NEWER + return UnityEditor.Experimental.SceneManagement.PrefabStageUtility.GetPrefabStage(go) != null || EditorUtility.IsPersistent(go); + #else + return EditorUtility.IsPersistent(go); + #endif + } + + //https://forum.unity.com/threads/using-unitywebrequest-in-editor-tools.397466/#post-4485181 + public static void StartCoroutine(System.Collections.IEnumerator update) + { + EditorApplication.CallbackFunction closureCallback = null; + + closureCallback = () => + { + try + { + if (update.MoveNext() == false) + { + EditorApplication.update -= closureCallback; + } + } + catch (Exception ex) + { + Debug.LogException(ex); + EditorApplication.update -= closureCallback; + } + }; + + EditorApplication.update += closureCallback; + } + + public static System.Collections.IEnumerator HttpPost(string url, Dictionary headers, byte[] payload, Action successCallback, Action errorCallback) + { + using (UnityWebRequest w = new UnityWebRequest(url, "POST")) + { + if (payload != null) + { + w.uploadHandler = new UploadHandlerRaw(payload); + } + w.downloadHandler = new DownloadHandlerBuffer(); + if (headers != null) + { + foreach (var header in headers) + { + w.SetRequestHeader(header.Key, header.Value); + } + } + + #if UNITY_2017_2_OR_NEWER + yield return w.SendWebRequest(); + #else + yield return w.Send(); + #endif + + while (w.isDone == false) + yield return null; + + #if UNITY_2020_2_OR_NEWER + if (w.result == UnityWebRequest.Result.ProtocolError || w.result == UnityWebRequest.Result.ConnectionError || w.result == UnityWebRequest.Result.DataProcessingError) + #elif UNITY_2017_1_OR_NEWER + if (w.isNetworkError || w.isHttpError) + #endif + { + if (errorCallback != null) + { + errorCallback(w.error); + } + } + else + { + if (successCallback != null) + { + successCallback(w.downloadHandler.text); + } + } + } + } + /// + /// Creates a Foldout using a toggle with (GUIStyle)"Foldout") and a separate label. This is a workaround for 2019.3 foldout arrows not working. + /// + /// + /// + /// Returns the new isExpanded value. + public static bool Foldout(this SerializedProperty isExpanded, GUIContent label) + { + var rect = EditorGUILayout.GetControlRect(); + bool newvalue = EditorGUI.Toggle(new Rect(rect) { xMin = rect.xMin + 2 }, GUIContent.none, isExpanded.boolValue, (GUIStyle)"Foldout"); + EditorGUI.LabelField(new Rect(rect) { xMin = rect.xMin + 15 }, label); + if (newvalue != isExpanded.boolValue) + { + isExpanded.boolValue = newvalue; + isExpanded.serializedObject.ApplyModifiedProperties(); + } + return newvalue; + } + + /// + /// Creates a Foldout using a toggle with (GUIStyle)"Foldout") and a separate label. This is a workaround for 2019.3 foldout arrows not working. + /// + /// + /// + /// Returns the new isExpanded value. + public static bool Foldout(this bool isExpanded, GUIContent label) + { + var rect = EditorGUILayout.GetControlRect(); + bool newvalue = EditorGUI.Toggle(new Rect(rect) { xMin = rect.xMin + 2 }, GUIContent.none, isExpanded, (GUIStyle)"Foldout"); + EditorGUI.LabelField(new Rect(rect) { xMin = rect.xMin + 15 }, label); + return newvalue; + } + } + + + public class CleanUpDefinesOnPunDelete : UnityEditor.AssetModificationProcessor + { + public static AssetDeleteResult OnWillDeleteAsset(string assetPath, RemoveAssetOptions rao) + { + if ("Assets/Photon/PhotonUnityNetworking".Equals(assetPath)) + { + PhotonEditorUtils.CleanUpPunDefineSymbols(); + } + + return AssetDeleteResult.DidNotDelete; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/Unity/Editor/PhotonEditorUtils.cs.meta b/Assets/Photon/PhotonRealtime/Code/Unity/Editor/PhotonEditorUtils.cs.meta new file mode 100644 index 00000000..90d608f3 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Unity/Editor/PhotonEditorUtils.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 607340ca505d53d4f8e785423fac7964 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonRealtime/Code/Unity/PhotonAppSettings.cs b/Assets/Photon/PhotonRealtime/Code/Unity/PhotonAppSettings.cs new file mode 100644 index 00000000..66b57ebc --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Unity/PhotonAppSettings.cs @@ -0,0 +1,116 @@ +// ----------------------------------------------------------------------- +// +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_2017_4_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +#if !PHOTON_UNITY_NETWORKING + +namespace Photon.Realtime +{ + using System; + using System.IO; + using UnityEditor; + using UnityEngine; + /// + /// Collection of connection-relevant settings, used internally by PhotonNetwork.ConnectUsingSettings. + /// + /// + /// Includes the AppSettings class from the Realtime APIs plus some other, PUN-relevant, settings. + [Serializable] + [HelpURL("https://doc.photonengine.com/en-us/pun/v2/getting-started/initial-setup")] + public class PhotonAppSettings : ScriptableObject + { + [Tooltip("Core Photon Server/Cloud settings.")] + public AppSettings AppSettings; + + #if UNITY_EDITOR + [HideInInspector] + public bool DisableAutoOpenWizard; + //public bool ShowSettings; + //public bool DevRegionSetOnce; + #endif + + private static PhotonAppSettings instance; + + /// Serialized server settings, written by the Setup Wizard for use in ConnectUsingSettings. + public static PhotonAppSettings Instance + { + get + { + if (instance == null) + { + LoadOrCreateSettings(); + } + + return instance; + } + + private set { instance = value; } + } + + + + public static void LoadOrCreateSettings() + { + if (instance != null) + { + Debug.LogWarning("Instance is not null. Will not LoadOrCreateSettings()."); + return; + } + + + #if UNITY_EDITOR + // let's check if the AssetDatabase finds the file; aimed to avoid multiple files being created, potentially a futile step + AssetDatabase.Refresh(); + #endif + + // try to load the resource / asset (ServerSettings a.k.a. PhotonServerSettings) + instance = (PhotonAppSettings)Resources.Load(typeof(PhotonAppSettings).Name, typeof(PhotonAppSettings)); + if (instance != null) + { + //Debug.LogWarning("Settings from Resources."); // DEBUG + return; + } + + + // create it if not loaded + if (instance == null) + { + instance = (PhotonAppSettings)CreateInstance(typeof(PhotonAppSettings)); + if (instance == null) + { + Debug.LogError("Failed to create ServerSettings. PUN is unable to run this way. If you deleted it from the project, reload the Editor."); + return; + } + + //Debug.LogWarning("Settings created!"); // DEBUG + } + + // in the editor, store the settings file as it's not loaded + #if UNITY_EDITOR + string punResourcesDirectory = "Assets/Photon/Resources/"; + string serverSettingsAssetPath = punResourcesDirectory + typeof(PhotonAppSettings).Name + ".asset"; + string serverSettingsDirectory = Path.GetDirectoryName(serverSettingsAssetPath); + + if (!Directory.Exists(serverSettingsDirectory)) + { + Directory.CreateDirectory(serverSettingsDirectory); + AssetDatabase.ImportAsset(serverSettingsDirectory); + } + + AssetDatabase.CreateAsset(instance, serverSettingsAssetPath); + AssetDatabase.SaveAssets(); + + + //Debug.Log("Settings stored to DB."); // DEBUG + #endif + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/Unity/PhotonAppSettings.cs.meta b/Assets/Photon/PhotonRealtime/Code/Unity/PhotonAppSettings.cs.meta new file mode 100644 index 00000000..63c192e1 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/Unity/PhotonAppSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a389b614f52fbf347a1533dbbf245033 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/WebRpc.cs b/Assets/Photon/PhotonRealtime/Code/WebRpc.cs new file mode 100644 index 00000000..b0177e3a --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/WebRpc.cs @@ -0,0 +1,187 @@ +// ---------------------------------------------------------------------------- +// +// Loadbalancing Framework for Photon - Copyright (C) 2018 Exit Games GmbH +// +// +// This class wraps responses of a Photon WebRPC call, coming from a +// third party web service. +// +// developer@photonengine.com +// ---------------------------------------------------------------------------- + +#if UNITY_4_7 || UNITY_5 || UNITY_5_3_OR_NEWER +#define SUPPORTED_UNITY +#endif + + +namespace Photon.Realtime +{ + using System.Collections.Generic; + using ExitGames.Client.Photon; + + #if SUPPORTED_UNITY || NETFX_CORE + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClass = ExitGames.Client.Photon.SupportClass; + #endif + + + /// Reads an operation response of a WebRpc and provides convenient access to most common values. + /// + /// See LoadBalancingClient.OpWebRpc.
+ /// Create a WebRpcResponse to access common result values.
+ /// The operationResponse.OperationCode should be: OperationCode.WebRpc.
+ ///
+ public class WebRpcResponse + { + /// Name of the WebRpc that was called. + public string Name { get; private set; } + + /// ResultCode of the WebService that answered the WebRpc. + /// + /// 0 is: "OK" for WebRPCs.
+ /// -1 is: No ResultCode by WebRpc service (check ).
+ /// Other ResultCode are defined by the individual WebRpc and service. + ///
+ public int ResultCode { get; private set; } + [System.Obsolete("Use ResultCode instead")] + public int ReturnCode + { + get { return ResultCode; } + } + + /// Might be empty or null. + public string Message { get; private set; } + [System.Obsolete("Use Message instead")] + public string DebugMessage + { + get { return Message; } + } + + + /// Other key/values returned by the webservice that answered the WebRpc. + public Dictionary Parameters { get; private set; } + + /// An OperationResponse for a WebRpc is needed to read it's values. + public WebRpcResponse(OperationResponse response) + { + object value; + if (response.Parameters.TryGetValue(ParameterCode.UriPath, out value)) + { + this.Name = value as string; + } + + this.ResultCode = -1; + if (response.Parameters.TryGetValue(ParameterCode.WebRpcReturnCode, out value)) + { + this.ResultCode = (byte)value; + } + + if (response.Parameters.TryGetValue(ParameterCode.WebRpcParameters, out value)) + { + this.Parameters = value as Dictionary; + } + + if (response.Parameters.TryGetValue(ParameterCode.WebRpcReturnMessage, out value)) + { + this.Message = value as string; + } + } + + /// Turns the response into an easier to read string. + /// String resembling the result. + public string ToStringFull() + { + return string.Format("{0}={2}: {1} \"{3}\"", this.Name, SupportClass.DictionaryToString(this.Parameters), this.ResultCode, this.Message); + } + } + + + /// + /// Optional flags to be used in Photon client SDKs with Op RaiseEvent and Op SetProperties. + /// Introduced mainly for webhooks 1.2 to control behavior of forwarded HTTP requests. + /// + public class WebFlags + { + + public readonly static WebFlags Default = new WebFlags(0); + public byte WebhookFlags; + /// + /// Indicates whether to forward HTTP request to web service or not. + /// + public bool HttpForward + { + get { return (WebhookFlags & HttpForwardConst) != 0; } + set { + if (value) + { + WebhookFlags |= HttpForwardConst; + } + else + { + WebhookFlags = (byte) (WebhookFlags & ~(1 << 0)); + } + } + } + public const byte HttpForwardConst = 0x01; + /// + /// Indicates whether to send AuthCookie of actor in the HTTP request to web service or not. + /// + public bool SendAuthCookie + { + get { return (WebhookFlags & SendAuthCookieConst) != 0; } + set { + if (value) + { + WebhookFlags |= SendAuthCookieConst; + } + else + { + WebhookFlags = (byte)(WebhookFlags & ~(1 << 1)); + } + } + } + public const byte SendAuthCookieConst = 0x02; + /// + /// Indicates whether to send HTTP request synchronously or asynchronously to web service. + /// + public bool SendSync + { + get { return (WebhookFlags & SendSyncConst) != 0; } + set { + if (value) + { + WebhookFlags |= SendSyncConst; + } + else + { + WebhookFlags = (byte)(WebhookFlags & ~(1 << 2)); + } + } + } + public const byte SendSyncConst = 0x04; + /// + /// Indicates whether to send serialized game state in HTTP request to web service or not. + /// + public bool SendState + { + get { return (WebhookFlags & SendStateConst) != 0; } + set { + if (value) + { + WebhookFlags |= SendStateConst; + } + else + { + WebhookFlags = (byte)(WebhookFlags & ~(1 << 3)); + } + } + } + public const byte SendStateConst = 0x08; + + public WebFlags(byte webhookFlags) + { + WebhookFlags = webhookFlags; + } + } + +} diff --git a/Assets/Photon/PhotonRealtime/Code/WebRpc.cs.meta b/Assets/Photon/PhotonRealtime/Code/WebRpc.cs.meta new file mode 100644 index 00000000..8a235c93 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/WebRpc.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 294b0a24f6c841f48acf4bf696a4d764 +timeCreated: 1493901324 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Code/changes-realtime.txt b/Assets/Photon/PhotonRealtime/Code/changes-realtime.txt new file mode 100644 index 00000000..e1883504 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/changes-realtime.txt @@ -0,0 +1,401 @@ + +Photon Realtime C# Client - Changelog +Exit Games GmbH - www.photonengine.com - forum.photonengine.com + + +Version 4.1.6.17 (02. August 2022) + Added: DisconnectCause.ApplicationQuit. Can be used when your app disconnects on application quit: lbc.Disconnect(DisconnectCause.ApplicationQuit). + Note: The ConnectionHandler will use this to differentiate a regular disconnect from one that is triggered by Unity / app-quit. + +Version 4.1.6.16 (22. June 2022) + Fixed: Formatting issue in debug logs for WebGL exports. + Changed: Best Region selection. A weighted ping value is used now. Out of the 5 attempts, the worst is discarded (usually the first) and the best is counted in twice (it is the fastest). In WebGL, HTTP is used to ping servers and when a request didn't finish, the next attempt will be delayed a bit. + Changed: HTTP Ping class for Best Region selection in WebGL changed from Unity's WWW class to UnityWebRequest. + +Version 4.1.6.15 (10. June 2022) + Changed: Sharding / Clustering support. Clients will no longer connect to a random cluster by default. To do so, make sure to add "/*" to the region code, if your game supports sharding / multiple clusters. This is only done in very high CCU cases. + +Version 4.1.6.14 (26. April 2022) + Added: Warning log if SocketWebTcp could not be found at runtime in Unity WebGL exports. + +Version 4.1.6.11 (22. November 2021) + Changed: For Unity, PhotonEditorUtils.IsPrefab to use the correct prefab stage utility for Unity 2021.2 and up. + Added: CustomAuthenticationType.Epic to authenticate via Epic Online Services (EOS). + Added: CustomAuthenticationType.FacebookGaming to authenticate via Facebook Gaming services. + +Version 4.1.6.8 (12. October 2021) + Changed: CustomTypesUnity. The default Quaternion is now Quaternion.identity (which is a legit Quaterion, as opposed to the previously used new Quaternion). Added const values for each type's byte-size. + Added: Checks to avoid creating a player for actorNumber 0. + Added: CheckIfOpCanBeSent to OpJoinOrCreateRoom and OpRejoinRoom. Avoids changing state and repeating operation. + Removed: Surplus checks if the LoadBalancingPeer is non-null. This is done in CheckIfOpCanBeSent(), too. + +Version 4.1.6.7 (27. September 2021) + Replaced: Pointer_stringify with UTF8ToString in WebSocket.jslib. It was removed from newer Emscripten versions and is no longer working when exporting from Unity 2021.2. betas. Replaced with UTF8ToString. Tested in 2018.4.x and a current beta. + Fixed: Usage of websocketType for console. + +Version 4.1.6.6 (17. September 2021) + Removed: Usage of class EncryptorNative. This needs to be replaced by EncryptorNativeSource where the Native Socket Plugin should be used. + Changed: The Native Socket Plugin can also be used for UDP on Xbox (not in Editor). + Removed: CheckConnectSetupXboxOne() as platform requirements were turned into recommendations. + Changed: For Xbox, order of checked assemblies when getting Type SocketNativeSource. It's more likely to be in Assembly-CSharp. + +Version 4.1.6.5 (24. August 2021) + Updated: The default name server host to "ns.photonengine.io". When using WSS on this, it expects TLS1.2 (Win 7 and old Unity versions may not support this). + Fixed: Internally used OpJoinRoom() will now send custom room properties (all RoomOptions set) to the Master Server, too. This allows the Master Server to immediately find the room, even if property filtering is used. This was affecting matchmaking with OpJoinOrCreateRoom. + +Version 4.1.6.4 (26. July 2021) + Internal: Added PhotonEditorTools.HasFusion value and added AppSettings.AppIdFusion as well as ClientAppType.Fusion. + Added: ConnectionHandler.DisconnectAfterKeepAlive to let the fallback thread call Disconnect after the KeepAliveInBackground time. Default: false. + Changed: ConnectionHandler timer implementation to use a Stopwatch, which is a little more clear about what happens. PUN does not expose this value, so you need to set it in code (change the default). + Added: Hashtable specific extension methods StripKeysWithNullValues and StripToStringKeys which allocates less. + +Version 4.1.6.3 (06. July 2021) + Added: Handling of ErrorCode Invalid Operation (-2) for Authenticate requests. This becomes a DisconnectCause = OperationNotAllowedInCurrentState. + +Version 4.1.6.2 (17. June 2021) + Changed: The enumeration CustomAuthenticationType was changed to fix naming inconsistencies. Use PlayStation4 and PlayStation5 respectively. Old variants are available as obsolete. + +Version 4.1.6.0 (19. May 2021) + Changed: As tokenless auth is no longer allowed when using a Name Server, there is now an error log and authentication will not be done from the client. This is not happening in the normal workflow but a precaution to detect issues, should something unpredicted happen. + Changed: SupportLogger formatting of the timestamp to include the minutes (if available). Hours will not be logged (so in the logs, there is a wrap around of log-timestamps after 60 min). + +Version 4.1.5.4 (13. April 2021) + Changed: Connect-methods in the LoadBalancingClient now fail "early" when the peer is already connected. This prevents unintentional modifications of the state and auth token. + Added: The LoadBalancingClient will now check if the token is available when the AuthMode 'AuthOnce' or 'AuthOnceWss' require it. If it's not available, the client will log an error and prevent the connection attempt. If this happens, the client is already in a bad state and won't connect anyways. + +Version 4.1.5.3 (07. April 2021) + Fixed: Protocol Fallback will now connect correctly when a fixed region is set. + Changed: ConnectUsingSettings internally sets connectToBestRegion value, based on CloudRegion (equals appSettings.FixedRegion). This avoids pinging when a fixed region is set. Leads to callback OnDisconnected(InvalidRegion). + +Version 4.1.5.2 (12. March 2021) + Changed: Region pinging will now apply port overrides for the Master Server port for UDP and address-based pinging (in the address and the UDP pings). + Changed: The RegionHandler gets the override port from lbc.ServerPortOverrides.MasterServerPort. If it's 0, the default port 5055 is being used. + Changed: The LoadBalancingClient.ReplacePortWithAlternative is now static and internal and can be used by the RegionHandler. + Added: TargetFramework (of the used dll) to SupportLogger output. + Added: Room.GetPlayer() option to find the Master Client, if the id is 0 (which is commonly used as "owned/controlled by the room, so it requires the Master Client). + +Version 4.1.5.1 (09. March 2021) + Removed: Setting of protocol 1.6 when connecting directly to a Master Server. This was a workaround for older Photon Server SDKs. + Note: If you host Photon yourself, you can set the LoadBalancingClient.SerializationProtocol to SerializationProtocol.GpBinaryV16, before you connect. + Changed: OpLeaveRoom will now clear the GameServerAddress and private room-entering cache. This cleans the state and prevents accidental success for ReconnectAndRejoinRoom calls. + Changed: ReconnectToMaster will check if MasterServerAddress and authToken are known. These are minimum requirements to reconnect to the master (after a connection loss). + Added: CustomAuthenticationType.Playstation5 (value 12). + +Version 4.1.5.0 (23. February 2021) + Added: LoadBalancingClient.ClientType and related code. Defines which sort of AppId should be expected. The LoadBalancingClient supports Realtime and Voice app types. Default: Realtime. + Note: This allows using AppSettings for Voice and Realtime clients more easily. ConnectUsingSettings will pick the relevant appid with this info. + Moved: EncryptionDataParameters class to become an internal class of the LoadBalancingClient (it was not used outside of LBC). + Removed: Room.StorePlayer was trying to calculate the Master Client (and was wrong about it). This triggered a OnMasterClientSwitched() callback in some cases of rejoining a room. + +Version 4.1.4.9 (12. January 2021) + Internal: EncryptionMode.DatagramEncryptionGCMRandomSequence (12) with .DatagramEncryptionGCM (13). + Internal: TokenForInit is now an object instead of a string. This also affects the AuthenticationValues class. This enables the server to send a byte[], which is more effective than a string. + Changed: Exposed all RoomOptions in Room class. Room.PublishUserId, Room.DeleteNullProperties. + Changed: Room.AutoCleanUp can also be set from room options flag. + Internal: EnterRoomParams and OpJoinRoom now use a JoinMode (replacing EnterRoomParams.CreateIfNotExists and EnterRoomParams.RejoinOnly). + Fixed: Unity-specific CustomTypes.cs to actually only compile for Unity. + Updated: EncryptionMode.DatagramEncryptionGCMRandomSequence (12) with .DatagramEncryptionGCM in the LoadBalancingClient. + Added: Room.SetExpectedUsers() to let the server know who's also coming (or no longer coming). + +Version 4.1.4.8 (30. November 2020) + Added: Conditional compilation in methods which are only for UNITY_WEBGL and UNITY_XBOXONE. The code needed to compile for any platform, even though it should not run anywhere else. + Added: Support for UNITY_GAMECORE. + Added: Parameter checks for GetGameList (and PUN GetCustomRoomList). The operation is not sent unless the parameters are OK. + Added: SupportLogger.OnDestroy to be removed from callback targets. + Added: RoomOptions.SuppressPlayerInfo. It can be used to skip join and leave events as well as properties broadcasts in rooms. + +Version 4.1.4.7 (25. November 2020) + Fixed: It was possible to trigger multiple calls of Authenticate by calling ConnectToRegionMaster(region) multiple times while being connected to the Name Server. + Changed: AuthenticationValues.ToString() to expose less data while showing which values are set. + +Version 4.1.4.6 (17. November 2020) + Added: Unity-specific types will now be registered for de/serialization automatically (in Unity projects) using CustomTypesUnity (in LoadBalancingClient constructor). + Note: The Player class needs to reference the current room to deserialize, so it is not a serializable type in the Realtime API (but in PUN). Send the Player.ActorNumber instead and the receiver looks up the ActorNumber in the room. + Changed: The client will now call disconnect if any operation response has a ReturnCode == ErrorCode.OperationLimitReached. The resulting OnDisconnect callback gets the new DisconnectCause.DisconnectByOperationLimit value. + Added: DisconnectCause.DisconnectByDisconnectMessage. If the server has a "low level" reason to disconnect a client, it can now send a Disconnect Message with some debug info. The LoadBalancingClient will log this message as error and disconnect. When this gets used will be added to the docs. + Changed: The BroadcastProperties parameter is now always sent to the Game Server, no matter if there are properties. This fixes a recent issue where UserIds were not broadcast in rooms, if no other player properties were used (see v4.1.4.5 changes). + Changed: UseAlternativeUdpPorts is replaced by ServerPortOverrides, which allow configuration of ports per server (including using no override). + Changed: UseAlternativeUdpPorts is obsolete and no longer used. + Changed: LoadBalancingClient.NameServerPortOverride is now named NameServerPortInAppSettings, which is closer to what it resembles. It is overwritten by the ServerPortOverrides if the nameserver port is > 0 there. + Added: Struct PhotonPortDefinition. + Added: ReplacePortWithAlternative method to wrap up the replacement as per our address rules. + Changed: When the client does not connect initially and EnableProtocolFallback is enabled, the ServerPortOverrides are reset and the fallback protocol will use the default ports for the Name Server (defined per protocol). + Changed: ReconnectAndRejoin() no longer affects the value IsUsingNameServer. This is only about reconnecting. + Changed: ReconnectAndRejoin() was logging error-level messages for expected situations. Now, there are only warnings in the logs. You can simply check the return value, which is false on error (then you should connect again, as usual). + Internal: The pool type for paramDictionaryPool, which is used in OpRaiseEvent. It is now a ParameterDictionary, which will wrap some value-types into pooled objects. This helps avoid some memory allocation. + Internal: ParameterCode.Secret is now .Token to match the server naming. + Changed: Logging level when OpRaiseEvent fails due to leaving a room. It reports as INFO level, when leaving or disconnecting. + Added: Error log for Op Authenticate, if the client does not have a token to authenticate on a Master or Game Server. That token comes from the Name Server and should be automatically present and used. Note: The client will send the auth but may fail due to missing token. + Changed: LoadBalancingClient.Disconnect() now checks if the client was just created or is disconnecting already. Those cases won't trigger a callback, so there is no surplus attempt to disconnect the peer. Also, the State does not change. An INFO level debug message helps detect those cases. + +Version 4.1.4.5 (02. September 2020) + Added: Unity-only ConnectionHandler.StaticReset() to allow entering playmode without domain reload. + Added: ErrorCode definition for OperationLimitReached (32743). The client will become unable to call any further operations (to safeguard the room/server) and get disconnected soon after. Currently used for SetProperties only. + Fixed: Region pinging for the case that none of the regions answered anything. Then, all region results caused a callback. + Added: Support for rooms that suppress room-events. + Added: Field bool Room.SuppressRoomEvents to allow checking if room events are suppressed. + Changed: If room events are suppressed, the callbacks OnCreatedRoom() and OnJoinedRoom() are now called by the operation response (not waiting for the suppressed events). + Renamed: Room.SetRoomFlags() to InternalCacheRoomFlags(). + Changed: When entering a room, the local players NickName property (255) is not sent if NullOrEmpty. + Changed: LoadBalancingApi should not use Unity.Debug unconditionally. + Updated: AuthenticationValues reference slightly. Better wording. + Updated: Token setter to be protected internal. Only needs to be set by Photon LB API. + Fixed: Csproject files for Chat API and LoadBalancing API. The two projects now import the dll based on the current target framework (dynamic). + +Version 4.1.4.4 (6. July 2020) + Fixed: AppSettings.CopyTo method. It was not copying the new value EnableProtocolFallback yet. + Fixed: The date of version 4.1.4.3 in this changelog. + Updated: Error handling in PingWindowsStore. + +Version 4.1.4.3 (24. June 2020) + Added: Check that the Dev Region override is in the list of available regions (from Name Server). If not, the first available region is being used. + Changed: RegionPinger.Start() now attempts to use a ThreadPool WorkerItem to ping individual regions. Only if that fails, a separate managed Thread is used. This should help avoid running into Thread limits (if any). Builds for NETFX_CORE don't use this. + Changed: Error handling in PingMono. SocketExceptions were not handled entirely. + Changed: PhotonPingClasses is no longer used. It's empty and can be removed. + Changed: Handling of event LobbyStats in case of LoadBalancingPeer.UseByteArraySlicePoolForEvents. This relates to a new option in the PhotonPeer to use pooled memory (wrapped byte[] basically) when incoming events only contain a byte[]. See changes-library.txt and API reference. + Added: Initial puzzle pieces for WSS Proxy support. This is not yet funtional. To actually use the proxy settings, a special WebSocket implementation is needed. + Changed: The AppSettings.Port value is now also usable when connecting to a Name Server initially. This allows custom ports on a (custom) Name Server. + Added: Various details to the SupportLogger output. + Changed: Callback OnCreatedRoom() is now also triggered by the event Join. This is the same trigger as for JoinOrCreateRoom (if that created a new room). + Added: Player.HasRejoined value. This is set for the local and remote players and can help define the workflow on ReJoin. + Added: LoadBalancingClient.EnableProtocolFallback. If enabled, the client will try another protocol if the initial connect to the Name Server fails. + Added: AppSettings.EnableProtocolFallback with a default of true. Used in ConnectUsingSettings to set the client's value accordingly. + Internal: Added setting the LoadBalancingClient.Server in Connect and other places, so it should be accurate. + Added: Checks for connections on WebGL and Xbox One. Settings that can be corrected (to match the platform's requirements) are corrected with a log note. An Exception is thrown, if the settings can't be corrected automatically. This means Connect methods may throw an Exception in some cases, which are to be fixed during development time. + +Version 4.1.4.2 (8. May 2020 - rev5519) + Fixed: EventLeave handling. The IsInactive property is to false before doing the OnPlayerLeftRoom callback. + Note: Use Player.IsInactive to know the 'reason' for the callback. + +Version 4.1.4.0 (27. April 2020 rev5469) + Fixed: When connecting directly to a Master Server (self hosted), the serialization protocol 1.6 is used (not the detault 1.8). This was changed accidentally in v4.1.3.0 (and thus PUN 2.17). + Added: Connection state check in CheckIfOpCanBeSent() to fail early if an op can't be sent. + Updated: WebRPC handling and added an example to the doc of OnWebRpcResponse. + Added: Logging of OnJoinRoomFailed to SupportLogger. + Changed: StripKeysWithNullValues to reuse a list of key with null-values. This causes less allocations and garbage to clean. As a downside, the method now runs only for one thread (even for distinct IDictionary instances). This should not be a problem for the expected use case. + Changed: The LoadBalancingClient.OnStatusChanged will handle StatusCode.SendError as disconnect due to Exception. Log level INFO should log the inner exception when sending. + Fixed: Cleanup of the RoomReference for the local player object on disconnect. This prevents issues when setting properties, after joining and leaving a room (back on Master Server). + Internal: LoadBalancingClient.ExpectedProtocol is now a nullable property with private setter. It's used internally (only) to switch to the target transport protocol when Authmode AuthOnceWss is "done". + Fixed: EventLeave handling. When a player gets removed from the room, the IsInactive property must be set to false before doing the OnPlayerLeftRoom callback. Use Player.IsInactive to know the 'reason' for the callback. + +Version 4.1.3.0 (23.03.2020 rev5394) + Changed: Trying to set empty custom properties Hashtable will fail (return false) and log error. + Changed: In online mode, trying to set properties while not joined to a room will fail (return false) and log error. Caching local player properties could be allowed though. + Changed: Player.InternalCacheProperties is now "protected internal" and no longer "public". + Changed: LoadBalancingClient.OpSetPropertiesOfRoom is now "protected internal" and no longer "public". Use LoadBalancingClient.OpSetCustomPropertiesOfRoom or Room.SetCustomProperties. + Changed: StatusCode.EncryptionFailedToEstablish will cause disconnection with DisconnectCause.ExceptionOnConnect. + Changed: Fix for Unity cloud build context to prevent sanitization of server settings, it's not needed and for some reason doesn't detect the current server settings. + Changed: AppSettings. The NonSerialized attribute is now only used in Unity builds. + Changed: With the updated Photon library (v4.1.3.0), the encryption can be set to true on any connection, including WSS. It should not be used conditionally for Auth. + Changed: GetPingImplementation() new sets a default PhotonPingImplementation for UNITY_WEBGL, NETFX_CORE and regular Mono/.Net. + Internal: New datagram encryption mode DatagramEncryptionGCMRandomSequence (value 12). To be used later on. + Internal: The SocketWebTcp.SerializationProtocol is now selected by the PhotonSocket with the Peer's current value. It no longer needs to be set. + +Version 4.1.2.20 (12. December 2019 - rev5296) + Added: New callback IErrorInfoCallback.OnErrorInfo when the client receives an ErrorInfo event from the server. + Changed: RegionPinger use a singleton MonoBehaviourEmpty for coroutine ping in WebGL in Unity. + Added: LoadBalancingClient.SerializationProtocol property to get or set the binary protocol version. Use this always instead of setting it via LoadBalancingPeer.SerializationProtocolType. + Added: LoadBalancingClient.ConnectUsingSettings(AppSettings appSettings). This allows Best Region connect, setting a custom name server and much more. + Changed: Connect() is now ConnectToMasterServer(). Unlike ConnectUsingSettings(), this requires some settings to be done on the client. + Added: Return parameter for all methods that set properties on the server. + Note: Room.SetCustomProperties returns bool. If you did override this, your project will have errors, make sure to fix the return type. + Changed: Failed Authentication will no longer call the OnDisconnected callback twice. This should better align with expectations. + Internal: Pinging regions via coroutine (when Threads are unavailable) now uses only one GameObject for all pinging. + +Version 4.1.2.19 (12. November 2019 - rev5266) + Fixed: The ExpectedProtocol is now also set for Authmode "AuthOnce" for ConnectToNameServer and ConnectToRegionMaster. + Changed: Player.ToString() to show ActorNumber and NickName. The PlayerProperties are included in ToStringFull(). + Changed: Logging message for OpAuthenticateOnce (only logged at info level and up). + Changed: Avoiding a potential nullreference exception on leave of another player. + Updated: Cluster support. The LoadBalancingClient.CurrentCluster gives access to the current cluster. Region.SetCodeAndCluster() now separates the cluster string properly. See ConnectToRegionMaster, too. + Fixed: Changing the SupportLogger.Client now skips registering for callbacks, if the new value is null. + Changed: Logging of SupportLogger. + Added: LoadBalancingClient.OpJoinRandomOrCreateRoom. This can be used to create a room, should random matchmaking fail. This helps avoid race conditons where players can't find one another. + Added: Extra null-check in handling of event leave. + +Version 4.1.2.17 (9. August 2019 - rev5188) + Changed: SupportLogger. Traffic stats are enabled by default. The PhotonHandler no longer has to enable this. + Added: Min/max ping to logged statistics. SupportLogger.TrackValues is invoked to keep track of min/max ping for each connection. + Fixed: Statistics logging is started on Connect and stopped OnDisconnected(). + Changed: Callback registration. + Changed: All callback target changes are now queued in one queue and executed in order. This avoids cases where our implementation defined if a callback got added or removed, when a target got added and removed. + Changed: Duplicate addition and removal is now prevented. + Changed: The callback containers now know and use the LoadBalancingClient to update the targets. This means they don't need lists for additions and removals anymore. + Changed: Events will now also update the callback targets before executing the event callback. + Changed: WebRpcCallbacksContainer is now also a List like the other containers. This is simpler to maintain. The only "custom" callback implementation is that for events. This was an event delegate before and remains one. No change for this. + Changed: The callbacks to OnDisconnected(reason). On timeout or exception, there is now only one callback which happens after the client/peer is actually disconnected. The peer's status changes (timeout, etc.) are used to identify the reason but don't cause a callback on their own. Previously, you could run into more than one OnDisconnected call and fail to reconnect in the first one. + Changed: There are now fewer calls of OnDisconnected(). Example: A timeout disconnect caused two calls because signalled the timeout and the second signalled when the client locally finished disconnecting. Now, the DisconnectCause stores the reason and there is only one callback. + Changed: Internal use of DisconnectCause. It's now set in LBC.Disconnect() and by errors from the Peer. It's reset to "None" before calls to Peer.Connect(). + Removed: DisconnectCause enum values that were obsolete already. DisconnectByServerUserLimit is now MaxCcuReached. TimeoutDisconnect is now ClientTimeout. DisconnectByServer is now ServerTimeout. + Changed: OnStatusChanged() case Disconnect always sets the CurrentRoom to null. It is no longer used to store the roomname from the Master Server to use on the Game Server. + Removed: LoadBalancingClient.didAuthenticate, which is no longer needed for the cleaned up logic. + Changed: WebRpcResponse.ReturnCode -> ResultCode and WebRpcResponse.DebugMessage -> Message. + Changed: AuthenticationValues.ToString() to include more useful info. + Changed: Execution order for disconnect on quit. As OnApplicationQuit is followed by OnDisable, PUN now disconnects in OnDisable, if OnApplicationQuit was called previously. This means that you can now send a final message in OnApplicationQuit. It's not guaranteed to arrive anywhere, as the message won't be repeated on loss. + Removed: PhotonHandler.OnDestroy which was not needed anymore. OnDisable is also called when the app quits, so it's adequate to tear down the thread there. + Removed: Outdated and unused PingMonoEditor. + Changed: Random ID for each ping is now truly randomized. + Changed: Region pinging result logging. Per region, all rtts are available, as well as a previous summary (if any). Pun gets it via RegionHandler.GetResults(). + +Version 4.1.2.15 (7. June 2019 - rev5137) + Added: Options for OpFindFriends to filter which rooms should be returned by the server. The default is the same as before but now the friend list may exclude rooms which are not yet on the game server, invisible, closed (or any combination). + Added: SimulateConnectionLoss(bool) to simplify testing of connection loss. This uses the built-in network simulation to get a client timeout disconnect. + Removed: EventExt class, which only contained obsolete methods. + +Version 4.1.2.14 (6. May 2019 - rev5097) + Changed: Realtime API changes are now listed in a separate changes file. + Updated: Demos to make use of Sender and CustomData. + +Version 4.1.2.13 (3. May 2019 - rev5086) + Changed: Renamed ClientState items which ended on "Gameserver" and "Masterserver" to using PascalCase "GameServer" and "MasterServer". The previous names are obsolete to ease upgrading this, if needed. + Updated: Checks if any given operation can be sent (to the currently connected server) or not. As not all operations are available on all server types, this may help avoid some mismatches. + Fixed: BroadcastPropsChangeToAll is applied correctly (it wasn't used properly, when false). + Fixed: When in offline mode, OpSetPropertiesOfActor does not get called (it failed due to not being connected). + +Version 4.1.2.11 (15. April 2019 - rev5043) + Changed: InLobby property is now checking the State == JoinedLobby, which is analog to InRoom. + Changed: IsConnectedAndReady is now also false for ClientState.DisconnectingFromGameserver, DisconnectingFromMasterserver and DisconnectingFromNameServer. + Changed: GetGameList check if the filter is null or empty. It's not sent for empty filters. + Added: Nintendo Switch as CustomAuthenticationType. + +Version 4.1.2.10 (11. March 2019 - rev5023) + Changed: The cached "best region" is cleared whenever a region's pinging finishes. This fixes a potential issue when the BestRegion value is used before the pinging is done. Then, you end up with a wrong selection. + Changed: PhotonPing now reuses the Socket per region. + Changed: The RegionHandler now checks #if PING_VIA_COROUTINE to use a coroutine instead of a thread (per region). This is for WebGL exports from Unity. + Changed: The SupportLogger now uses a Stopwatch to log the time (not depending on Unity's APIs). + +Version 4.1.2.1 (31. July 2018 - rev4787) + Changed: OnStateChangeAction is now named StateChanged and provides a "previous state" value. State changes only trigger the event-call when the value actually changes. + Renamed: OnEventAction to EventReceived and OnOpResponseAction to OpResponseReceived. + Added: LoadBalancingClient now has AddCallbackTarget and RemoveCallbackTarget to simplify registering for various callbacks. + +Version 4.1.2.0 (3. May 2018 - rev4660) + Changed: The namespace to the simpler "Photon.Realtime". + Added: Various callbacks to signal specific situations / events. To get those, a class must implement the interface and be added to a list of "Targets". See: ILoadBalancingCallbacks. + Added: RegionHandler, which provides methods to ping a list of regions and to find the one with best ping. This moves PUN's "Best Region" feature to the LoadBalancing API. + Moved: The PhotonPing was part of the dll but is now part of LoadBalancing. + Added: LoadBalancingClient.UseAlternativeUdpPorts. This way, UDP may use ports of the Steam Multiplayer port-range by simply replacing existing port strings in addresses. + Changed: RaiseEvent now has an overload, that uses RaiseEventOptions and SendOptions. The old variant is obsolete but will still work. + Changed: CheckUserOnJoin is now set by default. The RoomOptions.CheckUserOnJoin got removed. + Added: Client-side checks and limits for OpFindFriends. + Added: Optional parameter sendAuthCookie to OpLeaveRoom. The app can control what's passed from Photon to a server via WebHook. + Changes: The room list for lobbies is no longer part of the LoadBalancingClient. Instead, implement the callback for the changed room list. + Added: AppSettings, a base class to host AppId and some settings for a title. This will help make it available across products. Right now, the LoadBalancingClient is not using it yet. + Changed: Player.ID is now .ActorNumber, which mirrors the server's naming. + Fixed: Unity compile defines to support Unity 2018, + +Version 4.1.1.18 (19. December 2017 - rev4540) + Changed: FriendInfo.Name is now "UserId", which is up to date with it's usage. + Changed: CheckUserOnJoin is now set by default. The RoomOptions.CheckUserOnJoin got removed. + +Version 4.1.1.17 (11. October 2017 - rev4465) + Changed: OperationCode const byte Join = 255 is now marked obsolete. We use "JoinGame" instead. + Added: DisconnectCause.AuthenticationTicketExpired. + Fixed: DebugReturn call in Unity WebGL. + +Version 4.1.1.15 (17. July 2017 - rev4232) + Added: LoadBalancingClient.TransportProtocol as shortcut to the use PhotonPeer's TransportProtocol value. This enables setting the protocol easily while not connected. + Added: LoadBalancingClient.SocketImplementationConfig as shortcut to modify PhotonPeer's SocketImplementationConfig. This enables you to setup which IPhotonSocket implementation to use for which network protocol. + Changed: LoadBalancingPeer.ConfigUnitySockets() to try to find our websocket implementations in the assembly, making the SocketWebTcpCoroutine and SocketWebTcpThread classes optional. + Removed: Class "SocketWebTcp" is no longer found by ConfigUnitySockets(). + +Version 4.1.1.14 (5. July 2017 - rev4191) + Changed: The ClientState "Uninitialized" is now "PeerCreated". This is the initial state. ConnectedToMaster is now ConnectedToMasterserver (both use the same value). + Updated: ClientState values descriptions. + Internal: GameEnteredOnGameServer() first sets the local player's actorNumber, then updates the player lists. + +Version 4.1.1.8 (24. February 2017 - rev3873) + Added: Player.UserId field and code to read published UserIds from the player properties in CacheProperties(). When publishing the UserId in a room (RoomOptions.PublishUserId = true), the UserId becomes available for all players in a room. Good to find/make friends or follow a team player into another room. + Added: New matchmaking operation: OpGetGameList(typedLobby, sqlFilter). This fetches a list of rooms that match the filter. You can show lists of rooms with specific properties, if needed (or still use OpJoinRandom). + Fixed: WebFlags properties setters. + +Version 4.1.1.7 (16. December 2016) + Fixed: Demos with persistent (Turnbased) games. The Memory Demo was not setting up rooms correctly (which led to errors joining them) and used a "join" rather than a "rejoin" to get into saved games (getting added to the room once more). + +Version 4.1.1.6 (9. December 2016 - rev3801) + Added: OpJoinRandom will now "remember" to send ExpectedUsers to the Game Server (by caching the value). + Added: AuthEvent and it's handling. This (internally sent) event can now update the client's token anytime (before that expires). + Added: LoadBalancingClient.OpChangeGroups(). + Changed: LoadBalancingClient.Disconnect() no longer sets it's own State to Disconnected. It waits till the state-change callback gets called by the lib. + +Version 4.1.1.2 (13. September 2016 - rev3652) + Removed: LoadBalancingClient.PlayerName and Player.Name. Were obsolete for more than a year. There is a NickName and the UserId can be set in the AuthValues. + Removed: OpJoinRoom() overload with actorNumber. This was obsolete. To enable clients to return to a room, set AuthValues and a userID. + Changed: LoadBalancingClient no longer overrides the protocol for Unity WebGL. This is done in the LoadBalancingPeer.ConfigUnitySockets(). + Changed: GetNameServerAddress() is the same in Chat and LoadBalancing APIs now. + Added: DisconnectCause.DisconnectByServerLogic and handling for this case. You can check this DisconnectedCause when the LoadBalancingClient.State is ClientState.Disconnected. + Added: Hashtable definition to use Photon's own implementation for Windows Store builds (NETFX_CORE). This must be used but it means you to use the same Hashtable definition in all builds (no matter if 8.1 or 10). + Added: Support for WebGL export in Unity. + Changed: OnStateChangeAction, OnEventAction and OnOpResponseAction are now events. To register a method in one of those, use += and to deregister you need to use -=. This prevents assigning a new method and de-registering any previously registered ones. + +Version 4.1.1.0 (15. August 2016 - rev3536) + Fixed: Room.ClearExpectedUsers() is now sending it's current, local "expected users" to update the server with "CAS" (Check and Swap). This gives the client an update when the values become valid (which updates the local cache after the roundtrip). + Added: Support for the 'Server Side Master Client' feature. The Room will read master client updates from the server accordingly. Room.SetMasterClient() enables you to override the server's selection (provided it did not change before your operation gets executed). + Changed: Option for bool WebForward into the new "WebFlags". This allows fine control of which data is being sent to WebHooks. This affects all SetProperties, OpWebRPC and the RaiseEventOptions. + Added: WebRPC.cs to the LoadBalancing API folder (was available separately before). It contains WebFlags and WebRpcResponse. + +Version 4.1.0.6 (21. June 2016 - rev3376) + Fixed: LoadBalancingPeer.OpRaiseEvent(...) to send operations (and events) unencrypted again. + +Version 4.1.0.2 (21. April 2016 - rev3283) + Added: Expected Users. This affects the Room, LoadBalancingClient, JoinRoom, JoinOrCreateRoom and CreateRoom. + Added: null check in Extensions.StripToStringKeys(). + Fixed: FriendInfo.IsInRoom, which returned the opposite of it's naming! Also changed FriendInfo ToString() according to PUN's. + Added: RoomInfo expectedUsersField, which is updated with room properties (well known ones). + Added: Room.ExpectedUsers and ClearExpectedUsers() to expose the list of expected players. + Added: RoomInfo.serverSideMasterClient and masterClientIdField (also updated with well known properties). + Changed: OpRaiseEvent now re-uses a Dictionary in the LoadBalancingPeer. It uses Clear(), rather than creating a new Dict each time. + Changed: AuthenticationValues to also use C# properties and and backup-fields. This is guaranteed to work in Unity. + Updated: EventCode ErrorInfo reference with a link to "WebHooks" doc online. + Changed: Disconnect handling in the LoadBalancingClient. The client should reset correctly and log info, if it's in a State where a disconnect is a proper error. Note: In some cases like "switching server", a disconnect is expected, so it's not an error then. + Fixed: PlayerProperties sent to game server will now include well-known properties again. This fixes the "NickName missing" bug. + Fixed: LoadBalancingClient.State value when the client fails to join or create a game on the Master Server. The state is correctly re-set to ClientState.JoinedLobby or ClientState.ConnectedToMaster. + Internal: Added private inLobby value, to store if the client was/is in a lobby on the Master Server. + Fixed: DemoClient (in demo-loadbalancing) now makes use of the Name Server by using: ConnectToRegionMaster("eu"). + Added: DemoClient now has debug output when the connection times out or can't be established. + +Version 4.0.5.1 (18. January 2016 - rev3187) + Added: OpSetCustomPropertiesOfActor() and OpSetCustomPropertiesOfRoom() now check locally, if the client is currently in a room. It must be, to be able to set these properties. An exception exists for setting properties for the local player's actorNumber, but those are better set via LoadBalancingClient.LocalPlayer. + +Version 4.0.0.11 (28. October 2015 - rev3093) + Added: LeaveLobby handling in OnOperationResponse(), which sets the client's state correctly. + Changed: Order of execution for Ev Join. If user is known (inactive user rejoins), the player's props are read. The actor list is used, if available. + Changed: RoomOptions to use properties with backup-fields to avoid issues in Unity which has issues with Object Initializer (curly brackets). + Changed: JoinMode 2 is now "JoinOrRejoin". Was: "Rejoin". + Added: ErrorCode constant AuthenticationTicketExpired. + Internal: OpJoinRoom, OpCreateRoom and OpJoinRandomRoom no longer use a (growing) list of properties. Instead, classes were created to "sum up" their parameters. The api for games didn't change. + Internal: Related to the refactoring of Join/Create, the LoadBalancingClient now creates a Room instance when the client arrived on the GameServer (before, it got created in the initial "create" call). + +Version 4.0.0.10 (14. July 2015 - rev2988) + Updated: Description for IsConnectedAndReady. + Changed: NameServerAddress to return a fitting address depending on protocol (including WebSocket but not yet RHTTP). + Updated: The only name server host is now "ns.exitgames.com", which gets turned into a proper address by protocol. + Changed: LoadBalancingClient.CustomAuthenticationValues is now .AuthValues. You can use those values to identify a user, even if you don't setup an external, custom authentication service. + Changed: LoadBalancingClient.UserId no longer directly stores the id but puts it into AuthValues. This means, the UserId could also be set via setting AuthValues. + Changed: The API of AuthenticationValues. There is now the UserId and AddAuthParameter() replaces the less general SetAuthParameters() (which only set specific key/values). + Changed: PlayerName gets renamed to NickName, so PhotonPlayer.Name becomes .NickName and LoadBalancingClient.Name becomes .NickName, too. The old naming is marked as obsolete. + Changed: Particle Demo now connects to the Cloud by default (because it's easier to setup and try). You can define your own Master Server (Photon OnPremise) of course. + Added: GamePropertyKey.MasterClientId (248) and ParameterCode.MasterClientId (203) + Added: ParameterCode.ExpectedValues (231) + Added: ParameterCode.SuppressRoomEvents (237) + +Version 4.0.0.6 (05. December 2014 - rev2758) + Added: LoadBalancingClient.OpJoinOrCreateRoom overload which has lobby as parameter. If a room gets created, this defines in which lobby it belongs. + Changed: LoadBalancingPeer: Added new error code PluginMismatch, documentation for Plugins parameter code. + +Version 4.0.0.1 (17. June 2014 - rev2663) + Added: LoadBalancingClient.OpRaiseEvent(). Now that LoadBalancingClient USES a loadBalancingPeer (and doesn't extend it), things are much easier by offering this method, too! + Added: LoadBalancingClient.IsConnected and .IsConnectedAndReady to LB API. Going to be part of the API from now on. + Removed: Unused fields clientId and clientCount. + Changed: Field for internal use "lastJoinActorNumber" is now private as intended. + Changed: LoadBalancingClient.Disconnect is now setting it's own state to Disconnected if the connection got closed (as expected). + +Version 4.0.0.0 (23. May 2014 - rev2614) + Changed: LoadBalancingClient.FriendList creation/update is delayed until the server's response is available. This avoids cases where the friends are offline for the moment between requesting the update and getting it. Initially, it is null as before. + Added: some methods to Player to find next player, etc. Useful for turnbased games to find an opponent. + Added: LoadBalancingClient.UserId, which is the ID of a user(account). This is used in FindFriends and when you fetch account-related data (like save-games for Turnbased games). Set it before Connect*(). As fallback when empty during connect, the PlayerName is used instead. + Removed: LoadBalancingPeer.OpSetCustomPropertiesOfActor and OpSetPropertyOfRoom which were too special to be so low level. Could be implemented to LBClient. + Fixed: OpJoinRandomRoom and OpCreateRoom which didn't reset the ActorNr to claim when entering the room. Depending on previous actions, some calls of those methods did fail when the actorNumber wasn't available. + Changed: OperationCode.Rpc is now called OperationCode.WebRpc. It's simply much cleaner (considering PUN has RPCs as well but in a different context). + Changed: WebRpcResponse reading to be able to handle additional data. + Added: Parameter webForward to: OpSetCustomPropertiesOfRoom and OpSetPropertiesOfRoom. The "old" overloads of these methods are still there, too. If webForward is true, the properties are sent to the WebHooks. \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Code/changes-realtime.txt.meta b/Assets/Photon/PhotonRealtime/Code/changes-realtime.txt.meta new file mode 100644 index 00000000..4e58ca30 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Code/changes-realtime.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 530dcba8d8fbbc24a8894ca925cadd8a +timeCreated: 1558358700 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Demos.meta b/Assets/Photon/PhotonRealtime/Demos.meta new file mode 100644 index 00000000..efe46cec --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Demos.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5456c843f3eadef4f86166dc7f3ab583 +folderAsset: yes +timeCreated: 1523527335 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing.meta b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing.meta new file mode 100644 index 00000000..f743f6a5 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 32dc3abb17a2b434a9b7b347bdbea7b3 +folderAsset: yes +timeCreated: 1513266233 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/ConnectAndJoinRandomLb.cs b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/ConnectAndJoinRandomLb.cs new file mode 100644 index 00000000..996e1752 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/ConnectAndJoinRandomLb.cs @@ -0,0 +1,145 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Prototyping / sample code for Photon Realtime. +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using System.Collections.Generic; +using ExitGames.Client.Photon; +using UnityEngine; +using UnityEngine.UI; + +namespace Photon.Realtime.Demo +{ + public class ConnectAndJoinRandomLb : MonoBehaviour, IConnectionCallbacks, IMatchmakingCallbacks, ILobbyCallbacks + { + [SerializeField] + private AppSettings appSettings = new AppSettings(); + private LoadBalancingClient lbc; + + private ConnectionHandler ch; + public Text StateUiText; + + public void Start() + { + this.lbc = new LoadBalancingClient(); + this.lbc.AddCallbackTarget(this); + + if (!this.lbc.ConnectUsingSettings(appSettings)) + { + Debug.LogError("Error while connecting"); + } + + this.ch = this.gameObject.GetComponent(); + if (this.ch != null) + { + this.ch.Client = this.lbc; + this.ch.StartFallbackSendAckThread(); + } + } + + public void Update() + { + LoadBalancingClient client = this.lbc; + if (client != null) + { + client.Service(); + + + Text uiText = this.StateUiText; + string state = client.State.ToString(); + if (uiText != null && !uiText.text.Equals(state)) + { + uiText.text = "State: " + state; + } + } + } + + + public void OnConnected() + { + } + + public void OnConnectedToMaster() + { + Debug.Log("OnConnectedToMaster"); + this.lbc.OpJoinRandomRoom(); // joins any open room (no filter) + } + + public void OnDisconnected(DisconnectCause cause) + { + Debug.Log("OnDisconnected(" + cause + ")"); + } + + public void OnCustomAuthenticationResponse(Dictionary data) + { + } + + public void OnCustomAuthenticationFailed(string debugMessage) + { + } + + public void OnRegionListReceived(RegionHandler regionHandler) + { + Debug.Log("OnRegionListReceived"); + regionHandler.PingMinimumOfRegions(this.OnRegionPingCompleted, null); + } + + public void OnRoomListUpdate(List roomList) + { + } + + public void OnLobbyStatisticsUpdate(List lobbyStatistics) + { + } + + public void OnJoinedLobby() + { + } + + public void OnLeftLobby() + { + } + + public void OnFriendListUpdate(List friendList) + { + } + + public void OnCreatedRoom() + { + } + + public void OnCreateRoomFailed(short returnCode, string message) + { + } + + public void OnJoinedRoom() + { + Debug.Log("OnJoinedRoom"); + } + + public void OnJoinRoomFailed(short returnCode, string message) + { + } + + public void OnJoinRandomFailed(short returnCode, string message) + { + Debug.Log("OnJoinRandomFailed"); + this.lbc.OpCreateRoom(new EnterRoomParams()); + } + + public void OnLeftRoom() + { + } + + + /// A callback of the RegionHandler, provided in OnRegionListReceived. + /// The regionHandler wraps up best region and other region relevant info. + private void OnRegionPingCompleted(RegionHandler regionHandler) + { + Debug.Log("OnRegionPingCompleted " + regionHandler.BestRegion); + Debug.Log("RegionPingSummary: " + regionHandler.SummaryToCache); + this.lbc.ConnectToRegionMaster(regionHandler.BestRegion.Code); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/ConnectAndJoinRandomLb.cs.meta b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/ConnectAndJoinRandomLb.cs.meta new file mode 100644 index 00000000..206b9301 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/ConnectAndJoinRandomLb.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 72e8756202d0dfc488140c228938043b +timeCreated: 1510583920 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/DemoLoadBalancing-Scene.unity b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/DemoLoadBalancing-Scene.unity new file mode 100644 index 00000000..ad84155a --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/DemoLoadBalancing-Scene.unity @@ -0,0 +1,711 @@ +%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: 8 + 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: 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} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 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 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &383751291 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 383751293} + - component: {fileID: 383751292} + 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 &383751292 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 383751291} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + 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_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &383751293 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 383751291} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &572142180 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 572142185} + - component: {fileID: 572142184} + - component: {fileID: 572142182} + - component: {fileID: 572142181} + 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 &572142181 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 572142180} + m_Enabled: 1 +--- !u!124 &572142182 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 572142180} + m_Enabled: 1 +--- !u!20 &572142184 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 572142180} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.92782223, g: 0.941594, b: 0.9632353, a: 0.019607844} + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &572142185 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 572142180} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1200790913 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1200790914} + - component: {fileID: 1200790916} + - component: {fileID: 1200790915} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1200790914 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1200790913} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1364508574} + m_RootOrder: 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: -20} + m_SizeDelta: {x: 0, y: 60} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1200790915 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1200790913} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.13235295, g: 0.13235295, b: 0.13235295, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 4a4df204c321f9c40b0dbfb1baaffb4c, type: 3} + m_FontSize: 35 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 300 + m_Alignment: 1 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Demo Realtime +--- !u!222 &1200790916 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1200790913} +--- !u!1 &1235673705 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1235673708} + - component: {fileID: 1235673707} + - component: {fileID: 1235673706} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1235673706 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1235673705} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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 &1235673707 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1235673705} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 5 +--- !u!4 &1235673708 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1235673705} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1302440785 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1302440786} + - component: {fileID: 1302440788} + - component: {fileID: 1302440787} + m_Layer: 5 + m_Name: State Txt + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1302440786 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1302440785} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1364508574} + m_RootOrder: 2 + 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: -150} + m_SizeDelta: {x: 0, y: 30} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1302440787 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1302440785} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.13235295, g: 0.13235295, b: 0.13235295, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 4a4df204c321f9c40b0dbfb1baaffb4c, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'State: n/a' +--- !u!222 &1302440788 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1302440785} +--- !u!1 &1337127108 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1337127110} + - component: {fileID: 1337127109} + - component: {fileID: 1337127111} + m_Layer: 0 + m_Name: Scripts + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1337127109 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1337127108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 72e8756202d0dfc488140c228938043b, type: 3} + m_Name: + m_EditorClassIdentifier: + appSettings: + AppIdRealtime: + AppIdChat: + AppIdVoice: + AppVersion: + UseNameServer: 1 + FixedRegion: + Server: + Port: 0 + Protocol: 0 + AuthMode: 0 + EnableLobbyStatistics: 0 + NetworkLogging: 1 + StateUiText: {fileID: 1302440787} +--- !u!4 &1337127110 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1337127108} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1337127111 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1337127108} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f0b3ce6748186d3468e0dbaecb38b04c, type: 3} + m_Name: + m_EditorClassIdentifier: + KeepAliveInBackground: 5000 + ApplyDontDestroyOnLoad: 1 +--- !u!1 &1364508570 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1364508574} + - component: {fileID: 1364508573} + - component: {fileID: 1364508572} + - component: {fileID: 1364508571} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1364508571 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1364508570} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1364508572 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1364508570} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1364508573 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1364508570} + 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 &1364508574 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1364508570} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1200790914} + - {fileID: 1423237584} + - {fileID: 1302440786} + m_Father: {fileID: 0} + m_RootOrder: 3 + 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 &1423237583 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1423237584} + - component: {fileID: 1423237586} + - component: {fileID: 1423237585} + m_Layer: 5 + m_Name: Info + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1423237584 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1423237583} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1364508574} + m_RootOrder: 1 + 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: -60} + m_SizeDelta: {x: 0, y: 90} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1423237585 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1423237583} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.13235295, g: 0.13235295, b: 0.13235295, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 4a4df204c321f9c40b0dbfb1baaffb4c, type: 3} + m_FontSize: 16 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "This very simple demo shows how to directly use the Realtime API.\r\nOn + play, the state will cycle through various values and finish with \"Joined\".\r\nAt + that point, your game logic should kick in." +--- !u!222 &1423237586 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1423237583} diff --git a/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/DemoLoadBalancing-Scene.unity.meta b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/DemoLoadBalancing-Scene.unity.meta new file mode 100644 index 00000000..5a8b0ced --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/DemoLoadBalancing-Scene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a73b0cac1a73cc346aaeb5f8dd0b53f1 +timeCreated: 1513264275 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/Jura-Medium-LB.ttf b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/Jura-Medium-LB.ttf new file mode 100644 index 00000000..acaa33e0 Binary files /dev/null and b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/Jura-Medium-LB.ttf differ diff --git a/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/Jura-Medium-LB.ttf.meta b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/Jura-Medium-LB.ttf.meta new file mode 100644 index 00000000..4a3d5ad1 --- /dev/null +++ b/Assets/Photon/PhotonRealtime/Demos/DemoLoadBalancing/Jura-Medium-LB.ttf.meta @@ -0,0 +1,20 @@ +fileFormatVersion: 2 +guid: 4a4df204c321f9c40b0dbfb1baaffb4c +timeCreated: 1533028308 +licenseType: Store +TrueTypeFontImporter: + serializedVersion: 3 + fontSize: 16 + forceTextureCase: -2 + characterSpacing: 1 + characterPadding: 0 + includeFontData: 1 + fontNames: [] + fallbackFontReferences: + - {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + customCharacters: + fontRenderingMode: 0 + ascentCalculationMode: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking.meta b/Assets/Photon/PhotonUnityNetworking.meta new file mode 100644 index 00000000..bb50e895 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d2b6672cc770a19438ff06fcb2637630 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code.meta b/Assets/Photon/PhotonUnityNetworking/Code.meta new file mode 100644 index 00000000..7bb5219e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9a312e4dbb5268d4e859200f68478e0c +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/CustomTypes.cs b/Assets/Photon/PhotonUnityNetworking/Code/CustomTypes.cs new file mode 100644 index 00000000..3a6b993b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/CustomTypes.cs @@ -0,0 +1,74 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Sets up support for Unity-specific types. Can be a blueprint how to register your own Custom Types for sending. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEngine; + using Photon.Realtime; + using ExitGames.Client.Photon; + + + /// + /// Internally used class, containing de/serialization method for PUN specific classes. + /// + internal static class CustomTypes + { + /// Register de/serializer methods for PUN specific types. Makes the type usable in RaiseEvent, RPC and sync updates of PhotonViews. + internal static void Register() + { + PhotonPeer.RegisterType(typeof(Player), (byte) 'P', SerializePhotonPlayer, DeserializePhotonPlayer); + } + + + #region Custom De/Serializer Methods + + public static readonly byte[] memPlayer = new byte[4]; + + private static short SerializePhotonPlayer(StreamBuffer outStream, object customobject) + { + int ID = ((Player) customobject).ActorNumber; + + lock (memPlayer) + { + byte[] bytes = memPlayer; + int off = 0; + Protocol.Serialize(ID, bytes, ref off); + outStream.Write(bytes, 0, 4); + return 4; + } + } + + private static object DeserializePhotonPlayer(StreamBuffer inStream, short length) + { + if (length != 4) + { + return null; + } + + int ID; + lock (memPlayer) + { + inStream.Read(memPlayer, 0, length); + int off = 0; + Protocol.Deserialize(out ID, memPlayer, ref off); + } + + if (PhotonNetwork.CurrentRoom != null) + { + Player player = PhotonNetwork.CurrentRoom.GetPlayer(ID); + return player; + } + return null; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/CustomTypes.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/CustomTypes.cs.meta new file mode 100644 index 00000000..82e3a5cd --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/CustomTypes.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ab517bd36a2b2504b83979fcad45d4a2 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor.meta new file mode 100644 index 00000000..6f60006f --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e14293cef01c2f742a605d63babcb803 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIcon.png b/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIcon.png new file mode 100644 index 00000000..429019e6 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIcon.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIcon.png.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIcon.png.meta new file mode 100644 index 00000000..b4ef0c59 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIcon.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: d1228d93299ce47a8a5ac1a33513aeaf +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: WebGL + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIconPro.png b/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIconPro.png new file mode 100644 index 00000000..8a9bd219 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIconPro.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIconPro.png.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIconPro.png.meta new file mode 100644 index 00000000..dd272b85 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/CopyIconPro.png.meta @@ -0,0 +1,116 @@ +fileFormatVersion: 2 +guid: 81b8e0c5ffa3345b7aa3af3a2c0257ce +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 0 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 2 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Standalone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: iPhone + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: Android + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - buildTarget: WebGL + maxTextureSize: 32 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs new file mode 100644 index 00000000..6baf51de --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs @@ -0,0 +1,856 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// MenuItems and in-Editor scripts for PhotonNetwork. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; + +using UnityEditor; +using UnityEditor.Callbacks; +using UnityEditor.Compilation; +using UnityEngine; + +namespace Photon.Pun +{ + using Realtime; + + + public class PunWizardText + { + public string WindowTitle = "PUN Wizard"; + public string SetupWizardWarningTitle = "Warning"; + public string SetupWizardWarningMessage = "You have not yet run the Photon setup wizard! Your game won't be able to connect. See Windows -> Photon Unity Networking."; + public string MainMenuButton = "Main Menu"; + public string SetupWizardTitle = "PUN Setup"; + public string SetupWizardInfo = "Thanks for importing Photon Unity Networking.\nThis window should set you up.\n\n- To use an existing Photon Cloud App, enter your AppId.\n- To register an account or access an existing one, enter the account's mail address.\n- To use Photon OnPremise, skip this step."; + public string EmailOrAppIdLabel = "AppId or Email"; + public string AlreadyRegisteredInfo = "The email is registered so we can't fetch your AppId (without password).\n\nPlease login online to get your AppId and paste it above."; + public string SkipRegistrationInfo = "Skipping? No problem:\nEdit your server settings in the PhotonServerSettings file."; + public string RegisteredNewAccountInfo = "We created a (free) account and fetched you an AppId.\nWelcome. Your PUN project is setup."; + public string AppliedToSettingsInfo = "Your AppId is now applied to this project."; + public string SetupCompleteInfo = "Done!\nAll connection settings can be edited in the PhotonServerSettings now.\nHave a look."; + public string CloseWindowButton = "Close"; + public string SkipButton = "Skip"; + public string SetupButton = "Setup Project"; + public string CancelButton = "Cancel"; + public string PUNWizardLabel = "PUN Wizard"; + public string SettingsButton = "Settings:"; + public string SetupServerCloudLabel = "Setup wizard for setting up your own server or the cloud."; + public string WarningPhotonDisconnect = "Disconnecting PUN due to recompile. Exit PlayMode."; + public string StartButton = "Start"; + public string LocateSettingsButton = "Locate PhotonServerSettings"; + public string SettingsHighlightLabel = "Highlights the used photon settings file in the project."; + public string DocumentationLabel = "Documentation:"; + public string OpenPDFText = "Reference PDF"; + public string OpenPDFTooltip = "Opens the local documentation pdf."; + public string OpenDevNetText = "Doc Pages / Manual"; + public string OpenDevNetTooltip = "Online documentation for Photon."; + public string OpenCloudDashboardText = "Cloud Dashboard Login"; + public string OpenCloudDashboardTooltip = "Review Cloud App information and statistics."; + public string OpenForumText = "Open Forum"; + public string OpenForumTooltip = "Online support for Photon."; + public string OkButton = "Ok"; + public string OwnHostCloudCompareLabel = "How 'my own host' compares to 'cloud'."; + public string ComparisonPageButton = "Cloud versus OnPremise"; + public string ConnectionTitle = "Connecting"; + public string ConnectionInfo = "Connecting to the account service..."; + public string ErrorTextTitle = "Error"; + public string IncorrectRPCListTitle = "Warning: RPC-list becoming incompatible!"; + public string IncorrectRPCListLabel = "Your project's RPC-list is full, so we can't add some RPCs just compiled.\n\nBy removing outdated RPCs, the list will be long enough but incompatible with older client builds!\n\nMake sure you change the game version where you use PhotonNetwork.ConnectUsingSettings()."; + public string RemoveOutdatedRPCsLabel = "Remove outdated RPCs"; + public string FullRPCListTitle = "Warning: RPC-list is full!"; + public string FullRPCListLabel = "Your project's RPC-list is too long for PUN.\n\nYou can change PUN's source to use short-typed RPC index. Look for comments 'LIMITS RPC COUNT'\n\nAlternatively, remove some RPC methods (use more parameters per RPC maybe).\n\nAfter a RPC-list refresh, make sure you change the game version where you use PhotonNetwork.ConnectUsingSettings()."; + public string SkipRPCListUpdateLabel = "Skip RPC-list update"; + public string PUNNameReplaceTitle = "Warning: RPC-list Compatibility"; + public string PUNNameReplaceLabel = "PUN replaces RPC names with numbers by using the RPC-list. All clients must use the same list for that.\n\nClearing it most likely makes your client incompatible with previous versions! Change your game version or make sure the RPC-list matches other clients."; + public string RPCListCleared = "Clear RPC-list"; + public string ServerSettingsCleanedWarning = "Cleared the PhotonServerSettings.RpcList, which breaks compatibility with older builds. You should update the \"App Version\" in the PhotonServerSettings to avoid issues."; + public string WizardMainWindowInfo = "This window should help you find important settings for PUN, as well as documentation."; + } + + + public class PhotonEditor : EditorWindow + { + protected static Type WindowType = typeof(PhotonEditor); + + protected Vector2 scrollPos = Vector2.zero; + + private readonly Vector2 preferredSize = new Vector2(350, 400); + + private static Texture2D BackgroundImage; + + public static PunWizardText CurrentLang = new PunWizardText(); + + /// + /// third parties custom token + /// + public static string CustomToken = null; + + /// + /// third parties custom context + /// + public static string CustomContext = null; + + protected static string DocumentationLocation = "Assets/Photon/PhotonNetworking-Documentation.pdf"; + + protected static string UrlFreeLicense = "https://dashboard.photonengine.com/en-US/SelfHosted"; + + public const string UrlDevNet = "https://doc.photonengine.com/en-us/pun/v2"; + + protected static string UrlForum = "https://forum.photonengine.com"; + + protected static string UrlCompare = "https://doc.photonengine.com/en-us/realtime/current/getting-started/onpremise-or-saas"; + + protected static string UrlHowToSetup = "https://doc.photonengine.com/en-us/onpremise/current/getting-started/photon-server-in-5min"; + + protected static string UrlAppIDExplained = "https://doc.photonengine.com/en-us/realtime/current/getting-started/obtain-your-app-id"; + + public const string UrlCloudDashboard = "https://dashboard.photonengine.com/en-US/account/signin?email="; + + public const string UrlPunSettings = "https://doc.photonengine.com/en-us/pun/v2/getting-started/initial-setup"; // the SeverSettings class has this url directly in it's HelpURL attribute. + + private enum PhotonSetupStates + { + MainUi, + + RegisterForPhotonCloud, + + EmailAlreadyRegistered, + + GoEditPhotonServerSettings, + + EmailRegistrationPending + } + + private bool isSetupWizard = false; + + private PhotonSetupStates photonSetupState = PhotonSetupStates.RegisterForPhotonCloud; + + + private bool minimumInput = false; + private bool useMail = false; + private bool useAppId = false; + private bool useSkip = false; + private bool highlightedSettings = false; + private bool close = false; + private string mailOrAppId = string.Empty; + + + private static double lastWarning = 0; + private static bool postInspectorUpdate; + + + + [MenuItem("Window/Photon Unity Networking/PUN Wizard &p", false, 0)] + protected static void MenuItemOpenWizard() + { + PhotonEditor win = GetWindow(false, CurrentLang.WindowTitle, true); + if (win == null) + { + return; + } + win.photonSetupState = PhotonSetupStates.MainUi; + win.isSetupWizard = false; + } + + [MenuItem("Window/Photon Unity Networking/Highlight Server Settings %#&p", false, 1)] + protected static void MenuItemHighlightSettings() + { + HighlightSettings(); + } + + + + [UnityEditor.InitializeOnLoadMethod] + public static void InitializeOnLoadMethod() + { + //Debug.Log("InitializeOnLoadMethod()"); + EditorApplication.delayCall += OnDelayCall; + } + + + // used to register for various events (post-load) + private static void OnDelayCall() + { + //Debug.Log("OnDelayCall()"); + + postInspectorUpdate = true; + + EditorApplication.playModeStateChanged -= PlayModeStateChanged; + EditorApplication.playModeStateChanged += PlayModeStateChanged; + + #if UNITY_2021_1_OR_NEWER + CompilationPipeline.compilationStarted -= OnCompileStarted21; + CompilationPipeline.compilationStarted += OnCompileStarted21; + #else + CompilationPipeline.assemblyCompilationStarted -= OnCompileStarted; + CompilationPipeline.assemblyCompilationStarted += OnCompileStarted; + #endif + + #if (UNITY_2018 || UNITY_2018_1_OR_NEWER) + EditorApplication.projectChanged -= OnProjectChanged; + EditorApplication.projectChanged += OnProjectChanged; + #else + EditorApplication.projectWindowChanged -= OnProjectChanged; + EditorApplication.projectWindowChanged += OnProjectChanged; + #endif + + + if (!EditorApplication.isPlaying && !EditorApplication.isPlayingOrWillChangePlaymode) + { + OnProjectChanged(); // call this initially from here, as the project change events happened earlier (on start of the Editor) + PhotonEditor.UpdateRpcList(); + } + } + + + + // called in editor, opens wizard for initial setup, keeps scene PhotonViews up to date and closes connections when compiling (to avoid issues) + private static void OnProjectChanged() + { + PhotonEditorUtils.ProjectChangedWasCalled = true; + + + // Prevent issues with Unity Cloud Builds where ServerSettings are not found. + // Also, within the context of a Unity Cloud Build, ServerSettings is already present anyway. + #if UNITY_CLOUD_BUILD + return; + #else + + if (PhotonNetwork.PhotonServerSettings == null || PhotonNetwork.PhotonServerSettings.AppSettings == null || string.IsNullOrEmpty(PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime)) + { + PhotonNetwork.LoadOrCreateSettings(true); + } + + if (PhotonNetwork.PhotonServerSettings == null) + { + // the PhotonServerSettings are loaded or created. If both fails, the Editor should probably not run (anymore). + return; + } + + PunSceneSettings.SanitizeSceneSettings(); + + + // serverSetting is null when the file gets deleted. otherwise, the wizard should only run once and only if hosting option is not (yet) set + if (!PhotonNetwork.PhotonServerSettings.DisableAutoOpenWizard) + { + ShowRegistrationWizard(); + PhotonNetwork.PhotonServerSettings.DisableAutoOpenWizard = true; + PhotonEditor.SaveSettings(); + } + #endif + } + + + #if UNITY_2021_1_OR_NEWER + private static void OnCompileStarted21(object obj) + { + OnCompileStarted(obj as string); + } + #endif + + private static void OnCompileStarted(string obj) + { + if (PhotonNetwork.IsConnected) + { + // log warning, unless there was one recently + if (EditorApplication.timeSinceStartup - lastWarning > 3) + { + Debug.LogWarning(CurrentLang.WarningPhotonDisconnect); + lastWarning = EditorApplication.timeSinceStartup; + } + + PhotonNetwork.Disconnect(); + PhotonNetwork.NetworkingClient.LoadBalancingPeer.DispatchIncomingCommands(); + #if UNITY_2019_4_OR_NEWER && UNITY_EDITOR + EditorApplication.ExitPlaymode(); + #endif + } + } + + + [DidReloadScripts] + private static void OnDidReloadScripts() + { + //Debug.Log("OnDidReloadScripts() postInspectorUpdate: "+postInspectorUpdate + " isPlayingOrWillChangePlaymode: "+EditorApplication.isPlayingOrWillChangePlaymode); + if (postInspectorUpdate && !EditorApplication.isPlayingOrWillChangePlaymode) + { + PhotonEditor.UpdateRpcList(); // could be called when compilation finished (instead of when reload / compile starts) + } + } + + private static void PlayModeStateChanged(PlayModeStateChange state) + { + //Debug.Log("PlayModeStateChanged"); + if (EditorApplication.isPlaying || !EditorApplication.isPlayingOrWillChangePlaymode) + { + return; + } + + if (string.IsNullOrEmpty(PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime) && !PhotonNetwork.PhotonServerSettings.AppSettings.IsMasterServerAddress) + { + EditorUtility.DisplayDialog(CurrentLang.SetupWizardWarningTitle, CurrentLang.SetupWizardWarningMessage, CurrentLang.OkButton); + } + } + + + #region GUI and Wizard + + + // setup per window + public PhotonEditor() + { + this.minSize = this.preferredSize; + } + + protected void Awake() + { + // check if some appid is set. if so, we can avoid registration calls. + if (PhotonNetwork.PhotonServerSettings != null && PhotonNetwork.PhotonServerSettings.AppSettings != null && !string.IsNullOrEmpty(PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime)) + { + this.mailOrAppId = PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime; + } + } + + /// Creates an Editor window, showing the cloud-registration wizard for Photon (entry point to setup PUN). + protected static void ShowRegistrationWizard() + { + PhotonEditor win = GetWindow(WindowType, false, CurrentLang.WindowTitle, true) as PhotonEditor; + if (win == null) + { + return; + } + + win.photonSetupState = PhotonSetupStates.RegisterForPhotonCloud; + win.isSetupWizard = true; + } + + // Window Update() callback. On-demand, when Window is open + protected void Update() + { + if (this.close) + { + this.Close(); + } + } + + protected virtual void OnGUI() + { + if (BackgroundImage == null) + { + string[] paths = AssetDatabase.FindAssets("PunGradient t:Texture2D"); + if (paths != null && paths.Length > 0) + { + BackgroundImage = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(paths[0])); + } + } + + PhotonSetupStates oldGuiState = this.photonSetupState; // used to fix an annoying Editor input field issue: wont refresh until focus is changed. + + GUI.SetNextControlName(string.Empty); + this.scrollPos = GUILayout.BeginScrollView(this.scrollPos); + + + if (this.photonSetupState == PhotonSetupStates.MainUi) + { + this.UiMainWizard(); + } + else + { + EditorGUI.BeginDisabledGroup(this.photonSetupState == PhotonSetupStates.EmailRegistrationPending); + this.UiSetupApp(); + EditorGUI.EndDisabledGroup(); + } + + + GUILayout.EndScrollView(); + + if (oldGuiState != this.photonSetupState) + { + GUI.FocusControl(string.Empty); + } + } + + private string emailSentToAccount; + private bool emailSentToAccountIsRegistered; + + + protected virtual void UiSetupApp() + { + GUI.skin.label.wordWrap = true; + if (!this.isSetupWizard) + { + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button(CurrentLang.MainMenuButton, GUILayout.ExpandWidth(false))) + { + this.photonSetupState = PhotonSetupStates.MainUi; + } + + GUILayout.EndHorizontal(); + } + + + // setup header + this.UiTitleBox(CurrentLang.SetupWizardTitle, BackgroundImage); + + // setup info text + GUI.skin.label.richText = true; + GUILayout.Label(CurrentLang.SetupWizardInfo); + + // input of appid or mail + EditorGUILayout.Separator(); + GUILayout.Label(CurrentLang.EmailOrAppIdLabel); + this.minimumInput = false; + this.useMail = false; + this.useAppId = false; + this.mailOrAppId = EditorGUILayout.TextField(this.mailOrAppId); + if (!string.IsNullOrEmpty(this.mailOrAppId)) + { + this.mailOrAppId = this.mailOrAppId.Trim(); // note: we trim all input + if (AccountService.IsValidEmail(this.mailOrAppId)) + { + // input should be a mail address + this.useMail = true; + + // check if the current input equals earlier input, which is known to be registered already + this.minimumInput = !this.mailOrAppId.Equals(this.emailSentToAccount) || !this.emailSentToAccountIsRegistered; + } + else if (ServerSettings.IsAppId(this.mailOrAppId)) + { + // this should be an appId + this.minimumInput = true; + this.useAppId = true; + } + } + + // button to skip setup + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button(CurrentLang.SkipButton, GUILayout.Width(100))) + { + this.photonSetupState = PhotonSetupStates.GoEditPhotonServerSettings; + this.useSkip = true; + this.useMail = false; + this.useAppId = false; + } + + // SETUP button + EditorGUI.BeginDisabledGroup(!this.minimumInput); + if (GUILayout.Button(CurrentLang.SetupButton, GUILayout.Width(100))) + { + this.useSkip = false; + GUIUtility.keyboardControl = 0; + if (this.useMail) + { + this.RegisterWithEmail(this.mailOrAppId); // sets state + } + else if (this.useAppId) + { + this.photonSetupState = PhotonSetupStates.GoEditPhotonServerSettings; + Undo.RecordObject(PhotonNetwork.PhotonServerSettings, "Update PhotonServerSettings for PUN"); + PhotonNetwork.PhotonServerSettings.UseCloud(this.mailOrAppId); + PhotonEditor.SaveSettings(); + } + } + EditorGUI.EndDisabledGroup(); + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + + + // existing account needs to fetch AppId online + if (this.photonSetupState == PhotonSetupStates.EmailAlreadyRegistered) + { + // button to open dashboard and get the AppId + GUILayout.Space(15); + GUILayout.Label(CurrentLang.AlreadyRegisteredInfo); + + + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button(new GUIContent(CurrentLang.OpenCloudDashboardText, CurrentLang.OpenCloudDashboardTooltip), GUILayout.Width(205))) + { + Application.OpenURL(string.Concat(UrlCloudDashboard, Uri.EscapeUriString(this.mailOrAppId))); + this.mailOrAppId = string.Empty; + } + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + + + else if (this.photonSetupState == PhotonSetupStates.GoEditPhotonServerSettings) + { + if (!this.highlightedSettings) + { + this.highlightedSettings = true; + HighlightSettings(); + } + + GUILayout.Space(15); + if (this.useSkip) + { + GUILayout.Label(CurrentLang.SkipRegistrationInfo); + } + else if (this.useMail) + { + GUILayout.Label(CurrentLang.RegisteredNewAccountInfo); + } + else if (this.useAppId) + { + GUILayout.Label(CurrentLang.AppliedToSettingsInfo); + } + + + // setup-complete info + GUILayout.Space(15); + GUILayout.Label(CurrentLang.SetupCompleteInfo); + + + // close window (done) + GUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if (GUILayout.Button(CurrentLang.CloseWindowButton, GUILayout.Width(205))) + { + this.close = true; + } + GUILayout.FlexibleSpace(); + GUILayout.EndHorizontal(); + } + GUI.skin.label.richText = false; + } + + private void UiTitleBox(string title, Texture2D bgIcon) + { + GUIStyle bgStyle = EditorGUIUtility.isProSkin ? new GUIStyle(GUI.skin.GetStyle("Label")) : new GUIStyle(GUI.skin.GetStyle("WhiteLabel")); + bgStyle.padding = new RectOffset(10, 10, 10, 10); + bgStyle.fontSize = 22; + bgStyle.fontStyle = FontStyle.Bold; + if (bgIcon != null) + { + bgStyle.normal.background = bgIcon; + } + + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + Rect scale = GUILayoutUtility.GetLastRect(); + scale.height = 44; + + GUI.Label(scale, title, bgStyle); + GUILayout.Space(scale.height + 5); + } + + protected virtual void UiMainWizard() + { + GUILayout.Space(15); + + // title + this.UiTitleBox(CurrentLang.PUNWizardLabel, BackgroundImage); + + EditorGUILayout.BeginVertical(new GUIStyle() { padding = new RectOffset(10, 10, 10, 10) }); + + // wizard info text + GUILayout.Label(CurrentLang.WizardMainWindowInfo, new GUIStyle("Label") { wordWrap = true }); + GUILayout.Space(15); + + + // settings button + GUILayout.Label(CurrentLang.SettingsButton, EditorStyles.boldLabel); + + if (GUILayout.Button(new GUIContent(CurrentLang.LocateSettingsButton, CurrentLang.SettingsHighlightLabel))) + { + HighlightSettings(); + } + if (GUILayout.Button(new GUIContent(CurrentLang.OpenCloudDashboardText, CurrentLang.OpenCloudDashboardTooltip))) + { + Application.OpenURL(UrlCloudDashboard + Uri.EscapeUriString(this.mailOrAppId)); + } + if (GUILayout.Button(new GUIContent(CurrentLang.SetupButton, CurrentLang.SetupServerCloudLabel))) + { + this.photonSetupState = PhotonSetupStates.RegisterForPhotonCloud; + } + + GUILayout.Space(15); + + + // documentation + GUILayout.Label(CurrentLang.DocumentationLabel, EditorStyles.boldLabel); + + if (GUILayout.Button(new GUIContent(CurrentLang.OpenPDFText, CurrentLang.OpenPDFTooltip))) + { + EditorUtility.OpenWithDefaultApp(DocumentationLocation); + } + + if (GUILayout.Button(new GUIContent(CurrentLang.OpenDevNetText, CurrentLang.OpenDevNetTooltip))) + { + Application.OpenURL(UrlDevNet); + } + + GUI.skin.label.wordWrap = true; + GUILayout.Label(CurrentLang.OwnHostCloudCompareLabel); + if (GUILayout.Button(CurrentLang.ComparisonPageButton)) + { + Application.OpenURL(UrlCompare); + } + + + if (GUILayout.Button(new GUIContent(CurrentLang.OpenForumText, CurrentLang.OpenForumTooltip))) + { + Application.OpenURL(UrlForum); + } + + GUILayout.EndVertical(); + + } + + #endregion + + + private AccountService serviceClient; + protected virtual void RegisterWithEmail(string email) + { + List types = new List(); + types.Add(ServiceTypes.Pun); + if (PhotonEditorUtils.HasChat) + { + types.Add(ServiceTypes.Chat); + } + if (PhotonEditorUtils.HasVoice) + { + types.Add(ServiceTypes.Voice); + } + + + if (this.serviceClient == null) + { + this.serviceClient = new AccountService(); + this.serviceClient.CustomToken = CustomToken; + this.serviceClient.CustomContext = CustomContext; + } + else + { + // while RegisterByEmail will check RequestPendingResult below, it would also display an error message. no needed in this case + if (this.serviceClient.RequestPendingResult) + { + Debug.LogWarning("Registration request is pending a response. Please wait."); + return; + } + } + + this.emailSentToAccount = email; + this.emailSentToAccountIsRegistered = false; + + if (this.serviceClient.RegisterByEmail(email, types, RegisterWithEmailSuccessCallback, RegisterWithEmailErrorCallback, "PUN"+PhotonNetwork.PunVersion)) + { + this.photonSetupState = PhotonSetupStates.EmailRegistrationPending; + EditorUtility.DisplayProgressBar(CurrentLang.ConnectionTitle, CurrentLang.ConnectionInfo, 0.5f); + } + else + { + this.DisplayErrorMessage("Email registration request could not be sent. Retry again or check error logs and contact support."); + } + } + + private void RegisterWithEmailSuccessCallback(AccountServiceResponse res) + { + EditorUtility.ClearProgressBar(); + this.emailSentToAccountIsRegistered = true; // email is either registered now, or was already + + if (res.ReturnCode == AccountServiceReturnCodes.Success) + { + string key = ((int) ServiceTypes.Pun).ToString(); + string appId; + if (res.ApplicationIds.TryGetValue(key, out appId)) + { + this.mailOrAppId = appId; + PhotonNetwork.PhotonServerSettings.UseCloud(this.mailOrAppId, null); + key = ((int) ServiceTypes.Chat).ToString(); + if (res.ApplicationIds.TryGetValue(key, out appId)) + { + PhotonNetwork.PhotonServerSettings.AppSettings.AppIdChat = appId; + } + else if (PhotonEditorUtils.HasChat) + { + Debug.LogWarning("Registration successful but no Chat AppId returned"); + } + key = ((int) ServiceTypes.Voice).ToString(); + if (res.ApplicationIds.TryGetValue(key, out appId)) + { + PhotonNetwork.PhotonServerSettings.AppSettings.AppIdVoice = appId; + } + else if (PhotonEditorUtils.HasVoice) + { + Debug.LogWarning("Registration successful but no Voice AppId returned"); + } + PhotonEditor.SaveSettings(); + this.photonSetupState = PhotonSetupStates.GoEditPhotonServerSettings; + } + else + { + DisplayErrorMessage("Registration successful but no PUN AppId returned"); + } + } + else + { + PhotonEditor.SaveSettings(); + + if (res.ReturnCode == AccountServiceReturnCodes.EmailAlreadyRegistered) + { + this.photonSetupState = PhotonSetupStates.EmailAlreadyRegistered; + } + else + { + DisplayErrorMessage(res.Message); + } + } + } + + private void RegisterWithEmailErrorCallback(string error) + { + EditorUtility.ClearProgressBar(); + DisplayErrorMessage(error); + } + + private void DisplayErrorMessage(string error) + { + EditorUtility.DisplayDialog(CurrentLang.ErrorTextTitle, error, CurrentLang.OkButton); + this.photonSetupState = PhotonSetupStates.RegisterForPhotonCloud; + } + + // Pings PhotonServerSettings and makes it selected (show in Inspector) + private static void HighlightSettings() + { + ServerSettings serverSettings = (ServerSettings)Resources.Load(PhotonNetwork.ServerSettingsFileName, typeof(ServerSettings)); + Selection.objects = new UnityEngine.Object[] { serverSettings }; + EditorGUIUtility.PingObject(serverSettings); + } + + // Marks settings object as dirty, so it gets saved. + // unity 5.3 changes the usecase for SetDirty(). but here we don't modify a scene object! so it's ok to use + private static void SaveSettings() + { + EditorUtility.SetDirty(PhotonNetwork.PhotonServerSettings); + } + + #region RPC List Handling + + + public static void UpdateRpcList() + { + //Debug.Log("UpdateRpcList()"); + + if (PhotonNetwork.PhotonServerSettings == null) + { + Debug.LogWarning("UpdateRpcList() wasn not able to access the PhotonServerSettings. Not updating the RPCs."); + return; + } + + + // check all "script assemblies" for methods with PunRPC attribute + List additionalRpcs = new List(); // not yet listed rpc-method names go here + List allRpcs = new List(); + + + #if UNITY_2019_2_OR_NEWER + + // we can make use of the new TypeCache to find methods with PunRPC attribute + var extractedMethods = TypeCache.GetMethodsWithAttribute(); + foreach (var methodInfo in extractedMethods) + { + allRpcs.Add(methodInfo.Name); + if (!PhotonNetwork.PhotonServerSettings.RpcList.Contains(methodInfo.Name) && !additionalRpcs.Contains(methodInfo.Name)) + { + additionalRpcs.Add(methodInfo.Name); + } + } + + #else + + System.Reflection.Assembly[] assemblies = System.AppDomain.CurrentDomain.GetAssemblies().Where(a => !(a.ManifestModule is System.Reflection.Emit.ModuleBuilder)).ToArray(); + + foreach (var assembly in assemblies) + { + if (!assembly.Location.Contains("ScriptAssemblies") || assembly.FullName.StartsWith("Assembly-CSharp-Editor")) + { + continue; + } + + var types = assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(MonoBehaviour))); + var methodInfos = types.SelectMany(t => t.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)); + var methodNames = methodInfos.Where(m => m.IsDefined(typeof(PunRPC), false)).Select(mi => mi.Name).ToArray(); + var additional = methodNames.Where(n => !PhotonNetwork.PhotonServerSettings.RpcList.Contains(n) && !additionalRpcs.Contains(n)); + + allRpcs.AddRange(methodNames); + additionalRpcs.AddRange(additional); + } + + #endif + + + if (additionalRpcs.Count <= 0) + { + //Debug.Log("UpdateRPCs did not found new."); + return; + } + + + if (additionalRpcs.Count + PhotonNetwork.PhotonServerSettings.RpcList.Count >= byte.MaxValue) + { + if (allRpcs.Count <= byte.MaxValue) + { + bool clearList = EditorUtility.DisplayDialog(CurrentLang.IncorrectRPCListTitle, CurrentLang.IncorrectRPCListLabel, CurrentLang.RemoveOutdatedRPCsLabel, CurrentLang.CancelButton); + if (clearList) + { + PhotonNetwork.PhotonServerSettings.RpcList.Clear(); + additionalRpcs = allRpcs.Distinct().ToList(); // we add all unique names + } + else + { + return; + } + } + else + { + EditorUtility.DisplayDialog(CurrentLang.FullRPCListTitle, CurrentLang.FullRPCListLabel, CurrentLang.SkipRPCListUpdateLabel); + return; + } + } + + + additionalRpcs.Sort(); + Undo.RecordObject(PhotonNetwork.PhotonServerSettings, "RPC-list update of PUN."); + PhotonNetwork.PhotonServerSettings.RpcList.AddRange(additionalRpcs); + EditorUtility.SetDirty(PhotonNetwork.PhotonServerSettings); + + //Debug.Log("Updated RPCs. Added: "+additionalRpcs.Count); + } + + + public static void ClearRpcList() + { + bool clearList = EditorUtility.DisplayDialog(CurrentLang.PUNNameReplaceTitle, CurrentLang.PUNNameReplaceLabel, CurrentLang.RPCListCleared, CurrentLang.CancelButton); + if (clearList) + { + ServerSettings serverSettings = PhotonNetwork.PhotonServerSettings; + + Undo.RecordObject(serverSettings, "RPC-list cleared for PUN."); + serverSettings.RpcList.Clear(); + EditorUtility.SetDirty(serverSettings); + + Debug.LogWarning(CurrentLang.ServerSettingsCleanedWarning); + } + } + + #endregion + + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs.meta new file mode 100644 index 00000000..beda65ac --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dabbbed2a74eac44dac281f20d706ba8 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonGUI.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonGUI.cs new file mode 100644 index 00000000..54a6be22 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonGUI.cs @@ -0,0 +1,363 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// GUI scripts for the Editor. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +using UnityEngine; +using UnityEditor; + +namespace Photon.Pun +{ + public class PhotonGUI + { + #region Styles + + static GUIStyle m_DefaultTitleStyle; + + public static GUIStyle DefaultTitleStyle + { + get + { + if (m_DefaultTitleStyle == null) + { + m_DefaultTitleStyle = new GUIStyle(); + m_DefaultTitleStyle.border = new RectOffset(2, 2, 2, 1); + m_DefaultTitleStyle.margin = new RectOffset(5, 5, 5, 0); + m_DefaultTitleStyle.padding = new RectOffset(5, 5, 0, 0); + m_DefaultTitleStyle.alignment = TextAnchor.MiddleLeft; + m_DefaultTitleStyle.normal.background = ReorderableListResources.texTitleBackground; + m_DefaultTitleStyle.normal.textColor = EditorGUIUtility.isProSkin + ? new Color(0.8f, 0.8f, 0.8f) + : new Color(0.2f, 0.2f, 0.2f); + } + + return m_DefaultTitleStyle; + } + } + + static GUIStyle m_DefaultContainerStyle; + + public static GUIStyle DefaultContainerStyle + { + get + { + if (m_DefaultContainerStyle == null) + { + m_DefaultContainerStyle = new GUIStyle(); + m_DefaultContainerStyle.border = new RectOffset(2, 2, 1, 2); + m_DefaultContainerStyle.margin = new RectOffset(5, 5, 5, 5); + m_DefaultContainerStyle.padding = new RectOffset(1, 1, 2, 2); + m_DefaultContainerStyle.normal.background = ReorderableListResources.texContainerBackground; + } + + return m_DefaultContainerStyle; + } + } + + static GUIStyle m_DefaultAddButtonStyle; + + public static GUIStyle DefaultAddButtonStyle + { + get + { + if (m_DefaultAddButtonStyle == null) + { + m_DefaultAddButtonStyle = new GUIStyle(); + m_DefaultAddButtonStyle.fixedWidth = 30; + m_DefaultAddButtonStyle.fixedHeight = 16; + m_DefaultAddButtonStyle.normal.background = ReorderableListResources.texAddButton; + m_DefaultAddButtonStyle.active.background = ReorderableListResources.texAddButtonActive; + } + + return m_DefaultAddButtonStyle; + } + } + + static GUIStyle m_DefaultRemoveButtonStyle; + + public static GUIStyle DefaultRemoveButtonStyle + { + get + { + if (m_DefaultRemoveButtonStyle == null) + { + m_DefaultRemoveButtonStyle = new GUIStyle(); + m_DefaultRemoveButtonStyle.fixedWidth = 30; + m_DefaultRemoveButtonStyle.fixedHeight = 20; + m_DefaultRemoveButtonStyle.active.background = ReorderableListResources.CreatePixelTexture("Dark Pixel (List GUI)", new Color32(18, 18, 18, 255)); + m_DefaultRemoveButtonStyle.imagePosition = ImagePosition.ImageOnly; + m_DefaultRemoveButtonStyle.alignment = TextAnchor.MiddleCenter; + } + + return m_DefaultRemoveButtonStyle; + } + } + + static GUIStyle m_DefaultContainerRowStyle; + + public static GUIStyle DefaultContainerRowStyle + { + get + { + if (m_DefaultContainerRowStyle == null) + { + m_DefaultContainerRowStyle = new GUIStyle(); + m_DefaultContainerRowStyle.border = new RectOffset(2, 2, 2, 2); + + m_DefaultContainerRowStyle.margin = new RectOffset(5, 5, 5, 5); + m_DefaultContainerRowStyle.padding = new RectOffset(1, 1, 2, 2); + m_DefaultContainerRowStyle.normal.background = ReorderableListResources.texContainerBackground; + } + + return m_DefaultContainerRowStyle; + } + } + + static GUIStyle m_FoldoutBold; + + public static GUIStyle FoldoutBold + { + get + { + if (m_FoldoutBold == null) + { + m_FoldoutBold = new GUIStyle(EditorStyles.foldout); + m_FoldoutBold.fontStyle = FontStyle.Bold; + } + + return m_FoldoutBold; + } + } + + static GUIStyle m_RichLabel; + + public static GUIStyle RichLabel + { + get + { + if (m_RichLabel == null) + { + m_RichLabel = new GUIStyle(GUI.skin.label); + m_RichLabel.richText = true; + m_RichLabel.wordWrap = true; + } + + return m_RichLabel; + } + } + + #endregion + + + internal static string GetIconPath(string iconFileName) + { + string _thisIconPath = PhotonNetwork.FindAssetPath ("PhotonGUI"); + + if (string.IsNullOrEmpty(_thisIconPath)) + { + _thisIconPath = "Assets/Photon/PhotonUnityNetworking/Code/Editor/"+iconFileName; + } + else + { + _thisIconPath = _thisIconPath.Replace("PhotonGUI.cs", iconFileName); + } + + return _thisIconPath; + } + + static Texture2D m_HelpIcon; + + public static Texture2D HelpIcon + { + get + { + if (m_HelpIcon == null) + { + m_HelpIcon = AssetDatabase.LoadAssetAtPath(GetIconPath("help.png"), typeof(Texture2D)) as Texture2D; + } + + + return m_HelpIcon; + } + } + + + static Texture2D m_CopyIcon; + static Texture2D m_CopyIconPro; + + public static Texture2D CopyIcon + { + get + { + if (EditorGUIUtility.isProSkin) + { + if (m_CopyIconPro == null) + { + m_CopyIconPro = AssetDatabase.LoadAssetAtPath(GetIconPath("CopyIconPro.png"), typeof(Texture2D)) as Texture2D; + } + + return m_CopyIconPro; + } + + if (m_CopyIcon == null) + { + m_CopyIcon = AssetDatabase.LoadAssetAtPath(GetIconPath("CopyIcon.png"), typeof(Texture2D)) as Texture2D; + } + + return m_CopyIcon; + } + } + + #region Interface + + public static void ContainerHeader(string headline) + { + DoContainerHeader(headline, 27, 0); + } + + public static bool ContainerHeaderToggle(string headline, bool toggle) + { + return DoContainerHeaderToggle(headline, toggle); + } + + public static bool ContainerHeaderFoldout(string headline, bool foldout, System.Action buttonAction = null, string buttonName = null) + { + return DoContainerHeaderFoldout(headline, foldout, buttonAction, buttonName); + } + + public static Rect ContainerBody(float height) + { + return DoContainerBody(height); + } + + public static bool AddButton() + { + Rect controlRect = EditorGUILayout.GetControlRect(false, DefaultAddButtonStyle.fixedHeight - 5); + controlRect.yMin -= 5; + controlRect.yMax -= 5; + + Rect addButtonRect = new Rect(controlRect.xMax - DefaultAddButtonStyle.fixedWidth, + controlRect.yMin, + DefaultAddButtonStyle.fixedWidth, + DefaultAddButtonStyle.fixedHeight); + + return GUI.Button(addButtonRect, "", DefaultAddButtonStyle); + } + + public static void DrawSplitter(Rect position) + { + ReorderableListResources.DrawTexture(position, ReorderableListResources.texItemSplitter); + } + + public static void DrawGizmoOptions( + Rect position, + string label, + SerializedProperty gizmoEnabledProperty, + SerializedProperty gizmoColorProperty, + SerializedProperty gizmoTypeProperty, + SerializedProperty gizmoSizeProperty) + { + float height = EditorGUIUtility.singleLineHeight; + float flexibleWidth = Mathf.Max(40, position.width - EditorGUIUtility.labelWidth - 20 - 75 - 5 - 40 - 5); + + Rect labelRect = new Rect(position.xMin, position.yMin, EditorGUIUtility.labelWidth, height); + GUI.Label(labelRect, label); + + Rect enabledRect = new Rect(labelRect.xMax, labelRect.yMin, 20, height); + EditorGUI.PropertyField(enabledRect, gizmoEnabledProperty, GUIContent.none); + + bool oldGUIEnabled = GUI.enabled; + GUI.enabled = gizmoEnabledProperty.boolValue; + + Rect colorRect = new Rect(enabledRect.xMax + 5, labelRect.yMin, 70, height); + EditorGUI.PropertyField(colorRect, gizmoColorProperty, GUIContent.none); + + Rect typeRect = new Rect(colorRect.xMax + 5, labelRect.yMin, flexibleWidth * 0.7f, height); + EditorGUI.PropertyField(typeRect, gizmoTypeProperty, GUIContent.none); + + Rect sizeLabelRect = new Rect(typeRect.xMax + 10, labelRect.yMin, 30, height); + GUI.Label(sizeLabelRect, "Size"); + + Rect sizeRect = new Rect(sizeLabelRect.xMax + 5, labelRect.yMin, flexibleWidth * 0.3f, height); + EditorGUI.PropertyField(sizeRect, gizmoSizeProperty, GUIContent.none); + + GUI.enabled = oldGUIEnabled; + } + + #endregion + + #region Implementation + + static Rect DoContainerBody(float height) + { + Rect controlRect = EditorGUILayout.GetControlRect(false, height); + controlRect.yMin -= 3; + controlRect.yMax -= 2; + + int controlID = GUIUtility.GetControlID(FocusType.Passive, controlRect); + + if (Event.current.type == EventType.Repaint) + { + PhotonGUI.DefaultContainerStyle.Draw(controlRect, GUIContent.none, controlID); + } + + return controlRect; + } + + static bool DoContainerHeaderToggle(string headline, bool toggle) + { + Rect rect = DoContainerHeader(headline, 27, 15); + Rect toggleRect = new Rect(rect.xMin + 5, rect.yMin + 5, EditorGUIUtility.labelWidth, rect.height); + + return EditorGUI.Toggle(toggleRect, toggle); + } + + + static bool DoContainerHeaderFoldout(string headline, bool foldout, System.Action buttonAction = null, string buttonLabel = null, float buttonWidth = 48) + { + bool showButton = buttonAction != null; + + Rect rect = DoContainerHeader("", 27, 0f); + + // Shorten foldout label if button is present, so it doesn't interfere with clicking. + float foldoutWidth = rect.width - (showButton ? 15 + buttonWidth: 15); + Rect foldoutRect = new Rect(rect.xMin + 15, rect.yMin + 5, foldoutWidth, 16); + + bool expanded = EditorGUI.Foldout(foldoutRect, foldout, headline, FoldoutBold); + + // If a button is defined show it, and invoke action on click. + if (showButton && GUI.Button(new Rect(foldoutRect) { x = foldoutRect.xMax, height = 17, width = buttonWidth - 4 }, buttonLabel == null ? "" : buttonLabel)) + { + buttonAction.Invoke(); + } + + return expanded; + } + + static Rect DoContainerHeader(string headline, float height, float contentOffset) + { + GUILayout.Space(5); + Rect controlRect = EditorGUILayout.GetControlRect(false, height); + + int controlID = GUIUtility.GetControlID(FocusType.Passive, controlRect); + + if (Event.current.type == EventType.Repaint) + { + PhotonGUI.DefaultTitleStyle.Draw(controlRect, GUIContent.none, controlID); + + Rect labelRect = new Rect(controlRect.xMin + 5 + contentOffset, controlRect.yMin + 5, controlRect.width, controlRect.height); + GUI.Label(labelRect, headline, EditorStyles.boldLabel); + } + + return controlRect; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonGUI.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonGUI.cs.meta new file mode 100644 index 00000000..247a4eb2 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonGUI.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3d2cadb1ccf05074e8ce96b1393846cf +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonUnityNetworking.Editor.asmdef b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonUnityNetworking.Editor.asmdef new file mode 100644 index 00000000..2aa5d2bf --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonUnityNetworking.Editor.asmdef @@ -0,0 +1,13 @@ +{ + "name": "PhotonUnityNetworking.Editor", + "references": [ + "PhotonRealtime", + "PhotonUnityNetworking" + ], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonUnityNetworking.Editor.asmdef.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonUnityNetworking.Editor.asmdef.meta new file mode 100644 index 00000000..f38d07ed --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonUnityNetworking.Editor.asmdef.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4025d00f1ce60da4ea2d0830acf5ebfb +timeCreated: 1537863428 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewHandler.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewHandler.cs new file mode 100644 index 00000000..4f5b340a --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewHandler.cs @@ -0,0 +1,191 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This is a Editor script to initialize PhotonView components. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System.Collections.Generic; + using Realtime; + using UnityEditor; + using UnityEngine; + using Debug = UnityEngine.Debug; + + + [InitializeOnLoad] + public class PhotonViewHandler : EditorWindow + { + static PhotonViewHandler() + { + // called once per change (per key-press in inspectors) and once after play-mode ends. + #if (UNITY_2018 || UNITY_2018_1_OR_NEWER) + EditorApplication.hierarchyChanged += OnHierarchyChanged; + #else + EditorApplication.hierarchyWindowChanged += OnHierarchyChanged; + #endif + } + + + internal static void OnHierarchyChanged() + { + // set prefabs to viewID 0 if needed + // organize resource PVs in a list per viewID + + // process the lists: if more than one photonView is in a list, we have to resolve the clash + // check if only one view had the viewId earlier + // apply a new viewID to the others + + // update the cached list of instances and their viewID + + + //Debug.LogWarning("OnHierarchyChanged(). isPlaying: " + Application.isPlaying); + if (Application.isPlaying) + { + return; + } + + + PhotonView[] photonViewResources = Resources.FindObjectsOfTypeAll(); + List photonViewInstances = new List(); + Dictionary> viewInstancesPerViewId = new Dictionary>(); + List photonViewsToReassign = new List(); + + foreach (PhotonView view in photonViewResources) + { + if (PhotonEditorUtils.IsPrefab(view.gameObject)) + { + // prefabs should use 0 as ViewID and sceneViewId + if (view.ViewID != 0 || view.sceneViewId != 0) + { + view.ViewID = 0; + view.sceneViewId = 0; + EditorUtility.SetDirty(view); + } + + continue; // skip prefabs in further processing + } + + photonViewInstances.Add(view); + + + // assign a new viewID if the viewId is lower than the minimum for this scene + if (!IsViewIdOkForScene(view)) + { + photonViewsToReassign.Add(view); + continue; // this view definitely gets cleaned up, so it does not count versus duplicates, checked below + } + + + // organize the viewInstances into lists per viewID, so we know duplicate usage + if (!viewInstancesPerViewId.ContainsKey(view.sceneViewId)) + { + viewInstancesPerViewId[view.sceneViewId] = new List(); + } + viewInstancesPerViewId[view.sceneViewId].Add(view); + } + + //Debug.Log("PreviousAssignments: "+PunSceneViews.Instance.Views.Count); + + foreach (List list in viewInstancesPerViewId.Values) + { + if (list.Count <= 1) + { + continue; // skip lists with just one entry (the viewID is unique) + } + + + PhotonView previousAssignment = null; + bool wasAssigned = PunSceneViews.Instance.Views.TryGetValue(list[0].sceneViewId, out previousAssignment); + + foreach (PhotonView view in list) + { + if (wasAssigned && view.Equals(previousAssignment)) + { + // previously, we cached the used viewID as assigned to the current view. we don't change this. + continue; + } + + //Debug.LogWarning("View to reassign due to viewID: "+view, view.gameObject); + photonViewsToReassign.Add(view); + } + } + + int i; + foreach (PhotonView view in photonViewsToReassign) + { + i = MinSceneViewId(view); + while (viewInstancesPerViewId.ContainsKey(i)) + { + i++; + } + view.sceneViewId = i; + viewInstancesPerViewId.Add(i, null); // we don't need the lists anymore but we care about getting the viewIDs listed + EditorUtility.SetDirty(view); + } + + + // update the "semi persistent" list of viewIDs and their PhotonViews + PunSceneViews.Instance.Views.Clear(); + foreach (PhotonView view in photonViewInstances) + { + if (PunSceneViews.Instance.Views.ContainsKey(view.sceneViewId)) + { + Debug.LogError("ViewIDs should no longer have duplicates! "+view.sceneViewId, view); + continue; + } + + PunSceneViews.Instance.Views[view.sceneViewId] = view; + } + + //Debug.Log("photonViewsToReassign.Count: "+photonViewsToReassign.Count + " count of viewIDs in use: "+viewInstancesPerViewId.Values.Count); + //Debug.Log("PreviousAssignments now counts: "+PunSceneViews.Instance.Views.Count); + } + + + private static int MinSceneViewId(PhotonView view) + { + int result = PunSceneSettings.MinViewIdForScene(view.gameObject.scene.name); + return result; + } + + private static bool IsViewIdOkForScene(PhotonView view) + { + return view.sceneViewId >= MinSceneViewId(view); + } + } + + /// + /// Stores a PhotonView instances per viewId (key). Instance is used as cache storage in-Editor. + /// + public class PunSceneViews : ScriptableObject + { + [SerializeField] + public Dictionary Views = new Dictionary(); + + private static PunSceneViews instanceField; + public static PunSceneViews Instance + { + get + { + if (instanceField != null) + { + return instanceField; + } + + instanceField = GameObject.FindObjectOfType(); + if (instanceField == null) + { + instanceField = ScriptableObject.CreateInstance(); + } + + return instanceField; + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewHandler.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewHandler.cs.meta new file mode 100644 index 00000000..74dfe3fb --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 57b538e62a0ca6248bfd354def935e57 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewInspector.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewInspector.cs new file mode 100644 index 00000000..a4a09772 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewInspector.cs @@ -0,0 +1,394 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Custom inspector for the PhotonView component. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + +using System; +using UnityEditor; +using UnityEngine; + +using Photon.Realtime; + +namespace Photon.Pun +{ + [CustomEditor(typeof(PhotonView))] + [CanEditMultipleObjects] + internal class PhotonViewInspector : Editor + { + private PhotonView m_Target; + + private static GUIContent ownerTransferGuiContent = new GUIContent("Ownership Transfer", "Determines how ownership changes may be initiated."); + private static GUIContent syncronizationGuiContent = new GUIContent("Synchronization", "Determines how sync updates are culled and sent."); + private static GUIContent observableSearchGuiContent = new GUIContent("Observable Search", "When set to Auto, On Awake, Observables on this GameObject (and child GameObjects) will be found and populate the Observables List." + + "\n\nNested PhotonViews (children with a PhotonView) and their children will not be included in the search."); + + public void OnEnable() + { + this.m_Target = (PhotonView)this.target; + + if (!Application.isPlaying) + m_Target.FindObservables(); + } + public override void OnInspectorGUI() + { + + + this.m_Target = (PhotonView)this.target; + bool isProjectPrefab = PhotonEditorUtils.IsPrefab(this.m_Target.gameObject); + bool multiSelected = Selection.gameObjects.Length > 1; + + if (this.m_Target.ObservedComponents == null) + { + this.m_Target.ObservedComponents = new System.Collections.Generic.List(); + } + + if (this.m_Target.ObservedComponents.Count == 0) + { + this.m_Target.ObservedComponents.Add(null); + } + + GUILayout.Space(5); + + EditorGUILayout.BeginVertical((GUIStyle)"HelpBox"); + // View ID - Hide if we are multi-selected + if (!multiSelected) + { + if (isProjectPrefab) + { + EditorGUILayout.LabelField("View ID", "Set at runtime", new GUIStyle("Label") { richText = true }); + } + else if (EditorApplication.isPlaying) + { + EditorGUILayout.LabelField("View ID", this.m_Target.ViewID.ToString()); + } + else + { + // this is an object in a scene, modified at edit-time. we can store this as sceneViewId + int idValue = EditorGUILayout.IntField("View ID [1.." + (PhotonNetwork.MAX_VIEW_IDS - 1) + "]", this.m_Target.sceneViewId); + if (this.m_Target.sceneViewId != idValue) + { + Undo.RecordObject(this.m_Target, "Change PhotonView viewID"); + this.m_Target.sceneViewId = idValue; + } + } + } + + // Locally Controlled + if (EditorApplication.isPlaying) + { + string masterClientHint = PhotonNetwork.IsMasterClient ? " (master)" : ""; + EditorGUILayout.LabelField("IsMine:", this.m_Target.IsMine.ToString() + masterClientHint); + Room room = PhotonNetwork.CurrentRoom; + int cretrId = this.m_Target.CreatorActorNr; + Player cretr = (room != null) ? room.GetPlayer(cretrId) : null; + Player owner = this.m_Target.Owner; + Player ctrlr = this.m_Target.Controller; + EditorGUILayout.LabelField("Controller:", (ctrlr != null ? ("[" + ctrlr.ActorNumber + "] '" + ctrlr.NickName + "' " + (ctrlr.IsMasterClient ? " (master)" : "")) : "[0] ")); + EditorGUILayout.LabelField("Owner:", (owner != null ? ("[" + owner.ActorNumber + "] '" + owner.NickName + "' " + (owner.IsMasterClient ? " (master)" : "")) : "[0] ")); + EditorGUILayout.LabelField("Creator:", (cretr != null ? ("[" +cretrId + "] '" + cretr.NickName + "' " + (cretr.IsMasterClient ? " (master)" : "")) : "[0] ")); + + } + + EditorGUILayout.EndVertical(); + + EditorGUI.BeginDisabledGroup(Application.isPlaying); + + GUILayout.Space(5); + + // Ownership section + + EditorGUILayout.LabelField("Ownership", (GUIStyle)"BoldLabel"); + + OwnershipOption own = (OwnershipOption)EditorGUILayout.EnumPopup(ownerTransferGuiContent, this.m_Target.OwnershipTransfer/*, GUILayout.MaxWidth(68), GUILayout.MinWidth(68)*/); + if (own != this.m_Target.OwnershipTransfer) + { + // jf: fixed 5 and up prefab not accepting changes if you quit Unity straight after change. + // not touching the define nor the rest of the code to avoid bringing more problem than solving. + EditorUtility.SetDirty(this.m_Target); + + Undo.RecordObject(this.m_Target, "Change PhotonView Ownership Transfer"); + this.m_Target.OwnershipTransfer = own; + } + + + GUILayout.Space(5); + + // Observables section + + EditorGUILayout.LabelField("Observables", (GUIStyle)"BoldLabel"); + + EditorGUILayout.PropertyField(this.serializedObject.FindProperty("Synchronization"), syncronizationGuiContent); + + if (this.m_Target.Synchronization == ViewSynchronization.Off) + { + // Show warning if there are any observables. The null check is because the list allows nulls. + var observed = m_Target.ObservedComponents; + if (observed.Count > 0) + { + for (int i = 0, cnt = observed.Count; i < cnt; ++i) + if (observed[i] != null) + { + EditorGUILayout.HelpBox("Synchronization is set to Off. Select a Synchronization setting in order to sync the listed Observables.", MessageType.Warning); + break; + } + } + } + + + PhotonView.ObservableSearch autoFindObservables = (PhotonView.ObservableSearch)EditorGUILayout.EnumPopup(observableSearchGuiContent, m_Target.observableSearch); + + if (m_Target.observableSearch != autoFindObservables) + { + Undo.RecordObject(this.m_Target, "Change Auto Find Observables Toggle"); + m_Target.observableSearch = autoFindObservables; + } + + m_Target.FindObservables(); + + if (!multiSelected) + { + bool disableList = Application.isPlaying || autoFindObservables != PhotonView.ObservableSearch.Manual; + + if (disableList) + EditorGUI.BeginDisabledGroup(true); + + this.DrawObservedComponentsList(disableList); + + if (disableList) + EditorGUI.EndDisabledGroup(); + } + + // Cleanup: save and fix look + if (GUI.changed) + { + PhotonViewHandler.OnHierarchyChanged(); // TODO: check if needed + } + + EditorGUI.EndDisabledGroup(); + } + + + + private int GetObservedComponentsCount() + { + int count = 0; + + for (int i = 0; i < this.m_Target.ObservedComponents.Count; ++i) + { + if (this.m_Target.ObservedComponents[i] != null) + { + count++; + } + } + + return count; + } + + /// + /// Find Observables, and then baking them into the serialized object. + /// + private void EditorFindObservables() + { + Undo.RecordObject(serializedObject.targetObject, "Find Observables"); + var property = serializedObject.FindProperty("ObservedComponents"); + + // Just doing a Find updates the Observables list, but Unity fails to save that change. + // Instead we do the find, and then iterate the found objects into the serialize property, then apply that. + property.ClearArray(); + m_Target.FindObservables(true); + for(int i = 0; i < m_Target.ObservedComponents.Count; ++i) + { + property.InsertArrayElementAtIndex(i); + property.GetArrayElementAtIndex(i).objectReferenceValue = m_Target.ObservedComponents[i]; + } + serializedObject.ApplyModifiedProperties(); + } + + private void DrawObservedComponentsList(bool disabled = false) + { + SerializedProperty listProperty = this.serializedObject.FindProperty("ObservedComponents"); + + if (listProperty == null) + { + return; + } + + float containerElementHeight = 22; + float containerHeight = listProperty.arraySize * containerElementHeight; + + string foldoutLabel = "Observed Components (" + this.GetObservedComponentsCount() + ")"; + bool isOpen = PhotonGUI.ContainerHeaderFoldout(foldoutLabel, this.serializedObject.FindProperty("ObservedComponentsFoldoutOpen").boolValue, () => EditorFindObservables(), "Find"); + this.serializedObject.FindProperty("ObservedComponentsFoldoutOpen").boolValue = isOpen; + + if (isOpen == false) + { + containerHeight = 0; + } + + //Texture2D statsIcon = AssetDatabase.LoadAssetAtPath( "Assets/Photon Unity Networking/Editor/PhotonNetwork/PhotonViewStats.png", typeof( Texture2D ) ) as Texture2D; + + Rect containerRect = PhotonGUI.ContainerBody(containerHeight); + + + bool wasObservedComponentsEmpty = this.m_Target.ObservedComponents.FindAll(item => item != null).Count == 0; + if (isOpen == true) + { + for (int i = 0; i < listProperty.arraySize; ++i) + { + Rect elementRect = new Rect(containerRect.xMin, containerRect.yMin + containerElementHeight * i, containerRect.width, containerElementHeight); + { + Rect texturePosition = new Rect(elementRect.xMin + 6, elementRect.yMin + elementRect.height / 2f - 1, 9, 5); + ReorderableListResources.DrawTexture(texturePosition, ReorderableListResources.texGrabHandle); + + Rect propertyPosition = new Rect(elementRect.xMin + 20, elementRect.yMin + 3, elementRect.width - 45, 16); + + // keep track of old type to catch when a new type is observed + Type _oldType = listProperty.GetArrayElementAtIndex(i).objectReferenceValue != null ? listProperty.GetArrayElementAtIndex(i).objectReferenceValue.GetType() : null; + + EditorGUI.PropertyField(propertyPosition, listProperty.GetArrayElementAtIndex(i), new GUIContent()); + + // new type, could be different from old type + Type _newType = listProperty.GetArrayElementAtIndex(i).objectReferenceValue != null ? listProperty.GetArrayElementAtIndex(i).objectReferenceValue.GetType() : null; + + // the user dropped a Transform, we must change it by adding a PhotonTransformView and observe that instead + if (_oldType != _newType) + { + if (_newType == typeof(PhotonView)) + { + listProperty.GetArrayElementAtIndex(i).objectReferenceValue = null; + Debug.LogError("PhotonView Detected you dropped a PhotonView, this is not allowed. \n It's been removed from observed field."); + + } + else if (_newType == typeof(Transform)) + { + + // try to get an existing PhotonTransformView ( we don't want any duplicates...) + PhotonTransformView _ptv = this.m_Target.gameObject.GetComponent(); + if (_ptv == null) + { + // no ptv yet, we create one and enable position and rotation, no scaling, as it's too rarely needed to take bandwidth for nothing + _ptv = Undo.AddComponent(this.m_Target.gameObject); + } + // switch observe from transform to _ptv + listProperty.GetArrayElementAtIndex(i).objectReferenceValue = _ptv; + Debug.Log("PhotonView has detected you dropped a Transform. Instead it's better to observe a PhotonTransformView for better control and performances"); + } + else if (_newType == typeof(Rigidbody)) + { + + Rigidbody _rb = listProperty.GetArrayElementAtIndex(i).objectReferenceValue as Rigidbody; + + // try to get an existing PhotonRigidbodyView ( we don't want any duplicates...) + PhotonRigidbodyView _prbv = _rb.gameObject.GetComponent(); + if (_prbv == null) + { + // no _prbv yet, we create one + _prbv = Undo.AddComponent(_rb.gameObject); + } + // switch observe from transform to _prbv + listProperty.GetArrayElementAtIndex(i).objectReferenceValue = _prbv; + Debug.Log("PhotonView has detected you dropped a RigidBody. Instead it's better to observe a PhotonRigidbodyView for better control and performances"); + } + else if (_newType == typeof(Rigidbody2D)) + { + + // try to get an existing PhotonRigidbody2DView ( we don't want any duplicates...) + PhotonRigidbody2DView _prb2dv = this.m_Target.gameObject.GetComponent(); + if (_prb2dv == null) + { + // no _prb2dv yet, we create one + _prb2dv = Undo.AddComponent(this.m_Target.gameObject); + } + // switch observe from transform to _prb2dv + listProperty.GetArrayElementAtIndex(i).objectReferenceValue = _prb2dv; + Debug.Log("PhotonView has detected you dropped a Rigidbody2D. Instead it's better to observe a PhotonRigidbody2DView for better control and performances"); + } + else if (_newType == typeof(Animator)) + { + + // try to get an existing PhotonAnimatorView ( we don't want any duplicates...) + PhotonAnimatorView _pav = this.m_Target.gameObject.GetComponent(); + if (_pav == null) + { + // no _pav yet, we create one + _pav = Undo.AddComponent(this.m_Target.gameObject); + } + // switch observe from transform to _prb2dv + listProperty.GetArrayElementAtIndex(i).objectReferenceValue = _pav; + Debug.Log("PhotonView has detected you dropped a Animator, so we switched to PhotonAnimatorView so that you can serialized the Animator variables"); + } + else if (!typeof(IPunObservable).IsAssignableFrom(_newType)) + { + bool _ignore = false; +#if PLAYMAKER + _ignore = _newType == typeof(PlayMakerFSM);// Photon Integration for PlayMaker will swap at runtime to a proxy using iPunObservable. +#endif + + if (_newType == null || _newType == typeof(Rigidbody) || _newType == typeof(Rigidbody2D)) + { + _ignore = true; + } + + if (!_ignore) + { + listProperty.GetArrayElementAtIndex(i).objectReferenceValue = null; + Debug.LogError("PhotonView Detected you dropped a Component missing IPunObservable Interface,\n You dropped a <" + _newType + "> instead. It's been removed from observed field."); + } + } + } + + //Debug.Log( listProperty.GetArrayElementAtIndex( i ).objectReferenceValue.GetType() ); + //Rect statsPosition = new Rect( propertyPosition.xMax + 7, propertyPosition.yMin, statsIcon.width, statsIcon.height ); + //ReorderableListResources.DrawTexture( statsPosition, statsIcon ); + + Rect removeButtonRect = new Rect(elementRect.xMax - PhotonGUI.DefaultRemoveButtonStyle.fixedWidth, + elementRect.yMin + 2, + PhotonGUI.DefaultRemoveButtonStyle.fixedWidth, + PhotonGUI.DefaultRemoveButtonStyle.fixedHeight); + + GUI.enabled = !disabled && listProperty.arraySize > 1; + if (GUI.Button(removeButtonRect, new GUIContent(ReorderableListResources.texRemoveButton), PhotonGUI.DefaultRemoveButtonStyle)) + { + listProperty.DeleteArrayElementAtIndex(i); + } + GUI.enabled = !disabled; + + if (i < listProperty.arraySize - 1) + { + texturePosition = new Rect(elementRect.xMin + 2, elementRect.yMax, elementRect.width - 4, 1); + PhotonGUI.DrawSplitter(texturePosition); + } + } + } + } + + if (PhotonGUI.AddButton()) + { + listProperty.InsertArrayElementAtIndex(Mathf.Max(0, listProperty.arraySize - 1)); + } + + this.serializedObject.ApplyModifiedProperties(); + + bool isObservedComponentsEmpty = this.m_Target.ObservedComponents.FindAll(item => item != null).Count == 0; + + if (wasObservedComponentsEmpty == true && isObservedComponentsEmpty == false && this.m_Target.Synchronization == ViewSynchronization.Off) + { + Undo.RecordObject(this.m_Target, "Change PhotonView"); + this.m_Target.Synchronization = ViewSynchronization.UnreliableOnChange; + this.serializedObject.Update(); + } + + if (wasObservedComponentsEmpty == false && isObservedComponentsEmpty == true) + { + Undo.RecordObject(this.m_Target, "Change PhotonView"); + this.m_Target.Synchronization = ViewSynchronization.Off; + this.serializedObject.Update(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewInspector.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewInspector.cs.meta new file mode 100644 index 00000000..200b1ee2 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PhotonViewInspector.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e73a30c46df19194f873ea7a9ce12753 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunGradient.png b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunGradient.png new file mode 100644 index 00000000..15d054da Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunGradient.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunGradient.png.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunGradient.png.meta new file mode 100644 index 00000000..48f073e6 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunGradient.png.meta @@ -0,0 +1,45 @@ +fileFormatVersion: 2 +guid: 1faa1cf0448470c4ebbb23b97759ab50 +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: 0 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettings.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettings.cs new file mode 100644 index 00000000..3fe487ce --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettings.cs @@ -0,0 +1,178 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Optional lowest-viewID setting per-scene. So PhotonViews don't get the same ID. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +using System; +using System.Collections.Generic; +using System.IO; + +using UnityEditor; +using UnityEngine; + +namespace Photon.Pun +{ + [Serializable] + public class SceneSetting + { + public SceneAsset sceneAsset; + public string sceneName; + public int minViewId; + } + + [HelpURL("https://doc.photonengine.com/en-us/pun/current/getting-started/feature-overview#scene_photonviews_in_multiple_scenes")] + public class PunSceneSettings : ScriptableObject + { + + #if UNITY_EDITOR + // Suppressing compiler warning "this variable is never used". Only used in the CustomEditor, only in Editor + #pragma warning disable 0414 + [SerializeField] + bool SceneSettingsListFoldoutOpen = true; + #pragma warning restore 0414 + #endif + + [SerializeField] + public List MinViewIdPerScene = new List(); + + + private const string SceneSettingsFileName = "PunSceneSettingsFile.asset"; + + // we use the path to PunSceneSettings.cs as path to create a scene settings file + private static string punSceneSettingsCsPath; + + public static string PunSceneSettingsCsPath + { + get + { + if (!string.IsNullOrEmpty(punSceneSettingsCsPath)) + { + return punSceneSettingsCsPath; + } + + // Unity 4.3.4 does not yet have AssetDatabase.FindAssets(). Would be easier. + var result = Directory.GetFiles(Application.dataPath, "PunSceneSettings.cs", SearchOption.AllDirectories); + if (result.Length >= 1) + { + punSceneSettingsCsPath = Path.GetDirectoryName(result[0]); + punSceneSettingsCsPath = punSceneSettingsCsPath.Replace('\\', '/'); + punSceneSettingsCsPath = punSceneSettingsCsPath.Replace(Application.dataPath, "Assets"); + + // AssetDatabase paths have to use '/' and are relative to the project's folder. Always. + punSceneSettingsCsPath = punSceneSettingsCsPath + "/" + SceneSettingsFileName; + } + + return punSceneSettingsCsPath; + } + } + + + private static PunSceneSettings instanceField; + + public static PunSceneSettings Instance + { + get + { + if (instanceField != null) + { + return instanceField; + } + + instanceField = (PunSceneSettings)AssetDatabase.LoadAssetAtPath(PunSceneSettingsCsPath, typeof(PunSceneSettings)); + if (instanceField == null) + { + instanceField = CreateInstance(); + #pragma warning disable 0168 + try + { + AssetDatabase.CreateAsset(instanceField, PunSceneSettingsCsPath); + } + catch (Exception e) + { + #if PHOTON_UNITY_NETWORKING + Debug.LogError("-- WARNING: PROJECT CLEANUP NECESSARY -- If you delete pun from your project, make sure you also clean up the Scripting define symbols from any reference to PUN like 'PHOTON_UNITY_NETWORKING "); + #endif + } + #pragma warning restore 0168 + } + + return instanceField; + } + } + + + public static int MinViewIdForScene(string sceneName) + { + if (string.IsNullOrEmpty(sceneName)) + { + return 1; + } + + PunSceneSettings pss = Instance; + if (pss == null) + { + Debug.LogError("pss cant be null"); + return 1; + } + + foreach (SceneSetting setting in pss.MinViewIdPerScene) + { + if (setting.sceneName.Equals(sceneName)) + { + return setting.minViewId; + } + } + return 1; + } + + public static void SanitizeSceneSettings() + { + if (Instance == null) + { + return; + } + + #if UNITY_EDITOR + foreach (SceneSetting sceneSetting in Instance.MinViewIdPerScene) + { + if (sceneSetting.sceneAsset == null && !string.IsNullOrEmpty(sceneSetting.sceneName)) + { + + string[] guids = AssetDatabase.FindAssets(sceneSetting.sceneName + " t:SceneAsset"); + + foreach (string guid in guids) + { + string path = AssetDatabase.GUIDToAssetPath(guid); + if (Path.GetFileNameWithoutExtension(path) == sceneSetting.sceneName) + { + sceneSetting.sceneAsset = + AssetDatabase.LoadAssetAtPath( + AssetDatabase.GUIDToAssetPath(guid)); + + // Debug.Log("SceneSettings : ''"+sceneSetting.sceneName+"'' scene is missing: Issue corrected",Instance); + break; + } + } + + //Debug.Log("SceneSettings : ''"+sceneSetting.sceneName+"'' scene is missing",Instance); + + continue; + } + + if (sceneSetting.sceneAsset != null && sceneSetting.sceneName!= sceneSetting.sceneAsset.name ) + { + // Debug.Log("SceneSettings : '"+sceneSetting.sceneName+"' mismatch with sceneAsset: '"+sceneSetting.sceneAsset.name+"' : Issue corrected",Instance); + sceneSetting.sceneName = sceneSetting.sceneAsset.name; + continue; + } + } + #endif + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettings.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettings.cs.meta new file mode 100644 index 00000000..065e2d89 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettings.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fc3284eace5a64d4bb516df7d7effdb9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsFile.asset b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsFile.asset new file mode 100644 index 00000000..a8784019 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsFile.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fc3284eace5a64d4bb516df7d7effdb9, type: 3} + m_Name: PunSceneSettingsFile + m_EditorClassIdentifier: + SceneSettingsListFoldoutOpen: 1 + MinViewIdPerScene: + - sceneAsset: {fileID: 102900000, guid: 559222f4671e440cba71aecba1de3505, type: 3} + sceneName: SceneView_A + minViewId: 2 + - sceneAsset: {fileID: 102900000, guid: a81615022a16c489aac8daadf8f51fae, type: 3} + sceneName: SceneView_B + minViewId: 10 diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsFile.asset.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsFile.asset.meta new file mode 100644 index 00000000..5125fa91 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsFile.asset.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d0aacb83307022d449e90a09d28222ae diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsInspector.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsInspector.cs new file mode 100644 index 00000000..4a683e84 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsInspector.cs @@ -0,0 +1,260 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2019 Exit Games GmbH +// +// +// Custom inspector for the PunSceneSettings component. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace Photon.Pun +{ + [CustomEditor(typeof(PunSceneSettings))] + internal class PunSceneSettingsInspector : Editor + { + private PunSceneSettings m_Target; + private bool isOpen; + private List _duplicateScenesDefinition; + private List _duplicateViewIdDefinition; + + private SerializedProperty listProperty; + private SerializedProperty _sceneSettings_i; + private SerializedProperty sceneNameProperty; + private SerializedProperty sceneAssetProperty; + private SerializedProperty minViewIdProperty; + + private bool _firstTime; + + + public override void OnInspectorGUI() + { + this.m_Target = (PunSceneSettings) this.target; + + // error checking + _duplicateScenesDefinition = m_Target.MinViewIdPerScene.GroupBy(x => x.sceneName) + .Where(g => g.Count() > 1) + .Select(y => y.Key) + .ToList(); + + _duplicateViewIdDefinition = m_Target.MinViewIdPerScene.GroupBy(x => x.minViewId) + .Where(g => g.Count() > 1) + .Select(y => y.Key) + .ToList(); + + DrawSceneSettingsList(); + + foreach (string dup in _duplicateScenesDefinition) + { + EditorGUILayout.LabelField("Found duplicates for scene",dup); + } + + + foreach (SceneSetting sceneSettings in m_Target.MinViewIdPerScene) + { + if (_duplicateViewIdDefinition.Contains(sceneSettings.minViewId)) + { + GUILayout.Label("Found view Id duplicates '"+sceneSettings.minViewId+"' for scene: " +sceneSettings.sceneName); + } + + if (sceneSettings.minViewId > PhotonNetwork.MAX_VIEW_IDS) + { + GUILayout.Label(sceneSettings.sceneName+" view Id can not exceed the max view Id "+PhotonNetwork.MAX_VIEW_IDS); + } + + if (sceneSettings.minViewId < 1) + { + GUILayout.Label(sceneSettings.sceneName+" view Id can not be less than 1"); + } + + if (sceneSettings.sceneAsset == null && !string.IsNullOrEmpty(sceneSettings.sceneName)) + { + GUILayout.Label("'"+sceneSettings.sceneName+"' scene is missing in the project"); + } + } + + _firstTime = false; + } + + private void OnEnable() + { + _firstTime = true; + } + + private void DrawSceneSettingsList() + { + GUILayout.Space(5); + + // check for changes ( from undo for example) + this.serializedObject.Update(); + + listProperty = this.serializedObject.FindProperty("MinViewIdPerScene"); + + if (listProperty == null) + { + return; + } + + float containerElementHeight = 44; + float containerHeight = listProperty.arraySize * containerElementHeight; + + isOpen = PhotonGUI.ContainerHeaderFoldout("Scene Settings (" + listProperty.arraySize + ")", this.serializedObject.FindProperty("SceneSettingsListFoldoutOpen").boolValue); + this.serializedObject.FindProperty("SceneSettingsListFoldoutOpen").boolValue = isOpen; + + if (isOpen == false) + { + containerHeight = 0; + } + + Rect containerRect = PhotonGUI.ContainerBody(containerHeight); + if (isOpen == true) + { + for (int i = 0; i < listProperty.arraySize; ++i) + { + Rect elementRect = new Rect(containerRect.xMin, containerRect.yMin + containerElementHeight * i, + containerRect.width, containerElementHeight); + { + Rect texturePosition = new Rect(elementRect.xMin + 6, + elementRect.yMin + elementRect.height / 2f - 1, 9, 5); + ReorderableListResources.DrawTexture(texturePosition, ReorderableListResources.texGrabHandle); + + Rect propertyPosition = new Rect(elementRect.xMin + 20, elementRect.yMin + 3, + elementRect.width - 45, 16); + + _sceneSettings_i = listProperty.GetArrayElementAtIndex(i); + + sceneNameProperty = _sceneSettings_i.FindPropertyRelative("sceneName"); + sceneAssetProperty = _sceneSettings_i.FindPropertyRelative("sceneAsset"); + minViewIdProperty = _sceneSettings_i.FindPropertyRelative("minViewId"); + + string _sceneName = sceneNameProperty.stringValue; + SceneAsset _sceneAsset = m_Target.MinViewIdPerScene[i].sceneAsset; + + // check if we need to find the scene asset based on the scene name. This is for backward compatibility or when the scene asset was deleted + if (_firstTime) + { + if (_sceneAsset == null && !string.IsNullOrEmpty(_sceneName)) + { + string[] guids = AssetDatabase.FindAssets(_sceneName + " t:SceneAsset"); + + foreach (string guid in guids) + { + string path = AssetDatabase.GUIDToAssetPath(guid); + if (Path.GetFileNameWithoutExtension(path) == _sceneName) + { + sceneAssetProperty.objectReferenceValue = + AssetDatabase.LoadAssetAtPath( + AssetDatabase.GUIDToAssetPath(guid)); + break; + } + } + } + } + + bool _missingSceneAsset = _sceneAsset == null && !string.IsNullOrEmpty(_sceneName); + // if we don't have a scene asset for the serialized scene named, we show an error. + if (_missingSceneAsset || + (sceneNameProperty!=null && _duplicateScenesDefinition!=null && _duplicateScenesDefinition.Contains(sceneNameProperty.stringValue)) + ) + { + GUI.color = Color.red; + } + + EditorGUI.BeginChangeCheck(); + string _label = _missingSceneAsset + ? "Scene Asset: Missing '" + _sceneName + "'" + : "Scene Asset"; + + EditorGUI.PropertyField(propertyPosition,sceneAssetProperty, new GUIContent(_label)); + + if (EditorGUI.EndChangeCheck()) + { + _sceneAsset = sceneAssetProperty.objectReferenceValue as SceneAsset; + if (_sceneAsset == null && !string.IsNullOrEmpty(sceneNameProperty.stringValue)) + { + sceneNameProperty.stringValue = null; + } + else if (sceneNameProperty.stringValue != _sceneAsset.name) + { + sceneNameProperty.stringValue = _sceneAsset.name; + } + } + + + // EditorGUI.PropertyField(propertyPosition, sceneNameProperty, + // new GUIContent("Scene Name")); + + GUI.color = Color.white; + + if ( minViewIdProperty.intValue<1 || minViewIdProperty.intValue> PhotonNetwork.MAX_VIEW_IDS) + { + GUI.color = Color.red; + } + Rect secondPropertyPosition = new Rect(elementRect.xMin + 20, elementRect.yMin + containerElementHeight/2, + elementRect.width - 45, 16); + + EditorGUI.PropertyField(secondPropertyPosition, _sceneSettings_i.FindPropertyRelative("minViewId"), + new GUIContent("Minimum View ID")); + + GUI.color = Color.white; + + //Debug.Log( listProperty.GetArrayElementAtIndex( i ).objectReferenceValue.GetType() ); + //Rect statsPosition = new Rect( propertyPosition.xMax + 7, propertyPosition.yMin, statsIcon.width, statsIcon.height ); + //ReorderableListResources.DrawTexture( statsPosition, statsIcon ); + + + Rect removeButtonRect = new Rect( + elementRect.xMax - PhotonGUI.DefaultRemoveButtonStyle.fixedWidth, + elementRect.yMin + 2, + PhotonGUI.DefaultRemoveButtonStyle.fixedWidth, + PhotonGUI.DefaultRemoveButtonStyle.fixedHeight); + + + if (GUI.Button(removeButtonRect, new GUIContent(ReorderableListResources.texRemoveButton), + PhotonGUI.DefaultRemoveButtonStyle)) + { + listProperty.DeleteArrayElementAtIndex(i); + + Undo.RecordObject(this.m_Target, "Removed SceneSettings Entry"); + + } + + + if (i < listProperty.arraySize - 1) + { + texturePosition = new Rect(elementRect.xMin + 2, elementRect.yMax, elementRect.width - 4, + 1); + PhotonGUI.DrawSplitter(texturePosition); + } + } + } + } + + if (PhotonGUI.AddButton()) + { + this.listProperty.InsertArrayElementAtIndex(Mathf.Max(0, listProperty.arraySize - 1)); + _sceneSettings_i = this.listProperty.GetArrayElementAtIndex(listProperty.arraySize - 1); + sceneNameProperty = _sceneSettings_i.FindPropertyRelative("sceneName"); + sceneAssetProperty = _sceneSettings_i.FindPropertyRelative("sceneAsset"); + minViewIdProperty = _sceneSettings_i.FindPropertyRelative("minViewId"); + + sceneAssetProperty.objectReferenceValue = null; + sceneNameProperty.stringValue = ""; + minViewIdProperty.intValue = 1; + + Undo.RecordObject(this.m_Target, "Added SceneSettings Entry"); + } + + this.serializedObject.ApplyModifiedProperties(); + + + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsInspector.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsInspector.cs.meta new file mode 100644 index 00000000..800c63c6 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/PunSceneSettingsInspector.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1ad59deacfd0848dcb64a51b0a0eb960 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList.meta new file mode 100644 index 00000000..22f4297e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 62126d9bb7b8eb64ea07a039d902d0ac +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/LICENSE.txt b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/LICENSE.txt new file mode 100644 index 00000000..99bae577 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/LICENSE.txt @@ -0,0 +1,26 @@ +Copyright (c) 2013, Rotorz Limited +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project. \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/LICENSE.txt.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/LICENSE.txt.meta new file mode 100644 index 00000000..944ba4cc --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/LICENSE.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c2fbd2e43c3dfae4d9830e9921238cf5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/ReorderableListResources.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/ReorderableListResources.cs new file mode 100644 index 00000000..b2185d8c --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/ReorderableListResources.cs @@ -0,0 +1,237 @@ +// Copyright (c) 2012-2013 Rotorz Limited. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +using UnityEngine; +using UnityEditor; + +using System; + +namespace Photon.Pun +{ + + /// + /// Resources to assist with reorderable list control. + /// + internal static class ReorderableListResources + { + + static ReorderableListResources() + { + GenerateSpecialTextures(); + LoadResourceAssets(); + } + + #region Texture Resources + + private enum ResourceName + { + add_button = 0, + add_button_active, + container_background, + grab_handle, + remove_button, + remove_button_active, + title_background, + } + + /// + /// Resource assets for light skin. + /// + /// + /// Resource assets are PNG images which have been encoded using a base-64 + /// string so that actual asset files are not necessary. + /// + private static string[] s_LightSkin = { + "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAQCAYAAAABOs/SAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAW0lEQVRIS+3NywnAQAhF0anI4mzVCmzBBl7QEBgGE5JFhBAXd+OHM5gZZgYRKcktNxu+HRFF2e6qhtOjtQM7K/tZ+xY89wSbazg9eqOfw6oag4rcChjY8coAjA2l1RxFDY8IFAAAAABJRU5ErkJggg==", + "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAQCAYAAAABOs/SAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGlJREFUeNpiFBER+f/jxw8GNjY2BnqAX79+MXBwcDAwMQwQGHoWnzp1CoxHjo8pBSykBi8+MTMzs2HmY2QfwXxKii9HExdZgNwgHuFB/efPH7pZCLOL8f///wyioqL/6enbL1++MAIEGABvGSLA+9GPZwAAAABJRU5ErkJggg==", + "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAECAYAAABGM/VAAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAMElEQVQYV2P4//8/Q1FR0X8YBvHBAp8+ffp/+fJlMA3igwUfPnwIFgDRYEFM7f8ZAG1EOYL9INrfAAAAAElFTkSuQmCC", + "iVBORw0KGgoAAAANSUhEUgAAAAkAAAAFCAYAAACXU8ZrAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAIElEQVQYV2P49OnTf0KYobCw8D8hzPD/P2FMLesK/wMAs5yJpK+6aN4AAAAASUVORK5CYII=", + "iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAIAAADq9gq6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABVJREFUeNpiVFZWZsAGmBhwAIAAAwAURgBt4C03ZwAAAABJRU5ErkJggg==", + "iVBORw0KGgoAAAANSUhEUgAAAAgAAAACCAIAAADq9gq6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABVJREFUeNpivHPnDgM2wMSAAwAEGAB8VgKYlvqkBwAAAABJRU5ErkJggg==", + "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAECAYAAABGM/VAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAEFJREFUeNpi/P//P0NxcfF/BgRgZP78+fN/VVVVhpCQEAZjY2OGs2fPNrCApBwdHRkePHgAVwoWnDVrFgMyAAgwAAt4E1dCq1obAAAAAElFTkSuQmCC" + }; + /// + /// Resource assets for dark skin. + /// + /// + /// Resource assets are PNG images which have been encoded using a base-64 + /// string so that actual asset files are not necessary. + /// + private static string[] s_DarkSkin = { + "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAQCAYAAAABOs/SAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIBJREFUeNpiVFZW/u/i4sLw4sULBnoACQkJhj179jAwMQwQGHoWl5aWgvHI8TGlgIXU4MUn1t3dPcx8HB8fD2cvXLgQQ0xHR4c2FmMzmBTLhl5QYwt2cn1MtsXkWjg4gvrt27fgWoMeAGQXCDD+//+fQUVF5T89fXvnzh1GgAADAFmSI1Ed3FqgAAAAAElFTkSuQmCC", + "iVBORw0KGgoAAAANSUhEUgAAAB4AAAAQCAYAAAABOs/SAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHlJREFUeNpiFBER+f/jxw8GNjY2BnqAX79+MXBwcDAwMQwQGHoWv3nzBoxHjo8pBSykBi8+MWAOGWY+5uLigrO/ffuGIYbMppnF5Fg2tFM1yKfk+pbkoKZGEA+OVP3nzx+6WQizi/H///8MoqKi/+np2y9fvjACBBgAoTYjgvihfz0AAAAASUVORK5CYII=", + "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAECAYAAABGM/VAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAD1JREFUeNpi/P//P4OKisp/Bii4c+cOIwtIwMXFheHFixcMEhISYAVMINm3b9+CBUA0CDCiazc0NGQECDAAdH0YelA27kgAAAAASUVORK5CYII=", + "iVBORw0KGgoAAAANSUhEUgAAAAkAAAAFCAYAAACXU8ZrAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACRJREFUeNpizM3N/c9AADAqKysTVMTi5eXFSFAREFPHOoAAAwBCfwcAO8g48QAAAABJRU5ErkJggg==", + "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi/P//PwM+wHL06FG8KpgYCABGZWVlvCYABBgA7/sHvGw+cz8AAAAASUVORK5CYII=", + "iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAYAAACzzX7wAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi/P//PwM+wPKfgAomBgKAhYuLC68CgAADAAxjByOjCHIRAAAAAElFTkSuQmCC", + "iVBORw0KGgoAAAANSUhEUgAAAAUAAAAECAYAAABGM/VAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADtJREFUeNpi/P//P4OKisp/Bii4c+cOIwtIQE9Pj+HLly9gQRCfBcQACbx69QqmmAEseO/ePQZkABBgAD04FXsmmijSAAAAAElFTkSuQmCC" + }; + + /// + /// Gets light or dark texture "add_button.png". + /// + public static Texture2D texAddButton + { + get { return s_Cached[ (int)ResourceName.add_button ]; } + } + /// + /// Gets light or dark texture "add_button_active.png". + /// + public static Texture2D texAddButtonActive + { + get { return s_Cached[ (int)ResourceName.add_button_active ]; } + } + /// + /// Gets light or dark texture "container_background.png". + /// + public static Texture2D texContainerBackground + { + get { return s_Cached[ (int)ResourceName.container_background ]; } + } + /// + /// Gets light or dark texture "grab_handle.png". + /// + public static Texture2D texGrabHandle + { + get { return s_Cached[ (int)ResourceName.grab_handle ]; } + } + /// + /// Gets light or dark texture "remove_button.png". + /// + public static Texture2D texRemoveButton + { + get { return s_Cached[ (int)ResourceName.remove_button ]; } + } + /// + /// Gets light or dark texture "remove_button_active.png". + /// + public static Texture2D texRemoveButtonActive + { + get { return s_Cached[ (int)ResourceName.remove_button_active ]; } + } + /// + /// Gets light or dark texture "title_background.png". + /// + public static Texture2D texTitleBackground + { + get { return s_Cached[ (int)ResourceName.title_background ]; } + } + + #endregion + + #region Generated Resources + + public static Texture2D texItemSplitter { get; private set; } + + /// + /// Generate special textures. + /// + private static void GenerateSpecialTextures() + { + var splitterColor = EditorGUIUtility.isProSkin + ? new Color( 1f, 1f, 1f, 0.14f ) + : new Color( 0.59f, 0.59f, 0.59f, 0.55f ) + ; + texItemSplitter = CreatePixelTexture( "(Generated) Item Splitter", splitterColor ); + } + + /// + /// Create 1x1 pixel texture of specified color. + /// + /// Name for texture object. + /// Pixel color. + /// + /// The new Texture2D instance. + /// + public static Texture2D CreatePixelTexture( string name, Color color ) + { + var tex = new Texture2D( 1, 1, TextureFormat.ARGB32, false, true ); + tex.name = name; + tex.hideFlags = HideFlags.HideAndDontSave; + tex.filterMode = FilterMode.Point; + tex.SetPixel( 0, 0, color ); + tex.Apply(); + return tex; + } + + #endregion + + #region Load PNG from Base-64 Encoded String + + private static Texture2D[] s_Cached; + + /// + /// Read textures from base-64 encoded strings. Automatically selects assets based + /// upon whether the light or dark (pro) skin is active. + /// + private static void LoadResourceAssets() + { + var skin = EditorGUIUtility.isProSkin ? s_DarkSkin : s_LightSkin; + s_Cached = new Texture2D[ skin.Length ]; + + for( int i = 0; i < s_Cached.Length; ++i ) + { + // Get image data (PNG) from base64 encoded strings. + byte[] imageData = Convert.FromBase64String( skin[ i ] ); + + // Gather image size from image data. + int texWidth, texHeight; + GetImageSize( imageData, out texWidth, out texHeight ); + + // Generate texture asset. + var tex = new Texture2D( texWidth, texHeight, TextureFormat.ARGB32, false, true ); + tex.hideFlags = HideFlags.HideAndDontSave; + tex.name = "(Generated) ReorderableList:" + i; + tex.filterMode = FilterMode.Point; + tex.LoadImage( imageData ); + + s_Cached[ i ] = tex; + } + + s_LightSkin = null; + s_DarkSkin = null; + } + + /// + /// Read width and height if PNG file in pixels. + /// + /// PNG image data. + /// Width of image in pixels. + /// Height of image in pixels. + private static void GetImageSize( byte[] imageData, out int width, out int height ) + { + width = ReadInt( imageData, 3 + 15 ); + height = ReadInt( imageData, 3 + 15 + 2 + 2 ); + } + + private static int ReadInt( byte[] imageData, int offset ) + { + return ( imageData[ offset ] << 8 ) | imageData[ offset + 1 ]; + } + + #endregion + + #region GUI Helper + private static GUIStyle s_TempStyle = new GUIStyle(); + + /// + /// Draw texture using to workaround bug in Unity where + /// flickers when embedded inside a property drawer. + /// + /// Position of which to draw texture in space of GUI. + /// Texture. + public static void DrawTexture( Rect position, Texture2D texture ) + { + if( Event.current.type != EventType.Repaint ) + return; + + s_TempStyle.normal.background = texture; + + s_TempStyle.Draw( position, GUIContent.none, false, false, false, false ); + } + #endregion + + } + +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/ReorderableListResources.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/ReorderableListResources.cs.meta new file mode 100644 index 00000000..7f43a218 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ReordableList/ReorderableListResources.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 60c609ded101b0a468fb5cf27b31cf27 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/ServerSettingsInspector.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ServerSettingsInspector.cs new file mode 100644 index 00000000..0d5da290 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ServerSettingsInspector.cs @@ -0,0 +1,322 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This is a custom editor for the ServerSettings scriptable object. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + +using System; +using UnityEditor; +using UnityEngine; + +using Photon.Pun; + +using ExitGames.Client.Photon; +using System.Collections.Generic; +using System.Reflection; +using Photon.Realtime; + +namespace Photon.Pun +{ + [CustomEditor(typeof(ServerSettings))] + public class ServerSettingsInspector : Editor + { + private string versionPhoton; + + private string[] regionsPrefsList; + + private string prefLabel; + private const string notAvailableLabel = "n/a"; + + private string rpcCrc; + private bool showRpcs; + + private GUIStyle vertboxStyle; + + public void Awake() + { + this.versionPhoton = System.Reflection.Assembly.GetAssembly(typeof(PhotonPeer)).GetName().Version.ToString(); + } + + + public override void OnInspectorGUI() + { + if (vertboxStyle == null) + vertboxStyle = new GUIStyle("HelpBox") { padding = new RectOffset(6, 6, 6, 6) }; + + SerializedObject sObj = new SerializedObject(this.target); + ServerSettings settings = this.target as ServerSettings; + + + EditorGUI.BeginChangeCheck(); + + #region Version Vertical Box + + EditorGUILayout.BeginVertical(/*vertboxStyle*/); + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel(new GUIContent("Version:", "Version of PUN and Photon3Unity3d.dll.")); + GUILayout.FlexibleSpace(); + var helpicorect = EditorGUILayout.GetControlRect(GUILayout.MaxWidth(16)); + EditorGUIUtility.AddCursorRect(helpicorect, MouseCursor.Link); + if (GUI.Button(helpicorect, PhotonGUI.HelpIcon, GUIStyle.none)) + { + Application.OpenURL(PhotonEditor.UrlPunSettings); + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.LabelField("Pun: " + PhotonNetwork.PunVersion + " Photon lib: " + this.versionPhoton); + EditorGUILayout.EndVertical(); + + #endregion Version Vertical Box + + EditorGUI.indentLevel--; + SerializedProperty showSettingsProp = this.serializedObject.FindProperty("ShowSettings"); + bool showSettings = showSettingsProp.Foldout(new GUIContent("Server/Cloud Settings", "Core Photon Server/Cloud settings.")); + EditorGUI.indentLevel++; + + + if (showSettings != settings.ShowSettings) + { + showSettingsProp.boolValue = showSettings; + } + + if (showSettingsProp.boolValue) + { + SerializedProperty settingsSp = this.serializedObject.FindProperty("AppSettings"); + + EditorGUI.indentLevel++; + + //Realtime APP ID + this.BuildAppIdField(settingsSp.FindPropertyRelative("AppIdRealtime"), "App Id PUN"); + + if (PhotonEditorUtils.HasChat) + { + this.BuildAppIdField(settingsSp.FindPropertyRelative("AppIdChat")); + } + if (PhotonEditorUtils.HasVoice) + { + this.BuildAppIdField(settingsSp.FindPropertyRelative("AppIdVoice")); + } + + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("AppVersion")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("UseNameServer"), new GUIContent("Use Name Server", "Photon Cloud requires this checked.\nUncheck for Photon Server SDK (OnPremise).")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("FixedRegion"), new GUIContent("Fixed Region", "Photon Cloud setting, needs a Name Server.\nDefine one region to always connect to.\nLeave empty to use the best region from a server-side region list.")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("Server"), new GUIContent("Server", "Typically empty for Photon Cloud.\nFor Photon OnPremise, enter your host name or IP. Also uncheck \"Use Name Server\" for older Photon OnPremise servers.")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("Port"), new GUIContent("Port", "Leave 0 to use default Photon Cloud ports for the Name Server.\nOnPremise defaults to 5055 for UDP and 4530 for TCP.")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("ProxyServer"), new GUIContent("Proxy Server", "HTTP Proxy Server for WebSocket connection. See LoadBalancingClient.ProxyServerAddress for options.")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("Protocol"), new GUIContent("Protocol", "Use UDP where possible.\nWSS works on WebGL and Xbox exports.\nDefine WEBSOCKET for use on other platforms.")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("EnableProtocolFallback"), new GUIContent("Protocol Fallback", "Automatically try another network protocol, if initial connect fails.\nWill use default Name Server ports.")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("EnableLobbyStatistics"), new GUIContent("Lobby Statistics", "When using multiple room lists (lobbies), the server can send info about their usage.")); + EditorGUILayout.PropertyField(settingsSp.FindPropertyRelative("NetworkLogging"), new GUIContent("Network Logging", "Log level for the Photon libraries.")); + EditorGUI.indentLevel--; + } + + EditorGUILayout.PropertyField(this.serializedObject.FindProperty("PunLogging"), new GUIContent("PUN Logging", "Log level for the PUN layer.")); + EditorGUILayout.PropertyField(this.serializedObject.FindProperty("EnableSupportLogger"), new GUIContent("Support Logger", "Logs additional info for debugging.\nUse this when you submit bugs to the Photon Team.")); + EditorGUILayout.PropertyField(this.serializedObject.FindProperty("RunInBackground"), new GUIContent("Run In Background", "Enables apps to keep the connection without focus. Android and iOS ignore this.")); + EditorGUILayout.PropertyField(this.serializedObject.FindProperty("StartInOfflineMode"), new GUIContent("Start In Offline Mode", "Simulates an online connection.\nPUN can be used as usual.")); + + EditorGUILayout.PropertyField(this.serializedObject.FindProperty("DevRegion"), new GUIContent("Dev Region", "Photon Cloud setting, needs a Name Server.\nDefine region the Editor and Development builds will always connect to - ensuring all users can find common rooms.\nLeave empty to use the Fixed Region or best region from a server-side region list. This value will be ignored for non-Development builds.")); + + #region Best Region Box + + EditorGUILayout.BeginVertical(vertboxStyle); + + if (!string.IsNullOrEmpty(PhotonNetwork.BestRegionSummaryInPreferences)) + { + this.regionsPrefsList = PhotonNetwork.BestRegionSummaryInPreferences.Split(new[] {';'}, StringSplitOptions.RemoveEmptyEntries); + if (this.regionsPrefsList.Length < 2) + { + this.prefLabel = notAvailableLabel; + } + else + { + this.prefLabel = string.Format("'{0}' ping:{1}ms ", this.regionsPrefsList[0], this.regionsPrefsList[1]); + } + } + else + { + this.prefLabel = notAvailableLabel; + } + + EditorGUILayout.LabelField(new GUIContent("Best Region Preference: " + prefLabel, "Best region is used if Fixed Region is empty.")); + + EditorGUILayout.BeginHorizontal(); + + var resetrect = EditorGUILayout.GetControlRect(GUILayout.MinWidth(64)); + var editrect = EditorGUILayout.GetControlRect(GUILayout.MinWidth(64)); + if (GUI.Button(resetrect, "Reset", EditorStyles.miniButton)) + { + ServerSettings.ResetBestRegionCodeInPreferences(); + } + + if (GUI.Button(editrect, "Edit WhiteList", EditorStyles.miniButton)) + { + Application.OpenURL("https://dashboard.photonengine.com/en-US/App/RegionsWhitelistEdit/" + PhotonNetwork.PhotonServerSettings.AppSettings.AppIdRealtime); + + } + + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + + #endregion Best Region Box + + + //this.showRpcs = EditorGUILayout.Foldout(this.showRpcs, new GUIContent("RPCs", "RPC shortcut list.")); + EditorGUI.indentLevel--; + this.showRpcs = this.showRpcs.Foldout(new GUIContent("RPCs", "RPC shortcut list.")); + EditorGUI.indentLevel++; + + if (this.showRpcs) + { + // first time check to get the rpc has proper + if (string.IsNullOrEmpty(this.rpcCrc)) + { + this.rpcCrc = this.RpcListHashCode().ToString("X"); + } + + #region Begin Vertical Box CRC + + EditorGUILayout.BeginVertical(vertboxStyle); + + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PrefixLabel("List CRC"); + + EditorGUI.indentLevel--; + var copyrect = EditorGUILayout.GetControlRect(GUILayout.MaxWidth(16)); + EditorGUILayout.GetControlRect(GUILayout.MaxWidth(12)); + var hashrect = EditorGUILayout.GetControlRect(GUILayout.MinWidth(16)); // new Rect(copyrect) { xMin = copyrect.xMin + 32 }; + + EditorGUIUtility.AddCursorRect(copyrect, MouseCursor.Link); + EditorGUI.LabelField(copyrect, new GUIContent("", "Copy Hashcode to Clipboard")); + if (GUI.Button(copyrect, PhotonGUI.CopyIcon, GUIStyle.none)) + { + Debug.Log("RPC-List HashCode copied into your ClipBoard: " + this.rpcCrc + ". Make sure clients that send each other RPCs have the same RPC-List."); + EditorGUIUtility.systemCopyBuffer = this.rpcCrc; + } + EditorGUI.SelectableLabel(hashrect, this.rpcCrc); + + EditorGUILayout.EndHorizontal(); + + EditorGUI.indentLevel++; + + EditorGUILayout.BeginHorizontal(); + + var refreshrect = EditorGUILayout.GetControlRect(GUILayout.MinWidth(64)); + var clearrect = EditorGUILayout.GetControlRect(GUILayout.MinWidth(64)); + + if (GUI.Button(refreshrect, "Refresh RPCs", EditorStyles.miniButton)) + { + PhotonEditor.UpdateRpcList(); + this.Repaint(); + } + + if (GUI.Button(clearrect, "Clear RPCs", EditorStyles.miniButton)) + { + PhotonEditor.ClearRpcList(); + } + + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.EndVertical(); + + #endregion End Vertical Box CRC + + EditorGUI.indentLevel++; + + SerializedProperty sRpcs = sObj.FindProperty("RpcList"); + EditorGUILayout.PropertyField(sRpcs, true); + + EditorGUI.indentLevel--; + } + + if (EditorGUI.EndChangeCheck()) + { + sObj.ApplyModifiedProperties(); + this.serializedObject.ApplyModifiedProperties(); + + // cache the rpc hash + this.rpcCrc = this.RpcListHashCode().ToString("X"); + } + + #region Simple Settings + + /// Conditional Simple Sync Settings DrawGUI - Uses reflection to avoid having to hard connect the libraries + var SettingsScriptableObjectBaseType = GetType("Photon.Utilities.SettingsScriptableObjectBase"); + if (SettingsScriptableObjectBaseType != null) + { + EditorGUILayout.GetControlRect(false, 3); + + EditorGUILayout.LabelField("Simple Extension Settings", (GUIStyle)"BoldLabel"); + + var drawAllMethod = SettingsScriptableObjectBaseType.GetMethod("DrawAllSettings"); + + if (drawAllMethod != null && this != null) + { + bool initializeAsOpen = false; + drawAllMethod.Invoke(null, new object[2] { this, initializeAsOpen }); + + } + } + + + #endregion + } + + private static Type GetType(string typeName) + { + var type = Type.GetType(typeName); + if (type != null) return type; + foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) + { + type = a.GetType(typeName); + if (type != null) + return type; + } + return null; + } + + private int RpcListHashCode() + { + // this is a hashcode generated to (more) easily compare this Editor's RPC List with some other + int hashCode = PhotonNetwork.PhotonServerSettings.RpcList.Count + 1; + foreach (string s in PhotonNetwork.PhotonServerSettings.RpcList) + { + int h1 = s.GetHashCode(); + hashCode = ((h1 << 5) + h1) ^ hashCode; + } + return hashCode; + } + + private void BuildAppIdField(SerializedProperty property, string label = null) + { + EditorGUILayout.BeginHorizontal(); + + if (label != null) + { + EditorGUILayout.PropertyField(property, new GUIContent(label), GUILayout.MinWidth(32)); + } + else + { + EditorGUILayout.PropertyField(property, GUILayout.MinWidth(32)); + } + + property.stringValue = property.stringValue.Trim(); + string appId = property.stringValue; + + string url = "https://dashboard.photonengine.com/en-US/PublicCloud"; + + if (!string.IsNullOrEmpty(appId)) + { + url = string.Format("https://dashboard.photonengine.com/en-US/App/Manage/{0}", appId); + } + if (GUILayout.Button("Dashboard", EditorStyles.miniButton, GUILayout.MinWidth(78), GUILayout.MaxWidth(78))) + { + Application.OpenURL(url); + } + EditorGUILayout.EndHorizontal(); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/ServerSettingsInspector.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ServerSettingsInspector.cs.meta new file mode 100644 index 00000000..d9f769d2 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/ServerSettingsInspector.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 21239ba77ac4b534f958e8617ef13ede +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views.meta new file mode 100644 index 00000000..666c47e9 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c6024eaa234f94341af9e45cc99285c7 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/MonoBehaviourPunEditor.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/MonoBehaviourPunEditor.cs new file mode 100644 index 00000000..6d50f534 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/MonoBehaviourPunEditor.cs @@ -0,0 +1,40 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This is a custom editor for the AnimatorView component. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + +namespace Photon.Pun +{ + using UnityEditor; + using UnityEngine; + + [CustomEditor(typeof(MonoBehaviourPun))] + public abstract class MonoBehaviourPunEditor : Editor + { + MonoBehaviourPun mbTarget; + + private void OnEnable() + { + mbTarget = target as MonoBehaviourPun; + } + + public override void OnInspectorGUI() + { + mbTarget = target as MonoBehaviourPun; + + base.OnInspectorGUI(); + + if (mbTarget.photonView == null) + { + EditorGUILayout.HelpBox("Unable to find a PhotonView on this GameObject or on any parent GameObject.", MessageType.Warning); + } + } + + + } +} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/MonoBehaviourPunEditor.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/MonoBehaviourPunEditor.cs.meta new file mode 100644 index 00000000..9fbb5e94 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/MonoBehaviourPunEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6da457ee57ad5794782f1f76644536e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonAnimatorViewEditor.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonAnimatorViewEditor.cs new file mode 100644 index 00000000..4bd51437 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonAnimatorViewEditor.cs @@ -0,0 +1,295 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This is a custom editor for the AnimatorView component. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System.Collections.Generic; + using UnityEditor; + using UnityEditor.Animations; + using UnityEngine; + + + [CustomEditor(typeof(PhotonAnimatorView))] + public class PhotonAnimatorViewEditor : MonoBehaviourPunEditor + { + private Animator m_Animator; + private PhotonAnimatorView m_Target; + private AnimatorController m_Controller; + + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + + if (this.m_Animator == null) + { + EditorGUILayout.HelpBox("GameObject doesn't have an Animator component to synchronize", MessageType.Warning); + return; + } + + this.DrawWeightInspector(); + + if (this.GetLayerCount() == 0) + { + EditorGUILayout.HelpBox("Animator doesn't have any layers setup to synchronize", MessageType.Warning); + } + + this.DrawParameterInspector(); + + if (this.GetParameterCount() == 0) + { + EditorGUILayout.HelpBox("Animator doesn't have any parameters setup to synchronize", MessageType.Warning); + } + + this.serializedObject.ApplyModifiedProperties(); + + //GUILayout.Label( "m_SynchronizeLayers " + serializedObject.FindProperty( "m_SynchronizeLayers" ).arraySize ); + //GUILayout.Label( "m_SynchronizeParameters " + serializedObject.FindProperty( "m_SynchronizeParameters" ).arraySize ); + } + + + private int GetLayerCount() + { + return (this.m_Controller == null) ? 0 : this.m_Controller.layers.Length; + } + + private int GetParameterCount() + { + return (this.m_Controller == null) ? 0 : this.m_Controller.parameters.Length; + } + + private AnimatorControllerParameter GetAnimatorControllerParameter(int i) + { + return this.m_Controller.parameters[i]; + } + + + private RuntimeAnimatorController GetEffectiveController(Animator animator) + { + RuntimeAnimatorController controller = animator.runtimeAnimatorController; + + AnimatorOverrideController overrideController = controller as AnimatorOverrideController; + while (overrideController != null) + { + controller = overrideController.runtimeAnimatorController; + overrideController = controller as AnimatorOverrideController; + } + + return controller; + } + + private void OnEnable() + { + this.m_Target = (PhotonAnimatorView)this.target; + this.m_Animator = this.m_Target.GetComponent(); + + if (m_Animator) + { + this.m_Controller = this.GetEffectiveController(this.m_Animator) as AnimatorController; + + this.CheckIfStoredParametersExist(); + } + } + + private void DrawWeightInspector() + { + SerializedProperty foldoutProperty = this.serializedObject.FindProperty("ShowLayerWeightsInspector"); + foldoutProperty.boolValue = PhotonGUI.ContainerHeaderFoldout("Synchronize Layer Weights", foldoutProperty.boolValue); + + if (foldoutProperty.boolValue == false) + { + return; + } + + float lineHeight = 20; + Rect containerRect = PhotonGUI.ContainerBody(this.GetLayerCount() * lineHeight); + + for (int i = 0; i < this.GetLayerCount(); ++i) + { + if (this.m_Target.DoesLayerSynchronizeTypeExist(i) == false) + { + this.m_Target.SetLayerSynchronized(i, PhotonAnimatorView.SynchronizeType.Disabled); + } + + PhotonAnimatorView.SynchronizeType syncType = this.m_Target.GetLayerSynchronizeType(i); + + Rect elementRect = new Rect(containerRect.xMin, containerRect.yMin + i * lineHeight, containerRect.width, lineHeight); + + Rect labelRect = new Rect(elementRect.xMin + 5, elementRect.yMin + 2, EditorGUIUtility.labelWidth - 5, elementRect.height); + GUI.Label(labelRect, "Layer " + i); + + Rect popupRect = new Rect(elementRect.xMin + EditorGUIUtility.labelWidth, elementRect.yMin + 2, elementRect.width - EditorGUIUtility.labelWidth - 5, EditorGUIUtility.singleLineHeight); + syncType = (PhotonAnimatorView.SynchronizeType)EditorGUI.EnumPopup(popupRect, syncType); + + if (i < this.GetLayerCount() - 1) + { + Rect splitterRect = new Rect(elementRect.xMin + 2, elementRect.yMax, elementRect.width - 4, 1); + PhotonGUI.DrawSplitter(splitterRect); + } + + if (syncType != this.m_Target.GetLayerSynchronizeType(i)) + { + Undo.RecordObject(this.target, "Modify Synchronize Layer Weights"); + this.m_Target.SetLayerSynchronized(i, syncType); + } + } + } + + private bool DoesParameterExist(string name) + { + for (int i = 0; i < this.GetParameterCount(); ++i) + { + if (this.GetAnimatorControllerParameter(i).name == name) + { + return true; + } + } + + return false; + } + + private void CheckIfStoredParametersExist() + { + var syncedParams = this.m_Target.GetSynchronizedParameters(); + List paramsToRemove = new List(); + + for (int i = 0; i < syncedParams.Count; ++i) + { + string parameterName = syncedParams[i].Name; + if (this.DoesParameterExist(parameterName) == false) + { + Debug.LogWarning("Parameter '" + this.m_Target.GetSynchronizedParameters()[i].Name + "' doesn't exist anymore. Removing it from the list of synchronized parameters"); + paramsToRemove.Add(parameterName); + } + } + + if (paramsToRemove.Count > 0) + { + foreach (string param in paramsToRemove) + { + this.m_Target.GetSynchronizedParameters().RemoveAll(item => item.Name == param); + } + } + } + + + private void DrawParameterInspector() + { + // flag to expose a note in Interface if one or more trigger(s) are synchronized + bool isUsingTriggers = false; + + SerializedProperty foldoutProperty = this.serializedObject.FindProperty("ShowParameterInspector"); + foldoutProperty.boolValue = PhotonGUI.ContainerHeaderFoldout("Synchronize Parameters", foldoutProperty.boolValue); + + if (foldoutProperty.boolValue == false) + { + return; + } + + float lineHeight = 20; + Rect containerRect = PhotonGUI.ContainerBody(this.GetParameterCount() * lineHeight); + + for (int i = 0; i < this.GetParameterCount(); i++) + { + AnimatorControllerParameter parameter = null; + parameter = this.GetAnimatorControllerParameter(i); + + string defaultValue = ""; + + if (parameter.type == AnimatorControllerParameterType.Bool) + { + if (Application.isPlaying && this.m_Animator.gameObject.activeInHierarchy) + { + defaultValue += this.m_Animator.GetBool(parameter.name); + } + else + { + defaultValue += parameter.defaultBool.ToString(); + } + } + else if (parameter.type == AnimatorControllerParameterType.Float) + { + if (Application.isPlaying && this.m_Animator.gameObject.activeInHierarchy) + { + defaultValue += this.m_Animator.GetFloat(parameter.name).ToString("0.00"); + } + else + { + defaultValue += parameter.defaultFloat.ToString(); + } + } + else if (parameter.type == AnimatorControllerParameterType.Int) + { + if (Application.isPlaying && this.m_Animator.gameObject.activeInHierarchy) + { + defaultValue += this.m_Animator.GetInteger(parameter.name); + } + else + { + defaultValue += parameter.defaultInt.ToString(); + } + } + else if (parameter.type == AnimatorControllerParameterType.Trigger) + { + if (Application.isPlaying && this.m_Animator.gameObject.activeInHierarchy) + { + defaultValue += this.m_Animator.GetBool(parameter.name); + } + else + { + defaultValue += parameter.defaultBool.ToString(); + } + } + + if (this.m_Target.DoesParameterSynchronizeTypeExist(parameter.name) == false) + { + this.m_Target.SetParameterSynchronized(parameter.name, (PhotonAnimatorView.ParameterType)parameter.type, PhotonAnimatorView.SynchronizeType.Disabled); + } + + PhotonAnimatorView.SynchronizeType value = this.m_Target.GetParameterSynchronizeType(parameter.name); + + // check if using trigger and actually synchronizing it + if (value != PhotonAnimatorView.SynchronizeType.Disabled && parameter.type == AnimatorControllerParameterType.Trigger) + { + isUsingTriggers = true; + } + + Rect elementRect = new Rect(containerRect.xMin, containerRect.yMin + i * lineHeight, containerRect.width, lineHeight); + + Rect labelRect = new Rect(elementRect.xMin + 5, elementRect.yMin + 2, EditorGUIUtility.labelWidth - 5, elementRect.height); + GUI.Label(labelRect, parameter.name + " (" + defaultValue + ")"); + + Rect popupRect = new Rect(elementRect.xMin + EditorGUIUtility.labelWidth, elementRect.yMin + 2, elementRect.width - EditorGUIUtility.labelWidth - 5, EditorGUIUtility.singleLineHeight); + value = (PhotonAnimatorView.SynchronizeType)EditorGUI.EnumPopup(popupRect, value); + + if (i < this.GetParameterCount() - 1) + { + Rect splitterRect = new Rect(elementRect.xMin + 2, elementRect.yMax, elementRect.width - 4, 1); + PhotonGUI.DrawSplitter(splitterRect); + } + + if (value != this.m_Target.GetParameterSynchronizeType(parameter.name)) + { + Undo.RecordObject(this.target, "Modify Synchronize Parameter " + parameter.name); + this.m_Target.SetParameterSynchronized(parameter.name, (PhotonAnimatorView.ParameterType)parameter.type, value); + } + } + + // display note when synchronized triggers are detected. + if (isUsingTriggers) + { + EditorGUILayout.HelpBox("When using triggers, make sure this component is last in the stack. " + + "If you still experience issues, implement triggers as a regular RPC " + + "or in custom IPunObservable component instead.", MessageType.Warning); + + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonAnimatorViewEditor.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonAnimatorViewEditor.cs.meta new file mode 100644 index 00000000..c6e48af4 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonAnimatorViewEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a3f61bade114730459f7ad45f5f292c1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbody2DViewEditor.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbody2DViewEditor.cs new file mode 100644 index 00000000..ffeb6dbc --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbody2DViewEditor.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This is a custom editor for the PhotonRigidbody2DView component. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEditor; + using UnityEngine; + + + [CustomEditor(typeof (PhotonRigidbody2DView))] + public class PhotonRigidbody2DViewEditor : MonoBehaviourPunEditor + { + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + + if (Application.isPlaying) + { + EditorGUILayout.HelpBox("Editing is disabled in play mode.", MessageType.Info); + return; + } + + PhotonRigidbody2DView view = (PhotonRigidbody2DView)target; + + view.m_TeleportEnabled = PhotonGUI.ContainerHeaderToggle("Enable teleport for large distances", view.m_TeleportEnabled); + + if (view.m_TeleportEnabled) + { + Rect rect = PhotonGUI.ContainerBody(20.0f); + view.m_TeleportIfDistanceGreaterThan = EditorGUI.FloatField(rect, "Teleport if distance greater than", view.m_TeleportIfDistanceGreaterThan); + } + + view.m_SynchronizeVelocity = PhotonGUI.ContainerHeaderToggle("Synchronize Velocity", view.m_SynchronizeVelocity); + view.m_SynchronizeAngularVelocity = PhotonGUI.ContainerHeaderToggle("Synchronize Angular Velocity", view.m_SynchronizeAngularVelocity); + + if (GUI.changed) + { + EditorUtility.SetDirty(view); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbody2DViewEditor.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbody2DViewEditor.cs.meta new file mode 100644 index 00000000..9e509610 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbody2DViewEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3a82e8e86b9eecb40ac3f6ebc949f6ef +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbodyViewEditor.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbodyViewEditor.cs new file mode 100644 index 00000000..835605f0 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbodyViewEditor.cs @@ -0,0 +1,50 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This is a custom editor for the RigidbodyView component. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEditor; + using UnityEngine; + + + [CustomEditor(typeof (PhotonRigidbodyView))] + public class PhotonRigidbodyViewEditor : MonoBehaviourPunEditor + { + public override void OnInspectorGUI() + { + base.OnInspectorGUI(); + + if (Application.isPlaying) + { + EditorGUILayout.HelpBox("Editing is disabled in play mode.", MessageType.Info); + return; + } + + PhotonRigidbodyView view = (PhotonRigidbodyView)target; + + view.m_TeleportEnabled = PhotonGUI.ContainerHeaderToggle("Enable teleport for large distances", view.m_TeleportEnabled); + + if (view.m_TeleportEnabled) + { + Rect rect = PhotonGUI.ContainerBody(20.0f); + view.m_TeleportIfDistanceGreaterThan = EditorGUI.FloatField(rect, "Teleport if distance greater than", view.m_TeleportIfDistanceGreaterThan); + } + + view.m_SynchronizeVelocity = PhotonGUI.ContainerHeaderToggle("Synchronize Velocity", view.m_SynchronizeVelocity); + view.m_SynchronizeAngularVelocity = PhotonGUI.ContainerHeaderToggle("Synchronize Angular Velocity", view.m_SynchronizeAngularVelocity); + + if (GUI.changed) + { + EditorUtility.SetDirty(view); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbodyViewEditor.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbodyViewEditor.cs.meta new file mode 100644 index 00000000..b4fa5b9b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonRigidbodyViewEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4bcfebc9a2f1074488adedd1fe84e6c9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewClassicEditor.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewClassicEditor.cs new file mode 100644 index 00000000..22c8e358 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewClassicEditor.cs @@ -0,0 +1,412 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This is a custom editor for the TransformView component. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEditor; + using UnityEngine; + + + [CustomEditor(typeof(PhotonTransformViewClassic))] + public class PhotonTransformViewClassicEditor : MonoBehaviourPunEditor + { + //private PhotonTransformViewClassic m_Target; + + private SerializedProperty m_SynchronizePositionProperty; + private SerializedProperty m_SynchronizeRotationProperty; + private SerializedProperty m_SynchronizeScaleProperty; + + private bool m_InterpolateHelpOpen; + private bool m_ExtrapolateHelpOpen; + private bool m_InterpolateRotationHelpOpen; + private bool m_InterpolateScaleHelpOpen; + + private const int EDITOR_LINE_HEIGHT = 20; + + private const string INTERPOLATE_TOOLTIP = + "Choose between synchronizing the value directly (by disabling interpolation) or smoothly move it towards the newest update."; + + private const string INTERPOLATE_HELP = + "You can use interpolation to smoothly move your GameObject towards a new position that is received via the network. " + + "This helps to reduce the stuttering movement that results because the network updates only arrive 10 times per second.\n" + + "As a side effect, the GameObject is always lagging behind the actual position a little bit. This can be addressed with extrapolation."; + + private const string EXTRAPOLATE_TOOLTIP = "Extrapolation is used to predict where the GameObject actually is"; + + private const string EXTRAPOLATE_HELP = + "Whenever you deal with network values, all values you receive will be a little bit out of date since that data needs " + + "to reach you first. You can use extrapolation to try to predict where the player actually is, based on the movement data you have received.\n" + + + "This has to be tweaked carefully for each specific game in order to insure the optimal prediction. Sometimes it is very easy to extrapolate states, because " + + + "the GameObject behaves very predictable (for example for vehicles). Other times it can be very hard because the user input is translated directly to the game " + + "and you cannot really predict what the user is going to do (for example in fighting games)"; + + private const string INTERPOLATE_HELP_URL = "https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/package-demos/rpg-movement#interpolate_options"; + private const string EXTRAPOLATE_HELP_URL = "https://doc.photonengine.com/en-us/pun/current/demos-and-tutorials/package-demos/rpg-movement#extrapolate_options"; + + public void OnEnable() + { + SetupSerializedProperties(); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + base.OnInspectorGUI(); + + //this.m_Target = (PhotonTransformViewClassic) target; + + DrawIsPlayingWarning(); + GUI.enabled = !Application.isPlaying; + + DrawSynchronizePositionHeader(); + DrawSynchronizePositionData(); + + GUI.enabled = !Application.isPlaying; + DrawSynchronizeRotationHeader(); + DrawSynchronizeRotationData(); + + GUI.enabled = !Application.isPlaying; + DrawSynchronizeScaleHeader(); + DrawSynchronizeScaleData(); + + serializedObject.ApplyModifiedProperties(); + + GUI.enabled = true; + } + + private void DrawIsPlayingWarning() + { + if (Application.isPlaying == false) + { + return; + } + + GUILayout.BeginVertical(GUI.skin.box); + { + GUILayout.Label("Editing is disabled in play mode so the two objects don't go out of sync"); + } + GUILayout.EndVertical(); + } + + private void SetupSerializedProperties() + { + this.m_SynchronizePositionProperty = serializedObject.FindProperty("m_PositionModel.SynchronizeEnabled"); + this.m_SynchronizeRotationProperty = serializedObject.FindProperty("m_RotationModel.SynchronizeEnabled"); + this.m_SynchronizeScaleProperty = serializedObject.FindProperty("m_ScaleModel.SynchronizeEnabled"); + } + + private void DrawSynchronizePositionHeader() + { + DrawHeader("Synchronize Position", this.m_SynchronizePositionProperty); + } + + private void DrawSynchronizePositionData() + { + if (this.m_SynchronizePositionProperty == null || this.m_SynchronizePositionProperty.boolValue == false) + { + return; + } + + SerializedProperty interpolatePositionProperty = serializedObject.FindProperty("m_PositionModel.InterpolateOption"); + PhotonTransformViewPositionModel.InterpolateOptions interpolateOption = (PhotonTransformViewPositionModel.InterpolateOptions)interpolatePositionProperty.enumValueIndex; + + SerializedProperty extrapolatePositionProperty = serializedObject.FindProperty("m_PositionModel.ExtrapolateOption"); + PhotonTransformViewPositionModel.ExtrapolateOptions extrapolateOption = (PhotonTransformViewPositionModel.ExtrapolateOptions)extrapolatePositionProperty.enumValueIndex; + + float containerHeight = 155; + + switch (interpolateOption) + { + case PhotonTransformViewPositionModel.InterpolateOptions.FixedSpeed: + case PhotonTransformViewPositionModel.InterpolateOptions.Lerp: + containerHeight += EDITOR_LINE_HEIGHT; + break; + /*case PhotonTransformViewPositionModel.InterpolateOptions.MoveTowardsComplex: + containerHeight += EDITOR_LINE_HEIGHT*3; + break;*/ + } + + if (extrapolateOption != PhotonTransformViewPositionModel.ExtrapolateOptions.Disabled) + { + containerHeight += EDITOR_LINE_HEIGHT; + } + + switch (extrapolateOption) + { + case PhotonTransformViewPositionModel.ExtrapolateOptions.FixedSpeed: + containerHeight += EDITOR_LINE_HEIGHT; + break; + } + + if (this.m_InterpolateHelpOpen == true) + { + containerHeight += GetInterpolateHelpBoxHeight(); + } + + if (this.m_ExtrapolateHelpOpen == true) + { + containerHeight += GetExtrapolateHelpBoxHeight(); + } + + // removed Gizmo Options. -3 lines, -1 splitter + containerHeight -= EDITOR_LINE_HEIGHT * 3; + + Rect rect = PhotonGUI.ContainerBody(containerHeight); + + Rect propertyRect = new Rect(rect.xMin + 5, rect.yMin + 2, rect.width - 10, EditorGUIUtility.singleLineHeight); + + DrawTeleport(ref propertyRect); + DrawSplitter(ref propertyRect); + + DrawSynchronizePositionDataInterpolation(ref propertyRect, interpolatePositionProperty, interpolateOption); + DrawSplitter(ref propertyRect); + + DrawSynchronizePositionDataExtrapolation(ref propertyRect, extrapolatePositionProperty, extrapolateOption); + } + + private float GetInterpolateHelpBoxHeight() + { + return PhotonGUI.RichLabel.CalcHeight(new GUIContent(INTERPOLATE_HELP), Screen.width - 54) + 35; + } + + private float GetExtrapolateHelpBoxHeight() + { + return PhotonGUI.RichLabel.CalcHeight(new GUIContent(EXTRAPOLATE_HELP), Screen.width - 54) + 35; + } + + private void DrawSplitter(ref Rect propertyRect) + { + Rect splitterRect = new Rect(propertyRect.xMin - 3, propertyRect.yMin, propertyRect.width + 6, 1); + PhotonGUI.DrawSplitter(splitterRect); + + propertyRect.y += 5; + } + + private void DrawHelpBox(ref Rect propertyRect, bool isOpen, float height, string helpText, string url) + { + if (isOpen == true) + { + Rect helpRect = new Rect(propertyRect.xMin, propertyRect.yMin, propertyRect.width, height - 5); + GUI.BeginGroup(helpRect, GUI.skin.box); + GUI.Label(new Rect(5, 5, propertyRect.width - 10, height - 30), helpText, PhotonGUI.RichLabel); + if (GUI.Button(new Rect(5, height - 30, propertyRect.width - 10, 20), "Read more in our documentation")) + { + Application.OpenURL(url); + } + + GUI.EndGroup(); + + propertyRect.y += height; + } + } + + private void DrawPropertyWithHelpIcon(ref Rect propertyRect, ref bool isHelpOpen, SerializedProperty property, string tooltip) + { + Rect propertyFieldRect = new Rect(propertyRect.xMin, propertyRect.yMin, propertyRect.width - 20, propertyRect.height); + string propertyName = ObjectNames.NicifyVariableName(property.name); + EditorGUI.PropertyField(propertyFieldRect, property, new GUIContent(propertyName, tooltip)); + + Rect helpIconRect = new Rect(propertyFieldRect.xMax + 5, propertyFieldRect.yMin, 20, propertyFieldRect.height); + isHelpOpen = GUI.Toggle(helpIconRect, isHelpOpen, PhotonGUI.HelpIcon, GUIStyle.none); + + propertyRect.y += EDITOR_LINE_HEIGHT; + } + + private void DrawSynchronizePositionDataExtrapolation(ref Rect propertyRect, SerializedProperty extrapolatePositionProperty, + PhotonTransformViewPositionModel.ExtrapolateOptions extrapolateOption) + { + DrawPropertyWithHelpIcon(ref propertyRect, ref this.m_ExtrapolateHelpOpen, extrapolatePositionProperty, EXTRAPOLATE_TOOLTIP); + DrawHelpBox(ref propertyRect, this.m_ExtrapolateHelpOpen, GetExtrapolateHelpBoxHeight(), EXTRAPOLATE_HELP, EXTRAPOLATE_HELP_URL); + + if (extrapolateOption != PhotonTransformViewPositionModel.ExtrapolateOptions.Disabled) + { + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_PositionModel.ExtrapolateIncludingRoundTripTime")); + propertyRect.y += EDITOR_LINE_HEIGHT; + } + + switch (extrapolateOption) + { + case PhotonTransformViewPositionModel.ExtrapolateOptions.FixedSpeed: + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_PositionModel.ExtrapolateSpeed")); + propertyRect.y += EDITOR_LINE_HEIGHT; + break; + } + } + + private void DrawTeleport(ref Rect propertyRect) + { + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_PositionModel.TeleportEnabled"), + new GUIContent("Enable teleport for great distances")); + propertyRect.y += EDITOR_LINE_HEIGHT; + + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_PositionModel.TeleportIfDistanceGreaterThan"), + new GUIContent("Teleport if distance greater than")); + propertyRect.y += EDITOR_LINE_HEIGHT; + } + + private void DrawSynchronizePositionDataInterpolation(ref Rect propertyRect, SerializedProperty interpolatePositionProperty, + PhotonTransformViewPositionModel.InterpolateOptions interpolateOption) + { + DrawPropertyWithHelpIcon(ref propertyRect, ref this.m_InterpolateHelpOpen, interpolatePositionProperty, INTERPOLATE_TOOLTIP); + DrawHelpBox(ref propertyRect, this.m_InterpolateHelpOpen, GetInterpolateHelpBoxHeight(), INTERPOLATE_HELP, INTERPOLATE_HELP_URL); + + switch (interpolateOption) + { + case PhotonTransformViewPositionModel.InterpolateOptions.FixedSpeed: + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_PositionModel.InterpolateMoveTowardsSpeed"), + new GUIContent("MoveTowards Speed")); + propertyRect.y += EDITOR_LINE_HEIGHT; + break; + + case PhotonTransformViewPositionModel.InterpolateOptions.Lerp: + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_PositionModel.InterpolateLerpSpeed"), new GUIContent("Lerp Speed")); + propertyRect.y += EDITOR_LINE_HEIGHT; + break; + + /*case PhotonTransformViewPositionModel.InterpolateOptions.MoveTowardsComplex: + Rect curveRect = new Rect(propertyRect.xMin, propertyRect.yMin, propertyRect.width - 100, propertyRect.height); + EditorGUI.PropertyField(curveRect, serializedObject.FindProperty("m_PositionModel.InterpolateSpeedCurve"), new GUIContent("MoveTowards Speed Curve")); + + Rect labelRect = new Rect(propertyRect.xMax - 95, propertyRect.yMin, 10, propertyRect.height); + GUI.Label(labelRect, "x"); + + Rect multiplierRect = new Rect(propertyRect.xMax - 80, propertyRect.yMin, 80, propertyRect.height); + EditorGUI.PropertyField(multiplierRect, serializedObject.FindProperty("m_PositionModel.InterpolateMoveTowardsSpeed"), GUIContent.none); + propertyRect.y += EDITOR_LINE_HEIGHT; + + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_PositionModel.InterpolateMoveTowardsAcceleration"), + new GUIContent("Acceleration")); + propertyRect.y += EDITOR_LINE_HEIGHT; + + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_PositionModel.InterpolateMoveTowardsDeceleration"), + new GUIContent("Deceleration")); + propertyRect.y += EDITOR_LINE_HEIGHT; + break;*/ + } + } + + private void DrawSynchronizeRotationHeader() + { + DrawHeader("Synchronize Rotation", this.m_SynchronizeRotationProperty); + } + + private void DrawSynchronizeRotationData() + { + if (this.m_SynchronizeRotationProperty == null || this.m_SynchronizeRotationProperty.boolValue == false) + { + return; + } + + SerializedProperty interpolateRotationProperty = serializedObject.FindProperty("m_RotationModel.InterpolateOption"); + PhotonTransformViewRotationModel.InterpolateOptions interpolateOption = + (PhotonTransformViewRotationModel.InterpolateOptions)interpolateRotationProperty.enumValueIndex; + + float containerHeight = 20; + + switch (interpolateOption) + { + case PhotonTransformViewRotationModel.InterpolateOptions.RotateTowards: + case PhotonTransformViewRotationModel.InterpolateOptions.Lerp: + containerHeight += EDITOR_LINE_HEIGHT; + break; + } + + if (this.m_InterpolateRotationHelpOpen == true) + { + containerHeight += GetInterpolateHelpBoxHeight(); + } + + Rect rect = PhotonGUI.ContainerBody(containerHeight); + Rect propertyRect = new Rect(rect.xMin + 5, rect.yMin + 2, rect.width - 10, EditorGUIUtility.singleLineHeight); + + DrawPropertyWithHelpIcon(ref propertyRect, ref this.m_InterpolateRotationHelpOpen, interpolateRotationProperty, INTERPOLATE_TOOLTIP); + DrawHelpBox(ref propertyRect, this.m_InterpolateRotationHelpOpen, GetInterpolateHelpBoxHeight(), INTERPOLATE_HELP, INTERPOLATE_HELP_URL); + + switch (interpolateOption) + { + case PhotonTransformViewRotationModel.InterpolateOptions.RotateTowards: + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_RotationModel.InterpolateRotateTowardsSpeed"), + new GUIContent("RotateTowards Speed")); + break; + case PhotonTransformViewRotationModel.InterpolateOptions.Lerp: + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_RotationModel.InterpolateLerpSpeed"), new GUIContent("Lerp Speed")); + break; + } + } + + private void DrawSynchronizeScaleHeader() + { + DrawHeader("Synchronize Scale", this.m_SynchronizeScaleProperty); + } + + private void DrawSynchronizeScaleData() + { + if (this.m_SynchronizeScaleProperty == null || this.m_SynchronizeScaleProperty.boolValue == false) + { + return; + } + + SerializedProperty interpolateScaleProperty = serializedObject.FindProperty("m_ScaleModel.InterpolateOption"); + PhotonTransformViewScaleModel.InterpolateOptions interpolateOption = (PhotonTransformViewScaleModel.InterpolateOptions)interpolateScaleProperty.enumValueIndex; + + float containerHeight = EDITOR_LINE_HEIGHT; + + switch (interpolateOption) + { + case PhotonTransformViewScaleModel.InterpolateOptions.MoveTowards: + case PhotonTransformViewScaleModel.InterpolateOptions.Lerp: + containerHeight += EDITOR_LINE_HEIGHT; + break; + } + + if (this.m_InterpolateScaleHelpOpen == true) + { + containerHeight += GetInterpolateHelpBoxHeight(); + } + + Rect rect = PhotonGUI.ContainerBody(containerHeight); + Rect propertyRect = new Rect(rect.xMin + 5, rect.yMin + 2, rect.width - 10, EditorGUIUtility.singleLineHeight); + + DrawPropertyWithHelpIcon(ref propertyRect, ref this.m_InterpolateScaleHelpOpen, interpolateScaleProperty, INTERPOLATE_TOOLTIP); + DrawHelpBox(ref propertyRect, this.m_InterpolateScaleHelpOpen, GetInterpolateHelpBoxHeight(), INTERPOLATE_HELP, INTERPOLATE_HELP_URL); + + switch (interpolateOption) + { + case PhotonTransformViewScaleModel.InterpolateOptions.MoveTowards: + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_ScaleModel.InterpolateMoveTowardsSpeed"), + new GUIContent("MoveTowards Speed")); + break; + case PhotonTransformViewScaleModel.InterpolateOptions.Lerp: + EditorGUI.PropertyField(propertyRect, serializedObject.FindProperty("m_ScaleModel.InterpolateLerpSpeed"), new GUIContent("Lerp Speed")); + break; + } + } + + private void DrawHeader(string label, SerializedProperty property) + { + if (property == null) + { + return; + } + + bool newValue = PhotonGUI.ContainerHeaderToggle(label, property.boolValue); + + if (newValue != property.boolValue) + { + property.boolValue = newValue; + property.serializedObject.ApplyModifiedProperties(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewClassicEditor.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewClassicEditor.cs.meta new file mode 100644 index 00000000..58d59efa --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewClassicEditor.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22292ca8ffb574945bedfaf49266672e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewEditor.cs b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewEditor.cs new file mode 100644 index 00000000..8fb439ba --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewEditor.cs @@ -0,0 +1,72 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// This is a custom editor for the TransformView component. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEditor; + using UnityEngine; + + + [CustomEditor(typeof(PhotonTransformView))] + public class PhotonTransformViewEditor : Editor + { + private bool helpToggle = false; + + SerializedProperty pos, rot, scl, lcl; + + public void OnEnable() + { + pos = serializedObject.FindProperty("m_SynchronizePosition"); + rot = serializedObject.FindProperty("m_SynchronizeRotation"); + scl = serializedObject.FindProperty("m_SynchronizeScale"); + lcl = serializedObject.FindProperty("m_UseLocal"); + } + + public override void OnInspectorGUI() + { + if (Application.isPlaying) + { + EditorGUILayout.HelpBox("Editing is disabled in play mode.", MessageType.Info); + return; + } + + PhotonTransformView view = (PhotonTransformView)target; + + + EditorGUILayout.LabelField("Synchronize Options"); + + + EditorGUI.BeginChangeCheck(); + { + EditorGUILayout.BeginVertical("HelpBox"); + { + EditorGUILayout.PropertyField(pos, new GUIContent("Position", pos.tooltip)); + EditorGUILayout.PropertyField(rot, new GUIContent("Rotation", rot.tooltip)); + EditorGUILayout.PropertyField(scl, new GUIContent("Scale", scl.tooltip)); + } + EditorGUILayout.EndHorizontal(); + + EditorGUILayout.PropertyField(lcl, new GUIContent("Use Local", lcl.tooltip)); + } + + if (EditorGUI.EndChangeCheck()) + { + serializedObject.ApplyModifiedProperties(); + } + + this.helpToggle = EditorGUILayout.Foldout(this.helpToggle, "Info"); + if (this.helpToggle) + { + EditorGUILayout.HelpBox("The Photon Transform View of PUN 2 is simple by design.\nReplace it with the Photon Transform View Classic if you want the old options.\nThe best solution is a custom IPunObservable implementation.", MessageType.Info, true); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewEditor.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewEditor.cs.meta new file mode 100644 index 00000000..b8948327 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/Views/PhotonTransformViewEditor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: a8c9ec475ad103b43b901d942ff66e02 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/help.png b/Assets/Photon/PhotonUnityNetworking/Code/Editor/help.png new file mode 100644 index 00000000..a421667f Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Code/Editor/help.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Editor/help.png.meta b/Assets/Photon/PhotonUnityNetworking/Code/Editor/help.png.meta new file mode 100644 index 00000000..cb312ac9 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Editor/help.png.meta @@ -0,0 +1,45 @@ +fileFormatVersion: 2 +guid: 9f1212502533cb34188dd6ef094188cb +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: .5, y: .5} + spritePixelsToUnits: 100 + alphaIsTransparency: 1 + textureType: 2 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Enums.cs b/Assets/Photon/PhotonUnityNetworking/Code/Enums.cs new file mode 100644 index 00000000..1a3928ea --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Enums.cs @@ -0,0 +1,94 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Wraps up several enumerations for PUN. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + /// Which PhotonNetwork method was called to connect (which influences the regions we want pinged). + /// PhotonNetwork.ConnectUsingSettings will call either ConnectToMaster, ConnectToRegion or ConnectToBest, depending on the settings. + public enum ConnectMethod { NotCalled, ConnectToMaster, ConnectToRegion, ConnectToBest } + + + /// Used to define the level of logging output created by the PUN classes. Either log errors, info (some more) or full. + /// \ingroup publicApi + public enum PunLogLevel + { + /// Show only errors. Minimal output. Note: Some might be "runtime errors" which you have to expect. + ErrorsOnly, + + /// Logs some of the workflow, calls and results. + Informational, + + /// Every available log call gets into the console/log. Only use for debugging. + Full + } + + + /// Enum of "target" options for RPCs. These define which remote clients get your RPC call. + /// \ingroup publicApi + public enum RpcTarget + { + /// Sends the RPC to everyone else and executes it immediately on this client. Player who join later will not execute this RPC. + All, + + /// Sends the RPC to everyone else. This client does not execute the RPC. Player who join later will not execute this RPC. + Others, + + /// Sends the RPC to MasterClient only. Careful: The MasterClient might disconnect before it executes the RPC and that might cause dropped RPCs. + MasterClient, + + /// Sends the RPC to everyone else and executes it immediately on this client. New players get the RPC when they join as it's buffered (until this client leaves). + AllBuffered, + + /// Sends the RPC to everyone. This client does not execute the RPC. New players get the RPC when they join as it's buffered (until this client leaves). + OthersBuffered, + + /// Sends the RPC to everyone (including this client) through the server. + /// + /// This client executes the RPC like any other when it received it from the server. + /// Benefit: The server's order of sending the RPCs is the same on all clients. + /// + AllViaServer, + + /// Sends the RPC to everyone (including this client) through the server and buffers it for players joining later. + /// + /// This client executes the RPC like any other when it received it from the server. + /// Benefit: The server's order of sending the RPCs is the same on all clients. + /// + AllBufferedViaServer + } + + + public enum ViewSynchronization { Off, ReliableDeltaCompressed, Unreliable, UnreliableOnChange } + + + /// + /// Options to define how Ownership Transfer is handled per PhotonView. + /// + /// + /// This setting affects how RequestOwnership and TransferOwnership work at runtime. + /// + public enum OwnershipOption + { + /// + /// Ownership is fixed. Instantiated objects stick with their creator, room objects always belong to the Master Client. + /// + Fixed, + /// + /// Ownership can be taken away from the current owner who can't object. + /// + Takeover, + /// + /// Ownership can be requested with PhotonView.RequestOwnership but the current owner has to agree to give up ownership. + /// + /// The current owner has to implement IPunCallbacks.OnOwnershipRequest to react to the ownership request. + Request + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Enums.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Enums.cs.meta new file mode 100644 index 00000000..d612c91e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Enums.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b7962bbdaba2a4940b1341d755abd40d +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Interfaces.meta b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces.meta new file mode 100644 index 00000000..3a203755 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 38ae0eecc6fe5d340b82bb221198aa89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPhotonViewCallbacks.cs b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPhotonViewCallbacks.cs new file mode 100644 index 00000000..ff083c03 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPhotonViewCallbacks.cs @@ -0,0 +1,50 @@ +namespace Photon.Pun +{ + using Photon.Realtime; + + /// + /// Empty Base class for all PhotonView callbacks. + /// + public interface IPhotonViewCallback + { + + } + + /// + /// This interface defines a callback which fires prior to the PhotonNetwork destroying the PhotonView and Gameobject. + /// + public interface IOnPhotonViewPreNetDestroy : IPhotonViewCallback + { + /// + /// This method is called before Destroy() is initiated for a networked object. + /// + /// + void OnPreNetDestroy(PhotonView rootView); + } + + /// + /// This interface defines a callback for changes to the PhotonView's owner. + /// + public interface IOnPhotonViewOwnerChange : IPhotonViewCallback + { + /// + /// This method will be called when the PhotonView's owner changes. + /// + /// + /// + void OnOwnerChange(Player newOwner, Player previousOwner); + } + + /// + /// This interface defines a callback for changes to the PhotonView's controller. + /// + public interface IOnPhotonViewControllerChange : IPhotonViewCallback + { + /// + /// This method will be called when the PhotonView's controller changes. + /// + /// + /// + void OnControllerChange(Player newController, Player previousController); + } +} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPhotonViewCallbacks.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPhotonViewCallbacks.cs.meta new file mode 100644 index 00000000..2ff2dd51 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPhotonViewCallbacks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d67b3e094fcbf004da7f8771c17126f3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPunCallbacks.cs b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPunCallbacks.cs new file mode 100644 index 00000000..4a5387c4 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPunCallbacks.cs @@ -0,0 +1,141 @@ + +namespace Photon.Pun +{ + using UnityEngine; + using Photon.Realtime; + + + /// Defines the OnPhotonSerializeView method to make it easy to implement correctly for observable scripts. + /// \ingroup callbacks + public interface IPunObservable + { + /// + /// Called by PUN several times per second, so that your script can write and read synchronization data for the PhotonView. + /// + /// + /// This method will be called in scripts that are assigned as Observed component of a PhotonView.
+ /// PhotonNetwork.SerializationRate affects how often this method is called.
+ /// PhotonNetwork.SendRate affects how often packages are sent by this client.
+ /// + /// Implementing this method, you can customize which data a PhotonView regularly synchronizes. + /// Your code defines what is being sent (content) and how your data is used by receiving clients. + /// + /// Unlike other callbacks, OnPhotonSerializeView only gets called when it is assigned + /// to a PhotonView as PhotonView.observed script. + /// + /// To make use of this method, the PhotonStream is essential. It will be in "writing" mode" on the + /// client that controls a PhotonView (PhotonStream.IsWriting == true) and in "reading mode" on the + /// remote clients that just receive that the controlling client sends. + /// + /// If you skip writing any value into the stream, PUN will skip the update. Used carefully, this can + /// conserve bandwidth and messages (which have a limit per room/second). + /// + /// Note that OnPhotonSerializeView is not called on remote clients when the sender does not send + /// any update. This can't be used as "x-times per second Update()". + ///
+ /// \ingroup publicApi + void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info); + } + + + /// + /// Global Callback interface for ownership changes. These callbacks will fire for changes to ANY PhotonView that changes. + /// Consider using IOnPhotonViewControllerChange for callbacks from a specific PhotonView. + /// + public interface IPunOwnershipCallbacks + { + /// + /// Called when another player requests ownership of a PhotonView. + /// Called on all clients, so check if (targetView.IsMine) or (targetView.Owner == PhotonNetwork.LocalPlayer) + /// to determine if a targetView.TransferOwnership(requestingPlayer) response should be given. + /// + /// + /// The parameter viewAndPlayer contains: + /// + /// PhotonView view = viewAndPlayer[0] as PhotonView; + /// + /// Player requestingPlayer = viewAndPlayer[1] as Player; + /// + /// PhotonView for which ownership gets requested. + /// Player who requests ownership. + void OnOwnershipRequest(PhotonView targetView, Player requestingPlayer); + + /// + /// Called when ownership of a PhotonView is transfered to another player. + /// + /// + /// The parameter viewAndPlayers contains: + /// + /// PhotonView view = viewAndPlayers[0] as PhotonView; + /// + /// Player newOwner = viewAndPlayers[1] as Player; + /// + /// Player oldOwner = viewAndPlayers[2] as Player; + /// + /// void OnOwnershipTransfered(object[] viewAndPlayers) {} // + /// PhotonView for which ownership changed. + /// Player who was the previous owner (or null, if none). + void OnOwnershipTransfered(PhotonView targetView, Player previousOwner); + + /// + /// Called when an Ownership Request fails for objects with "takeover" setting. + /// + /// + /// Each request asks to take ownership from a specific controlling player. This can fail if anyone + /// else took over ownership briefly before the request arrived. + /// + /// + /// + void OnOwnershipTransferFailed(PhotonView targetView, Player senderOfFailedRequest); + } + + /// \ingroup callbacks + public interface IPunInstantiateMagicCallback + { + void OnPhotonInstantiate(PhotonMessageInfo info); + } + + /// + /// Defines an interface for object pooling, used in PhotonNetwork.Instantiate and PhotonNetwork.Destroy. + /// + /// + /// To apply your custom IPunPrefabPool, set PhotonNetwork.PrefabPool. + /// + /// The pool has to return a valid, disabled GameObject when PUN calls Instantiate. + /// Also, the position and rotation must be applied. + /// + /// Note that Awake and Start are only called once by Unity, so scripts on re-used GameObjects + /// should make use of OnEnable and or OnDisable. When OnEnable gets called, the PhotonView + /// is already updated to the new values. + /// + /// To be able to enable a GameObject, Instantiate must return an inactive object. + /// + /// Before PUN "destroys" GameObjects, it will disable them. + /// + /// If a component implements IPunInstantiateMagicCallback, PUN will call OnPhotonInstantiate + /// when the networked object gets instantiated. If no components implement this on a prefab, + /// PUN will optimize the instantiation and no longer looks up IPunInstantiateMagicCallback + /// via GetComponents. + /// + public interface IPunPrefabPool + { + /// + /// Called to get an instance of a prefab. Must return valid, disabled GameObject with PhotonView. + /// + /// The id of this prefab. + /// The position for the instance. + /// The rotation for the instance. + /// A disabled instance to use by PUN or null if the prefabId is unknown. + GameObject Instantiate(string prefabId, Vector3 position, Quaternion rotation); + + /// + /// Called to destroy (or just return) the instance of a prefab. It's disabled and the pool may reset and cache it for later use in Instantiate. + /// + /// + /// A pool needs some way to find out which type of GameObject got returned via Destroy(). + /// It could be a tag, name, a component or anything similar. + /// + /// The instance to destroy. + void Destroy(GameObject gameObject); + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPunCallbacks.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPunCallbacks.cs.meta new file mode 100644 index 00000000..d0bdc193 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Interfaces/IPunCallbacks.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 421c323e36c065045b2c44e16a184a9a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs b/Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs new file mode 100644 index 00000000..de82a73f --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs @@ -0,0 +1,405 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// PhotonHandler is a runtime MonoBehaviour to include PUN into the main loop. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System; + using System.Collections.Generic; + using ExitGames.Client.Photon; + using Photon.Realtime; + using UnityEngine; + using UnityEngine.Profiling; + + + /// + /// Internal MonoBehaviour that allows Photon to run an Update loop. + /// + public class PhotonHandler : ConnectionHandler, IInRoomCallbacks, IMatchmakingCallbacks + { + + private static PhotonHandler instance; + internal static PhotonHandler Instance + { + get + { + if (instance == null) + { + instance = FindObjectOfType(); + if (instance == null) + { + GameObject obj = new GameObject(); + obj.name = "PhotonMono"; + instance = obj.AddComponent(); + } + } + + return instance; + } + } + + + /// Limits the number of datagrams that are created in each LateUpdate. + /// Helps spreading out sending of messages minimally. + public static int MaxDatagrams = 10; + + /// Signals that outgoing messages should be sent in the next LateUpdate call. + /// Up to MaxDatagrams are created to send queued messages. + public static bool SendAsap; + + /// This corrects the "next time to serialize the state" value by some ms. + /// As LateUpdate typically gets called every 15ms it's better to be early(er) than late to achieve a SerializeRate. + private const int SerializeRateFrameCorrection = 8; + + protected internal int UpdateInterval; // time [ms] between consecutive SendOutgoingCommands calls + + protected internal int UpdateIntervalOnSerialize; // time [ms] between consecutive RunViewUpdate calls (sending syncs, etc) + + private int nextSendTickCount; + + private int nextSendTickCountOnSerialize; + + private SupportLogger supportLoggerComponent; + + + protected override void Awake() + { + if (instance == null || ReferenceEquals(this, instance)) + { + instance = this; + base.Awake(); + } + else + { + Destroy(this); + } + } + + protected virtual void OnEnable() + { + if (Instance != this) + { + Debug.LogError("PhotonHandler is a singleton but there are multiple instances. this != Instance."); + return; + } + + this.Client = PhotonNetwork.NetworkingClient; + + if (PhotonNetwork.PhotonServerSettings.EnableSupportLogger) + { + SupportLogger supportLogger = this.gameObject.GetComponent(); + if (supportLogger == null) + { + supportLogger = this.gameObject.AddComponent(); + } + if (this.supportLoggerComponent != null) + { + if (supportLogger.GetInstanceID() != this.supportLoggerComponent.GetInstanceID()) + { + Debug.LogWarningFormat("Cached SupportLogger component is different from the one attached to PhotonMono GameObject"); + } + } + this.supportLoggerComponent = supportLogger; + this.supportLoggerComponent.Client = PhotonNetwork.NetworkingClient; + } + + this.UpdateInterval = 1000 / PhotonNetwork.SendRate; + this.UpdateIntervalOnSerialize = 1000 / PhotonNetwork.SerializationRate; + + PhotonNetwork.AddCallbackTarget(this); + this.StartFallbackSendAckThread(); // this is not done in the base class + } + + protected void Start() + { + UnityEngine.SceneManagement.SceneManager.sceneLoaded += (scene, loadingMode) => + { + PhotonNetwork.NewSceneLoaded(); + }; + } + + protected override void OnDisable() + { + PhotonNetwork.RemoveCallbackTarget(this); + base.OnDisable(); + } + + + /// Called in intervals by UnityEngine. Affected by Time.timeScale. + protected void FixedUpdate() + { + #if PUN_DISPATCH_IN_FIXEDUPDATE + this.Dispatch(); + #elif PUN_DISPATCH_IN_LATEUPDATE + // do not dispatch here + #else + if (Time.timeScale > PhotonNetwork.MinimalTimeScaleToDispatchInFixedUpdate) + { + this.Dispatch(); + } + #endif + } + + /// Called in intervals by UnityEngine, after running the normal game code and physics. + protected void LateUpdate() + { + #if PUN_DISPATCH_IN_LATEUPDATE + this.Dispatch(); + #elif PUN_DISPATCH_IN_FIXEDUPDATE + // do not dispatch here + #else + // see MinimalTimeScaleToDispatchInFixedUpdate and FixedUpdate for explanation: + if (Time.timeScale <= PhotonNetwork.MinimalTimeScaleToDispatchInFixedUpdate) + { + this.Dispatch(); + } + #endif + + int currentMsSinceStart = (int)(Time.realtimeSinceStartup * 1000); // avoiding Environment.TickCount, which could be negative on long-running platforms + if (PhotonNetwork.IsMessageQueueRunning && currentMsSinceStart > this.nextSendTickCountOnSerialize) + { + PhotonNetwork.RunViewUpdate(); + this.nextSendTickCountOnSerialize = currentMsSinceStart + this.UpdateIntervalOnSerialize - SerializeRateFrameCorrection; + this.nextSendTickCount = 0; // immediately send when synchronization code was running + } + + currentMsSinceStart = (int)(Time.realtimeSinceStartup * 1000); + if (SendAsap || currentMsSinceStart > this.nextSendTickCount) + { + SendAsap = false; + bool doSend = true; + int sendCounter = 0; + while (PhotonNetwork.IsMessageQueueRunning && doSend && sendCounter < MaxDatagrams) + { + // Send all outgoing commands + Profiler.BeginSample("SendOutgoingCommands"); + doSend = PhotonNetwork.NetworkingClient.LoadBalancingPeer.SendOutgoingCommands(); + sendCounter++; + Profiler.EndSample(); + } + if (sendCounter >= MaxDatagrams) + { + SendAsap = true; + } + + this.nextSendTickCount = currentMsSinceStart + this.UpdateInterval; + } + } + + /// Dispatches incoming network messages for PUN. Called in FixedUpdate or LateUpdate. + /// + /// It may make sense to dispatch incoming messages, even if the timeScale is near 0. + /// That can be configured with PhotonNetwork.MinimalTimeScaleToDispatchInFixedUpdate. + /// + /// Without dispatching messages, PUN won't change state and does not handle updates. + /// + protected void Dispatch() + { + if (PhotonNetwork.NetworkingClient == null) + { + Debug.LogError("NetworkPeer broke!"); + return; + } + + //if (PhotonNetwork.NetworkClientState == ClientState.PeerCreated || PhotonNetwork.NetworkClientState == ClientState.Disconnected || PhotonNetwork.OfflineMode) + //{ + // return; + //} + + + bool doDispatch = true; + Exception ex = null; + int exceptionCount = 0; + while (PhotonNetwork.IsMessageQueueRunning && doDispatch) + { + // DispatchIncomingCommands() returns true of it dispatched any command (event, response or state change) + Profiler.BeginSample("DispatchIncomingCommands"); + try + { + doDispatch = PhotonNetwork.NetworkingClient.LoadBalancingPeer.DispatchIncomingCommands(); + } + catch (Exception e) + { + exceptionCount++; + if (ex == null) + { + ex = e; + } + } + + Profiler.EndSample(); + } + + if (ex != null) + { + throw new AggregateException("Caught " + exceptionCount + " exception(s) in methods called by DispatchIncomingCommands(). Rethrowing first only (see above).", ex); + } + } + + + public void OnCreatedRoom() + { + PhotonNetwork.SetLevelInPropsIfSynced(SceneManagerHelper.ActiveSceneName); + } + + public void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) + { + PhotonNetwork.LoadLevelIfSynced(); + } + + + public void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) { } + + public void OnMasterClientSwitched(Player newMasterClient) + { + var views = PhotonNetwork.PhotonViewCollection; + foreach (var view in views) + { + if (view.IsRoomView) + { + view.OwnerActorNr= newMasterClient.ActorNumber; + view.ControllerActorNr = newMasterClient.ActorNumber; + } + } + } + + public void OnFriendListUpdate(System.Collections.Generic.List friendList) { } + + public void OnCreateRoomFailed(short returnCode, string message) { } + + public void OnJoinRoomFailed(short returnCode, string message) { } + + public void OnJoinRandomFailed(short returnCode, string message) { } + + protected List reusableIntList = new List(); + + public void OnJoinedRoom() + { + + if (PhotonNetwork.ViewCount == 0) + return; + + var views = PhotonNetwork.PhotonViewCollection; + + bool amMasterClient = PhotonNetwork.IsMasterClient; + bool amRejoiningMaster = amMasterClient && PhotonNetwork.CurrentRoom.PlayerCount > 1; + + if (amRejoiningMaster) + reusableIntList.Clear(); + + // If this is the master rejoining, reassert ownership of non-creator owners + foreach (var view in views) + { + int viewOwnerId = view.OwnerActorNr; + int viewCreatorId = view.CreatorActorNr; + + // on join / rejoin, assign control to either the Master Client (for room objects) or the owner (for anything else) + view.RebuildControllerCache(); + + // Rejoining master should enforce its world view, and override any changes that happened while it was soft disconnected + if (amRejoiningMaster) + if (viewOwnerId != viewCreatorId) + { + reusableIntList.Add(view.ViewID); + reusableIntList.Add(viewOwnerId); + } + } + + if (amRejoiningMaster && reusableIntList.Count > 0) + { + PhotonNetwork.OwnershipUpdate(reusableIntList.ToArray()); + } + } + + public void OnLeftRoom() + { + // Destroy spawned objects and reset scene objects + PhotonNetwork.LocalCleanupAnythingInstantiated(true); + } + + + public void OnPlayerEnteredRoom(Player newPlayer) + { + // note: if the master client becomes inactive, someone else becomes master. so there is no case where the active master client reconnects + // what may happen is that the Master Client disconnects locally and uses ReconnectAndRejoin before anyone (including the server) notices. + + bool amMasterClient = PhotonNetwork.IsMasterClient; + + var views = PhotonNetwork.PhotonViewCollection; + if (amMasterClient) + { + reusableIntList.Clear(); + } + + foreach (var view in views) + { + view.RebuildControllerCache(); // all clients will potentially have to clean up owner and controller, if someone re-joins + + // the master client notifies joining players of any non-creator ownership + if (amMasterClient) + { + int viewOwnerId = view.OwnerActorNr; + if (viewOwnerId != view.CreatorActorNr) + { + reusableIntList.Add(view.ViewID); + reusableIntList.Add(viewOwnerId); + } + } + } + + // update the joining player of non-creator ownership in the room + if (amMasterClient && reusableIntList.Count > 0) + { + PhotonNetwork.OwnershipUpdate(reusableIntList.ToArray(), newPlayer.ActorNumber); + } + + } + + public void OnPlayerLeftRoom(Player otherPlayer) + { + var views = PhotonNetwork.PhotonViewCollection; + + int leavingPlayerId = otherPlayer.ActorNumber; + bool isInactive = otherPlayer.IsInactive; + + // SOFT DISCONNECT: A player has timed out to the relay but has not yet exceeded PlayerTTL and may reconnect. + // Master will take control of this objects until the player hard disconnects, or returns. + if (isInactive) + { + foreach (var view in views) + { + // v2.27: changed from owner-check to controller-check + if (view.ControllerActorNr == leavingPlayerId) + view.ControllerActorNr = PhotonNetwork.MasterClient.ActorNumber; + } + + } + // HARD DISCONNECT: Player permanently removed. Remove that actor as owner for all items they created (Unless AutoCleanUp is false) + else + { + bool autocleanup = PhotonNetwork.CurrentRoom.AutoCleanUp; + + foreach (var view in views) + { + // Skip changing Owner/Controller for items that will be cleaned up. + if (autocleanup && view.CreatorActorNr == leavingPlayerId) + continue; + + // Any views owned by the leaving player, default to null owner (which will become master controlled). + if (view.OwnerActorNr == leavingPlayerId || view.ControllerActorNr == leavingPlayerId) + { + view.OwnerActorNr = 0; + view.ControllerActorNr = PhotonNetwork.MasterClient.ActorNumber; + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs.meta new file mode 100644 index 00000000..97b4d82f --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 177bddf229f8d8445a70c0652f03b7df +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs b/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs new file mode 100644 index 00000000..c5846b56 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs @@ -0,0 +1,3312 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// PhotonNetwork is the central class of the PUN package. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System.Diagnostics; + using UnityEngine; + using System; + using System.Linq; + using System.Collections.Generic; + using ExitGames.Client.Photon; + using UnityEngine.SceneManagement; + + using Photon.Realtime; + using Debug = UnityEngine.Debug; + using Hashtable = ExitGames.Client.Photon.Hashtable; + + #if UNITY_EDITOR + using UnityEditor; + using System.IO; + #endif + + + public struct InstantiateParameters + { + public int[] viewIDs; + public byte objLevelPrefix; + public object[] data; + public byte @group; + public Quaternion rotation; + public Vector3 position; + public string prefabName; + public Player creator; + public int timestamp; + + public InstantiateParameters(string prefabName, Vector3 position, Quaternion rotation, byte @group, object[] data, byte objLevelPrefix, int[] viewIDs, Player creator, int timestamp) + { + this.prefabName = prefabName; + this.position = position; + this.rotation = rotation; + this.@group = @group; + this.data = data; + this.objLevelPrefix = objLevelPrefix; + this.viewIDs = viewIDs; + this.creator = creator; + this.timestamp = timestamp; + } + } + + + /// + /// The main class to use the PhotonNetwork plugin. + /// This class is static. + /// + /// \ingroup publicApi + public static partial class PhotonNetwork + { + /// Version number of PUN. Used in the AppVersion, which separates your playerbase in matchmaking. + public const string PunVersion = "2.41"; + + /// Version number of your game. Setting this updates the AppVersion, which separates your playerbase in matchmaking. + /// + /// In PUN, the GameVersion is only one component of the LoadBalancingClient.AppVersion. + /// Setting the GameVersion will also set the LoadBalancingClient.AppVersion to: value+'_'+ PhotonNetwork.PunVersion. + /// + /// The AppVersion is used to split your playerbase as needed. + /// One AppId may have various AppVersions and each is a separate set of users for matchmaking. + /// + /// The AppVersion gets sent in the "Authenticate" step. + /// This means you can set the GameVersion right after calling ConnectUsingSettings (e.g.) and the new value will be used on the server. + /// Once the client is connected, authentication is done and the value won't be sent to the server anymore. + /// + public static string GameVersion + { + get { return gameVersion; } + set + { + gameVersion = value; + NetworkingClient.AppVersion = string.Format("{0}_{1}", value, PhotonNetwork.PunVersion); + } + } + + private static string gameVersion; + + /// Sent to Photon Server to specify the "Virtual AppId". + /// Sent with the operation Authenticate. When using PUN, you should set the GameVersion or use ConnectUsingSettings(). + public static string AppVersion + { + get { return NetworkingClient.AppVersion; } + } + + /// The LoadBalancingClient is part of Photon Realtime and wraps up multiple servers and states for PUN. + public static LoadBalancingClient NetworkingClient; + + /// + /// The maximum number of assigned PhotonViews per player (or scene). See the [General Documentation](@ref general) topic "Limitations" on how to raise this limitation. + /// + public static readonly int MAX_VIEW_IDS = 1000; // VIEW & PLAYER LIMIT CAN BE EASILY CHANGED, SEE DOCS + + + /// Name of the PhotonServerSettings file (used to load and by PhotonEditor to save new files). + public const string ServerSettingsFileName = "PhotonServerSettings"; + + private static ServerSettings photonServerSettings; + + /// Serialized server settings, written by the Setup Wizard for use in ConnectUsingSettings. + public static ServerSettings PhotonServerSettings + { + get + { + if (photonServerSettings == null) + { + LoadOrCreateSettings(); + } + + return photonServerSettings; + } + private set { photonServerSettings = value; } + } + + /// Currently used server address (no matter if master or game server). + public static string ServerAddress { get { return (NetworkingClient != null) ? NetworkingClient.CurrentServerAddress : ""; } } + + /// Currently used Cloud Region (if any). As long as the client is not on a Master Server or Game Server, the region is not yet defined. + public static string CloudRegion { get { return (NetworkingClient != null && IsConnected && Server!=ServerConnection.NameServer) ? NetworkingClient.CloudRegion : null; } } + + /// The cluster name provided by the Name Server. + /// + /// The value is provided by the OpResponse for OpAuthenticate/OpAuthenticateOnce. See ConnectToRegion. + /// + /// Null until set. + /// + /// Note that the Name Server may assign another cluster, if the requested one is not configured or available. + /// + public static string CurrentCluster { get { return (NetworkingClient != null ) ? NetworkingClient.CurrentCluster : null; } } + + /// Key to save the "Best Region Summary" in the Player Preferences. + private const string PlayerPrefsKey = "PUNCloudBestRegion"; + + /// Used to store and access the "Best Region Summary" in the Player Preferences. + /// + /// Set this value to null before you connect, to discard the previously selected Best Region for the client. + /// + public static string BestRegionSummaryInPreferences + { + get + { + return PlayerPrefs.GetString(PlayerPrefsKey, null); + } + internal set + { + if (String.IsNullOrEmpty(value)) + { + PlayerPrefs.DeleteKey(PlayerPrefsKey); + } + else + { + PlayerPrefs.SetString(PlayerPrefsKey, value.ToString()); + } + } + } + + /// + /// False until you connected to Photon initially. True immediately after Connect-call, in offline mode, while connected to any server and even while switching servers. + /// + /// + /// It is recommended to use the IConnectionCallbacks to establish a connection workflow. + /// Also have a look at IsConnectedAndReady, which provides more info on when you can call operations at all. + /// + public static bool IsConnected + { + get + { + if (OfflineMode) + { + return true; + } + + if (NetworkingClient == null) + { + return false; + } + + return NetworkingClient.IsConnected; + } + } + + /// + /// A refined version of connected which is true only if your connection to the server is ready to accept operations like join, leave, etc. + /// + public static bool IsConnectedAndReady + { + get + { + if (OfflineMode) + { + return true; + } + if (NetworkingClient == null) + { + return false; + } + + return NetworkingClient.IsConnectedAndReady; + } + } + + /// + /// Directly provides the network-level client state, unless in OfflineMode. + /// + /// + /// In context of PUN, you should usually use IsConnected or IsConnectedAndReady. + /// + /// This is the lower level connection state. Keep in mind that PUN uses more than one server, + /// so the client may become Disconnected, even though it's just switching servers. + /// + /// While OfflineMode is true, this is ClientState.Joined (after create/join) or ConnectedToMasterServer in all other cases. + /// + public static ClientState NetworkClientState + { + get + { + if (OfflineMode) + { + return (offlineModeRoom != null) ? ClientState.Joined : ClientState.ConnectedToMasterServer; + } + + if (NetworkingClient == null) + { + return ClientState.Disconnected; + } + + return NetworkingClient.State; + } + } + + /// Tracks, which Connect method was called last. + /// + /// ConnectToMaster sets this to ConnectToMaster. + /// ConnectToRegion sets this to ConnectToRegion. + /// ConnectToBestCloudServer sets this to ConnectToBest. + /// PhotonNetwork.ConnectUsingSettings will call either ConnectToMaster, ConnectToRegion or ConnectToBest, depending on the settings. + /// + public static ConnectMethod ConnectMethod = ConnectMethod.NotCalled; + + + /// The server (type) this client is currently connected or connecting to. + /// Photon uses 3 different roles of servers: Name Server, Master Server and Game Server. + public static ServerConnection Server + { + get + { + if (OfflineMode) + { + return CurrentRoom == null ? ServerConnection.MasterServer : ServerConnection.GameServer; + } + return (PhotonNetwork.NetworkingClient != null) ? PhotonNetwork.NetworkingClient.Server : ServerConnection.NameServer; + } + } + + /// + /// A user's authentication values used during connect. + /// + /// + /// Set these before calling Connect if you want custom authentication. + /// These values set the userId, if and how that userId gets verified (server-side), etc.. + /// + /// If authentication fails for any values, PUN will call your implementation of OnCustomAuthenticationFailed(string debugMessage). + /// See . + /// + public static AuthenticationValues AuthValues + { + get { return (NetworkingClient != null) ? NetworkingClient.AuthValues : null; } + set { if (NetworkingClient != null) NetworkingClient.AuthValues = value; } + } + + /// + /// The lobby that will be used when PUN joins a lobby or creates a game. + /// This is defined when joining a lobby or creating rooms + /// + /// + /// The default lobby uses an empty string as name. + /// So when you connect or leave a room, PUN automatically gets you into a lobby again. + /// + /// Check PhotonNetwork.InLobby if the client is in a lobby. + /// (@ref masterServerAndLobby) + /// + public static TypedLobby CurrentLobby + { + get { return NetworkingClient.CurrentLobby; } + } + + /// + /// Get the room we're currently in (also when in OfflineMode). Null if we aren't in any room. + /// + /// + /// LoadBalancing Client is not aware of the Photon Offline Mode, so never use PhotonNetwork.NetworkingClient.CurrentRoom will be null if you are using OffLine Mode, while PhotonNetwork.CurrentRoom will be set when offlineMode is true + /// + public static Room CurrentRoom + { + get + { + if (offlineMode) + { + return offlineModeRoom; + } + + return NetworkingClient == null ? null : NetworkingClient.CurrentRoom; + } + } + + /// + /// Controls how verbose PUN is. + /// + public static PunLogLevel LogLevel = PunLogLevel.ErrorsOnly; + + /// + /// This client's Player instance is always available, unless the app shuts down. + /// + /// + /// Useful (e.g.) to set the Custom Player Properties or the NickName for this client anytime. + /// When the client joins a room, the Custom Properties and other values are synced. + /// + public static Player LocalPlayer + { + get + { + if (NetworkingClient == null) + { + return null; // suppress ExitApplication errors + } + + return NetworkingClient.LocalPlayer; + } + } + + /// + /// Set to synchronize the player's nickname with everyone in the room(s) you enter. This sets PhotonNetwork.player.NickName. + /// + /// + /// The NickName is just a nickname and does not have to be unique or backed up with some account.
+ /// Set the value any time (e.g. before you connect) and it will be available to everyone you play with.
+ /// Access the names of players by: Player.NickName.
+ /// PhotonNetwork.PlayerListOthers is a list of other players - each contains the NickName the remote player set. + ///
+ public static string NickName + { + get + { + return NetworkingClient.NickName; + } + + set + { + NetworkingClient.NickName = value; + } + } + + /// + /// A sorted copy of the players-list of the current room. This is using Linq, so better cache this value. Update when players join / leave. + /// + public static Player[] PlayerList + { + get + { + Room room = CurrentRoom; + if (room != null) + { + // TODO: implement more effectively. maybe cache?! + return room.Players.Values.OrderBy((x) => x.ActorNumber).ToArray(); + } + return new Player[0]; + } + } + + /// + /// A sorted copy of the players-list of the current room, excluding this client. This is using Linq, so better cache this value. Update when players join / leave. + /// + public static Player[] PlayerListOthers + { + get + { + Room room = CurrentRoom; + if (room != null) + { + // TODO: implement more effectively. maybe cache?! + return room.Players.Values.OrderBy((x) => x.ActorNumber).Where(x => !x.IsLocal).ToArray(); + } + return new Player[0]; + } + } + + /// + /// Used to enable reaction to CloseConnection events. Default: false. + /// + /// + /// Using CloseConnection is a security risk, as exploiters can send the event as Master Client. + /// + /// In best case, a game would implement this "disconnect others" independently from PUN in game-code + /// with some security checks. + /// + public static bool EnableCloseConnection = false; + + /// + /// The minimum difference that a Vector2 or Vector3(e.g. a transforms rotation) needs to change before we send it via a PhotonView's OnSerialize/ObservingComponent. + /// + /// + /// Note that this is the sqrMagnitude. E.g. to send only after a 0.01 change on the Y-axix, we use 0.01f*0.01f=0.0001f. As a remedy against float inaccuracy we use 0.000099f instead of 0.0001f. + /// + public static float PrecisionForVectorSynchronization = 0.000099f; + + /// + /// The minimum angle that a rotation needs to change before we send it via a PhotonView's OnSerialize/ObservingComponent. + /// + public static float PrecisionForQuaternionSynchronization = 1.0f; + + /// + /// The minimum difference between floats before we send it via a PhotonView's OnSerialize/ObservingComponent. + /// + public static float PrecisionForFloatSynchronization = 0.01f; + + + /// + /// Offline mode can be set to re-use your multiplayer code in singleplayer game modes. + /// When this is on PhotonNetwork will not create any connections and there is near to + /// no overhead. Mostly usefull for reusing RPC's and PhotonNetwork.Instantiate + /// + public static bool OfflineMode + { + get + { + return offlineMode; + } + + set + { + if (value == offlineMode) + { + return; + } + + if (value && IsConnected) + { + Debug.LogError("Can't start OFFLINE mode while connected!"); + return; + } + + if (NetworkingClient.IsConnected) + { + NetworkingClient.Disconnect(); // Cleanup (also calls OnLeftRoom to reset stuff) + } + + offlineMode = value; + + if (offlineMode) + { + NetworkingClient.ChangeLocalID(-1); + //SendMonoMessage(PhotonNetworkingMessage.OnConnectedToMaster); + NetworkingClient.ConnectionCallbackTargets.OnConnectedToMaster(); + } + else + { + bool wasInOfflineRoom = offlineModeRoom != null; + + if (wasInOfflineRoom) + { + LeftRoomCleanup(); + } + offlineModeRoom = null; + PhotonNetwork.NetworkingClient.CurrentRoom = null; + NetworkingClient.ChangeLocalID(-1); + if (wasInOfflineRoom) + { + NetworkingClient.MatchMakingCallbackTargets.OnLeftRoom(); + } + } + } + } + + private static bool offlineMode = false; + private static Room offlineModeRoom = null; + + + /// Defines if all clients in a room should automatically load the same level as the Master Client. + /// + /// When enabled, clients load the same scene that is active on the Master Client. + /// When a client joins a room, the scene gets loaded even before the callback OnJoinedRoom gets called. + /// + /// To synchronize the loaded level, the Master Client should use PhotonNetwork.LoadLevel, which + /// notifies the other clients before starting to load the scene. + /// If the Master Client loads a level directly via Unity's API, PUN will notify the other players after + /// the scene loading completed (using SceneManager.sceneLoaded). + /// + /// Internally, a Custom Room Property is set for the loaded scene. On change, clients use LoadLevel + /// if they are not in the same scene. + /// + /// Note that this works only for a single active scene and that reloading the scene is not supported. + /// The Master Client will actually reload a scene but other clients won't. + /// To get everyone to reload, the game can send an RPC or event to trigger the loading. + /// + public static bool AutomaticallySyncScene + { + get + { + return automaticallySyncScene; + } + set + { + automaticallySyncScene = value; + if (automaticallySyncScene && CurrentRoom != null) + { + LoadLevelIfSynced(); + } + } + } + + private static bool automaticallySyncScene = false; + + /// + /// If enabled, the client will get a list of available lobbies from the Master Server. + /// + /// + /// Set this value before the client connects to the Master Server. While connected to the Master + /// Server, a change has no effect. + /// + /// Implement OptionalInfoCallbacks.OnLobbyStatisticsUpdate, to get the list of used lobbies. + /// + /// The lobby statistics can be useful if your title dynamically uses lobbies, depending (e.g.) + /// on current player activity or such. + /// In this case, getting a list of available lobbies, their room-count and player-count can + /// be useful info. + /// + /// ConnectUsingSettings sets this to the PhotonServerSettings value. + /// + public static bool EnableLobbyStatistics + { + get + { + return NetworkingClient.EnableLobbyStatistics; + } + } + + + /// True while this client is in a lobby. + /// + /// Implement IPunCallbacks.OnRoomListUpdate() for a notification when the list of rooms + /// becomes available or updated. + /// + /// You are automatically leaving any lobby when you join a room! + /// Lobbies only exist on the Master Server (whereas rooms are handled by Game Servers). + /// + public static bool InLobby + { + get + { + return NetworkingClient.InLobby; + } + } + + + /// + /// Defines how many times per second the PhotonHandler should send data, if any is queued. Default: 30. + /// + /// + /// This value defines how often PUN will call the low level PhotonPeer to put queued outgoing messages + /// into a datagram to be sent. This is implemented in the PhotonHandler component, which integrates PUN + /// into the Unity game loop. + /// The PhotonHandler.MaxDatagrams value defines how many datagrams can be sent in one iteration. + /// + /// This value does not affect how often updates are written by PhotonViews. That is controlled by the + /// SerializationRate. To avoid send-delays for PhotonView updates, PUN will also send data at the end + /// of frames that wrote data in OnPhotonSerializeView, so sending may actually be more frequent than + /// the SendRate. + /// + /// Messages queued due to RPCs and RaiseEvent, will be sent with at least SendRate frequency. They + /// are included, when OnPhotonSerialize wrote updates and triggers early sending. + /// + /// Setting this value does not adjust the SerializationRate anymore (as of PUN 2.24). + /// + /// Sending less often will aggregate messages in datagrams, which avoids overhead on the network. + /// It is also important to not push too many datagrams per frame. Three to five seem to be the sweet spot. + /// + /// Keep your target platform in mind: mobile networks are usually slower. + /// WiFi is slower with more variance and bursts of loss. + /// + /// A low framerate (as in Update calls) will affect sending of messages. + /// + public static int SendRate + { + get + { + return 1000 / sendFrequency; + } + + set + { + sendFrequency = 1000 / value; + if (PhotonHandler.Instance != null) + { + PhotonHandler.Instance.UpdateInterval = sendFrequency; + } + } + } + + private static int sendFrequency = 33; // in milliseconds. + + /// + /// Defines how many times per second OnPhotonSerialize should be called on PhotonViews for controlled objects. + /// + /// + /// This value defines how often PUN will call OnPhotonSerialize on controlled network objects. + /// This is implemented in the PhotonHandler component, which integrates PUN into the Unity game loop. + /// + /// The updates written in OnPhotonSerialize will be queued temporarily and sent in the next LateUpdate, + /// so a high SerializationRate also causes more sends. The idea is to keep the delay short during + /// which written updates are queued. + /// + /// Calling RPCs will not trigger a send. + /// + /// A low framerate will affect how frequent updates are written and how "on time" they are. + /// + /// A lower rate takes up less performance but the receiving side needs to interpolate longer times + /// between updates. + /// + public static int SerializationRate + { + get + { + return 1000 / serializationFrequency; + } + + set + { + serializationFrequency = 1000 / value; + if (PhotonHandler.Instance != null) + { + PhotonHandler.Instance.UpdateIntervalOnSerialize = serializationFrequency; + } + } + } + + private static int serializationFrequency = 100; // in milliseconds. I.e. 100 = 100ms which makes 10 times/second + + + /// + /// Can be used to pause dispatching of incoming events (RPCs, Instantiates and anything else incoming). + /// + /// + /// While IsMessageQueueRunning == false, the OnPhotonSerializeView calls are not done and nothing is sent by + /// a client. Also, incoming messages will be queued until you re-activate the message queue. + /// + /// This can be useful if you first want to load a level, then go on receiving data of PhotonViews and RPCs. + /// The client will go on receiving and sending acknowledgements for incoming packages and your RPCs/Events. + /// This adds "lag" and can cause issues when the pause is longer, as all incoming messages are just queued. + /// + public static bool IsMessageQueueRunning + { + get + { + return isMessageQueueRunning; + } + + set + { + isMessageQueueRunning = value; + } + } + + /// Backup for property IsMessageQueueRunning. + private static bool isMessageQueueRunning = true; + + + /// + /// Photon network time, synched with the server. + /// + /// + /// v1.55
+ /// This time value depends on the server's Environment.TickCount. It is different per server + /// but inside a Room, all clients should have the same value (Rooms are on one server only).
+ /// This is not a DateTime!
+ /// + /// Use this value with care:
+ /// It can start with any positive value.
+ /// It will "wrap around" from 4294967.295 to 0! + ///
+ public static double Time + { + get + { + if (UnityEngine.Time.frameCount == frame) + { + return frametime; + } + + uint u = (uint)ServerTimestamp; + double t = u; + frametime = t / 1000.0d; + frame = UnityEngine.Time.frameCount; + return frametime; + } + } + + private static double frametime; + private static int frame; + + /// + /// The current server's millisecond timestamp. + /// + /// + /// This can be useful to sync actions and events on all clients in one room. + /// The timestamp is based on the server's Environment.TickCount. + /// + /// It will overflow from a positive to a negative value every so often, so + /// be careful to use only time-differences to check the Time delta when things + /// happen. + /// + /// This is the basis for PhotonNetwork.Time. + /// + public static int ServerTimestamp + { + get + { + if (OfflineMode) + { + if (StartupStopwatch != null && StartupStopwatch.IsRunning) + { + return (int)StartupStopwatch.ElapsedMilliseconds; + } + return Environment.TickCount; + } + + return NetworkingClient.LoadBalancingPeer.ServerTimeInMilliSeconds; // TODO: implement ServerTimeInMilliSeconds in LBC + } + } + + /// Used for Photon/PUN timing, as Time.time can't be called from Threads. + private static Stopwatch StartupStopwatch; + + + /// + /// Defines how many seconds PUN keeps the connection after Unity's OnApplicationPause(true) call. Default: 60 seconds. + /// + /// + /// It's best practice to disconnect inactive apps/connections after a while but to also allow users to take calls, etc.. + /// We think a reasonable background timeout is 60 seconds. + /// + /// To handle the timeout, implement: OnDisconnected(), as usual. + /// Your application will "notice" the background disconnect when it becomes active again (running the Update() loop). + /// + /// If you need to separate this case from others, you need to track if the app was in the background + /// (there is no special callback by PUN). + /// + /// + /// Info: + /// PUN is running a "fallback thread" to send ACKs to the server, even when Unity is not calling Update() regularly. + /// This helps keeping the connection while loading scenes and assets and when the app is in the background. + /// + /// Note: + /// Some platforms (e.g. iOS) don't allow to keep a connection while the app is in background. + /// In those cases, this value does not change anything, the app immediately loses connection in background. + /// + /// Unity's OnApplicationPause() callback is broken in some exports (Android) of some Unity versions. + /// Make sure OnApplicationPause() gets the callbacks you expect on the platform you target! + /// Check PhotonHandler.OnApplicationPause(bool pause) to see the implementation. + /// + public static float KeepAliveInBackground + { + set + { + if (PhotonHandler.Instance != null) + { + PhotonHandler.Instance.KeepAliveInBackground = (int)Mathf.Round(value * 1000.0f); + } + } + + get { return PhotonHandler.Instance != null ? Mathf.Round(PhotonHandler.Instance.KeepAliveInBackground / 1000.0f) : 60.0f; } + } + + + /// Affects if the PhotonHandler dispatches incoming messages in LateUpdate or FixedUpdate (default). + /// + /// By default the PhotonHandler component dispatches incoming messages in FixedUpdate. + /// + /// When the Time.timeScale is low, FixedUpdate is called less frequently up to a point where updates may get paused. + /// PUN can automatically dispatch messages in LateUpdate for low timeScale values (when Time.timeScale is lower than this value). + /// + /// PUN will use either FixedUpdate or LateUpdate but not both (as of v2.23). + /// + /// When you use this value, be aware that Instantiates and RPCs execute with a changed timing within a frame. + /// If Instantiate is called from FixedUpdate, the physics engine seems to run for instantiated objects before the engine calls Start() on them. + /// + /// By default, this value is -1f, so there is no fallback to LateUpdate. + /// + public static float MinimalTimeScaleToDispatchInFixedUpdate = -1f; + + + /// + /// Are we the master client? + /// + public static bool IsMasterClient + { + get + { + if (OfflineMode) + { + return true; + } + + return NetworkingClient.CurrentRoom != null && NetworkingClient.CurrentRoom.MasterClientId == LocalPlayer.ActorNumber; // TODO: implement MasterClient shortcut in LBC? + } + } + + /// + /// The Master Client of the current room or null (outside of rooms). + /// + /// + /// Can be used as "authoritative" client/player to make descisions, run AI or other. + /// + /// If the current Master Client leaves the room (leave/disconnect), the server will quickly assign someone else. + /// If the current Master Client times out (closed app, lost connection, etc), messages sent to this client are + /// effectively lost for the others! A timeout can take 10 seconds in which no Master Client is active. + /// + /// Implement the method IPunCallbacks.OnMasterClientSwitched to be called when the Master Client switched. + /// + /// Use PhotonNetwork.SetMasterClient, to switch manually to some other player / client. + /// + /// With OfflineMode == true, this always returns the PhotonNetwork.player. + /// + public static Player MasterClient + { + get + { + if (OfflineMode) + { + return PhotonNetwork.LocalPlayer; + } + + if (NetworkingClient == null || NetworkingClient.CurrentRoom == null) + { + return null; + } + + return NetworkingClient.CurrentRoom.GetPlayer(NetworkingClient.CurrentRoom.MasterClientId); + } + } + + /// Is true while being in a room (NetworkClientState == ClientState.Joined). + /// + /// Aside from polling this value, game logic should implement IMatchmakingCallbacks in some class + /// and react when that gets called.
+ /// + /// Many actions can only be executed in a room, like Instantiate or Leave, etc.
+ /// A client can join a room in offline mode. In that case, don't use LoadBalancingClient.InRoom, which + /// does not cover offline mode. + ///
+ public static bool InRoom + { + get + { + // in offline mode, you can be in a room too and NetworkClientState then returns Joined like on online mode! + return NetworkClientState == ClientState.Joined; + } + } + + + /// + /// The count of players currently looking for a room (available on MasterServer in 5sec intervals). + /// + public static int CountOfPlayersOnMaster + { + get + { + return NetworkingClient.PlayersOnMasterCount; + } + } + + /// + /// Count of users currently playing your app in some room (sent every 5sec by Master Server). + /// Use PhotonNetwork.PlayerList.Length or PhotonNetwork.CurrentRoom.PlayerCount to get the count of players in the room you're in! + /// + public static int CountOfPlayersInRooms + { + get + { + return NetworkingClient.PlayersInRoomsCount; + } + } + + /// + /// The count of players currently using this application (available on MasterServer in 5sec intervals). + /// + public static int CountOfPlayers + { + get + { + return NetworkingClient.PlayersInRoomsCount + NetworkingClient.PlayersOnMasterCount; + } + } + + /// + /// The count of rooms currently in use (available on MasterServer in 5sec intervals). + /// + public static int CountOfRooms + { + get + { + return NetworkingClient.RoomsCount; + } + } + + /// + /// Enables or disables the collection of statistics about this client's traffic. + /// + /// + /// If you encounter issues with clients, the traffic stats are a good starting point to find solutions. + /// Only with enabled stats, you can use GetVitalStats + /// + public static bool NetworkStatisticsEnabled + { + get + { + return NetworkingClient.LoadBalancingPeer.TrafficStatsEnabled; + } + + set + { + NetworkingClient.LoadBalancingPeer.TrafficStatsEnabled = value; + } + } + + /// + /// Count of commands that got repeated (due to local repeat-timing before an ACK was received). + /// + /// + /// If this value increases a lot, there is a good chance that a timeout disconnect will happen due to bad conditions. + /// + public static int ResentReliableCommands + { + get { return NetworkingClient.LoadBalancingPeer.ResentReliableCommands; } + } + + /// Crc checks can be useful to detect and avoid issues with broken datagrams. Can be enabled while not connected. + public static bool CrcCheckEnabled + { + get { return NetworkingClient.LoadBalancingPeer.CrcEnabled; } + set + { + if (!IsConnected) + { + NetworkingClient.LoadBalancingPeer.CrcEnabled = value; + } + else + { + Debug.Log("Can't change CrcCheckEnabled while being connected. CrcCheckEnabled stays " + NetworkingClient.LoadBalancingPeer.CrcEnabled); + } + } + } + + /// If CrcCheckEnabled, this counts the incoming packages that don't have a valid CRC checksum and got rejected. + public static int PacketLossByCrcCheck + { + get { return NetworkingClient.LoadBalancingPeer.PacketLossByCrc; } + } + + /// Defines the number of times a reliable message can be resent before not getting an ACK for it will trigger a disconnect. Default: 5. + /// Less resends mean quicker disconnects, while more can lead to much more lag without helping. Min: 3. Max: 10. + public static int MaxResendsBeforeDisconnect + { + get { return NetworkingClient.LoadBalancingPeer.SentCountAllowance; } + set + { + if (value < 3) value = 3; + if (value > 10) value = 10; + NetworkingClient.LoadBalancingPeer.SentCountAllowance = value; + } + } + + /// In case of network loss, reliable messages can be repeated quickly up to 3 times. + /// + /// When reliable messages get lost more than once, subsequent repeats are delayed a bit + /// to allow the network to recover.
+ /// With this option, the repeats 2 and 3 can be sped up. This can help avoid timeouts but + /// also it increases the speed in which gaps are closed.
+ /// When you set this, increase PhotonNetwork.MaxResendsBeforeDisconnect to 6 or 7. + ///
+ public static int QuickResends + { + get { return NetworkingClient.LoadBalancingPeer.QuickResendAttempts; } + set + { + if (value < 0) value = 0; + if (value > 3) value = 3; + NetworkingClient.LoadBalancingPeer.QuickResendAttempts = (byte)value; + } + } + + + /// Replaced by ServerPortOverrides. + [Obsolete("Set port overrides in ServerPortOverrides. Not used anymore!")] + public static bool UseAlternativeUdpPorts { get; set; } + + /// Defines overrides for server ports. Used per server-type if > 0. Important: If you change the transport protocol, adjust the overrides, too. + /// + public static PhotonPortDefinition ServerPortOverrides + { + get { return (NetworkingClient == null) ? new PhotonPortDefinition() : NetworkingClient.ServerPortOverrides; } + set { if (NetworkingClient != null) NetworkingClient.ServerPortOverrides = value; } + } + + + private static int lastUsedViewSubId = 0; // each player only needs to remember it's own (!) last used subId to speed up assignment + private static int lastUsedViewSubIdStatic = 0; // per room, the master is able to instantiate GOs. the subId for this must be unique too + + + /// + /// Static constructor used for basic setup. + /// + static PhotonNetwork() + { + #if !UNITY_EDITOR + StaticReset(); // in builds, we just reset/init the client once + #else + + #if UNITY_2019_4_OR_NEWER + if (NetworkingClient == null) + { + NetworkingClient = new LoadBalancingClient(); + } + #else + StaticReset(); // in OLDER unity editor versions there is no RuntimeInitializeOnLoadMethod, so call reset + #endif + + #endif + } + + #if UNITY_EDITOR && UNITY_2019_4_OR_NEWER + [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] + #endif + private static void StaticReset() + { + #if UNITY_EDITOR + if (!EditorApplication.isPlayingOrWillChangePlaymode) + { + return; + } + #endif + + // This clear is for when Domain Reloading is disabled. Typically will already be empty. + monoRPCMethodsCache.Clear(); + + // set up the NetworkingClient, protocol, etc + OfflineMode = false; + ConnectionProtocol protocol = PhotonNetwork.PhotonServerSettings.AppSettings.Protocol; + NetworkingClient = new LoadBalancingClient(protocol); + NetworkingClient.LoadBalancingPeer.QuickResendAttempts = 2; + NetworkingClient.LoadBalancingPeer.SentCountAllowance = 9; + + NetworkingClient.EventReceived -= OnEvent; + NetworkingClient.EventReceived += OnEvent; + NetworkingClient.OpResponseReceived -= OnOperation; + NetworkingClient.OpResponseReceived += OnOperation; + NetworkingClient.StateChanged -= OnClientStateChanged; + NetworkingClient.StateChanged += OnClientStateChanged; + + StartupStopwatch = new Stopwatch(); + StartupStopwatch.Start(); + + // using a singleton PhotonHandler to control the new client (which is also a singleton for PUN) + PhotonHandler.Instance.Client = NetworkingClient; + + + Application.runInBackground = PhotonServerSettings.RunInBackground; + PrefabPool = new DefaultPool(); + + // RPC shortcut lookup creation (from list of RPCs, which is updated by Editor scripts) + rpcShortcuts = new Dictionary(PhotonNetwork.PhotonServerSettings.RpcList.Count); + for (int index = 0; index < PhotonNetwork.PhotonServerSettings.RpcList.Count; index++) + { + var name = PhotonNetwork.PhotonServerSettings.RpcList[index]; + rpcShortcuts[name] = index; + } + + // PUN custom types (typical for Unity) + CustomTypes.Register(); + } + + /// Connect to Photon as configured in the PhotonServerSettings file. + /// + /// Implement IConnectionCallbacks, to make your game logic aware of state changes. + /// Especially, IConnectionCallbacks.ConnectedToMasterServer is useful to react when + /// the client can do matchmaking. + /// + /// This method will disable OfflineMode (which won't destroy any instantiated GOs) and it + /// will set IsMessageQueueRunning to true. + /// + /// Your Photon configuration is created by the PUN Wizard and contains the AppId, + /// region for Photon Cloud games, the server address among other things. + /// + /// To ignore the settings file, set the relevant values and connect by calling + /// ConnectToMaster, ConnectToRegion. + /// + /// To connect to the Photon Cloud, a valid AppId must be in the settings file + /// (shown in the Photon Cloud Dashboard). + /// + /// Connecting to the Photon Cloud might fail due to: + /// - Invalid AppId + /// - Network issues + /// - Invalid region + /// - Subscription CCU limit reached + /// - etc. + /// + /// In general check out the from the callback. + /// + public static bool ConnectUsingSettings() + { + if (PhotonServerSettings == null) + { + Debug.LogError("Can't connect: Loading settings failed. ServerSettings asset must be in any 'Resources' folder as: " + ServerSettingsFileName); + return false; + } + + return ConnectUsingSettings(PhotonServerSettings.AppSettings, PhotonServerSettings.StartInOfflineMode); + } + + public static bool ConnectUsingSettings(AppSettings appSettings, bool startInOfflineMode = false) // parameter name hides static class member + { + if (NetworkingClient.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + Debug.LogWarning("ConnectUsingSettings() failed. Can only connect while in state 'Disconnected'. Current state: " + NetworkingClient.LoadBalancingPeer.PeerState); + return false; + } + if (PhotonHandler.AppQuits) + { + Debug.LogWarning("Can't connect: Application is closing. Unity called OnApplicationQuit()."); + return false; + } + if (PhotonServerSettings == null) + { + Debug.LogError("Can't connect: Loading settings failed. ServerSettings asset must be in any 'Resources' folder as: " + ServerSettingsFileName); + return false; + } + + SetupLogging(); + + + NetworkingClient.LoadBalancingPeer.TransportProtocol = appSettings.Protocol; + NetworkingClient.ExpectedProtocol = null; + NetworkingClient.EnableProtocolFallback = appSettings.EnableProtocolFallback; + NetworkingClient.AuthMode = appSettings.AuthMode; + + + IsMessageQueueRunning = true; + NetworkingClient.AppId = appSettings.AppIdRealtime; + GameVersion = appSettings.AppVersion; + + + + if (startInOfflineMode) + { + OfflineMode = true; + return true; + } + + if (OfflineMode) + { + OfflineMode = false; // Cleanup offline mode + // someone can set OfflineMode in code and then call ConnectUsingSettings() with non-offline settings. Warning for that case: + Debug.LogWarning("ConnectUsingSettings() disabled the offline mode. No longer offline."); + } + + + NetworkingClient.EnableLobbyStatistics = appSettings.EnableLobbyStatistics; + NetworkingClient.ProxyServerAddress = appSettings.ProxyServer; + + + if (appSettings.IsMasterServerAddress) + { + if (AuthValues == null) + { + AuthValues = new AuthenticationValues(Guid.NewGuid().ToString()); + } + else if (string.IsNullOrEmpty(AuthValues.UserId)) + { + AuthValues.UserId = Guid.NewGuid().ToString(); + } + return ConnectToMaster(appSettings.Server, appSettings.Port, appSettings.AppIdRealtime); + } + + + NetworkingClient.NameServerPortInAppSettings = appSettings.Port; + if (!appSettings.IsDefaultNameServer) + { + NetworkingClient.NameServerHost = appSettings.Server; + } + + + if (appSettings.IsBestRegion) + { + return ConnectToBestCloudServer(); + } + + return ConnectToRegion(appSettings.FixedRegion); + } + + + /// Connect to a Photon Master Server by address, port, appID. + /// + /// To connect to the Photon Cloud, a valid AppId must be in the settings file (shown in the Photon Cloud Dashboard). + /// https://dashboard.photonengine.com + /// + /// Connecting to the Photon Cloud might fail due to: + /// - Invalid AppId + /// - Network issues + /// - Invalid region + /// - Subscription CCU limit reached + /// - etc. + /// + /// In general check out the from the callback. + /// + /// The server's address (either your own or Photon Cloud address). + /// The server's port to connect to. + /// Your application ID (Photon Cloud provides you with a GUID for your game). + public static bool ConnectToMaster(string masterServerAddress, int port, string appID) + { + // TODO: refactor NetworkingClient.LoadBalancingPeer.PeerState to not use the peer but LBC.connected or so + if (NetworkingClient.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + Debug.LogWarning("ConnectToMaster() failed. Can only connect while in state 'Disconnected'. Current state: " + NetworkingClient.LoadBalancingPeer.PeerState); + return false; + } + if (PhotonHandler.AppQuits) + { + Debug.LogWarning("Can't connect: Application is closing. Unity called OnApplicationQuit()."); + return false; + } + + if (OfflineMode) + { + OfflineMode = false; // Cleanup offline mode + Debug.LogWarning("ConnectToMaster() disabled the offline mode. No longer offline."); + } + + if (!IsMessageQueueRunning) + { + IsMessageQueueRunning = true; + Debug.LogWarning("ConnectToMaster() enabled IsMessageQueueRunning. Needs to be able to dispatch incoming messages."); + } + + SetupLogging(); + ConnectMethod = ConnectMethod.ConnectToMaster; + + NetworkingClient.IsUsingNameServer = false; + NetworkingClient.MasterServerAddress = (port == 0) ? masterServerAddress : masterServerAddress + ":" + port; + NetworkingClient.AppId = appID; + + return NetworkingClient.ConnectToMasterServer(); + } + + + /// + /// Connect to the Photon Cloud region with the lowest ping (on platforms that support Unity's Ping). + /// + /// + /// Will save the result of pinging all cloud servers in PlayerPrefs. Calling this the first time can take +-2 seconds. + /// The ping result can be overridden via PhotonNetwork.OverrideBestCloudServer(..) + /// This call can take up to 2 seconds if it is the first time you are using this, all cloud servers will be pinged to check for the best region. + /// + /// The PUN Setup Wizard stores your appID in a settings file and applies a server address/port. + /// To connect to the Photon Cloud, a valid AppId must be in the settings file (shown in the Photon Cloud Dashboard). + /// https://dashboard.photonengine.com + /// + /// Connecting to the Photon Cloud might fail due to: + /// - Invalid AppId + /// - Network issues + /// - Invalid region + /// - Subscription CCU limit reached + /// - etc. + /// + /// In general check out the from the callback. + /// + /// If this client is going to connect to cloud server based on ping. Even if true, this does not guarantee a connection but the attempt is being made. + public static bool ConnectToBestCloudServer() + { + if (NetworkingClient.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + Debug.LogWarning("ConnectToBestCloudServer() failed. Can only connect while in state 'Disconnected'. Current state: " + NetworkingClient.LoadBalancingPeer.PeerState); + return false; + } + if (PhotonHandler.AppQuits) + { + Debug.LogWarning("Can't connect: Application is closing. Unity called OnApplicationQuit()."); + return false; + } + + SetupLogging(); + ConnectMethod = ConnectMethod.ConnectToBest; + + // Connecting to "Best Region" begins with connecting to the Name Server. + bool couldConnect = PhotonNetwork.NetworkingClient.ConnectToNameServer(); + return couldConnect; + } + + + /// + /// Connects to the Photon Cloud region of choice. + /// + /// + /// It's typically enough to define the region code ("eu", "us", etc). + /// Connecting to a specific cluster may be necessary, when regions get sharded and you support friends / invites. + /// + /// In all other cases, you should not define a cluster as this allows the Name Server to distribute + /// clients as needed. A random, load balanced cluster will be selected. + /// + /// The Name Server has the final say to assign a cluster as available. + /// If the requested cluster is not available another will be assigned. + /// + /// Once connected, check the value of CurrentCluster. + /// + public static bool ConnectToRegion(string region) + { + if (NetworkingClient.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected && NetworkingClient.Server != ServerConnection.NameServer) + { + Debug.LogWarning("ConnectToRegion() failed. Can only connect while in state 'Disconnected'. Current state: " + NetworkingClient.LoadBalancingPeer.PeerState); + return false; + } + if (PhotonHandler.AppQuits) + { + Debug.LogWarning("Can't connect: Application is closing. Unity called OnApplicationQuit()."); + return false; + } + + SetupLogging(); + ConnectMethod = ConnectMethod.ConnectToRegion; + + if (!string.IsNullOrEmpty(region)) + { + return NetworkingClient.ConnectToRegionMaster(region); + } + + return false; + } + + + /// + /// Makes this client disconnect from the photon server, a process that leaves any room and calls OnDisconnected on completion. + /// + /// + /// When you disconnect, the client will send a "disconnecting" message to the server. This speeds up leave/disconnect + /// messages for players in the same room as you (otherwise the server would timeout this client's connection). + /// When used in OfflineMode, the state-change and event-call OnDisconnected are immediate. + /// Offline mode is set to false as well. + /// Once disconnected, the client can connect again. Use ConnectUsingSettings. + /// + public static void Disconnect() + { + if (OfflineMode) + { + OfflineMode = false; + offlineModeRoom = null; + NetworkingClient.State = ClientState.Disconnecting; + NetworkingClient.OnStatusChanged(StatusCode.Disconnect); + return; + } + + if (NetworkingClient == null) + { + return; // Surpress error when quitting playmode in the editor + } + + NetworkingClient.Disconnect(); + } + + /// Can be used to reconnect to the master server after a disconnect. + /// + /// After losing connection, you can use this to connect a client to the region Master Server again. + /// Cache the room name you're in and use RejoinRoom(roomname) to return to a game. + /// Common use case: Press the Lock Button on a iOS device and you get disconnected immediately. + /// + public static bool Reconnect() + { + if (string.IsNullOrEmpty(NetworkingClient.MasterServerAddress)) + { + Debug.LogWarning("Reconnect() failed. It seems the client wasn't connected before?! Current state: " + NetworkingClient.LoadBalancingPeer.PeerState); + return false; + } + + if (NetworkingClient.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + Debug.LogWarning("Reconnect() failed. Can only connect while in state 'Disconnected'. Current state: " + NetworkingClient.LoadBalancingPeer.PeerState); + return false; + } + + if (OfflineMode) + { + OfflineMode = false; // Cleanup offline mode + Debug.LogWarning("Reconnect() disabled the offline mode. No longer offline."); + } + + if (!IsMessageQueueRunning) + { + IsMessageQueueRunning = true; + Debug.LogWarning("Reconnect() enabled IsMessageQueueRunning. Needs to be able to dispatch incoming messages."); + } + + NetworkingClient.IsUsingNameServer = false; + return NetworkingClient.ReconnectToMaster(); + } + + + /// + /// Resets the traffic stats and re-enables them. + /// + public static void NetworkStatisticsReset() + { + NetworkingClient.LoadBalancingPeer.TrafficStatsReset(); + } + + + /// + /// Only available when NetworkStatisticsEnabled was used to gather some stats. + /// + /// A string with vital networking statistics. + public static string NetworkStatisticsToString() + { + if (NetworkingClient == null || OfflineMode) + { + return "Offline or in OfflineMode. No VitalStats available."; + } + + return NetworkingClient.LoadBalancingPeer.VitalStatsToString(false); + } + + + /// + /// Helper function which is called inside this class to erify if certain functions can be used (e.g. RPC when not connected) + /// + /// + private static bool VerifyCanUseNetwork() + { + if (IsConnected) + { + return true; + } + + Debug.LogError("Cannot send messages when not connected. Either connect to Photon OR use offline mode!"); + return false; + } + + + /// + /// The current roundtrip time to the photon server. + /// + /// Roundtrip time (to server and back). + public static int GetPing() + { + return NetworkingClient.LoadBalancingPeer.RoundTripTime; + } + + /// Refreshes the server timestamp (async operation, takes a roundtrip). + /// Can be useful if a bad connection made the timestamp unusable or imprecise. + public static void FetchServerTimestamp() + { + if (NetworkingClient != null) + { + NetworkingClient.LoadBalancingPeer.FetchServerTimestamp(); + } + } + + /// + /// Can be used to immediately send the RPCs and Instantiates just called, so they are on their way to the other players. + /// + /// + /// This could be useful if you do a RPC to load a level and then load it yourself. + /// While loading, no RPCs are sent to others, so this would delay the "load" RPC. + /// You can send the RPC to "others", use this method, disable the message queue + /// (by IsMessageQueueRunning) and then load. + /// + public static void SendAllOutgoingCommands() + { + if (!VerifyCanUseNetwork()) + { + return; + } + + while (NetworkingClient.LoadBalancingPeer.SendOutgoingCommands()) + { + } + } + + /// Request a client to disconnect/kick, which happens if EnableCloseConnection is set to true. Only the master client can do this. + /// Only the target player gets this event. That player will disconnect if EnableCloseConnection = true. + /// The Player to kick. + public static bool CloseConnection(Player kickPlayer) + { + if (!VerifyCanUseNetwork()) + { + return false; + } + + if (!PhotonNetwork.EnableCloseConnection) + { + Debug.LogError("CloseConnection is disabled. No need to call it."); + return false; + } + + if (!LocalPlayer.IsMasterClient) + { + Debug.LogError("CloseConnection: Only the masterclient can kick another player."); + return false; + } + + if (kickPlayer == null) + { + Debug.LogError("CloseConnection: No such player connected!"); + return false; + } + + RaiseEventOptions options = new RaiseEventOptions() { TargetActors = new int[] { kickPlayer.ActorNumber } }; + return NetworkingClient.OpRaiseEvent(PunEvent.CloseConnection, null, options, SendOptions.SendReliable); + } + + + /// + /// Asks the server to assign another player as Master Client of your current room. + /// + /// + /// RPCs and RaiseEvent have the option to send messages only to the Master Client of a room. + /// SetMasterClient affects which client gets those messages. + /// + /// This method calls an operation on the server to set a new Master Client, which takes a roundtrip. + /// In case of success, this client and the others get the new Master Client from the server. + /// + /// SetMasterClient tells the server which current Master Client should be replaced with the new one. + /// It will fail, if anything switches the Master Client moments earlier. There is no callback for this + /// error. All clients should get the new Master Client assigned by the server anyways. + /// + /// See also: PhotonNetwork.MasterClient + /// + /// On v3 servers: + /// The ReceiverGroup.MasterClient (usable in RPCs) is not affected by this (still points to lowest player.ID in room). + /// Avoid using this enum value (and send to a specific player instead). + /// + /// If the current Master Client leaves, PUN will detect a new one by "lowest player ID". Implement OnMasterClientSwitched + /// to get a callback in this case. The PUN-selected Master Client might assign a new one. + /// + /// Make sure you don't create an endless loop of Master-assigning! When selecting a custom Master Client, all clients + /// should point to the same player, no matter who actually assigns this player. + /// + /// Locally the Master Client is immediately switched, while remote clients get an event. This means the game + /// is tempoarily without Master Client like when a current Master Client leaves. + /// + /// When switching the Master Client manually, keep in mind that this user might leave and not do it's work, just like + /// any Master Client. + /// + /// + /// The player to become the next Master Client. + /// False when this operation couldn't be done. Must be in a room (not in OfflineMode). + public static bool SetMasterClient(Player masterClientPlayer) + { + if (!InRoom || !VerifyCanUseNetwork() || OfflineMode) + { + if (LogLevel == PunLogLevel.Informational) Debug.Log("Can not SetMasterClient(). Not in room or in OfflineMode."); + return false; + } + + return CurrentRoom.SetMasterClient(masterClientPlayer); + } + + + /// + /// Joins a random room that matches the filter. Will callback: OnJoinedRoom or OnJoinRandomFailed. + /// + /// + /// Used for random matchmaking. You can join any room or one with specific properties defined in opJoinRandomRoomParams. + /// + /// This operation fails if no rooms are fitting or available (all full, closed, in another lobby or not visible). + /// It may also fail when actually joining the room which was found. Rooms may close, become full or empty anytime. + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// More about PUN matchmaking: + /// https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby + /// + public static bool JoinRandomRoom() + { + return JoinRandomRoom(null, 0, MatchmakingMode.FillRoom, null, null); + } + + /// + /// Joins a random room that matches the filter. Will callback: OnJoinedRoom or OnJoinRandomFailed. + /// + /// + /// Used for random matchmaking. You can join any room or one with specific properties defined in opJoinRandomRoomParams. + /// + /// This operation fails if no rooms are fitting or available (all full, closed, in another lobby or not visible). + /// It may also fail when actually joining the room which was found. Rooms may close, become full or empty anytime. + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// More about PUN matchmaking: + /// https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby + /// + /// Filters for rooms that match these custom properties (string keys and values). To ignore, pass null. + /// Filters for a particular maxplayer setting. Use 0 to accept any maxPlayer value. + /// If the operation got queued and will be sent. + public static bool JoinRandomRoom(Hashtable expectedCustomRoomProperties, byte expectedMaxPlayers) + { + return JoinRandomRoom(expectedCustomRoomProperties, expectedMaxPlayers, MatchmakingMode.FillRoom, null, null); + } + + /// + /// Joins a random room that matches the filter. Will callback: OnJoinedRoom or OnJoinRandomFailed. + /// + /// + /// Used for random matchmaking. You can join any room or one with specific properties defined in opJoinRandomRoomParams. + /// + /// This operation fails if no rooms are fitting or available (all full, closed, in another lobby or not visible). + /// It may also fail when actually joining the room which was found. Rooms may close, become full or empty anytime. + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// More about PUN matchmaking: + /// https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby + /// + /// Filters for rooms that match these custom properties (string keys and values). To ignore, pass null. + /// Filters for a particular maxplayer setting. Use 0 to accept any maxPlayer value. + /// Selects one of the available matchmaking algorithms. See MatchmakingMode enum for options. + /// The lobby in which you want to lookup a room. Pass null, to use the default lobby. This does not join that lobby and neither sets the lobby property. + /// A filter-string for SQL-typed lobbies. + /// Optional list of users (by UserId) who are expected to join this game and who you want to block a slot for. + /// If the operation got queued and will be sent. + public static bool JoinRandomRoom(Hashtable expectedCustomRoomProperties, byte expectedMaxPlayers, MatchmakingMode matchingType, TypedLobby typedLobby, string sqlLobbyFilter, string[] expectedUsers = null) + { + if (OfflineMode) + { + if (offlineModeRoom != null) + { + Debug.LogError("JoinRandomRoom failed. In offline mode you still have to leave a room to enter another."); + return false; + } + EnterOfflineRoom("offline room", null, true); + return true; + } + if (NetworkingClient.Server != ServerConnection.MasterServer || !IsConnectedAndReady) + { + Debug.LogError("JoinRandomRoom failed. Client is on "+ NetworkingClient.Server+ " (must be Master Server for matchmaking)" + (IsConnectedAndReady ? " and ready" : " but not ready for operations (State: "+ NetworkingClient.State + ")") + ". Wait for callback: OnJoinedLobby or OnConnectedToMaster."); + return false; + } + + typedLobby = typedLobby ?? ((NetworkingClient.InLobby) ? NetworkingClient.CurrentLobby : null); // use given lobby, or active lobby (if any active) or none + + OpJoinRandomRoomParams opParams = new OpJoinRandomRoomParams(); + opParams.ExpectedCustomRoomProperties = expectedCustomRoomProperties; + opParams.ExpectedMaxPlayers = expectedMaxPlayers; + opParams.MatchingType = matchingType; + opParams.TypedLobby = typedLobby; + opParams.SqlLobbyFilter = sqlLobbyFilter; + opParams.ExpectedUsers = expectedUsers; + + return NetworkingClient.OpJoinRandomRoom(opParams); + } + + + /// + /// Attempts to join a room that matches the specified filter and creates a room if none found. + /// + /// + /// This operation is a combination of filter-based random matchmaking with the option to create a new room, + /// if no fitting room exists. + /// The benefit of that is that the room creation is done by the same operation and the room can be found + /// by the very next client, looking for similar rooms. + /// + /// There are separate parameters for joining and creating a room. + /// + /// This method can only be called while connected to a Master Server. + /// This client's State is set to ClientState.Joining immediately. + /// + /// Either IMatchmakingCallbacks.OnJoinedRoom or IMatchmakingCallbacks.OnCreatedRoom gets called. + /// + /// Should the creation on the Master Server, IMatchmakingCallbacks.OnJoinRandomFailed gets called. + /// Should the "join" on the Game Server fail, IMatchmakingCallbacks.OnJoinRoomFailed gets called. + /// + /// + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// If the operation will be sent (requires connection to Master Server). + public static bool JoinRandomOrCreateRoom(Hashtable expectedCustomRoomProperties = null, byte expectedMaxPlayers = 0, MatchmakingMode matchingType = MatchmakingMode.FillRoom, TypedLobby typedLobby = null, string sqlLobbyFilter = null, string roomName = null, RoomOptions roomOptions = null, string[] expectedUsers = null) + { + if (OfflineMode) + { + if (offlineModeRoom != null) + { + Debug.LogError("JoinRandomOrCreateRoom failed. In offline mode you still have to leave a room to enter another."); + return false; + } + EnterOfflineRoom("offline room", null, true); + return true; + } + if (NetworkingClient.Server != ServerConnection.MasterServer || !IsConnectedAndReady) + { + Debug.LogError("JoinRandomOrCreateRoom failed. Client is on "+ NetworkingClient.Server+ " (must be Master Server for matchmaking)" + (IsConnectedAndReady ? " and ready" : " but not ready for operations (State: "+ NetworkingClient.State + ")") + ". Wait for callback: OnJoinedLobby or OnConnectedToMaster."); + return false; + } + + typedLobby = typedLobby ?? ((NetworkingClient.InLobby) ? NetworkingClient.CurrentLobby : null); // use given lobby, or active lobby (if any active) or none + + OpJoinRandomRoomParams opParams = new OpJoinRandomRoomParams(); + opParams.ExpectedCustomRoomProperties = expectedCustomRoomProperties; + opParams.ExpectedMaxPlayers = expectedMaxPlayers; + opParams.MatchingType = matchingType; + opParams.TypedLobby = typedLobby; + opParams.SqlLobbyFilter = sqlLobbyFilter; + opParams.ExpectedUsers = expectedUsers; + + EnterRoomParams enterRoomParams = new EnterRoomParams(); + enterRoomParams.RoomName = roomName; + enterRoomParams.RoomOptions = roomOptions; + enterRoomParams.Lobby = typedLobby; + enterRoomParams.ExpectedUsers = expectedUsers; + + return NetworkingClient.OpJoinRandomOrCreateRoom(opParams, enterRoomParams); + } + + + /// + /// Creates a new room. Will callback: OnCreatedRoom and OnJoinedRoom or OnCreateRoomFailed. + /// + /// + /// When successful, this calls the callbacks OnCreatedRoom and OnJoinedRoom (the latter, cause you join as first player). + /// In all error cases, OnCreateRoomFailed gets called. + /// + /// Creating a room will fail if the room name is already in use or when the RoomOptions clashing + /// with one another. Check the EnterRoomParams reference for the various room creation options. + /// + /// If you don't want to create a unique room-name, pass null or "" as name and the server will assign a roomName (a GUID as string). + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// More about PUN matchmaking: + /// https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby + /// + /// Unique name of the room to create. Pass null or "" to make the server generate a name. + /// Common options for the room like MaxPlayers, initial custom room properties and similar. See RoomOptions type.. + /// If null, the room is automatically created in the currently used lobby (which is "default" when you didn't join one explicitly). + /// Optional list of users (by UserId) who are expected to join this game and who you want to block a slot for. + /// If the operation got queued and will be sent. + public static bool CreateRoom(string roomName, RoomOptions roomOptions = null, TypedLobby typedLobby = null, string[] expectedUsers = null) + { + if (OfflineMode) + { + if (offlineModeRoom != null) + { + Debug.LogError("CreateRoom failed. In offline mode you still have to leave a room to enter another."); + return false; + } + EnterOfflineRoom(roomName, roomOptions, true); + return true; + } + if (NetworkingClient.Server != ServerConnection.MasterServer || !IsConnectedAndReady) + { + Debug.LogError("CreateRoom failed. Client is on " + NetworkingClient.Server + " (must be Master Server for matchmaking)" + (IsConnectedAndReady ? " and ready" : "but not ready for operations (State: " + NetworkingClient.State + ")") + ". Wait for callback: OnJoinedLobby or OnConnectedToMaster."); + return false; + } + + typedLobby = typedLobby ?? ((NetworkingClient.InLobby) ? NetworkingClient.CurrentLobby : null); // use given lobby, or active lobby (if any active) or none + + EnterRoomParams opParams = new EnterRoomParams(); + opParams.RoomName = roomName; + opParams.RoomOptions = roomOptions; + opParams.Lobby = typedLobby; + opParams.ExpectedUsers = expectedUsers; + + return NetworkingClient.OpCreateRoom(opParams); + } + + + /// + /// Joins a specific room by name and creates it on demand. Will callback: OnJoinedRoom or OnJoinRoomFailed. + /// + /// + /// Useful when players make up a room name to meet in: + /// All involved clients call the same method and whoever is first, also creates the room. + /// + /// When successful, the client will enter the specified room. + /// The client which creates the room, will callback both OnCreatedRoom and OnJoinedRoom. + /// Clients that join an existing room will only callback OnJoinedRoom. + /// In all error cases, OnJoinRoomFailed gets called. + /// + /// Joining a room will fail, if the room is full, closed or when the user + /// already is present in the room (checked by userId). + /// + /// To return to a room, use OpRejoinRoom. + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// + /// If you set room properties in roomOptions, they get ignored when the room is existing already. + /// This avoids changing the room properties by late joining players. + /// + /// You can define an array of expectedUsers, to block player slots in the room for these users. + /// The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages. + /// + /// + /// More about PUN matchmaking: + /// https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby + /// + /// Name of the room to join. Must be non null. + /// Options for the room, in case it does not exist yet. Else these values are ignored. + /// Lobby you want a new room to be listed in. Ignored if the room was existing and got joined. + /// Optional list of users (by UserId) who are expected to join this game and who you want to block a slot for. + /// If the operation got queued and will be sent. + public static bool JoinOrCreateRoom(string roomName, RoomOptions roomOptions, TypedLobby typedLobby, string[] expectedUsers = null) + { + if (OfflineMode) + { + if (offlineModeRoom != null) + { + Debug.LogError("JoinOrCreateRoom failed. In offline mode you still have to leave a room to enter another."); + return false; + } + EnterOfflineRoom(roomName, roomOptions, true); // in offline mode, JoinOrCreateRoom assumes you create the room + return true; + } + if (NetworkingClient.Server != ServerConnection.MasterServer || !IsConnectedAndReady) + { + Debug.LogError("JoinOrCreateRoom failed. Client is on " + NetworkingClient.Server + " (must be Master Server for matchmaking)" + (IsConnectedAndReady ? " and ready" : "but not ready for operations (State: " + NetworkingClient.State + ")") + ". Wait for callback: OnJoinedLobby or OnConnectedToMaster."); + return false; + } + if (string.IsNullOrEmpty(roomName)) + { + Debug.LogError("JoinOrCreateRoom failed. A roomname is required. If you don't know one, how will you join?"); + return false; + } + + typedLobby = typedLobby ?? ((NetworkingClient.InLobby) ? NetworkingClient.CurrentLobby : null); // use given lobby, or active lobby (if any active) or none + + EnterRoomParams opParams = new EnterRoomParams(); + opParams.RoomName = roomName; + opParams.RoomOptions = roomOptions; + opParams.Lobby = typedLobby; + opParams.PlayerProperties = LocalPlayer.CustomProperties; + opParams.ExpectedUsers = expectedUsers; + + return NetworkingClient.OpJoinOrCreateRoom(opParams); + } + + + /// + /// Joins a room by name. Will callback: OnJoinedRoom or OnJoinRoomFailed. + /// + /// + /// Useful when using lobbies or when players follow friends or invite each other. + /// + /// When successful, the client will enter the specified room and callback via OnJoinedRoom. + /// In all error cases, OnJoinRoomFailed gets called. + /// + /// Joining a room will fail if the room is full, closed, not existing or when the user + /// already is present in the room (checked by userId). + /// + /// To return to a room, use OpRejoinRoom. + /// When players invite each other and it's unclear who's first to respond, use OpJoinOrCreateRoom instead. + /// + /// This method can only be called while the client is connected to a Master Server so you should + /// implement the callback OnConnectedToMaster. + /// Check the return value to make sure the operation will be called on the server. + /// Note: There will be no callbacks if this method returned false. + /// + /// + /// More about PUN matchmaking: + /// https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby + /// + /// + /// + /// Unique name of the room to join. + /// Optional list of users (by UserId) who are expected to join this game and who you want to block a slot for. + /// If the operation got queued and will be sent. + public static bool JoinRoom(string roomName, string[] expectedUsers = null) + { + if (OfflineMode) + { + if (offlineModeRoom != null) + { + Debug.LogError("JoinRoom failed. In offline mode you still have to leave a room to enter another."); + return false; + } + EnterOfflineRoom(roomName, null, true); + return true; + } + if (NetworkingClient.Server != ServerConnection.MasterServer || !IsConnectedAndReady) + { + Debug.LogError("JoinRoom failed. Client is on " + NetworkingClient.Server + " (must be Master Server for matchmaking)" + (IsConnectedAndReady ? " and ready" : "but not ready for operations (State: " + NetworkingClient.State + ")") + ". Wait for callback: OnJoinedLobby or OnConnectedToMaster."); + return false; + } + if (string.IsNullOrEmpty(roomName)) + { + Debug.LogError("JoinRoom failed. A roomname is required. If you don't know one, how will you join?"); + return false; + } + + + EnterRoomParams opParams = new EnterRoomParams(); + opParams.RoomName = roomName; + opParams.ExpectedUsers = expectedUsers; + + return NetworkingClient.OpJoinRoom(opParams); + } + + + /// + /// Rejoins a room by roomName (using the userID internally to return). Will callback: OnJoinedRoom or OnJoinRoomFailed. + /// + /// + /// After losing connection, you might be able to return to a room and continue playing, + /// if the client is reconnecting fast enough. Use Reconnect() and this method. + /// Cache the room name you're in and use RejoinRoom(roomname) to return to a game. + /// + /// Note: To be able to Rejoin any room, you need to use UserIDs! + /// You also need to set RoomOptions.PlayerTtl. + /// + /// Important: Instantiate() and use of RPCs is not yet supported. + /// The ownership rules of PhotonViews prevent a seamless return to a game, if you use PhotonViews. + /// Use Custom Properties and RaiseEvent with event caching instead. + /// + /// Common use case: Press the Lock Button on a iOS device and you get disconnected immediately. + /// + /// Rejoining room will not send any player properties. Instead client will receive up-to-date ones from server. + /// If you want to set new player properties, do it once rejoined. + /// + public static bool RejoinRoom(string roomName) + { + if (OfflineMode) + { + Debug.LogError("RejoinRoom failed due to offline mode."); + return false; + } + if (NetworkingClient.Server != ServerConnection.MasterServer || !IsConnectedAndReady) + { + Debug.LogError("RejoinRoom failed. Client is on " + NetworkingClient.Server + " (must be Master Server for matchmaking)" + (IsConnectedAndReady ? " and ready" : "but not ready for operations (State: " + NetworkingClient.State + ")") + ". Wait for callback: OnJoinedLobby or OnConnectedToMaster."); + return false; + } + if (string.IsNullOrEmpty(roomName)) + { + Debug.LogError("RejoinRoom failed. A roomname is required. If you don't know one, how will you join?"); + return false; + } + + return NetworkingClient.OpRejoinRoom(roomName); + } + + + /// When the client lost connection during gameplay, this method attempts to reconnect and rejoin the room. + /// + /// This method re-connects directly to the game server which was hosting the room PUN was in before. + /// If the room was shut down in the meantime, PUN will call OnJoinRoomFailed and return this client to the Master Server. + /// + /// Check the return value, if this client will attempt a reconnect and rejoin (if the conditions are met). + /// If ReconnectAndRejoin returns false, you can still attempt a Reconnect and Rejoin. + /// + /// Similar to PhotonNetwork.RejoinRoom, this requires you to use unique IDs per player (the UserID). + /// + /// Rejoining room will not send any player properties. Instead client will receive up-to-date ones from server. + /// If you want to set new player properties, do it once rejoined. + /// + /// False, if there is no known room or game server to return to. Then, this client does not attempt the ReconnectAndRejoin. + public static bool ReconnectAndRejoin() + { + if (NetworkingClient.LoadBalancingPeer.PeerState != PeerStateValue.Disconnected) + { + Debug.LogWarning("ReconnectAndRejoin() failed. Can only connect while in state 'Disconnected'. Current state: " + NetworkingClient.LoadBalancingPeer.PeerState); + return false; + } + if (OfflineMode) + { + OfflineMode = false; // Cleanup offline mode + Debug.LogWarning("ReconnectAndRejoin() disabled the offline mode. No longer offline."); + } + + if (!IsMessageQueueRunning) + { + IsMessageQueueRunning = true; + Debug.LogWarning("ReconnectAndRejoin() enabled IsMessageQueueRunning. Needs to be able to dispatch incoming messages."); + } + + return NetworkingClient.ReconnectAndRejoin(); + } + + + /// Leave the current room and return to the Master Server where you can join or create rooms (see remarks). + /// + /// This will clean up all (network) GameObjects with a PhotonView, unless you changed autoCleanUp to false. + /// Returns to the Master Server. + /// + /// In OfflineMode, the local "fake" room gets cleaned up and OnLeftRoom gets called immediately. + /// + /// In a room with playerTTL < 0, LeaveRoom just turns a client inactive. The player stays in the room's player list + /// and can return later on. Setting becomeInactive to false deliberately, means to "abandon" the room, despite the + /// playerTTL allowing you to come back. + /// + /// In a room with playerTTL == 0, become inactive has no effect (clients are removed from the room right away). + /// + /// If this client becomes inactive in a room with playerTTL < 0. Defaults to true. + public static bool LeaveRoom(bool becomeInactive = true) + { + if (OfflineMode) + { + offlineModeRoom = null; + NetworkingClient.MatchMakingCallbackTargets.OnLeftRoom(); + NetworkingClient.ConnectionCallbackTargets.OnConnectedToMaster(); + } + else + { + if (CurrentRoom == null) + { + Debug.LogWarning("PhotonNetwork.CurrentRoom is null. You don't have to call LeaveRoom() when you're not in one. State: " + PhotonNetwork.NetworkClientState); + } + else + { + becomeInactive = becomeInactive && CurrentRoom.PlayerTtl != 0; // in a room with playerTTL == 0, the operation "leave" will never turn a client inactive + } + return NetworkingClient.OpLeaveRoom(becomeInactive); + } + + return true; + } + + + + /// + /// Internally used helper-method to setup an offline room, the numbers for actor and master-client and to do the callbacks. + /// + private static void EnterOfflineRoom(string roomName, RoomOptions roomOptions, bool createdRoom) + { + offlineModeRoom = new Room(roomName, roomOptions, true); + NetworkingClient.ChangeLocalID(1); + offlineModeRoom.masterClientId = 1; + offlineModeRoom.AddPlayer(PhotonNetwork.LocalPlayer); + offlineModeRoom.LoadBalancingClient = PhotonNetwork.NetworkingClient; + PhotonNetwork.NetworkingClient.CurrentRoom = offlineModeRoom; + + if (createdRoom) + { + NetworkingClient.MatchMakingCallbackTargets.OnCreatedRoom(); + } + + NetworkingClient.MatchMakingCallbackTargets.OnJoinedRoom(); + } + + /// On MasterServer this joins the default lobby which list rooms currently in use. + /// + /// The room list is sent and refreshed by the server using . + /// + /// Per room you should check if it's full or not before joining. Photon also lists rooms that are + /// full, unless you close and hide them (room.open = false and room.visible = false). + /// + /// In best case, you make your clients join random games, as described here: + /// https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby + /// + /// + /// You can show your current players and room count without joining a lobby (but you must + /// be on the master server). Use: CountOfPlayers, CountOfPlayersOnMaster, CountOfPlayersInRooms and + /// CountOfRooms. + /// + /// You can use more than one lobby to keep the room lists shorter. See JoinLobby(TypedLobby lobby). + /// When creating new rooms, they will be "attached" to the currently used lobby or the default lobby. + /// + /// You can use JoinRandomRoom without being in a lobby! + /// + public static bool JoinLobby() + { + return JoinLobby(null); + } + + /// On a Master Server you can join a lobby to get lists of available rooms. + /// + /// The room list is sent and refreshed by the server using . + /// + /// Any client can "make up" any lobby on the fly. Splitting rooms into multiple lobbies will + /// keep each list shorter. However, having too many lists might ruin the matchmaking experience. + /// + /// In best case, you create a limited number of lobbies. For example, create a lobby per + /// game-mode: "koth" for king of the hill and "ffa" for free for all, etc. + /// + /// There is no listing of lobbies at the moment. + /// + /// Sql-typed lobbies offer a different filtering model for random matchmaking. This might be more + /// suited for skillbased-games. However, you will also need to follow the conventions for naming + /// filterable properties in sql-lobbies! Both is explained in the matchmaking doc linked below. + /// + /// In best case, you make your clients join random games, as described here: + /// https://doc.photonengine.com/en-us/realtime/current/reference/matchmaking-and-lobby + /// + /// + /// Per room you should check if it's full or not before joining. Photon does list rooms that are + /// full, unless you close and hide them (room.open = false and room.visible = false). + /// + /// You can show your games current players and room count without joining a lobby (but you must + /// be on the master server). Use: CountOfPlayers, CountOfPlayersOnMaster, CountOfPlayersInRooms and + /// CountOfRooms. + /// + /// When creating new rooms, they will be "attached" to the currently used lobby or the default lobby. + /// + /// You can use JoinRandomRoom without being in a lobby! + /// + /// A typed lobby to join (must have name and type). + public static bool JoinLobby(TypedLobby typedLobby) + { + if (PhotonNetwork.IsConnected && PhotonNetwork.Server == ServerConnection.MasterServer) + { + return NetworkingClient.OpJoinLobby(typedLobby); + } + + return false; + } + + /// Leave a lobby to stop getting updates about available rooms. + /// + /// This does not reset PhotonNetwork.lobby! This allows you to join this particular lobby later + /// easily. + /// + /// The values CountOfPlayers, CountOfPlayersOnMaster, CountOfPlayersInRooms and CountOfRooms + /// are received even without being in a lobby. + /// + /// You can use JoinRandomRoom without being in a lobby. + /// + public static bool LeaveLobby() + { + if (PhotonNetwork.IsConnected && PhotonNetwork.Server == ServerConnection.MasterServer) + { + return NetworkingClient.OpLeaveLobby(); + } + + return false; + } + + /// + /// Requests the rooms and online status for a list of friends and saves the result in PhotonNetwork.Friends. + /// + /// + /// Works only on Master Server to find the rooms played by a selected list of users. + /// + /// The result will be stored in PhotonNetwork.Friends when available. + /// That list is initialized on first use of OpFindFriends (before that, it is null). + /// To refresh the list, call FindFriends again (in 5 seconds or 10 or 20). + /// + /// Users identify themselves by setting a unique userId in the PhotonNetwork.AuthValues. + /// See remarks of AuthenticationValues for info about how this is set and used. + /// + /// The list of friends must be fetched from some other source (not provided by Photon). + /// + /// + /// Internal: + /// The server response includes 2 arrays of info (each index matching a friend from the request): + /// ParameterCode.FindFriendsResponseOnlineList = bool[] of online states + /// ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room) + /// + /// Array of friend (make sure to use unique NickName or AuthValues). + /// If the operation could be sent (requires connection, only one request is allowed at any time). Always false in offline mode. + public static bool FindFriends(string[] friendsToFind) + { + if (NetworkingClient == null || offlineMode) + { + return false; + } + + return NetworkingClient.OpFindFriends(friendsToFind); + } + + /// Fetches a custom list of games from the server, matching a (non-empty) SQL-like filter. Triggers OnRoomListUpdate callback. + /// + /// Operation is only available for lobbies of type SqlLobby and the filter can not be empty. + /// It will check those conditions and fail locally, returning false. + /// This is an async request. + /// + /// Note: You don't have to join a lobby to query it. Rooms need to be "attached" to a lobby, which can be done + /// via the typedLobby parameter in CreateRoom, JoinOrCreateRoom, etc.. + /// + /// When done, OnRoomListUpdate gets called. + /// + /// + /// The lobby to query. Has to be of type SqlLobby. + /// The sql query statement. + /// If the operation could be sent (has to be connected). + public static bool GetCustomRoomList(TypedLobby typedLobby, string sqlLobbyFilter) + { + return NetworkingClient.OpGetGameList(typedLobby, sqlLobbyFilter); + } + + /// + /// Sets this (local) player's properties and synchronizes them to the other players (don't modify them directly). + /// + /// + /// While in a room, your properties are synced with the other players. + /// CreateRoom, JoinRoom and JoinRandomRoom will all apply your player's custom properties when you enter the room. + /// The whole Hashtable will get sent. Minimize the traffic by setting only updated key/values. + /// + /// If the Hashtable is null, the custom properties will be cleared. + /// Custom properties are never cleared automatically, so they carry over to the next room, if you don't change them. + /// + /// Don't set properties by modifying PhotonNetwork.player.customProperties! + /// + /// Only string-typed keys will be used from this hashtable. If null, custom properties are all deleted. + /// + /// False if customProperties is empty or have zero string keys. + /// True in offline mode. + /// True if not in a room and this is the local player + /// (use this to cache properties to be sent when joining a room). + /// Otherwise, returns if this operation could be sent to the server. + /// + public static bool SetPlayerCustomProperties(Hashtable customProperties) + { + if (customProperties == null) + { + customProperties = new Hashtable(); + foreach (object k in LocalPlayer.CustomProperties.Keys) + { + customProperties[(string)k] = null; + } + } + + return LocalPlayer.SetCustomProperties(customProperties); + } + + /// + /// Locally removes Custom Properties of "this" player. Important: This does not synchronize the change! Useful when you switch rooms. + /// + /// + /// Use this method with care. It can create inconsistencies of state between players! + /// This only changes the player.customProperties locally. This can be useful to clear your + /// Custom Properties between games (let's say they store which turn you made, kills, etc). + /// + /// SetPlayerCustomProperties() syncs and can be used to set values to null while in a room. + /// That can be considered "removed" while in a room. + /// + /// If customPropertiesToDelete is null or has 0 entries, all Custom Properties are deleted (replaced with a new Hashtable). + /// If you specify keys to remove, those will be removed from the Hashtable but other keys are unaffected. + /// + /// List of Custom Property keys to remove. See remarks. + public static void RemovePlayerCustomProperties(string[] customPropertiesToDelete) + { + // TODO: decide if this option makes sense + + if (customPropertiesToDelete == null || customPropertiesToDelete.Length == 0 || LocalPlayer.CustomProperties == null) + { + LocalPlayer.CustomProperties = new Hashtable(); + return; + } + + // if a specific list of props should be deleted, we do that here + for (int i = 0; i < customPropertiesToDelete.Length; i++) + { + string key = customPropertiesToDelete[i]; + if (LocalPlayer.CustomProperties.ContainsKey(key)) + { + LocalPlayer.CustomProperties.Remove(key); + } + } + } + + /// + /// Sends fully customizable events in a room. Events consist of at least an EventCode (0..199) and can have content. + /// + /// + /// To receive events, implement IOnEventCallback in any class and register it via PhotonNetwork.AddCallbackTarget. + /// See . + /// + /// The eventContent is optional. If set, eventContent must be a "serializable type", something that + /// the client can turn into a byte[] basically. Most basic types and arrays of them are supported, including + /// Unity's Vector2, Vector3, Quaternion. Transforms are not supported. + /// + /// You can turn a class into a "serializable type" by following the example in CustomTypes.cs. + /// + /// The RaiseEventOptions have some (less intuitive) combination rules: + /// If you set targetActors (an array of Player.ID values), the receivers parameter gets ignored. + /// When using event caching, the targetActors, receivers and interestGroup can't be used. Buffered events go to all. + /// When using cachingOption removeFromRoomCache, the eventCode and content are actually not sent but used as filter. + /// + /// A byte identifying the type of event. You might want to use a code per action or to signal which content can be expected. Allowed: 0..199. + /// Some serializable object like string, byte, integer, float (etc) and arrays of those. Hashtables with byte keys are good to send variable content. + /// Allows more complex usage of events. If null, RaiseEventOptions.Default will be used (which is fine). + /// Send options for reliable, encryption etc.. + /// False if event could not be sent. + public static bool RaiseEvent(byte eventCode, object eventContent, RaiseEventOptions raiseEventOptions, SendOptions sendOptions) + { + if (offlineMode) + { + if (raiseEventOptions.Receivers == ReceiverGroup.Others) + { + return true; + } + + EventData evData = new EventData { Code = eventCode }; // creates the equivalent of a received event + evData.Parameters[ParameterCode.Data] = eventContent; + evData.Parameters[ParameterCode.ActorNr] = 1; + + NetworkingClient.OnEvent(evData); + return true; + } + + if (!InRoom || eventCode >= 200) + { + Debug.LogWarning("RaiseEvent(" + eventCode + ") failed. Your event is not being sent! Check if your are in a Room and the eventCode must be less than 200 (0..199)."); + return false; + } + + return NetworkingClient.OpRaiseEvent(eventCode, eventContent, raiseEventOptions, sendOptions); + } + + /// Sends PUN-specific events to the server, unless in offlineMode. + /// A byte identifying the type of event. + /// Serializable object or container. + /// Allows more complex usage of events. If null, RaiseEventOptions. + /// Send options for reliable, encryption etc.. + /// False if event could not be sent + private static bool RaiseEventInternal(byte eventCode, object eventContent, RaiseEventOptions raiseEventOptions, SendOptions sendOptions) + { + if (offlineMode) + { + return false; + } + + if (!InRoom) + { + Debug.LogWarning("RaiseEvent(" + eventCode + ") failed. Your event is not being sent! Check if your are in a Room"); + return false; + } + + return NetworkingClient.OpRaiseEvent(eventCode, eventContent, raiseEventOptions, sendOptions); + } + + + /// + /// Allocates a viewID for the current/local player. + /// + /// True if a viewId was assigned. False if the PhotonView already had a non-zero viewID. + public static bool AllocateViewID(PhotonView view) + { + if (view.ViewID != 0) + { + Debug.LogError("AllocateViewID() can't be used for PhotonViews that already have a viewID. This view is: " + view.ToString()); + return false; + } + + int manualId = AllocateViewID(LocalPlayer.ActorNumber); + view.ViewID = manualId; + return true; + } + + [Obsolete("Renamed. Use AllocateRoomViewID instead")] + public static bool AllocateSceneViewID(PhotonView view) + { + return AllocateRoomViewID(view); + } + + /// + /// Enables the Master Client to allocate a viewID for room objects. + /// + /// True if a viewId was assigned. False if the PhotonView already had a non-zero viewID or if this client is not the Master Client. + public static bool AllocateRoomViewID(PhotonView view) + { + if (!PhotonNetwork.IsMasterClient) + { + Debug.LogError("Only the Master Client can AllocateRoomViewID(). Check PhotonNetwork.IsMasterClient!"); + return false; + } + + if (view.ViewID != 0) + { + Debug.LogError("AllocateRoomViewID() can't be used for PhotonViews that already have a viewID. This view is: " + view.ToString()); + return false; + } + + int manualId = AllocateViewID(0); + view.ViewID = manualId; + return true; + } + + /// Allocates a viewID for the current/local player or the room. + /// Use true, to allocate a room viewID and false to allocate a viewID for the local player. + /// Returns a viewID (combined owner and sequential number) that can be assigned as PhotonView.ViewID. + public static int AllocateViewID(bool roomObject) + { + if (roomObject && !LocalPlayer.IsMasterClient) + { + Debug.LogError("Only a Master Client can AllocateViewID() for room objects. This client/player is not a Master Client. Returning an invalid viewID: -1."); + return 0; + } + + int ownerActorNumber = roomObject ? 0 : LocalPlayer.ActorNumber; + return AllocateViewID(ownerActorNumber); + } + + /// Allocates a viewID for the current/local player or the room. + /// ActorNumber to allocate a viewID for. + /// Returns a viewID (combined owner and sequential number) that can be assigned as PhotonView.ViewID. + public static int AllocateViewID(int ownerId) + { + if (ownerId == 0) + { + // we look up a fresh subId for the owner "room" (mind the "sub" in subId) + int newSubId = lastUsedViewSubIdStatic; + int newViewId; + int ownerIdOffset = ownerId * MAX_VIEW_IDS; + for (int i = 1; i < MAX_VIEW_IDS; i++) + { + newSubId = (newSubId + 1) % MAX_VIEW_IDS; + if (newSubId == 0) + { + continue; // avoid using subID 0 + } + + newViewId = newSubId + ownerIdOffset; + if (!photonViewList.ContainsKey(newViewId)) + { + lastUsedViewSubIdStatic = newSubId; + return newViewId; + } + } + + // this is the error case: we didn't find any (!) free subId for this user + throw new Exception(string.Format("AllocateViewID() failed. The room (user {0}) is out of 'room' viewIDs. It seems all available are in use.", ownerId)); + } + else + { + // we look up a fresh SUBid for the owner + int newSubId = lastUsedViewSubId; + int newViewId; + int ownerIdOffset = ownerId * MAX_VIEW_IDS; + for (int i = 1; i <= MAX_VIEW_IDS; i++) + { + newSubId = (newSubId + 1) % MAX_VIEW_IDS; + if (newSubId == 0) + { + continue; // avoid using subID 0 + } + + newViewId = newSubId + ownerIdOffset; + if (!photonViewList.ContainsKey(newViewId)) + { + lastUsedViewSubId = newSubId; + return newViewId; + } + } + + throw new Exception(string.Format("AllocateViewID() failed. User {0} is out of viewIDs. It seems all available are in use.", ownerId)); + } + } + + + public static GameObject Instantiate(string prefabName, Vector3 position, Quaternion rotation, byte group = 0, object[] data = null) + { + if (CurrentRoom == null) + { + Debug.LogError("Can not Instantiate before the client joined/created a room. State: "+PhotonNetwork.NetworkClientState); + return null; + } + + Pun.InstantiateParameters netParams = new InstantiateParameters(prefabName, position, rotation, group, data, currentLevelPrefix, null, LocalPlayer, ServerTimestamp); + return NetworkInstantiate(netParams, false); + } + + [Obsolete("Renamed. Use InstantiateRoomObject instead")] + public static GameObject InstantiateSceneObject(string prefabName, Vector3 position, Quaternion rotation, byte group = 0, object[] data = null) + { + return InstantiateRoomObject(prefabName, position, rotation, group, data); + } + + public static GameObject InstantiateRoomObject(string prefabName, Vector3 position, Quaternion rotation, byte group = 0, object[] data = null) + { + if (CurrentRoom == null) + { + Debug.LogError("Can not Instantiate before the client joined/created a room."); + return null; + } + + if (LocalPlayer.IsMasterClient) + { + Pun.InstantiateParameters netParams = new InstantiateParameters(prefabName, position, rotation, group, data, currentLevelPrefix, null, LocalPlayer, ServerTimestamp); + return NetworkInstantiate(netParams, true); + } + + return null; + } + + private static GameObject NetworkInstantiate(Hashtable networkEvent, Player creator) + { + + // some values always present: + string prefabName = (string)networkEvent[keyByteZero]; + int serverTime = (int)networkEvent[keyByteSix]; + int instantiationId = (int)networkEvent[keyByteSeven]; + + Vector3 position; + if (networkEvent.ContainsKey(keyByteOne)) + { + position = (Vector3)networkEvent[keyByteOne]; + } + else + { + position = Vector3.zero; + } + + Quaternion rotation = Quaternion.identity; + if (networkEvent.ContainsKey(keyByteTwo)) + { + rotation = (Quaternion)networkEvent[keyByteTwo]; + } + + byte group = 0; + if (networkEvent.ContainsKey(keyByteThree)) + { + group = (byte)networkEvent[keyByteThree]; + } + + byte objLevelPrefix = 0; + if (networkEvent.ContainsKey(keyByteEight)) + { + objLevelPrefix = (byte)networkEvent[keyByteEight]; + } + + int[] viewsIDs; + if (networkEvent.ContainsKey(keyByteFour)) + { + viewsIDs = (int[])networkEvent[keyByteFour]; + } + else + { + viewsIDs = new int[1] { instantiationId }; + } + + object[] incomingInstantiationData; + if (networkEvent.ContainsKey(keyByteFive)) + { + incomingInstantiationData = (object[])networkEvent[keyByteFive]; + } + else + { + incomingInstantiationData = null; + } + + // SetReceiving filtering + if (group != 0 && !allowedReceivingGroups.Contains(group)) + { + return null; // Ignore group + } + + + Pun.InstantiateParameters netParams = new InstantiateParameters(prefabName, position, rotation, group, incomingInstantiationData, objLevelPrefix, viewsIDs, creator, serverTime); + return NetworkInstantiate(netParams, false, true); + } + + + private static readonly HashSet PrefabsWithoutMagicCallback = new HashSet(); + + private static GameObject NetworkInstantiate(Pun.InstantiateParameters parameters, bool roomObject = false, bool instantiateEvent = false) + { + //Instantiate(name, pos, rot) + //pv[] GetPhotonViewsInChildren() + //if (event==null) init send-params + //Setup of PVs and callback + //if (event == null) SendInstantiate(name, pos, rot, etc...) + + GameObject go = null; + PhotonView[] photonViews; + + go = prefabPool.Instantiate(parameters.prefabName, parameters.position, parameters.rotation); + + + if (go == null) + { + Debug.LogError("Failed to network-Instantiate: " + parameters.prefabName); + return null; + } + + if (go.activeSelf) + { + Debug.LogWarning("PrefabPool.Instantiate() should return an inactive GameObject. " + prefabPool.GetType().Name + " returned an active object. PrefabId: " + parameters.prefabName); + } + + + photonViews = go.GetPhotonViewsInChildren(); + + + if (photonViews.Length == 0) + { + Debug.LogError("PhotonNetwork.Instantiate() can only instantiate objects with a PhotonView component. This prefab does not have one: " + parameters.prefabName); + return null; + } + + bool localInstantiate = !instantiateEvent && LocalPlayer.Equals(parameters.creator); + if (localInstantiate) + { + // init viewIDs array, so it can be filled (below), before it gets sent + parameters.viewIDs = new int[photonViews.Length]; + } + + for (int i = 0; i < photonViews.Length; i++) + { + if (localInstantiate) + { + // when this client instantiates a GO, it has to allocate viewIDs accordingly. + // ROOM objects are created as actorNumber 0 (no matter which number this player has). + parameters.viewIDs[i] = (roomObject) ? AllocateViewID(0) : AllocateViewID(parameters.creator.ActorNumber); + } + + var view = photonViews[i]; + + view.ViewID = 0; + view.sceneViewId = 0; + view.isRuntimeInstantiated = true; + view.lastOnSerializeDataSent = null; + view.lastOnSerializeDataReceived = null; + view.Prefix = parameters.objLevelPrefix; + view.InstantiationId = parameters.viewIDs[0]; + view.InstantiationData = parameters.data; + view.ViewID = parameters.viewIDs[i]; // with didAwake true and viewID == 0, this will also register the view + + view.Group = parameters.group; + } + + if (localInstantiate) + { + // send instantiate network event + SendInstantiate(parameters, roomObject); + } + + go.SetActive(true); + + // if IPunInstantiateMagicCallback is implemented on any script of the instantiated GO, let's call it directly: + if (!PrefabsWithoutMagicCallback.Contains(parameters.prefabName)) + { + var list = go.GetComponents(); + if (list.Length > 0) + { + PhotonMessageInfo pmi = new PhotonMessageInfo(parameters.creator, parameters.timestamp, photonViews[0]); + foreach (IPunInstantiateMagicCallback callbackComponent in list) + { + callbackComponent.OnPhotonInstantiate(pmi); + } + } + else + { + PrefabsWithoutMagicCallback.Add(parameters.prefabName); + } + } + + return go; + } + + + private static readonly Hashtable SendInstantiateEvHashtable = new Hashtable(); // SendInstantiate reuses this to reduce GC + private static readonly RaiseEventOptions SendInstantiateRaiseEventOptions = new RaiseEventOptions(); // SendInstantiate reuses this to reduce GC + + internal static bool SendInstantiate(Pun.InstantiateParameters parameters, bool roomObject = false) + { + // first viewID is now also the gameobject's instantiateId + int instantiateId = parameters.viewIDs[0]; // LIMITS PHOTONVIEWS&PLAYERS + + SendInstantiateEvHashtable.Clear(); // SendInstantiate reuses this Hashtable to reduce GC + + SendInstantiateEvHashtable[keyByteZero] = parameters.prefabName; + + if (parameters.position != Vector3.zero) + { + SendInstantiateEvHashtable[keyByteOne] = parameters.position; + } + + if (parameters.rotation != Quaternion.identity) + { + SendInstantiateEvHashtable[keyByteTwo] = parameters.rotation; + } + + if (parameters.group != 0) + { + SendInstantiateEvHashtable[keyByteThree] = parameters.group; + } + + // send the list of viewIDs only if there are more than one. else the instantiateId is the viewID + if (parameters.viewIDs.Length > 1) + { + SendInstantiateEvHashtable[keyByteFour] = parameters.viewIDs; // LIMITS PHOTONVIEWS&PLAYERS + } + + if (parameters.data != null) + { + SendInstantiateEvHashtable[keyByteFive] = parameters.data; + } + + if (currentLevelPrefix > 0) + { + SendInstantiateEvHashtable[keyByteEight] = currentLevelPrefix; // photonview's / object's level prefix + } + + SendInstantiateEvHashtable[keyByteSix] = PhotonNetwork.ServerTimestamp; + SendInstantiateEvHashtable[keyByteSeven] = instantiateId; + + + SendInstantiateRaiseEventOptions.CachingOption = (roomObject) ? EventCaching.AddToRoomCacheGlobal : EventCaching.AddToRoomCache; + + return PhotonNetwork.RaiseEventInternal(PunEvent.Instantiation, SendInstantiateEvHashtable, SendInstantiateRaiseEventOptions, SendOptions.SendReliable); + } + + + /// + /// Network-Destroy the GameObject associated with the PhotonView, unless the PhotonView is static or not under this client's control. + /// + /// + /// Destroying a networked GameObject while in a Room includes: + /// - Removal of the Instantiate call from the server's room buffer. + /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call. + /// - Sending a message to other clients to remove the GameObject also (affected by network lag). + /// + /// Usually, when you leave a room, the GOs get destroyed automatically. + /// If you have to destroy a GO while not in a room, the Destroy is only done locally. + /// + /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). + /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. + /// + /// The GameObject must be under this client's control: + /// - Instantiated and owned by this client. + /// - Instantiated objects of players who left the room are controlled by the Master Client. + /// - Room-owned game objects are controlled by the Master Client. + /// - GameObject can be destroyed while client is not in a room. + /// + /// Nothing. Check error debug log for any issues. + public static void Destroy(PhotonView targetView) + { + if (targetView != null) + { + RemoveInstantiatedGO(targetView.gameObject, !InRoom); + } + else + { + Debug.LogError("Destroy(targetPhotonView) failed, cause targetPhotonView is null."); + } + } + + /// + /// Network-Destroy the GameObject, unless it is static or not under this client's control. + /// + /// + /// Destroying a networked GameObject includes: + /// - Removal of the Instantiate call from the server's room buffer. + /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call. + /// - Sending a message to other clients to remove the GameObject also (affected by network lag). + /// + /// Usually, when you leave a room, the GOs get destroyed automatically. + /// If you have to destroy a GO while not in a room, the Destroy is only done locally. + /// + /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). + /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. + /// + /// The GameObject must be under this client's control: + /// - Instantiated and owned by this client. + /// - Instantiated objects of players who left the room are controlled by the Master Client. + /// - Room-owned game objects are controlled by the Master Client. + /// - GameObject can be destroyed while client is not in a room. + /// + /// Nothing. Check error debug log for any issues. + public static void Destroy(GameObject targetGo) + { + RemoveInstantiatedGO(targetGo, !InRoom); + } + + /// + /// Network-Destroy all GameObjects, PhotonViews and their RPCs of targetPlayer. Can only be called on local player (for "self") or Master Client (for anyone). + /// + /// + /// Destroying a networked GameObject includes: + /// - Removal of the Instantiate call from the server's room buffer. + /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call. + /// - Sending a message to other clients to remove the GameObject also (affected by network lag). + /// + /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). + /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. + /// + /// Nothing. Check error debug log for any issues. + public static void DestroyPlayerObjects(Player targetPlayer) + { + if (targetPlayer == null) + { + Debug.LogError("DestroyPlayerObjects() failed, cause parameter 'targetPlayer' was null."); + } + + DestroyPlayerObjects(targetPlayer.ActorNumber); + } + + /// + /// Network-Destroy all GameObjects, PhotonViews and their RPCs of this player (by ID). Can only be called on local player (for "self") or Master Client (for anyone). + /// + /// + /// Destroying a networked GameObject includes: + /// - Removal of the Instantiate call from the server's room buffer. + /// - Removing RPCs buffered for PhotonViews that got created indirectly with the PhotonNetwork.Instantiate call. + /// - Sending a message to other clients to remove the GameObject also (affected by network lag). + /// + /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). + /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. + /// + /// Nothing. Check error debug log for any issues. + public static void DestroyPlayerObjects(int targetPlayerId) + { + if (!VerifyCanUseNetwork()) + { + return; + } + if (LocalPlayer.IsMasterClient || targetPlayerId == LocalPlayer.ActorNumber) + { + DestroyPlayerObjects(targetPlayerId, false); + } + else + { + Debug.LogError("DestroyPlayerObjects() failed, cause players can only destroy their own GameObjects. A Master Client can destroy anyone's. This is master: " + PhotonNetwork.IsMasterClient); + } + } + + /// + /// Network-Destroy all GameObjects, PhotonViews and their RPCs in the room. Removes anything buffered from the server. Can only be called by Master Client (for anyone). + /// + /// + /// Can only be called by Master Client (for anyone). + /// Unlike the Destroy methods, this will remove anything from the server's room buffer. If your game + /// buffers anything beyond Instantiate and RPC calls, that will be cleaned as well from server. + /// + /// Destroying all includes: + /// - Remove anything from the server's room buffer (Instantiate, RPCs, anything buffered). + /// - Sending a message to other clients to destroy everything locally, too (affected by network lag). + /// + /// Destroying networked objects works only if they got created with PhotonNetwork.Instantiate(). + /// Objects loaded with a scene are ignored, no matter if they have PhotonView components. + /// + /// Nothing. Check error debug log for any issues. + public static void DestroyAll() + { + if (IsMasterClient) + { + DestroyAll(false); + } + else + { + Debug.LogError("Couldn't call DestroyAll() as only the master client is allowed to call this."); + } + } + + /// + /// Remove all buffered RPCs from server that were sent by targetPlayer. Can only be called on local player (for "self") or Master Client (for anyone). + /// + /// + /// This method requires either: + /// - This is the targetPlayer's client. + /// - This client is the Master Client (can remove any Player's RPCs). + /// + /// If the targetPlayer calls RPCs at the same time that this is called, + /// network lag will determine if those get buffered or cleared like the rest. + /// + /// This player's buffered RPCs get removed from server buffer. + public static void RemoveRPCs(Player targetPlayer) + { + if (!VerifyCanUseNetwork()) + { + return; + } + + if (!targetPlayer.IsLocal && !IsMasterClient) + { + Debug.LogError("Error; Only the MasterClient can call RemoveRPCs for other players."); + return; + } + + OpCleanActorRpcBuffer(targetPlayer.ActorNumber); + } + + /// + /// Remove all buffered RPCs from server that were sent via targetPhotonView. The Master Client and the owner of the targetPhotonView may call this. + /// + /// + /// This method requires either: + /// - The targetPhotonView is owned by this client (Instantiated by it). + /// - This client is the Master Client (can remove any PhotonView's RPCs). + /// + /// RPCs buffered for this PhotonView get removed from server buffer. + public static void RemoveRPCs(PhotonView targetPhotonView) + { + if (!VerifyCanUseNetwork()) + { + return; + } + + CleanRpcBufferIfMine(targetPhotonView); + } + + + /// + /// Internal to send an RPC on given PhotonView. Do not call this directly but use: PhotonView.RPC! + /// + internal static void RPC(PhotonView view, string methodName, RpcTarget target, bool encrypt, params object[] parameters) + { + if (string.IsNullOrEmpty(methodName)) + { + Debug.LogError("RPC method name cannot be null or empty."); + return; + } + + if (!VerifyCanUseNetwork()) + { + return; + } + + if (CurrentRoom == null) + { + Debug.LogWarning("RPCs can only be sent in rooms. Call of \"" + methodName + "\" gets executed locally only, if at all."); + return; + } + + if (NetworkingClient != null) + { + RPC(view, methodName, target, null, encrypt, parameters); + } + else + { + Debug.LogWarning("Could not execute RPC " + methodName + ". Possible scene loading in progress?"); + } + } + + /// + /// Internal to send an RPC on given PhotonView. Do not call this directly but use: PhotonView.RPC! + /// + internal static void RPC(PhotonView view, string methodName, Player targetPlayer, bool encrypt, params object[] parameters) + { + if (!VerifyCanUseNetwork()) + { + return; + } + + if (CurrentRoom == null) + { + Debug.LogWarning("RPCs can only be sent in rooms. Call of \"" + methodName + "\" gets executed locally only, if at all."); + return; + } + + if (LocalPlayer == null) + { + Debug.LogError("RPC can't be sent to target Player being null! Did not send \"" + methodName + "\" call."); + } + + if (NetworkingClient != null) + { + RPC(view, methodName, RpcTarget.Others, targetPlayer, encrypt, parameters); + } + else + { + Debug.LogWarning("Could not execute RPC " + methodName + ". Possible scene loading in progress?"); + } + } + + + /// Finds the GameObjects with Components of a specific type (using FindObjectsOfType). + /// Type must be a Component + /// HashSet with GameObjects that have a specific type of Component. + public static HashSet FindGameObjectsWithComponent(Type type) + { + HashSet objectsWithComponent = new HashSet(); + + Component[] targetComponents = (Component[]) GameObject.FindObjectsOfType(type); + for (int index = 0; index < targetComponents.Length; index++) + { + if (targetComponents[index] != null) + { + objectsWithComponent.Add(targetComponents[index].gameObject); + } + } + + return objectsWithComponent; + } + + + /// Enable/disable receiving events from a given Interest Group. + /// + /// A client can tell the server which Interest Groups it's interested in. + /// The server will only forward events for those Interest Groups to that client (saving bandwidth and performance). + /// + /// See: https://doc.photonengine.com/en-us/pun/v2/gameplay/interestgroups + /// + /// See: https://doc.photonengine.com/en-us/pun/v2/demos-and-tutorials/package-demos/culling-demo + /// + /// The interest group to affect. + /// Sets if receiving from group to enabled (or not). + public static void SetInterestGroups(byte group, bool enabled) + { + if (!VerifyCanUseNetwork()) + { + return; + } + + if (enabled) + { + byte[] groups = new byte[1] { (byte)group }; + SetInterestGroups(null, groups); + } + else + { + byte[] groups = new byte[1] { (byte)group }; + SetInterestGroups(groups, null); + } + } + + + /// This method wraps loading a level asynchronously and pausing network messages during the process. + /// + /// While loading levels in a networked game, it makes sense to not dispatch messages received by other players. + /// LoadLevel takes care of that by setting PhotonNetwork.IsMessageQueueRunning = false until the scene loaded. + /// + /// To sync the loaded level in a room, set PhotonNetwork.AutomaticallySyncScene to true. + /// The Master Client of a room will then sync the loaded level with every other player in the room. + /// Note that this works only for a single active scene and that reloading the scene is not supported. + /// The Master Client will actually reload a scene but other clients won't. + /// + /// You should make sure you don't fire RPCs before you load another scene (which doesn't contain + /// the same GameObjects and PhotonViews). + /// + /// LoadLevel uses SceneManager.LoadSceneAsync(). + /// + /// Check the progress of the LevelLoading using PhotonNetwork.LevelLoadingProgress. + /// + /// Calling LoadLevel before the previous scene finished loading is not recommended. + /// If AutomaticallySyncScene is enabled, PUN cancels the previous load (and prevent that from + /// becoming the active scene). If AutomaticallySyncScene is off, the previous scene loading can finish. + /// In both cases, a new scene is loaded locally. + /// + /// + /// Build-index number of the level to load. When using level numbers, make sure they are identical on all clients. + /// + public static void LoadLevel(int levelNumber) + { + if (PhotonHandler.AppQuits) + { + return; + } + + if (PhotonNetwork.AutomaticallySyncScene) + { + SetLevelInPropsIfSynced(levelNumber); + } + + PhotonNetwork.IsMessageQueueRunning = false; + loadingLevelAndPausedNetwork = true; + _AsyncLevelLoadingOperation = SceneManager.LoadSceneAsync(levelNumber,LoadSceneMode.Single); + } + + /// This method wraps loading a level asynchronously and pausing network messages during the process. + /// + /// While loading levels in a networked game, it makes sense to not dispatch messages received by other players. + /// LoadLevel takes care of that by setting PhotonNetwork.IsMessageQueueRunning = false until the scene loaded. + /// + /// To sync the loaded level in a room, set PhotonNetwork.AutomaticallySyncScene to true. + /// The Master Client of a room will then sync the loaded level with every other player in the room. + /// Note that this works only for a single active scene and that reloading the scene is not supported. + /// The Master Client will actually reload a scene but other clients won't. + /// + /// You should make sure you don't fire RPCs before you load another scene (which doesn't contain + /// the same GameObjects and PhotonViews). + /// + /// LoadLevel uses SceneManager.LoadSceneAsync(). + /// + /// Check the progress of the LevelLoading using PhotonNetwork.LevelLoadingProgress. + /// + /// Calling LoadLevel before the previous scene finished loading is not recommended. + /// If AutomaticallySyncScene is enabled, PUN cancels the previous load (and prevent that from + /// becoming the active scene). If AutomaticallySyncScene is off, the previous scene loading can finish. + /// In both cases, a new scene is loaded locally. + /// + /// + /// Name of the level to load. Make sure it's available to all clients in the same room. + /// + public static void LoadLevel(string levelName) + { + if (PhotonHandler.AppQuits) + { + return; + } + + if (PhotonNetwork.AutomaticallySyncScene) + { + SetLevelInPropsIfSynced(levelName); + } + + PhotonNetwork.IsMessageQueueRunning = false; + loadingLevelAndPausedNetwork = true; + _AsyncLevelLoadingOperation = SceneManager.LoadSceneAsync(levelName, LoadSceneMode.Single); + } + + /// + /// This operation makes Photon call your custom web-service by name (path) with the given parameters. + /// + /// + /// This is a server-side feature which must be setup in the Photon Cloud Dashboard prior to use. + /// + /// The Parameters will be converted into JSon format, so make sure your parameters are compatible. + /// + /// See on how to get a response. + /// + /// It's important to understand that the OperationResponse only tells if the WebRPC could be called. + /// The content of the response contains any values your web-service sent and the error/success code. + /// In case the web-service failed, an error code and a debug message are usually inside the + /// OperationResponse. + /// + /// The class WebRpcResponse is a helper-class that extracts the most valuable content from the WebRPC + /// response. + /// + /// + /// Example callback implementation:
+        ///
+        /// public void OnWebRpcResponse(OperationResponse response)
+        /// {
+        ///     WebRpcResponse webResponse = new WebRpcResponse(operationResponse);
+        ///     if (webResponse.ReturnCode != 0) { //...
+        ///     }
+        ///
+        ///     switch (webResponse.Name) { //...
+        ///     }
+        ///     // and so on
+        /// }
+ ///
+ public static bool WebRpc(string name, object parameters, bool sendAuthCookie = false) + { + return NetworkingClient.OpWebRpc(name, parameters, sendAuthCookie); + } + + /// + /// Applies default log settings if they are not set up programmatically. + /// + private static void SetupLogging() + { + // only apply Settings if LogLevel is default ( see ServerSettings.cs), else it means it's been set programmatically + if (PhotonNetwork.LogLevel == PunLogLevel.ErrorsOnly) + { + PhotonNetwork.LogLevel = PhotonServerSettings.PunLogging; + } + + // only apply Settings if LogLevel is default ( see ServerSettings.cs), else it means it's been set programmatically + if (PhotonNetwork.NetworkingClient.LoadBalancingPeer.DebugOut == DebugLevel.ERROR) + { + PhotonNetwork.NetworkingClient.LoadBalancingPeer.DebugOut = PhotonServerSettings.AppSettings.NetworkLogging; + } + } + + + public static void LoadOrCreateSettings(bool reload = false) + { + if (reload) + { + photonServerSettings = null; // PhotonEditor will use this to load and save the settings delayed + } + else if (photonServerSettings != null) + { + Debug.LogWarning("photonServerSettings is not null. Will not LoadOrCreateSettings()."); + return; + } + + + // try to load the resource / asset (ServerSettings a.k.a. PhotonServerSettings) + photonServerSettings = (ServerSettings)Resources.Load(PhotonNetwork.ServerSettingsFileName, typeof(ServerSettings)); + if (photonServerSettings != null) + { + return; + } + + + // create the ScriptableObject if it could not be loaded + if (photonServerSettings == null) + { + photonServerSettings = (ServerSettings)ScriptableObject.CreateInstance("ServerSettings"); + if (photonServerSettings == null) + { + Debug.LogError("Failed to create ServerSettings. PUN is unable to run this way. If you deleted it from the project, reload the Editor."); + return; + } + } + + + // in the editor, store the settings file as it's not loaded + #if UNITY_EDITOR + // don't save the settings before OnProjectUpdated got called (this hints at an ongoing import/load) + if (!PhotonEditorUtils.ProjectChangedWasCalled) + { + return; + } + + string punResourcesDirectory = PhotonNetwork.FindPunAssetFolder() + "Resources/"; + string serverSettingsAssetPath = punResourcesDirectory + PhotonNetwork.ServerSettingsFileName + ".asset"; + string serverSettingsDirectory = Path.GetDirectoryName(serverSettingsAssetPath); + + if (!Directory.Exists(serverSettingsDirectory)) + { + Directory.CreateDirectory(serverSettingsDirectory); + AssetDatabase.ImportAsset(serverSettingsDirectory); + } + + if (!File.Exists(serverSettingsAssetPath)) + { + AssetDatabase.CreateAsset(photonServerSettings, serverSettingsAssetPath); + } + AssetDatabase.SaveAssets(); + + // if the project does not have PhotonServerSettings yet, enable "Development Build" to use the Dev Region. + EditorUserBuildSettings.development = true; + #endif + } + + + #if UNITY_EDITOR + + /// + /// Finds the asset path base on its name or search query: https://docs.unity3d.com/ScriptReference/AssetDatabase.FindAssets.html + /// + /// The asset path. + /// Asset. + public static string FindAssetPath(string asset) + { + string[] guids = AssetDatabase.FindAssets (asset, null); + if (guids.Length != 1) + { + return string.Empty; + } else + { + return AssetDatabase.GUIDToAssetPath (guids [0]); + } + } + + + /// + /// Finds the pun asset folder. Something like Assets/Photon Unity Networking/Resources/ + /// + /// The pun asset folder. + public static string FindPunAssetFolder() + { + string _thisPath = FindAssetPath("PunClasses"); + string _PunFolderPath = string.Empty; + + //Debug.Log("FindPunAssetFolder "+_thisPath); + string[] subdirectoryEntries = _thisPath.Split ('/'); + foreach (string dir in subdirectoryEntries) + { + if (!string.IsNullOrEmpty (dir)) + { + _PunFolderPath += dir +"/"; + + if (string.Equals (dir, "PhotonUnityNetworking")) + { + // Debug.Log("_PunFolderPath "+_PunFolderPath); + return _PunFolderPath; + } + } + } + + //Debug.Log("_PunFolderPath fallback to default Assets/Photon Unity Networking/"); + + return "Assets/Photon/PhotonUnityNetworking/"; + } + + + /// + /// Internally used by Editor scripts, called on Hierarchy change (includes scene save) to remove surplus hidden PhotonHandlers. + /// + /// This is done in this class, because the Editor assembly can't access PhotonHandler. + public static void InternalCleanPhotonMonoFromSceneIfStuck() + { + PhotonHandler[] photonHandlers = GameObject.FindObjectsOfType(typeof(PhotonHandler)) as PhotonHandler[]; + if (photonHandlers != null && photonHandlers.Length > 0) + { + Debug.Log("Cleaning up hidden PhotonHandler instances in scene. Please save the scene to fix the problem."); + foreach (PhotonHandler photonHandler in photonHandlers) + { + // Debug.Log("Removing Handler: " + photonHandler + " photonHandler.gameObject: " + photonHandler.gameObject); + if (photonHandler.gameObject != null && photonHandler.gameObject.name == "PhotonMono") + { + photonHandler.gameObject.hideFlags = 0; + GameObject.DestroyImmediate(photonHandler.gameObject); + } + + Component.DestroyImmediate(photonHandler); + } + } + } + + #endif + + } +} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs.meta new file mode 100644 index 00000000..23f48a0b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetwork.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 88e11b3353de7e94d84b1ec5adbdd15e +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs b/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs new file mode 100644 index 00000000..229c0dc5 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs @@ -0,0 +1,2559 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// PhotonNetwork is the central class of the PUN package. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System; + using System.Linq; + using UnityEngine; + using System.Collections; + using System.Collections.Generic; + using System.Reflection; + + using ExitGames.Client.Photon; + using Photon.Realtime; + + using Hashtable = ExitGames.Client.Photon.Hashtable; + using SupportClassPun = ExitGames.Client.Photon.SupportClass; + + public static partial class PhotonNetwork + { + private static HashSet allowedReceivingGroups = new HashSet(); + + private static HashSet blockedSendingGroups = new HashSet(); + + private static HashSet reusablePVHashset = new HashSet(); + + + /// + /// The photon view list. + /// + private static NonAllocDictionary photonViewList = new NonAllocDictionary(); + + /// + /// Gets the photon views. + /// + /// + /// This is an expensive operation as it returns a copy of the internal list. + /// + /// The photon views. + [System.Obsolete("Use PhotonViewCollection instead for an iterable collection of current photonViews.")] + public static PhotonView[] PhotonViews + { + get + { + var views = new PhotonView[photonViewList.Count]; + int idx = 0; + foreach (var v in photonViewList.Values) + { + views[idx] = v; + idx++; + } + return views; + } + } + + /// + /// Returns a new iterable collection of current photon views. + /// + /// + /// You can iterate over all PhotonViews in a simple foreach loop. + /// To use this in a while-loop, assign the new iterator to a variable and then call MoveNext on that. + /// + public static NonAllocDictionary.ValueIterator PhotonViewCollection + { + get + { + return photonViewList.Values; + } + } + + public static int ViewCount + { + get { return photonViewList.Count; } + } + + /// Parameters: PhotonView for which ownership changed, previous owner of the view. + private static event Action OnOwnershipRequestEv; + /// Parameters: PhotonView for which ownership was requested, player who requests ownership. + private static event Action OnOwnershipTransferedEv; + /// Parameters: PhotonView for which ownership was requested, player who requested (but didn't get) ownership. + private static event Action OnOwnershipTransferFailedEv; + + /// + /// Registers an object for callbacks for the implemented callback-interfaces. + /// + /// + /// The covered callback interfaces are: IConnectionCallbacks, IMatchmakingCallbacks, + /// ILobbyCallbacks, IInRoomCallbacks, IOnEventCallback and IWebRpcCallback. + /// + /// See: .Net Callbacks + /// + /// The object that registers to get callbacks from PUN's LoadBalancingClient. + public static void AddCallbackTarget(object target) + { + if (target is PhotonView) + { + return; + } + + IPunOwnershipCallbacks punOwnershipCallback = target as IPunOwnershipCallbacks; + if (punOwnershipCallback != null) + { + OnOwnershipRequestEv += punOwnershipCallback.OnOwnershipRequest; + OnOwnershipTransferedEv += punOwnershipCallback.OnOwnershipTransfered; + OnOwnershipTransferFailedEv += punOwnershipCallback.OnOwnershipTransferFailed; + } + + NetworkingClient.AddCallbackTarget(target); + } + + + /// + /// Removes the target object from callbacks for its implemented callback-interfaces. + /// + /// + /// The covered callback interfaces are: IConnectionCallbacks, IMatchmakingCallbacks, + /// ILobbyCallbacks, IInRoomCallbacks, IOnEventCallback and IWebRpcCallback. + /// + /// See: .Net Callbacks + /// + /// The object that unregisters from getting callbacks. + public static void RemoveCallbackTarget(object target) + { + if (target is PhotonView || NetworkingClient == null) + { + return; + } + + IPunOwnershipCallbacks punOwnershipCallback = target as IPunOwnershipCallbacks; + if (punOwnershipCallback != null) + { + OnOwnershipRequestEv -= punOwnershipCallback.OnOwnershipRequest; + OnOwnershipTransferedEv -= punOwnershipCallback.OnOwnershipTransfered; + OnOwnershipTransferFailedEv -= punOwnershipCallback.OnOwnershipTransferFailed; + } + + NetworkingClient.RemoveCallbackTarget(target); + } + + internal static string CallbacksToString() + { + var x = NetworkingClient.ConnectionCallbackTargets.Select(m => m.ToString()).ToArray(); + return string.Join(", ", x); + } + + internal static byte currentLevelPrefix = 0; + + /// Internally used to flag if the message queue was disabled by a "scene sync" situation (to re-enable it). + internal static bool loadingLevelAndPausedNetwork = false; + + /// For automatic scene syncing, the loaded scene is put into a room property. This is the name of said prop. + internal const string CurrentSceneProperty = "curScn"; + internal const string CurrentScenePropertyLoadAsync = "curScnLa"; + + + /// + /// An Object Pool can be used to keep and reuse instantiated object instances. Replaces Unity's default Instantiate and Destroy methods. + /// + /// + /// Defaults to the DefaultPool type. + /// To use a GameObject pool, implement IPunPrefabPool and assign it here. + /// Prefabs are identified by name. + /// + public static IPunPrefabPool PrefabPool + { + get + { + return prefabPool; + } + set + { + if (value == null) + { + Debug.LogWarning("PhotonNetwork.PrefabPool cannot be set to null. It will default back to using the 'DefaultPool' Pool"); + prefabPool = new DefaultPool(); + } + else + { + prefabPool = value; + } + } + } + + private static IPunPrefabPool prefabPool; + + /// + /// While enabled, the MonoBehaviours on which we call RPCs are cached, avoiding costly GetComponents<MonoBehaviour>() calls. + /// + /// + /// RPCs are called on the MonoBehaviours of a target PhotonView. Those have to be found via GetComponents. + /// + /// When set this to true, the list of MonoBehaviours gets cached in each PhotonView. + /// You can use photonView.RefreshRpcMonoBehaviourCache() to manually refresh a PhotonView's + /// list of MonoBehaviours on demand (when a new MonoBehaviour gets added to a networked GameObject, e.g.). + /// + public static bool UseRpcMonoBehaviourCache; + + private static readonly Dictionary> monoRPCMethodsCache = new Dictionary>(); + + private static Dictionary rpcShortcuts; // lookup "table" for the index (shortcut) of an RPC name + + /// + /// If an RPC method is implemented as coroutine, it gets started, unless this value is false. + /// + /// + /// As starting coroutines causes a little memnory garbage, you may want to disable this option but it is + /// also good enough to not return IEnumerable from methods with the attribite PunRPC. + /// + public static bool RunRpcCoroutines = true; + + + // for asynchronous network synched loading. + private static AsyncOperation _AsyncLevelLoadingOperation; + + private static float _levelLoadingProgress = 0f; + + /// + /// Represents the scene loading progress when using LoadLevel(). + /// + /// + /// The value is 0 if the app never loaded a scene with LoadLevel().
+ /// During async scene loading, the value is between 0 and 1.
+ /// Once any scene completed loading, it stays at 1 (signaling "done").
+ ///
+ /// The level loading progress. Ranges from 0 to 1. + public static float LevelLoadingProgress + { + get + { + if (_AsyncLevelLoadingOperation != null) + { + _levelLoadingProgress = _AsyncLevelLoadingOperation.progress; + } + else if (_levelLoadingProgress > 0f) + { + _levelLoadingProgress = 1f; + } + + return _levelLoadingProgress; + } + } + + /// + /// Called when "this client" left a room to clean up. + /// + /// + /// if (Server == ServerConnection.GameServer && (state == ClientState.Disconnecting || state == ClientState.DisconnectingFromGameServer)) + /// + private static void LeftRoomCleanup() + { + // Clean up if we were loading asynchronously. + if (_AsyncLevelLoadingOperation != null) + { + _AsyncLevelLoadingOperation.allowSceneActivation = false; + _AsyncLevelLoadingOperation = null; + } + + + bool wasInRoom = NetworkingClient.CurrentRoom != null; + // when leaving a room, we clean up depending on that room's settings. + bool autoCleanupSettingOfRoom = wasInRoom && CurrentRoom.AutoCleanUp; + + allowedReceivingGroups = new HashSet(); + blockedSendingGroups = new HashSet(); + + // Cleanup all network objects (all spawned PhotonViews, local and remote) + if (autoCleanupSettingOfRoom || offlineModeRoom != null) + { + LocalCleanupAnythingInstantiated(true); + } + } + + + /// + /// Cleans up anything that was instantiated in-game (not loaded with the scene). Resets views that are not destroyed. + /// + // TODO: This method name no longer matches is function. It also resets room object's views. + internal static void LocalCleanupAnythingInstantiated(bool destroyInstantiatedGameObjects) + { + //if (tempInstantiationData.Count > 0) + //{ + // Debug.LogWarning("It seems some instantiation is not completed, as instantiation data is used. You should make sure instantiations are paused when calling this method. Cleaning now, despite "); + //} + + // Destroy GO's (if we should) + if (destroyInstantiatedGameObjects) + { + // Fill list with Instantiated objects + HashSet instantiatedGos = new HashSet(); + foreach (PhotonView view in photonViewList.Values) + { + if (view.isRuntimeInstantiated) + { + instantiatedGos.Add(view.gameObject); // HashSet keeps each object only once + } + // For non-instantiated objects (scene objects) - reset the view + else + { + view.ResetPhotonView(true); + } + } + + foreach (GameObject go in instantiatedGos) + { + RemoveInstantiatedGO(go, true); + } + } + + // photonViewList is cleared of anything instantiated (so scene items are left inside) + // any other lists can be + PhotonNetwork.lastUsedViewSubId = 0; + PhotonNetwork.lastUsedViewSubIdStatic = 0; + } + + + /// + /// Resets the PhotonView "lastOnSerializeDataSent" so that "OnReliable" synched PhotonViews send a complete state to new clients (if the state doesnt change, no messages would be send otherwise!). + /// Note that due to this reset, ALL other players will receive the full OnSerialize. + /// + private static void ResetPhotonViewsOnSerialize() + { + foreach (PhotonView photonView in photonViewList.Values) + { + photonView.lastOnSerializeDataSent = null; + } + } + + // PHOTONVIEW/RPC related +#pragma warning disable 0414 + private static readonly Type typePunRPC = typeof(PunRPC); + private static readonly Type typePhotonMessageInfo = typeof(PhotonMessageInfo); + private static readonly object keyByteZero = (byte)0; + private static readonly object keyByteOne = (byte)1; + private static readonly object keyByteTwo = (byte)2; + private static readonly object keyByteThree = (byte)3; + private static readonly object keyByteFour = (byte)4; + private static readonly object keyByteFive = (byte)5; + private static readonly object keyByteSix = (byte)6; + private static readonly object keyByteSeven = (byte)7; + private static readonly object keyByteEight = (byte)8; + private static readonly object[] emptyObjectArray = new object[0]; + private static readonly Type[] emptyTypeArray = new Type[0]; +#pragma warning restore 0414 + + /// + /// Executes a received RPC event + /// + internal static void ExecuteRpc(Hashtable rpcData, Player sender) + { + if (rpcData == null || !rpcData.ContainsKey(keyByteZero)) + { + Debug.LogError("Malformed RPC; this should never occur. Content: " + SupportClassPun.DictionaryToString(rpcData)); + return; + } + + // ts: updated with "flat" event data + int netViewID = (int)rpcData[keyByteZero]; // LIMITS PHOTONVIEWS&PLAYERS + int otherSidePrefix = 0; // by default, the prefix is 0 (and this is not being sent) + if (rpcData.ContainsKey(keyByteOne)) + { + otherSidePrefix = (short)rpcData[keyByteOne]; + } + + + string inMethodName; + if (rpcData.ContainsKey(keyByteFive)) + { + int rpcIndex = (byte)rpcData[keyByteFive]; // LIMITS RPC COUNT + if (rpcIndex > PhotonNetwork.PhotonServerSettings.RpcList.Count - 1) + { + Debug.LogError("Could not find RPC with index: " + rpcIndex + ". Going to ignore! Check PhotonServerSettings.RpcList"); + return; + } + else + { + inMethodName = PhotonNetwork.PhotonServerSettings.RpcList[rpcIndex]; + } + } + else + { + inMethodName = (string)rpcData[keyByteThree]; + } + + object[] arguments = null; + if (rpcData.ContainsKey(keyByteFour)) + { + arguments = (object[])rpcData[keyByteFour]; + } + + PhotonView photonNetview = GetPhotonView(netViewID); + if (photonNetview == null) + { + int viewOwnerId = netViewID / PhotonNetwork.MAX_VIEW_IDS; + bool owningPv = (viewOwnerId == NetworkingClient.LocalPlayer.ActorNumber); + bool ownerSent = sender != null && viewOwnerId == sender.ActorNumber; + + if (owningPv) + { + Debug.LogWarning("Received RPC \"" + inMethodName + "\" for viewID " + netViewID + " but this PhotonView does not exist! View was/is ours." + (ownerSent ? " Owner called." : " Remote called.") + " By: " + sender); + } + else + { + Debug.LogWarning("Received RPC \"" + inMethodName + "\" for viewID " + netViewID + " but this PhotonView does not exist! Was remote PV." + (ownerSent ? " Owner called." : " Remote called.") + " By: " + sender + " Maybe GO was destroyed but RPC not cleaned up."); + } + return; + } + + if (photonNetview.Prefix != otherSidePrefix) + { + Debug.LogError("Received RPC \"" + inMethodName + "\" on viewID " + netViewID + " with a prefix of " + otherSidePrefix + ", our prefix is " + photonNetview.Prefix + ". The RPC has been ignored."); + return; + } + + // Get method name + if (string.IsNullOrEmpty(inMethodName)) + { + Debug.LogError("Malformed RPC; this should never occur. Content: " + SupportClassPun.DictionaryToString(rpcData)); + return; + } + + if (PhotonNetwork.LogLevel >= PunLogLevel.Full) + { + Debug.Log("Received RPC: " + inMethodName); + } + + + // SetReceiving filtering + if (photonNetview.Group != 0 && !allowedReceivingGroups.Contains(photonNetview.Group)) + { + return; // Ignore group + } + + Type[] argumentsTypes = null; + if (arguments != null && arguments.Length > 0) + { + argumentsTypes = new Type[arguments.Length]; + int i = 0; + for (int index = 0; index < arguments.Length; index++) + { + object objX = arguments[index]; + if (objX == null) + { + argumentsTypes[i] = null; + } + else + { + argumentsTypes[i] = objX.GetType(); + } + + i++; + } + } + + + int receivers = 0; + int foundMethods = 0; + if (!PhotonNetwork.UseRpcMonoBehaviourCache || photonNetview.RpcMonoBehaviours == null || photonNetview.RpcMonoBehaviours.Length == 0) + { + photonNetview.RefreshRpcMonoBehaviourCache(); + } + + for (int componentsIndex = 0; componentsIndex < photonNetview.RpcMonoBehaviours.Length; componentsIndex++) + { + MonoBehaviour monob = photonNetview.RpcMonoBehaviours[componentsIndex]; + if (monob == null) + { + Debug.LogError("ERROR You have missing MonoBehaviours on your gameobjects!"); + continue; + } + + Type type = monob.GetType(); + + // Get [PunRPC] methods from cache + List cachedRPCMethods = null; + bool methodsOfTypeInCache = monoRPCMethodsCache.TryGetValue(type, out cachedRPCMethods); + + if (!methodsOfTypeInCache) + { + List entries = SupportClassPun.GetMethods(type, typePunRPC); + + monoRPCMethodsCache[type] = entries; + cachedRPCMethods = entries; + } + + if (cachedRPCMethods == null) + { + continue; + } + + // Check cache for valid methodname+arguments + for (int index = 0; index < cachedRPCMethods.Count; index++) + { + MethodInfo mInfo = cachedRPCMethods[index]; + if (!mInfo.Name.Equals(inMethodName)) + { + continue; + } + + ParameterInfo[] parameters = mInfo.GetCachedParemeters(); + foundMethods++; + + + // if we got no arguments: + if (arguments == null) + { + if (parameters.Length == 0) + { + receivers++; + object o = mInfo.Invoke((object)monob, null); + if (PhotonNetwork.RunRpcCoroutines) + { + IEnumerator ie = null;//o as IEnumerator; + if ((ie = o as IEnumerator) != null) + { + PhotonHandler.Instance.StartCoroutine(ie); + } + } + } + else if (parameters.Length == 1 && parameters[0].ParameterType == typeof(PhotonMessageInfo)) + { + int sendTime = (int)rpcData[keyByteTwo]; + + receivers++; + object o = mInfo.Invoke((object)monob, new object[] { new PhotonMessageInfo(sender, sendTime, photonNetview) }); + if (PhotonNetwork.RunRpcCoroutines) + { + IEnumerator ie = null;//o as IEnumerator; + if ((ie = o as IEnumerator) != null) + { + PhotonHandler.Instance.StartCoroutine(ie); + } + } + } + continue; + } + + + // if there are any arguments (in the incoming call check if the method is compatible + if (parameters.Length == arguments.Length) + { + // Normal, PhotonNetworkMessage left out + if (CheckTypeMatch(parameters, argumentsTypes)) + { + receivers++; + object o = mInfo.Invoke((object)monob, arguments); + if (PhotonNetwork.RunRpcCoroutines) + { + IEnumerator ie = null;//o as IEnumerator; + if ((ie = o as IEnumerator) != null) + { + PhotonHandler.Instance.StartCoroutine(ie); + } + } + } + continue; + } + + if (parameters.Length == arguments.Length + 1) + { + // Check for PhotonNetworkMessage being the last + if (parameters[parameters.Length - 1].ParameterType == typeof(PhotonMessageInfo) && CheckTypeMatch(parameters, argumentsTypes)) + { + int sendTime = (int)rpcData[keyByteTwo]; + object[] argumentsWithInfo = new object[arguments.Length + 1]; + arguments.CopyTo(argumentsWithInfo, 0); + argumentsWithInfo[argumentsWithInfo.Length - 1] = new PhotonMessageInfo(sender, sendTime, photonNetview); + + receivers++; + object o = mInfo.Invoke((object)monob, argumentsWithInfo); + if (PhotonNetwork.RunRpcCoroutines) + { + IEnumerator ie = null;//o as IEnumerator; + if ((ie = o as IEnumerator) != null) + { + PhotonHandler.Instance.StartCoroutine(ie); + } + } + } + continue; + } + + if (parameters.Length == 1 && parameters[0].ParameterType.IsArray) + { + receivers++; + object o = mInfo.Invoke((object)monob, new object[] { arguments }); + if (PhotonNetwork.RunRpcCoroutines) + { + IEnumerator ie = null;//o as IEnumerator; + if ((ie = o as IEnumerator) != null) + { + PhotonHandler.Instance.StartCoroutine(ie); + } + } + continue; + } + } + } + + // Error handling + if (receivers != 1) + { + string argsString = string.Empty; + int argsLength = 0; + if (argumentsTypes != null) + { + argsLength = argumentsTypes.Length; + for (int index = 0; index < argumentsTypes.Length; index++) + { + Type ty = argumentsTypes[index]; + if (argsString != string.Empty) + { + argsString += ", "; + } + + if (ty == null) + { + argsString += "null"; + } + else + { + argsString += ty.Name; + } + } + } + + GameObject context = photonNetview != null ? photonNetview.gameObject : null; + if (receivers == 0) + { + if (foundMethods == 0) + { + // found no method that matches + Debug.LogErrorFormat(context, "RPC method '{0}({2})' not found on object with PhotonView {1}. Implement as non-static. Apply [PunRPC]. Components on children are not found. " + + "Return type must be void or IEnumerator (if you enable RunRpcCoroutines). RPCs are a one-way message.", inMethodName, netViewID, argsString); + } + else + { + // found a method but not the right arguments + Debug.LogErrorFormat(context, "RPC method '{0}' found on object with PhotonView {1} but has wrong parameters. Implement as '{0}({2})'. PhotonMessageInfo is optional as final parameter." + + "Return type must be void or IEnumerator (if you enable RunRpcCoroutines).", inMethodName, netViewID, argsString); + } + } + else + { + // multiple components have the same method + Debug.LogErrorFormat(context, "RPC method '{0}({2})' found {3}x on object with PhotonView {1}. Only one component should implement it." + + "Return type must be void or IEnumerator (if you enable RunRpcCoroutines).", inMethodName, netViewID, argsString, foundMethods); + } + } + } + + /// + /// Check if all types match with parameters. We can have more paramters then types (allow last RPC type to be different). + /// + /// + /// + /// If the types-array has matching parameters (of method) in the parameters array (which may be longer). + private static bool CheckTypeMatch(ParameterInfo[] methodParameters, Type[] callParameterTypes) + { + if (methodParameters.Length < callParameterTypes.Length) + { + return false; + } + + for (int index = 0; index < callParameterTypes.Length; index++) + { +#if NETFX_CORE + TypeInfo methodParamTI = methodParameters[index].ParameterType.GetTypeInfo(); + TypeInfo callParamTI = callParameterTypes[index].GetTypeInfo(); + + if (callParameterTypes[index] != null && !methodParamTI.IsAssignableFrom(callParamTI) && !(callParamTI.IsEnum && System.Enum.GetUnderlyingType(methodParamTI.AsType()).GetTypeInfo().IsAssignableFrom(callParamTI))) + { + return false; + } +#else + Type type = methodParameters[index].ParameterType; + if (callParameterTypes[index] != null && !type.IsAssignableFrom(callParameterTypes[index]) && !(type.IsEnum && System.Enum.GetUnderlyingType(type).IsAssignableFrom(callParameterTypes[index]))) + { + return false; + } +#endif + } + + return true; + } + + + /// + /// Destroys all Instantiates and RPCs locally and (if not localOnly) sends EvDestroy(player) and clears related events in the server buffer. + /// + public static void DestroyPlayerObjects(int playerId, bool localOnly) + { + if (playerId <= 0) + { + Debug.LogError("Failed to Destroy objects of playerId: " + playerId); + return; + } + + if (!localOnly) + { + // clean server's Instantiate and RPC buffers + OpRemoveFromServerInstantiationsOfPlayer(playerId); + OpCleanActorRpcBuffer(playerId); + + // send Destroy(player) to anyone else + SendDestroyOfPlayer(playerId); + } + + // locally cleaning up that player's objects + HashSet playersGameObjects = new HashSet(); + + // with ownership transfer, some objects might lose their owner. + // in that case, the creator becomes the owner again. every client can apply done below. + foreach (PhotonView view in photonViewList.Values) + { + if (view == null) + { + Debug.LogError("Null view"); + continue; + } + + // Mark player created objects for destruction + if (view.CreatorActorNr == playerId) + { + playersGameObjects.Add(view.gameObject); + continue; + } + + if (view.OwnerActorNr == playerId) + { + var previousOwner = view.Owner; + view.OwnerActorNr = view.CreatorActorNr; + view.ControllerActorNr = view.CreatorActorNr; + + // This callback was not originally here. Added with the IsMine caching changes. + if (PhotonNetwork.OnOwnershipTransferedEv != null) + { + PhotonNetwork.OnOwnershipTransferedEv(view, previousOwner); + } + } + } + + // any non-local work is already done, so with the list of that player's objects, we can clean up (locally only) + foreach (GameObject gameObject in playersGameObjects) + { + RemoveInstantiatedGO(gameObject, true); + } + } + + public static void DestroyAll(bool localOnly) + { + if (!localOnly) + { + OpRemoveCompleteCache(); + SendDestroyOfAll(); + } + + LocalCleanupAnythingInstantiated(true); + } + + internal static List foundPVs = new List(); + + /// Removes GameObject and the PhotonViews on it from local lists and optionally updates remotes. GameObject gets destroyed at end. + /// + /// This method might fail and quit early due to several tests. + /// + /// GameObject to cleanup. + /// For localOnly, tests of control are skipped and the server is not updated. + internal static void RemoveInstantiatedGO(GameObject go, bool localOnly) + { + // Avoid cleanup if we are quitting. + if (ConnectionHandler.AppQuits) + return; + + if (go == null) + { + Debug.LogError("Failed to 'network-remove' GameObject because it's null."); + return; + } + + // Don't remove the GO if it doesn't have any PhotonView + go.GetComponentsInChildren(true, foundPVs); + if (foundPVs.Count <= 0) + { + Debug.LogError("Failed to 'network-remove' GameObject because has no PhotonView components: " + go); + return; + } + + PhotonView viewZero = foundPVs[0]; + + // Don't remove GOs that are owned by others (unless this is the master and the remote player left) + if (!localOnly) + { + //Debug.LogWarning("Destroy " + instantiationId + " creator " + creatorId, go); + if (!viewZero.IsMine) + { + Debug.LogError("Failed to 'network-remove' GameObject. Client is neither owner nor MasterClient taking over for owner who left: " + viewZero); + foundPVs.Clear(); // as foundPVs is re-used, clean it to avoid lingering references + return; + } + } + + // cleanup instantiation (event and local list) + if (!localOnly) + { + ServerCleanInstantiateAndDestroy(viewZero); // server cleaning + } + + int creatorActorNr = viewZero.CreatorActorNr; + + // cleanup PhotonViews and their RPCs events (if not localOnly) + for (int j = foundPVs.Count - 1; j >= 0; j--) + { + PhotonView view = foundPVs[j]; + if (view == null) + { + continue; + } + + // TODO: Probably should have a enum that defines when auto-detachment should occur. + // Check nested PVs for different creator. Detach if different, to avoid destroying reparanted objects. + if (j != 0) + { + // view does not belong to the same object as the root PV - unparent this nested PV to avoid destruction. + if (view.CreatorActorNr != creatorActorNr) + { + view.transform.SetParent(null, true); + continue; + } + } + + // Notify all children PVs of impending destruction. Send the root PV (the actual object getting destroyed) to the callbacks. + view.OnPreNetDestroy(viewZero); + + // we only destroy/clean PhotonViews that were created by PhotonNetwork.Instantiate (and those have an instantiationId!) + if (view.InstantiationId >= 1) + { + LocalCleanPhotonView(view); + } + if (!localOnly) + { + OpCleanRpcBuffer(view); + } + } + + if (PhotonNetwork.LogLevel >= PunLogLevel.Full) + { + Debug.Log("Network destroy Instantiated GO: " + go.name); + } + + foundPVs.Clear(); // as foundPVs is re-used, clean it to avoid lingering references + + go.SetActive(false); // PUN 2 disables objects before the return to the pool + prefabPool.Destroy(go); // PUN 2 always uses a PrefabPool (even for the default implementation) + } + + + private static readonly ExitGames.Client.Photon.Hashtable removeFilter = new ExitGames.Client.Photon.Hashtable(); + private static readonly ExitGames.Client.Photon.Hashtable ServerCleanDestroyEvent = new ExitGames.Client.Photon.Hashtable(); + private static readonly RaiseEventOptions ServerCleanOptions = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache }; + + internal static RaiseEventOptions SendToAllOptions = new RaiseEventOptions() { Receivers = ReceiverGroup.All }; + internal static RaiseEventOptions SendToOthersOptions = new RaiseEventOptions() { Receivers = ReceiverGroup.Others }; + internal static RaiseEventOptions SendToSingleOptions = new RaiseEventOptions() { TargetActors = new int[1] }; + + /// + /// Removes an instantiation event from the server's cache. Needs id and actorNr of player who instantiated. + /// + private static void ServerCleanInstantiateAndDestroy(PhotonView photonView) + { + int filterId; + if (photonView.isRuntimeInstantiated) + { + filterId = photonView.InstantiationId; // actual, live InstantiationIds start with 1 and go up + // remove the Instantiate-event from the server cache: + removeFilter[keyByteSeven] = filterId; + ServerCleanOptions.CachingOption = EventCaching.RemoveFromRoomCache; + PhotonNetwork.RaiseEventInternal(PunEvent.Instantiation, removeFilter, ServerCleanOptions, SendOptions.SendReliable); + } + // Don't remove the Instantiation from the server, if it doesn't have a proper ID + else + { + filterId = photonView.ViewID; + } + + // send a Destroy-event to everyone (removing an event from the cache, doesn't send this to anyone else): + ServerCleanDestroyEvent[keyByteZero] = filterId; + ServerCleanOptions.CachingOption = photonView.isRuntimeInstantiated ? EventCaching.DoNotCache : EventCaching.AddToRoomCacheGlobal; // if the view got loaded with the scene, cache EvDestroy for anyone (re)joining later + + PhotonNetwork.RaiseEventInternal(PunEvent.Destroy, ServerCleanDestroyEvent, ServerCleanOptions, SendOptions.SendReliable); + } + + private static void SendDestroyOfPlayer(int actorNr) + { + ExitGames.Client.Photon.Hashtable evData = new ExitGames.Client.Photon.Hashtable(); + evData[keyByteZero] = actorNr; + + PhotonNetwork.RaiseEventInternal(PunEvent.DestroyPlayer, evData, null, SendOptions.SendReliable); + } + + private static void SendDestroyOfAll() + { + ExitGames.Client.Photon.Hashtable evData = new ExitGames.Client.Photon.Hashtable(); + evData[keyByteZero] = -1; + + PhotonNetwork.RaiseEventInternal(PunEvent.DestroyPlayer, evData, null, SendOptions.SendReliable); + } + + private static void OpRemoveFromServerInstantiationsOfPlayer(int actorNr) + { + // removes all "Instantiation" events of player actorNr. this is not an event for anyone else + RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = new int[] { actorNr } }; + PhotonNetwork.RaiseEventInternal(PunEvent.Instantiation, null, options, SendOptions.SendReliable); + } + + internal static void RequestOwnership(int viewID, int fromOwner) + { + //Debug.Log("RequestOwnership(): " + viewID + " from: " + fromOwner + " Time: " + Environment.TickCount % 1000); + PhotonNetwork.RaiseEventInternal(PunEvent.OwnershipRequest, new int[] { viewID, fromOwner }, SendToAllOptions, SendOptions.SendReliable); + } + + internal static void TransferOwnership(int viewID, int playerID) + { + //Debug.Log("TransferOwnership() view " + viewID + " to: " + playerID + " Time: " + Environment.TickCount % 1000); + PhotonNetwork.RaiseEventInternal(PunEvent.OwnershipTransfer, new int[] { viewID, playerID }, SendToAllOptions, SendOptions.SendReliable); + } + + /// + /// Call this on the Master to reassert ownership on clients. viewOwnerPairs are [viewId][viewOwnerActorNr] pairs. targetActor of -1 indicates send to all others. + /// + internal static void OwnershipUpdate(int[] viewOwnerPairs, int targetActor = -1) + { + RaiseEventOptions opts; + if (targetActor == -1) + { + opts = SendToOthersOptions; + } + else + { + SendToSingleOptions.TargetActors[0] = targetActor; + opts = SendToSingleOptions; + } + PhotonNetwork.RaiseEventInternal(PunEvent.OwnershipUpdate, viewOwnerPairs, opts, SendOptions.SendReliable); + } + + public static bool LocalCleanPhotonView(PhotonView view) + { + view.removedFromLocalViewList = true; + return photonViewList.Remove(view.ViewID); + } + + public static PhotonView GetPhotonView(int viewID) + { + PhotonView result = null; + photonViewList.TryGetValue(viewID, out result); + + /// Removed aggressive find that likely had no real use case, and was expensive. + //if (result == null) + //{ + // PhotonView[] views = GameObject.FindObjectsOfType(typeof(PhotonView)) as PhotonView[]; + + // for (int i = 0; i < views.Length; i++) + // { + // PhotonView view = views[i]; + // if (view.ViewID == viewID) + // { + // if (view.didAwake) + // { + // Debug.LogWarning("Had to lookup view that wasn't in photonViewList: " + view); + // } + // return view; + // } + // } + //} + + return result; + } + + public static void RegisterPhotonView(PhotonView netView) + { + if (!Application.isPlaying) + { + photonViewList = new NonAllocDictionary(); + return; + } + + if (netView.ViewID == 0) + { + // don't register views with ID 0 (not initialized). they register when a ID is assigned later on + Debug.Log("PhotonView register is ignored, because viewID is 0. No id assigned yet to: " + netView); + return; + } + + PhotonView listedView = null; + bool isViewListed = photonViewList.TryGetValue(netView.ViewID, out listedView); + if (isViewListed) + { + // if some other view is in the list already, we got a problem. it might be indestructible. print out error + if (netView != listedView) + { + Debug.LogError(string.Format("PhotonView ID duplicate found: {0}. New: {1} old: {2}. Maybe one wasn't destroyed on scene load?! Check for 'DontDestroyOnLoad'. Destroying old entry, adding new.", netView.ViewID, netView, listedView)); + } + else + { + return; + } + + RemoveInstantiatedGO(listedView.gameObject, true); + } + + // Debug.Log("adding view to known list: " + netView); + photonViewList.Add(netView.ViewID, netView); + netView.removedFromLocalViewList = false; + + //Debug.LogError("view being added. " + netView); // Exit Games internal log + + if (PhotonNetwork.LogLevel >= PunLogLevel.Full) + { + Debug.Log("Registered PhotonView: " + netView.ViewID); + } + } + + + /// + /// Removes the RPCs of someone else (to be used as master). + /// This won't clean any local caches. It just tells the server to forget a player's RPCs and instantiates. + /// + /// + public static void OpCleanActorRpcBuffer(int actorNumber) + { + RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = new int[] { actorNumber } }; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, null, options, SendOptions.SendReliable); + } + + /// + /// Instead removing RPCs or Instantiates, this removed everything cached by the actor. + /// + /// + public static void OpRemoveCompleteCacheOfPlayer(int actorNumber) + { + RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, TargetActors = new int[] { actorNumber } }; + PhotonNetwork.RaiseEventInternal(0, null, options, SendOptions.SendReliable); + } + + + public static void OpRemoveCompleteCache() + { + RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache, Receivers = ReceiverGroup.MasterClient }; + PhotonNetwork.RaiseEventInternal(0, null, options, SendOptions.SendReliable); + } + + /// This clears the cache of any player/actor who's no longer in the room (making it a simple clean-up option for a new master) + private static void RemoveCacheOfLeftPlayers() + { + Dictionary opParameters = new Dictionary(); + opParameters[ParameterCode.Code] = (byte)0; // any event + opParameters[ParameterCode.Cache] = (byte)EventCaching.RemoveFromRoomCacheForActorsLeft; // option to clear the room cache of all events of players who left + + NetworkingClient.LoadBalancingPeer.SendOperation((byte)OperationCode.RaiseEvent, opParameters, SendOptions.SendReliable); // TODO: Check if this is the best implementation possible + } + + // Remove RPCs of view (if they are local player's RPCs) + public static void CleanRpcBufferIfMine(PhotonView view) + { + if (view.OwnerActorNr != NetworkingClient.LocalPlayer.ActorNumber && !NetworkingClient.LocalPlayer.IsMasterClient) + { + Debug.LogError("Cannot remove cached RPCs on a PhotonView thats not ours! " + view.Owner + " scene: " + view.IsRoomView); + return; + } + + OpCleanRpcBuffer(view); + } + + + private static readonly Hashtable rpcFilterByViewId = new ExitGames.Client.Photon.Hashtable(); + private static readonly RaiseEventOptions OpCleanRpcBufferOptions = new RaiseEventOptions() { CachingOption = EventCaching.RemoveFromRoomCache }; + + /// Cleans server RPCs for PhotonView (without any further checks). + public static void OpCleanRpcBuffer(PhotonView view) + { + rpcFilterByViewId[keyByteZero] = view.ViewID; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcFilterByViewId, OpCleanRpcBufferOptions, SendOptions.SendReliable); + } + + /// + /// Remove all buffered RPCs from server that were sent in the targetGroup, if this is the Master Client or if this controls the individual PhotonView. + /// + /// + /// This method requires either: + /// - This client is the Master Client (can remove any RPCs per group). + /// - Any other client: each PhotonView is checked if it is under this client's control. Only those RPCs are removed. + /// + /// Interest group that gets all RPCs removed. + public static void RemoveRPCsInGroup(int group) + { + foreach (PhotonView view in photonViewList.Values) + { + if (view.Group == group) + { + CleanRpcBufferIfMine(view); + } + } + } + + /// + /// Clear buffered RPCs based on filter parameters. + /// + /// The viewID of the PhotonView where the RPC has been called on. We actually need its ViewID. If 0 (default) is provided, all PhotonViews/ViewIDs are considered. + /// The RPC method name, if possible we will use its hash shortcut for efficiency. If none (null or empty string) is provided all RPC method names are considered. + /// The actor numbers of the players who called/buffered the RPC. For example if two players buffered the same RPC you can clear the buffered RPC of one and keep the other. If none (null or empty array) is provided all senders are considered. + /// If the operation could be sent to the server. + public static bool RemoveBufferedRPCs(int viewId = 0, string methodName = null, int[] callersActorNumbers = null/*, params object[] parameters*/) + { + Hashtable filter = new Hashtable(2); + if (viewId != 0) + { + filter[keyByteZero] = viewId; + } + if (!string.IsNullOrEmpty(methodName)) + { + // send name or shortcut (if available) + int shortcut; + if (rpcShortcuts.TryGetValue(methodName, out shortcut)) + { + filter[keyByteFive] = (byte)shortcut; // LIMITS RPC COUNT + } + else + { + filter[keyByteThree] = methodName; + } + } + //if (parameters != null && parameters.Length > 0) + //{ + // filter[keyByteFour] = parameters; + //} + RaiseEventOptions raiseEventOptions = new RaiseEventOptions(); + raiseEventOptions.CachingOption = EventCaching.RemoveFromRoomCache; + if (callersActorNumbers != null) + { + raiseEventOptions.TargetActors = callersActorNumbers; + } + return RaiseEventInternal(PunEvent.RPC, filter, raiseEventOptions, SendOptions.SendReliable); + } + + /// + /// Sets level prefix for PhotonViews instantiated later on. Don't set it if you need only one! + /// + /// + /// Important: If you don't use multiple level prefixes, simply don't set this value. The + /// default value is optimized out of the traffic. + /// + /// This won't affect existing PhotonViews (they can't be changed yet for existing PhotonViews). + /// + /// Messages sent with a different level prefix will be received but not executed. This affects + /// RPCs, Instantiates and synchronization. + /// + /// Be aware that PUN never resets this value, you'll have to do so yourself. + /// + /// Max value is short.MaxValue = 255 + public static void SetLevelPrefix(byte prefix) + { + // TODO: check can use network + + currentLevelPrefix = prefix; + // TODO: should we really change the prefix for existing PVs?! better keep it! + //foreach (PhotonView view in photonViewList.Values) + //{ + // view.prefix = prefix; + //} + } + + + /// RPC Hashtable Structure + /// (byte)0 -> (int) ViewId (combined from actorNr and actor-unique-id) + /// (byte)1 -> (short) prefix (level) + /// (byte)2 -> (int) server timestamp + /// (byte)3 -> (string) methodname + /// (byte)4 -> (object[]) parameters + /// (byte)5 -> (byte) method shortcut (alternative to name) + /// + /// This is sent as event (code: 200) which will contain a sender (origin of this RPC). + + static ExitGames.Client.Photon.Hashtable rpcEvent = new ExitGames.Client.Photon.Hashtable(); + static RaiseEventOptions RpcOptionsToAll = new RaiseEventOptions(); + + + internal static void RPC(PhotonView view, string methodName, RpcTarget target, Player player, bool encrypt, params object[] parameters) + { + if (blockedSendingGroups.Contains(view.Group)) + { + return; // Block sending on this group + } + + if (view.ViewID < 1) + { + Debug.LogError("Illegal view ID:" + view.ViewID + " method: " + methodName + " GO:" + view.gameObject.name); + } + + if (PhotonNetwork.LogLevel >= PunLogLevel.Full) + { + Debug.Log("Sending RPC \"" + methodName + "\" to target: " + target + " or player:" + player + "."); + } + + + //ts: changed RPCs to a one-level hashtable as described in internal.txt + rpcEvent.Clear(); + + rpcEvent[keyByteZero] = (int)view.ViewID; // LIMITS NETWORKVIEWS&PLAYERS + if (view.Prefix > 0) + { + rpcEvent[keyByteOne] = (short)view.Prefix; + } + rpcEvent[keyByteTwo] = PhotonNetwork.ServerTimestamp; + + + // send name or shortcut (if available) + int shortcut = 0; + if (rpcShortcuts.TryGetValue(methodName, out shortcut)) + { + rpcEvent[keyByteFive] = (byte)shortcut; // LIMITS RPC COUNT + } + else + { + rpcEvent[keyByteThree] = methodName; + } + + if (parameters != null && parameters.Length > 0) + { + rpcEvent[keyByteFour] = (object[])parameters; + } + + SendOptions sendOptions = new SendOptions() { Reliability = true, Encrypt = encrypt }; + + // if sent to target player, this overrides the target + if (player != null) + { + if (NetworkingClient.LocalPlayer.ActorNumber == player.ActorNumber) + { + ExecuteRpc(rpcEvent, player); + } + else + { + RaiseEventOptions options = new RaiseEventOptions() { TargetActors = new int[] { player.ActorNumber } }; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcEvent, options, sendOptions); + // NetworkingClient.OpRaiseEvent(PunEvent.RPC, rpcEvent, options, new SendOptions() { Reliability = true, Encrypt = encrypt }); + } + + return; + } + + switch (target) + { + // send to a specific set of players + case RpcTarget.All: + RpcOptionsToAll.InterestGroup = (byte)view.Group; // NOTE: Test-wise, this is static and re-used to avoid memory garbage + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcEvent, RpcOptionsToAll, sendOptions); + + // Execute local + ExecuteRpc(rpcEvent, NetworkingClient.LocalPlayer); + break; + case RpcTarget.Others: + { + RaiseEventOptions options = new RaiseEventOptions() { InterestGroup = (byte)view.Group }; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcEvent, options, sendOptions); + break; + } + case RpcTarget.AllBuffered: + { + RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.AddToRoomCache }; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcEvent, options, sendOptions); + + // Execute local + ExecuteRpc(rpcEvent, NetworkingClient.LocalPlayer); + break; + } + case RpcTarget.OthersBuffered: + { + RaiseEventOptions options = new RaiseEventOptions() { CachingOption = EventCaching.AddToRoomCache }; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcEvent, options, sendOptions); + break; + } + case RpcTarget.MasterClient: + { + if (NetworkingClient.LocalPlayer.IsMasterClient) + { + ExecuteRpc(rpcEvent, NetworkingClient.LocalPlayer); + } + else + { + RaiseEventOptions options = new RaiseEventOptions() { Receivers = ReceiverGroup.MasterClient }; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcEvent, options, sendOptions); + } + + break; + } + case RpcTarget.AllViaServer: + { + RaiseEventOptions options = new RaiseEventOptions() { InterestGroup = (byte)view.Group, Receivers = ReceiverGroup.All }; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcEvent, options, sendOptions); + if (PhotonNetwork.OfflineMode) + { + ExecuteRpc(rpcEvent, NetworkingClient.LocalPlayer); + } + + break; + } + case RpcTarget.AllBufferedViaServer: + { + RaiseEventOptions options = new RaiseEventOptions() { InterestGroup = (byte)view.Group, Receivers = ReceiverGroup.All, CachingOption = EventCaching.AddToRoomCache }; + PhotonNetwork.RaiseEventInternal(PunEvent.RPC, rpcEvent, options, sendOptions); + if (PhotonNetwork.OfflineMode) + { + ExecuteRpc(rpcEvent, NetworkingClient.LocalPlayer); + } + + break; + } + default: + Debug.LogError("Unsupported target enum: " + target); + break; + } + } + + + /// Enable/disable receiving on given Interest Groups (applied to PhotonViews). + /// + /// A client can tell the server which Interest Groups it's interested in. + /// The server will only forward events for those Interest Groups to that client (saving bandwidth and performance). + /// + /// See: https://doc.photonengine.com/en-us/pun/v2/gameplay/interestgroups + /// + /// See: https://doc.photonengine.com/en-us/pun/v2/demos-and-tutorials/package-demos/culling-demo + /// + /// The interest groups to disable (or null). + /// The interest groups to enable (or null). + public static void SetInterestGroups(byte[] disableGroups, byte[] enableGroups) + { + // TODO: check can use network + + if (disableGroups != null) + { + if (disableGroups.Length == 0) + { + // a byte[0] should disable ALL groups in one step and before any groups are enabled. we do this locally, too. + allowedReceivingGroups.Clear(); + } + else + { + for (int index = 0; index < disableGroups.Length; index++) + { + byte g = disableGroups[index]; + if (g <= 0) + { + Debug.LogError("Error: PhotonNetwork.SetInterestGroups was called with an illegal group number: " + g + ". The Group number should be at least 1."); + continue; + } + + if (allowedReceivingGroups.Contains(g)) + { + allowedReceivingGroups.Remove(g); + } + } + } + } + + if (enableGroups != null) + { + if (enableGroups.Length == 0) + { + // a byte[0] should enable ALL groups in one step. we do this locally, too. + for (byte index = 0; index < byte.MaxValue; index++) + { + allowedReceivingGroups.Add(index); + } + + allowedReceivingGroups.Add(byte.MaxValue); + } + else + { + for (int index = 0; index < enableGroups.Length; index++) + { + byte g = enableGroups[index]; + if (g <= 0) + { + Debug.LogError("Error: PhotonNetwork.SetInterestGroups was called with an illegal group number: " + g + ". The Group number should be at least 1."); + continue; + } + + allowedReceivingGroups.Add(g); + } + } + } + + if (!PhotonNetwork.offlineMode) + { + NetworkingClient.OpChangeGroups(disableGroups, enableGroups); + } + } + + + /// Enable/disable sending on given group (applied to PhotonViews) + /// + /// This does not interact with the Photon server-side. + /// It's just a client-side setting to suppress updates, should they be sent to one of the blocked groups. + /// + /// This setting is not particularly useful, as it means that updates literally never reach the server or anyone else. + /// Use with care. + /// + /// The interest group to affect. + /// Sets if sending to group is enabled (or not). + public static void SetSendingEnabled(byte group, bool enabled) + { + // TODO: check can use network + + if (!enabled) + { + blockedSendingGroups.Add(group); // can be added to HashSet no matter if already in it + } + else + { + blockedSendingGroups.Remove(group); + } + } + + + + /// Enable/disable sending on given groups (applied to PhotonViews) + /// + /// This does not interact with the Photon server-side. + /// It's just a client-side setting to suppress updates, should they be sent to one of the blocked groups. + /// + /// This setting is not particularly useful, as it means that updates literally never reach the server or anyone else. + /// Use with care. + /// The interest groups to enable sending on (or null). + /// The interest groups to disable sending on (or null). + public static void SetSendingEnabled(byte[] disableGroups, byte[] enableGroups) + { + // TODO: check can use network + + if (disableGroups != null) + { + for (int index = 0; index < disableGroups.Length; index++) + { + byte g = disableGroups[index]; + blockedSendingGroups.Add(g); + } + } + + if (enableGroups != null) + { + for (int index = 0; index < enableGroups.Length; index++) + { + byte g = enableGroups[index]; + blockedSendingGroups.Remove(g); + } + } + } + + + internal static void NewSceneLoaded() + { + if (loadingLevelAndPausedNetwork) + { + _AsyncLevelLoadingOperation = null; + loadingLevelAndPausedNetwork = false; + PhotonNetwork.IsMessageQueueRunning = true; + } + else + { + PhotonNetwork.SetLevelInPropsIfSynced(SceneManagerHelper.ActiveSceneName); + } + + // Debug.Log("OnLevelWasLoaded photonViewList.Count: " + photonViewList.Count); // Exit Games internal log + + List removeKeys = new List(); + foreach (KeyValuePair kvp in photonViewList) + { + PhotonView view = kvp.Value; + if (view == null) + { + removeKeys.Add(kvp.Key); + } + } + + for (int index = 0; index < removeKeys.Count; index++) + { + + int key = removeKeys[index]; + photonViewList.Remove(key); + } + + if (removeKeys.Count > 0) + { + if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + Debug.Log("New level loaded. Removed " + removeKeys.Count + " scene view IDs from last level."); + } + } + + + /// + /// Defines how many updated produced by OnPhotonSerialize() are batched into one message. + /// + /// + /// A low number increases overhead, a high number might lead to fragmented messages. + /// + public static int ObjectsInOneUpdate = 20; + + + private static readonly PhotonStream serializeStreamOut = new PhotonStream(true, null); + private static readonly PhotonStream serializeStreamIn = new PhotonStream(false, null); + + + /// cache the RaiseEventOptions to prevent redundant Memory Allocation + private static RaiseEventOptions serializeRaiseEvOptions = new RaiseEventOptions(); + + private struct RaiseEventBatch : IEquatable + { + public byte Group; + public bool Reliable; + + public override int GetHashCode() + { + return (this.Group << 1) + (this.Reliable ? 1 : 0); + } + + public bool Equals(RaiseEventBatch other) + { + return this.Reliable == other.Reliable && this.Group == other.Group; + } + } + + + private class SerializeViewBatch : IEquatable, IEquatable + { + public readonly RaiseEventBatch Batch; + public List ObjectUpdates; + private int defaultSize = PhotonNetwork.ObjectsInOneUpdate; + private int offset; + + + // the offset enables us to skip the first X entries in the ObjectUpdate(s), leaving room for (e.g.) timestamp of sending and level prefix + public SerializeViewBatch(RaiseEventBatch batch, int offset) + { + this.Batch = batch; + this.ObjectUpdates = new List(this.defaultSize); + this.offset = offset; + for (int i = 0; i < offset; i++) this.ObjectUpdates.Add(null); + } + + public override int GetHashCode() + { + return (this.Batch.Group << 1) + (this.Batch.Reliable ? 1 : 0); + } + + public bool Equals(SerializeViewBatch other) + { + return this.Equals(other.Batch); + } + + public bool Equals(RaiseEventBatch other) + { + return this.Batch.Reliable == other.Reliable && this.Batch.Group == other.Group; + } + + public override bool Equals(object obj) + { + SerializeViewBatch other = obj as SerializeViewBatch; + return other != null && this.Batch.Equals(other.Batch); + } + + public void Clear() + { + this.ObjectUpdates.Clear(); + for (int i = 0; i < offset; i++) this.ObjectUpdates.Add(null); + } + + public void Add(List viewData) + { + if (this.ObjectUpdates.Count >= this.ObjectUpdates.Capacity) + { + // NOTE: we could also trim to new size + throw new Exception("Can't add. Size exceeded."); + } + + this.ObjectUpdates.Add(viewData); + } + } + + + private static readonly Dictionary serializeViewBatches = new Dictionary(); + + + /// Calls all locally controlled PhotonViews to write their updates in OnPhotonSerializeView. Called by a PhotonHandler. + internal static void RunViewUpdate() + { + if (PhotonNetwork.OfflineMode || CurrentRoom == null || CurrentRoom.Players == null) + { + return; + } + + + // no need to send OnSerialize messages while being alone (these are not buffered anyway) +#if !PHOTON_DEVELOP + if (CurrentRoom.Players.Count <= 1) + { + return; + } +#else + serializeRaiseEvOptions.Receivers = (CurrentRoom.Players.Count == 1) ? ReceiverGroup.All : ReceiverGroup.Others; +#endif + + + + /* Format of the event's data object[]: + * [0] = PhotonNetwork.ServerTimestamp; + * [1] = currentLevelPrefix; OPTIONAL! + * [2] = object[] of PhotonView x + * [3] = object[] of PhotonView y or NULL + * [...] + * + * We only combine updates for XY objects into one RaiseEvent to avoid fragmentation. + * The Reliability and Interest Group are only used for RaiseEvent and not contained in the event/data that reaches the other clients. + * This is read in OnEvent(). + */ + + + var enumerator = photonViewList.GetEnumerator(); // replacing foreach (PhotonView view in this.photonViewList.Values) for memory allocation improvement + while (enumerator.MoveNext()) + { + PhotonView view = enumerator.Current.Value; + + // a client only sends updates for active, synchronized PhotonViews that are under it's control (isMine) + if (view.Synchronization == ViewSynchronization.Off || view.IsMine == false || view.isActiveAndEnabled == false) + { + continue; + } + + if (blockedSendingGroups.Contains(view.Group)) + { + continue; // Block sending on this group + } + + + // call the PhotonView's serialize method(s) + List evData = OnSerializeWrite(view); + if (evData == null) + { + continue; + } + + RaiseEventBatch eventBatch = new RaiseEventBatch(); + eventBatch.Reliable = view.Synchronization == ViewSynchronization.ReliableDeltaCompressed || view.mixedModeIsReliable; + eventBatch.Group = view.Group; + + SerializeViewBatch svBatch = null; + bool found = serializeViewBatches.TryGetValue(eventBatch, out svBatch); + if (!found) + { + svBatch = new SerializeViewBatch(eventBatch, 2); // NOTE: the 2 first entries are kept empty for timestamp and level prefix + serializeViewBatches.Add(eventBatch, svBatch); + } + + svBatch.Add(evData); + if (svBatch.ObjectUpdates.Count == svBatch.ObjectUpdates.Capacity) + { + SendSerializeViewBatch(svBatch); + } + } + + var enumeratorB = serializeViewBatches.GetEnumerator(); + while (enumeratorB.MoveNext()) + { + SendSerializeViewBatch(enumeratorB.Current.Value); + } + } + + + private static void SendSerializeViewBatch(SerializeViewBatch batch) + { + if (batch == null || batch.ObjectUpdates.Count <= 2) + { + return; + } + + serializeRaiseEvOptions.InterestGroup = batch.Batch.Group; + batch.ObjectUpdates[0] = PhotonNetwork.ServerTimestamp; + batch.ObjectUpdates[1] = (currentLevelPrefix != 0) ? (object)currentLevelPrefix : null; + byte code = batch.Batch.Reliable ? PunEvent.SendSerializeReliable : PunEvent.SendSerialize; + + PhotonNetwork.RaiseEventInternal(code, batch.ObjectUpdates, serializeRaiseEvOptions, batch.Batch.Reliable ? SendOptions.SendReliable : SendOptions.SendUnreliable); + batch.Clear(); + } + + + // calls OnPhotonSerializeView (through ExecuteOnSerialize) + // the content created here is consumed by receivers in: ReadOnSerialize + private static List OnSerializeWrite(PhotonView view) + { + if (view.Synchronization == ViewSynchronization.Off) + { + return null; + } + + + // each view creates a list of values that should be sent + PhotonMessageInfo info = new PhotonMessageInfo(NetworkingClient.LocalPlayer, PhotonNetwork.ServerTimestamp, view); + + if (view.syncValues == null) view.syncValues = new List(); + view.syncValues.Clear(); + serializeStreamOut.SetWriteStream(view.syncValues); + serializeStreamOut.SendNext(null); //to become: viewID, + serializeStreamOut.SendNext(null); //to become: is compressed + serializeStreamOut.SendNext(null); //to become: null-values (for compression) followed by: values for this object's update + + + view.SerializeView(serializeStreamOut, info); + + // check if there are actual values to be sent (after the "header" of viewId, (bool)compressed and (int[])nullValues) + if (serializeStreamOut.Count <= SyncFirstValue) + { + return null; + } + + + List currentValues = serializeStreamOut.GetWriteStream(); + currentValues[SyncViewId] = view.ViewID; + currentValues[SyncCompressed] = false; // (bool) compression was used. + currentValues[SyncNullValues] = null; // if reliable compressed, this is non-null. + // next: sequence of values in this object's update. + + if (view.Synchronization == ViewSynchronization.Unreliable) + { + return currentValues; + } + + + // ViewSynchronization: Off, Unreliable, UnreliableOnChange, ReliableDeltaCompressed + if (view.Synchronization == ViewSynchronization.UnreliableOnChange) + { + if (AlmostEquals(currentValues, view.lastOnSerializeDataSent)) + { + if (view.mixedModeIsReliable) + { + return null; + } + + view.mixedModeIsReliable = true; + List temp = view.lastOnSerializeDataSent; // TODO: extract "exchange" into method in PV + view.lastOnSerializeDataSent = currentValues; + view.syncValues = temp; + } + else + { + view.mixedModeIsReliable = false; + List temp = view.lastOnSerializeDataSent; // TODO: extract "exchange" into method in PV + view.lastOnSerializeDataSent = currentValues; + view.syncValues = temp; + } + + + return currentValues; + } + + if (view.Synchronization == ViewSynchronization.ReliableDeltaCompressed) + { + // TODO: fix delta compression / comparison + + // compress content of data set (by comparing to view.lastOnSerializeDataSent) + // the "original" dataArray is NOT modified by DeltaCompressionWrite + List dataToSend = DeltaCompressionWrite(view.lastOnSerializeDataSent, currentValues); + + // cache the values that were written this time (not the compressed values) + List temp = view.lastOnSerializeDataSent; // TODO: extract "exchange" into method in PV + view.lastOnSerializeDataSent = currentValues; + view.syncValues = temp; + + return dataToSend; + } + + return null; + } + + /// + /// Reads updates created by OnSerializeWrite + /// + private static void OnSerializeRead(object[] data, Player sender, int networkTime, short correctPrefix) + { + // read view ID from key (byte)0: a int-array (PUN 1.17++) + int viewID = (int)data[SyncViewId]; + + + // debug: + //LogObjectArray(data); + + PhotonView view = GetPhotonView(viewID); + if (view == null) + { + Debug.LogWarning("Received OnSerialization for view ID " + viewID + ". We have no such PhotonView! Ignore this if you're joining or leaving a room. State: " + NetworkingClient.State); + return; + } + + if (view.Prefix > 0 && correctPrefix != view.Prefix) + { + Debug.LogError("Received OnSerialization for view ID " + viewID + " with prefix " + correctPrefix + ". Our prefix is " + view.Prefix); + return; + } + + // SetReceiving filtering + if (view.Group != 0 && !allowedReceivingGroups.Contains(view.Group)) + { + return; // Ignore group + } + + + + + if (view.Synchronization == ViewSynchronization.ReliableDeltaCompressed) + { + object[] uncompressed = DeltaCompressionRead(view.lastOnSerializeDataReceived, data); + //LogObjectArray(uncompressed,"uncompressed "); + if (uncompressed == null) + { + // Skip this packet as we haven't got received complete-copy of this view yet. + if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + Debug.Log("Skipping packet for " + view.name + " [" + view.ViewID + + "] as we haven't received a full packet for delta compression yet. This is OK if it happens for the first few frames after joining a game."); + } + return; + } + + // store last received values (uncompressed) for delta-compression usage + view.lastOnSerializeDataReceived = uncompressed; + data = uncompressed; + } + + // TODO: re-check if ownership needs to be adjusted based on updates. + // most likely, only the PhotonView.Controller should be affected, if anything at all. + // TODO: find a way to sync the owner of a PV for late joiners. + + //// This is when joining late to assign ownership to the sender + //// this has nothing to do with reading the actual synchronization update. + //// We don't do anything if OwnerShip Was Touched, which means we got the infos already. We only possibly act if ownership was never transfered. + //// We do override OwnershipWasTransfered if owner is the masterClient. + //if (sender.ID != view.OwnerActorNr && (!view.OwnershipWasTransfered || view.OwnerActorNr == 0) && view.currentMasterID == -1) + //{ + // // obviously the owner changed and we didn't yet notice. + // //Debug.Log("Adjusting owner to sender of updates. From: " + view.OwnerActorNr + " to: " + sender.ID); + // view.OwnerActorNr = sender.ID; + //} + + serializeStreamIn.SetReadStream(data, 3); + PhotonMessageInfo info = new PhotonMessageInfo(sender, networkTime, view); + + view.DeserializeView(serializeStreamIn, info); + } + + + // compresses currentContent by using NULL as value if currentContent equals previousContent + // skips initial indexes, as defined by SyncFirstValue + // to conserve memory, the previousContent is re-used as buffer for the result! duplicate the values before using this, if needed + // returns null, if nothing must be sent (current content might be null, which also returns null) + // SyncFirstValue should be the index of the first actual data-value (3 in PUN's case, as 0=viewId, 1=(bool)compressed, 2=(int[])values that are now null) + public const int SyncViewId = 0; + public const int SyncCompressed = 1; + public const int SyncNullValues = 2; + public const int SyncFirstValue = 3; + + private static List DeltaCompressionWrite(List previousContent, List currentContent) + { + if (currentContent == null || previousContent == null || previousContent.Count != currentContent.Count) + { + return currentContent; // the current data needs to be sent (which might be null) + } + + if (currentContent.Count <= SyncFirstValue) + { + return null; // this send doesn't contain values (except the "headers"), so it's not being sent + } + + List compressedContent = previousContent; // the previous content is no longer needed, once we compared the values! + compressedContent[SyncCompressed] = false; + int compressedValues = 0; + + Queue valuesThatAreChangedToNull = null; + for (int index = SyncFirstValue; index < currentContent.Count; index++) + { + object newObj = currentContent[index]; + object oldObj = previousContent[index]; + if (AlmostEquals(newObj, oldObj)) + { + // compress (by using null, instead of value, which is same as before) + compressedValues++; + compressedContent[index] = null; + } + else + { + compressedContent[index] = newObj; + + // value changed, we don't replace it with null + // new value is null (like a compressed value): we have to mark it so it STAYS null instead of being replaced with previous value + if (newObj == null) + { + if (valuesThatAreChangedToNull == null) + { + valuesThatAreChangedToNull = new Queue(currentContent.Count); + } + valuesThatAreChangedToNull.Enqueue(index); + } + } + } + + // Only send the list of compressed fields if we actually compressed 1 or more fields. + if (compressedValues > 0) + { + if (compressedValues == currentContent.Count - SyncFirstValue) + { + // all values are compressed to null, we have nothing to send + return null; + } + + compressedContent[SyncCompressed] = true; + if (valuesThatAreChangedToNull != null) + { + compressedContent[SyncNullValues] = valuesThatAreChangedToNull.ToArray(); // data that is actually null (not just cause we didn't want to send it) + } + } + + compressedContent[SyncViewId] = currentContent[SyncViewId]; + return compressedContent; // some data was compressed but we need to send something + } + + + private static object[] DeltaCompressionRead(object[] lastOnSerializeDataReceived, object[] incomingData) + { + if ((bool)incomingData[SyncCompressed] == false) + { + // index 1 marks "compressed" as being true. + return incomingData; + } + + // Compression was applied (as data[1] == true) + // we need a previous "full" list of values to restore values that are null in this msg. else, ignore this + if (lastOnSerializeDataReceived == null) + { + return null; + } + + + int[] indexesThatAreChangedToNull = incomingData[2] as int[]; + for (int index = SyncFirstValue; index < incomingData.Length; index++) + { + if (indexesThatAreChangedToNull != null && indexesThatAreChangedToNull.Contains(index)) + { + continue; // if a value was set to null in this update, we don't need to fetch it from an earlier update + } + if (incomingData[index] == null) + { + // we replace null values in this received msg unless a index is in the "changed to null" list + object lastValue = lastOnSerializeDataReceived[index]; + incomingData[index] = lastValue; + } + } + + return incomingData; + } + + + // startIndex should be the index of the first actual data-value (3 in PUN's case, as 0=viewId, 1=(bool)compressed, 2=(int[])values that are now null) + // returns the incomingData with modified content. any object being null (means: value unchanged) gets replaced with a previously sent value. incomingData is being modified + + + private static bool AlmostEquals(IList lastData, IList currentContent) + { + if (lastData == null && currentContent == null) + { + return true; + } + + if (lastData == null || currentContent == null || (lastData.Count != currentContent.Count)) + { + return false; + } + + for (int index = 0; index < currentContent.Count; index++) + { + object newObj = currentContent[index]; + object oldObj = lastData[index]; + if (!AlmostEquals(newObj, oldObj)) + { + return false; + } + } + + return true; + } + + /// + /// Returns true if both objects are almost identical. + /// Used to check whether two objects are similar enough to skip an update. + /// + static bool AlmostEquals(object one, object two) + { + if (one == null || two == null) + { + return one == null && two == null; + } + + if (!one.Equals(two)) + { + // if A is not B, lets check if A is almost B + if (one is Vector3) + { + Vector3 a = (Vector3)one; + Vector3 b = (Vector3)two; + if (a.AlmostEquals(b, PhotonNetwork.PrecisionForVectorSynchronization)) + { + return true; + } + } + else if (one is Vector2) + { + Vector2 a = (Vector2)one; + Vector2 b = (Vector2)two; + if (a.AlmostEquals(b, PhotonNetwork.PrecisionForVectorSynchronization)) + { + return true; + } + } + else if (one is Quaternion) + { + Quaternion a = (Quaternion)one; + Quaternion b = (Quaternion)two; + if (a.AlmostEquals(b, PhotonNetwork.PrecisionForQuaternionSynchronization)) + { + return true; + } + } + else if (one is float) + { + float a = (float)one; + float b = (float)two; + if (a.AlmostEquals(b, PhotonNetwork.PrecisionForFloatSynchronization)) + { + return true; + } + } + + // one does not equal two + return false; + } + + return true; + } + + // NOTE: Might be used as replacement for the equivalent method in SupportClass. + internal static bool GetMethod(MonoBehaviour monob, string methodType, out MethodInfo mi) + { + mi = null; + + if (monob == null || string.IsNullOrEmpty(methodType)) + { + return false; + } + + List methods = SupportClassPun.GetMethods(monob.GetType(), null); + for (int index = 0; index < methods.Count; index++) + { + MethodInfo methodInfo = methods[index]; + if (methodInfo.Name.Equals(methodType)) + { + mi = methodInfo; + return true; + } + } + + return false; + } + + + /// Internally used to detect the current scene and load it if PhotonNetwork.AutomaticallySyncScene is enabled. + internal static void LoadLevelIfSynced() + { + if (!PhotonNetwork.AutomaticallySyncScene || PhotonNetwork.IsMasterClient || PhotonNetwork.CurrentRoom == null) + { + return; + } + + // check if "current level" is set in props + if (!PhotonNetwork.CurrentRoom.CustomProperties.ContainsKey(CurrentSceneProperty)) + { + return; + } + + // if loaded level is not the one defined by master in props, load that level + object sceneId = PhotonNetwork.CurrentRoom.CustomProperties[CurrentSceneProperty]; + if (sceneId is int) + { + if (SceneManagerHelper.ActiveSceneBuildIndex != (int)sceneId) + { + PhotonNetwork.LoadLevel((int)sceneId); + } + } + else if (sceneId is string) + { + if (SceneManagerHelper.ActiveSceneName != (string)sceneId) + { + PhotonNetwork.LoadLevel((string)sceneId); + } + } + } + + + internal static void SetLevelInPropsIfSynced(object levelId) + { + if (!PhotonNetwork.AutomaticallySyncScene || !PhotonNetwork.IsMasterClient || PhotonNetwork.CurrentRoom == null) + { + return; + } + if (levelId == null) + { + Debug.LogError("Parameter levelId can't be null!"); + return; + } + + + // check if "current level" is already set in the room properties (then we don't set it again) + if (PhotonNetwork.CurrentRoom.CustomProperties.ContainsKey(CurrentSceneProperty)) + { + object levelIdInProps = PhotonNetwork.CurrentRoom.CustomProperties[CurrentSceneProperty]; + //Debug.Log("levelId (to set): "+ levelId + " levelIdInProps: " + levelIdInProps + " SceneManagerHelper.ActiveSceneName: "+ SceneManagerHelper.ActiveSceneName); + + if (levelId.Equals(levelIdInProps)) + { + //Debug.LogWarning("The levelId equals levelIdInProps. Don't set property again."); + return; + } + else + { + // if the new levelId does not equal the level in properties, there is a chance that build index and scene name refer to the same scene. + // as Unity does not provide all scenes with build index, we only check for the currently loaded scene (with a high chance this is the correct one). + int scnIndex = SceneManagerHelper.ActiveSceneBuildIndex; + string scnName = SceneManagerHelper.ActiveSceneName; + + if ((levelId.Equals(scnIndex) && levelIdInProps.Equals(scnName)) || (levelId.Equals(scnName) && levelIdInProps.Equals(scnIndex))) + { + //Debug.LogWarning("The levelId and levelIdInProps refer to the same scene. Don't set property for it."); + return; + } + } + } + + + // if the new levelId does not match the current room-property, we can cancel existing loading (as we start a new one) + if (_AsyncLevelLoadingOperation != null) + { + if (!_AsyncLevelLoadingOperation.isDone) + { + Debug.LogWarning("PUN cancels an ongoing async level load, as another scene should be loaded. Next scene to load: " + levelId); + } + + _AsyncLevelLoadingOperation.allowSceneActivation = false; + _AsyncLevelLoadingOperation = null; + } + + + // current level is not yet in props, or different, so this client has to set it + Hashtable setScene = new Hashtable(); + if (levelId is int) setScene[CurrentSceneProperty] = (int)levelId; + else if (levelId is string) setScene[CurrentSceneProperty] = (string)levelId; + else Debug.LogError("Parameter levelId must be int or string!"); + + PhotonNetwork.CurrentRoom.SetCustomProperties(setScene); + SendAllOutgoingCommands(); // send immediately! because: in most cases the client will begin to load and pause sending anything for a while + } + + + private static void OnEvent(EventData photonEvent) + { + int actorNr = photonEvent.Sender; + Player originatingPlayer = null; + if (actorNr > 0 && NetworkingClient.CurrentRoom != null) + { + originatingPlayer = NetworkingClient.CurrentRoom.GetPlayer(actorNr); + } + + switch (photonEvent.Code) + { + case EventCode.Join: + ResetPhotonViewsOnSerialize(); + break; + + case PunEvent.RPC: + ExecuteRpc(photonEvent.CustomData as Hashtable, originatingPlayer); + break; + + case PunEvent.SendSerialize: + case PunEvent.SendSerializeReliable: + // Debug.Log(photonEvent.ToStringFull()); + + /* This case must match definition in RunViewUpdate() and OnSerializeWrite(). + * Format of the event's data object[]: + * [0] = PhotonNetwork.ServerTimestamp; + * [1] = currentLevelPrefix; OPTIONAL! + * [2] = object[] of PhotonView x + * [3] = object[] of PhotonView y or NULL + * [...] + * + * We only combine updates for XY objects into one RaiseEvent to avoid fragmentation. + * The Reliability and Interest Group are only used for RaiseEvent and not contained in the event/data that reaches the other clients. + * This is read in OnEvent(). + */ + + object[] pvUpdates = (object[])photonEvent[ParameterCode.Data]; + int remoteUpdateServerTimestamp = (int)pvUpdates[0]; + short remoteLevelPrefix = (pvUpdates[1] != null) ? (byte)pvUpdates[1] : (short)0; + + object[] viewUpdate = null; + for (int i = 2; i < pvUpdates.Length; i++) + { + viewUpdate = pvUpdates[i] as object[]; + if (viewUpdate == null) + { + break; + } + OnSerializeRead(viewUpdate, originatingPlayer, remoteUpdateServerTimestamp, remoteLevelPrefix); + } + break; + + case PunEvent.Instantiation: + NetworkInstantiate((Hashtable)photonEvent.CustomData, originatingPlayer); + break; + + case PunEvent.CloseConnection: + + // MasterClient "requests" a disconnection from us + if (PhotonNetwork.EnableCloseConnection == false) + { + Debug.LogWarning("CloseConnection received from " + originatingPlayer + ". PhotonNetwork.EnableCloseConnection is false. Ignoring the request (this client stays in the room)."); + } + else if (originatingPlayer == null || !originatingPlayer.IsMasterClient) + { + Debug.LogWarning("CloseConnection received from " + originatingPlayer + ". That player is not the Master Client. " + PhotonNetwork.MasterClient + " is."); + } + else if (PhotonNetwork.EnableCloseConnection) + { + PhotonNetwork.LeaveRoom(false); + } + + break; + + case PunEvent.DestroyPlayer: + Hashtable evData = (Hashtable)photonEvent.CustomData; + int targetPlayerId = (int)evData[keyByteZero]; + if (targetPlayerId >= 0) + { + DestroyPlayerObjects(targetPlayerId, true); + } + else + { + DestroyAll(true); + } + break; + + case EventCode.Leave: + + // destroy objects & buffered messages + if (CurrentRoom != null && CurrentRoom.AutoCleanUp && (originatingPlayer == null || !originatingPlayer.IsInactive)) + { + DestroyPlayerObjects(actorNr, true); + } + break; + + case PunEvent.Destroy: + evData = (Hashtable)photonEvent.CustomData; + int instantiationId = (int)evData[keyByteZero]; + // Debug.Log("Ev Destroy for viewId: " + instantiationId + " sent by owner: " + (instantiationId / PhotonNetwork.MAX_VIEW_IDS == actorNr) + " this client is owner: " + (instantiationId / PhotonNetwork.MAX_VIEW_IDS == this.LocalPlayer.ID)); + + + PhotonView pvToDestroy = null; + if (photonViewList.TryGetValue(instantiationId, out pvToDestroy)) + { + RemoveInstantiatedGO(pvToDestroy.gameObject, true); + } + else + { + Debug.LogError("Ev Destroy Failed. Could not find PhotonView with instantiationId " + instantiationId + ". Sent by actorNr: " + actorNr); + } + + break; + + case PunEvent.OwnershipRequest: + { + int[] requestValues = (int[])photonEvent.CustomData; + int requestedViewId = requestValues[0]; + int requestedFromOwnerId = requestValues[1]; + + + PhotonView requestedView = GetPhotonView(requestedViewId); + if (requestedView == null) + { + Debug.LogWarning("Can't find PhotonView of incoming OwnershipRequest. ViewId not found: " + requestedViewId); + break; + } + + if (PhotonNetwork.LogLevel == PunLogLevel.Informational) + { + Debug.Log(string.Format("OwnershipRequest. actorNr {0} requests view {1} from {2}. current pv owner: {3} is {4}. isMine: {6} master client: {5}", actorNr, requestedViewId, requestedFromOwnerId, requestedView.OwnerActorNr, requestedView.IsOwnerActive ? "active" : "inactive", MasterClient.ActorNumber, requestedView.IsMine)); + } + + switch (requestedView.OwnershipTransfer) + { + case OwnershipOption.Takeover: + int currentPvOwnerId = requestedView.OwnerActorNr; + if (requestedFromOwnerId == currentPvOwnerId || (requestedFromOwnerId == 0 && currentPvOwnerId == MasterClient.ActorNumber) || currentPvOwnerId == 0) + { + // a takeover is successful automatically, if taken from current owner + Player prevOwner = requestedView.Owner; + + requestedView.OwnerActorNr = actorNr; + requestedView.ControllerActorNr = actorNr; + + if (PhotonNetwork.OnOwnershipTransferedEv != null) + { + PhotonNetwork.OnOwnershipTransferedEv(requestedView, prevOwner); + } + } + else + { + + if (PhotonNetwork.OnOwnershipTransferFailedEv != null) + { + PhotonNetwork.OnOwnershipTransferFailedEv(requestedView, originatingPlayer); + } + //Debug.LogWarning("requestedView.OwnershipTransfer was ignored! "); + } + break; + + case OwnershipOption.Request: + if (PhotonNetwork.OnOwnershipRequestEv != null) + { + PhotonNetwork.OnOwnershipRequestEv(requestedView, originatingPlayer); + } + break; + + default: + Debug.LogWarning("Ownership mode == " + (requestedView.OwnershipTransfer) + ". Ignoring request."); + break; + } + } + break; + + case PunEvent.OwnershipTransfer: + { + int[] transferViewToUserID = (int[])photonEvent.CustomData; + int requestedViewId = transferViewToUserID[0]; + int newOwnerId = transferViewToUserID[1]; + + if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + Debug.Log("Ev OwnershipTransfer. ViewID " + requestedViewId + " to: " + newOwnerId + " Time: " + Environment.TickCount % 1000); + } + + PhotonView requestedView = GetPhotonView(requestedViewId); + if (requestedView != null) + { + // Only apply this if pv allows Takeover, or allows Request and this message originates from the controller or owner. + if (requestedView.OwnershipTransfer == OwnershipOption.Takeover || + (requestedView.OwnershipTransfer == OwnershipOption.Request && (originatingPlayer == requestedView.Controller || originatingPlayer == requestedView.Owner))) + { + Player prevOwner = requestedView.Owner; + + requestedView.OwnerActorNr= newOwnerId; + requestedView.ControllerActorNr = newOwnerId; + + if (PhotonNetwork.OnOwnershipTransferedEv != null) + { + PhotonNetwork.OnOwnershipTransferedEv(requestedView, prevOwner); + } + } + else if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + if (requestedView.OwnershipTransfer == OwnershipOption.Request) + Debug.Log("Failed incoming OwnershipTransfer attempt for '" + requestedView.name + "; " + requestedViewId + + " - photonView has OwnershipTransfer set to OwnershipOption.Request, but Player attempting to change owner is not the current owner/controller."); + else + Debug.Log("Failed incoming OwnershipTransfer attempt for '" + requestedView.name + "; " + requestedViewId + + " - photonView has OwnershipTransfer set to OwnershipOption.Fixed."); + } + } + else if (PhotonNetwork.LogLevel >= PunLogLevel.ErrorsOnly) + { + Debug.LogErrorFormat("Failed to find a PhotonView with ID={0} for incoming OwnershipTransfer event (newOwnerActorNumber={1}), sender={2}", + requestedViewId, newOwnerId, actorNr); + } + + break; + } + + case PunEvent.OwnershipUpdate: + { + reusablePVHashset.Clear(); + + // Deserialize the list of exceptions, these are views on the master who's Owner and Creator didn't match. + int[] viewOwnerPair = (int[])photonEvent.CustomData; + + for (int i = 0, cnt = viewOwnerPair.Length; i < cnt; i++) + { + int viewId = viewOwnerPair[i]; + i++; + int newOwnerId = viewOwnerPair[i]; + + PhotonView view = GetPhotonView(viewId); + if (view == null) + { + if (PhotonNetwork.LogLevel >= PunLogLevel.ErrorsOnly) + { + Debug.LogErrorFormat("Failed to find a PhotonView with ID={0} for incoming OwnershipUpdate event (newOwnerActorNumber={1}), sender={2}. If you load scenes, make sure to pause the message queue.", viewId, newOwnerId, actorNr); + } + + continue; + } + + Player prevOwner = view.Owner; + Player newOwner = CurrentRoom.GetPlayer(newOwnerId, true); + + view.OwnerActorNr= newOwnerId; + view.ControllerActorNr = newOwnerId; + + reusablePVHashset.Add(view); + // If this produces an owner change locally, fire the OnOwnershipTransfered callbacks + if (PhotonNetwork.OnOwnershipTransferedEv != null && newOwner != prevOwner) + { + PhotonNetwork.OnOwnershipTransferedEv(view, prevOwner); + } + } + + // Initialize all views. Typically this is just fired on a new client after it joins a room and gets the first OwnershipUpdate from the Master. + // This was moved from PhotonHandler OnJoinedRoom to here, to allow objects to retain controller = -1 until an controller is actually known. + foreach (var view in PhotonViewCollection) + { + if (!reusablePVHashset.Contains(view)) + view.RebuildControllerCache(); + } + + break; + } + + + } + } + + private static void OnOperation(OperationResponse opResponse) + { + switch (opResponse.OperationCode) + { + case OperationCode.GetRegions: + if (opResponse.ReturnCode != 0) + { + if (PhotonNetwork.LogLevel >= PunLogLevel.Full) + { + Debug.Log("OpGetRegions failed. Will not ping any. ReturnCode: " + opResponse.ReturnCode); + } + return; + } + if (ConnectMethod == ConnectMethod.ConnectToBest) + { + string previousBestRegionSummary = PhotonNetwork.BestRegionSummaryInPreferences; + + if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + Debug.Log("PUN got region list. Going to ping minimum regions, based on this previous result summary: " + previousBestRegionSummary); + } + NetworkingClient.RegionHandler.PingMinimumOfRegions(OnRegionsPinged, previousBestRegionSummary); + } + break; + case OperationCode.JoinGame: + if (Server == ServerConnection.GameServer) + { + PhotonNetwork.LoadLevelIfSynced(); + } + break; + } + } + + private static void OnClientStateChanged(ClientState previousState, ClientState state) + { + if ( + (previousState == ClientState.Joined && state == ClientState.Disconnected) || + (Server == ServerConnection.GameServer && (state == ClientState.Disconnecting || state == ClientState.DisconnectingFromGameServer)) + ) + { + LeftRoomCleanup(); + } + + if (state == ClientState.ConnectedToMasterServer && _cachedRegionHandler != null) + { + BestRegionSummaryInPreferences = _cachedRegionHandler.SummaryToCache; + _cachedRegionHandler = null; + } + } + + // to be used in the main thread. as OnRegionsPinged is called in a separate thread and so we can't use some of the Unity methods (like saving playerPrefs) + private static RegionHandler _cachedRegionHandler; + + private static void OnRegionsPinged(RegionHandler regionHandler) + { + if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + Debug.Log(regionHandler.GetResults()); + } + + _cachedRegionHandler = regionHandler; + //PhotonNetwork.BestRegionSummaryInPreferences = regionHandler.SummaryToCache; // can not be called here, as it's not in the main thread + + + // the dev region overrides the best region selection in "development" builds (unless it was set but is empty). + +#if UNITY_EDITOR + if (!PhotonServerSettings.DevRegionSetOnce) + { + // if no dev region was defined before or if the dev region is unavailable, set a new dev region + PhotonServerSettings.DevRegionSetOnce = true; + PhotonServerSettings.DevRegion = _cachedRegionHandler.BestRegion.Code; + } +#endif + +#if DEVELOPMENT_BUILD || UNITY_EDITOR + if (!string.IsNullOrEmpty(PhotonServerSettings.DevRegion) && ConnectMethod == ConnectMethod.ConnectToBest) + { + Debug.LogWarning("PUN is in development mode (development build). As the 'dev region' is not empty (" + PhotonServerSettings.DevRegion + ") it overrides the found best region. See PhotonServerSettings."); + + string _finalDevRegion = PhotonServerSettings.DevRegion; + if (!_cachedRegionHandler.EnabledRegions.Any(p => p.Code == PhotonServerSettings.DevRegion)) + { + _finalDevRegion = _cachedRegionHandler.EnabledRegions[0].Code; + + Debug.LogWarning("The 'dev region' (" + PhotonServerSettings.DevRegion + ") was not found in the enabled regions, the first enabled region is picked (" + _finalDevRegion + ")"); + } + + PhotonNetwork.NetworkingClient.ConnectToRegionMaster(_finalDevRegion); + return; + } +#endif + + if (NetworkClientState == ClientState.ConnectedToNameServer) + { + PhotonNetwork.NetworkingClient.ConnectToRegionMaster(regionHandler.BestRegion.Code); + } + } + } +} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs.meta new file mode 100644 index 00000000..b56fbf00 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonNetworkPart.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cbf2b3734a024f842bd50f8738feb400 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs b/Assets/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs new file mode 100644 index 00000000..33a0b8f2 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs @@ -0,0 +1,197 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Contains the PhotonStreamQueue. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System.Collections.Generic; + using UnityEngine; + + /// + /// The PhotonStreamQueue helps you poll object states at higher frequencies than what + /// PhotonNetwork.SendRate dictates and then sends all those states at once when + /// Serialize() is called. + /// On the receiving end you can call Deserialize() and then the stream will roll out + /// the received object states in the same order and timeStep they were recorded in. + /// + public class PhotonStreamQueue + { + private int m_SampleRate; + private int m_SampleCount; + private int m_ObjectsPerSample = -1; + + private float m_LastSampleTime = -Mathf.Infinity; + private int m_LastFrameCount = -1; + private int m_NextObjectIndex = -1; + + private List m_Objects = new List(); + + private bool m_IsWriting; + + /// + /// Initializes a new instance of the class. + /// + /// How many times per second should the object states be sampled + public PhotonStreamQueue(int sampleRate) + { + this.m_SampleRate = sampleRate; + } + + private void BeginWritePackage() + { + //If not enough time has passed since the last sample, we don't want to write anything + if (Time.realtimeSinceStartup < this.m_LastSampleTime + 1f / this.m_SampleRate) + { + this.m_IsWriting = false; + return; + } + + if (this.m_SampleCount == 1) + { + this.m_ObjectsPerSample = this.m_Objects.Count; + //Debug.Log( "Setting m_ObjectsPerSample to " + m_ObjectsPerSample ); + } + else if (this.m_SampleCount > 1) + { + if (this.m_Objects.Count / this.m_SampleCount != this.m_ObjectsPerSample) + { + Debug.LogWarning("The number of objects sent via a PhotonStreamQueue has to be the same each frame"); + Debug.LogWarning("Objects in List: " + this.m_Objects.Count + " / Sample Count: " + this.m_SampleCount + " = " + this.m_Objects.Count / this.m_SampleCount + " != " + this.m_ObjectsPerSample); + } + } + + this.m_IsWriting = true; + this.m_SampleCount++; + this.m_LastSampleTime = Time.realtimeSinceStartup; + + /*if( m_SampleCount > 1 ) + { + Debug.Log( "Check: " + m_Objects.Count + " / " + m_SampleCount + " = " + ( m_Objects.Count / m_SampleCount ) + " = " + m_ObjectsPerSample ); + }*/ + } + + /// + /// Resets the PhotonStreamQueue. You need to do this whenever the amount of objects you are observing changes + /// + public void Reset() + { + this.m_SampleCount = 0; + this.m_ObjectsPerSample = -1; + + this.m_LastSampleTime = -Mathf.Infinity; + this.m_LastFrameCount = -1; + + this.m_Objects.Clear(); + } + + /// + /// Adds the next object to the queue. This works just like PhotonStream.SendNext + /// + /// The object you want to add to the queue + public void SendNext(object obj) + { + if (Time.frameCount != this.m_LastFrameCount) + { + this.BeginWritePackage(); + } + + this.m_LastFrameCount = Time.frameCount; + + if (this.m_IsWriting == false) + { + return; + } + + this.m_Objects.Add(obj); + } + + /// + /// Determines whether the queue has stored any objects + /// + public bool HasQueuedObjects() + { + return this.m_NextObjectIndex != -1; + } + + /// + /// Receives the next object from the queue. This works just like PhotonStream.ReceiveNext + /// + /// + public object ReceiveNext() + { + if (this.m_NextObjectIndex == -1) + { + return null; + } + + if (this.m_NextObjectIndex >= this.m_Objects.Count) + { + this.m_NextObjectIndex -= this.m_ObjectsPerSample; + } + + return this.m_Objects[this.m_NextObjectIndex++]; + } + + /// + /// Serializes the specified stream. Call this in your OnPhotonSerializeView method to send the whole recorded stream. + /// + /// The PhotonStream you receive as a parameter in OnPhotonSerializeView + public void Serialize(PhotonStream stream) + { + // TODO: find a better solution for this: + // the "if" is a workaround for packages which have only 1 sample/frame. in that case, SendNext didn't set the obj per sample. + if (this.m_Objects.Count > 0 && this.m_ObjectsPerSample < 0) + { + this.m_ObjectsPerSample = this.m_Objects.Count; + } + + stream.SendNext(this.m_SampleCount); + stream.SendNext(this.m_ObjectsPerSample); + + for (int i = 0; i < this.m_Objects.Count; ++i) + { + stream.SendNext(this.m_Objects[i]); + } + + //Debug.Log( "Serialize " + m_SampleCount + " samples with " + m_ObjectsPerSample + " objects per sample. object count: " + m_Objects.Count + " / " + ( m_SampleCount * m_ObjectsPerSample ) ); + + this.m_Objects.Clear(); + this.m_SampleCount = 0; + } + + /// + /// Deserializes the specified stream. Call this in your OnPhotonSerializeView method to receive the whole recorded stream. + /// + /// The PhotonStream you receive as a parameter in OnPhotonSerializeView + public void Deserialize(PhotonStream stream) + { + this.m_Objects.Clear(); + + this.m_SampleCount = (int) stream.ReceiveNext(); + this.m_ObjectsPerSample = (int) stream.ReceiveNext(); + + for (int i = 0; i < this.m_SampleCount * this.m_ObjectsPerSample; ++i) + { + this.m_Objects.Add(stream.ReceiveNext()); + } + + if (this.m_Objects.Count > 0) + { + this.m_NextObjectIndex = 0; + } + else + { + this.m_NextObjectIndex = -1; + } + + //Debug.Log( "Deserialized " + m_SampleCount + " samples with " + m_ObjectsPerSample + " objects per sample. object count: " + m_Objects.Count + " / " + ( m_SampleCount * m_ObjectsPerSample ) ); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs.meta new file mode 100644 index 00000000..b225d0d4 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonStreamQueue.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 006991e32d9020c4d896f161318a2bc0 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonUnityNetworking.asmdef b/Assets/Photon/PhotonUnityNetworking/Code/PhotonUnityNetworking.asmdef new file mode 100644 index 00000000..11c54b91 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonUnityNetworking.asmdef @@ -0,0 +1,10 @@ +{ + "name": "PhotonUnityNetworking", + "references": [ + "PhotonRealtime" + ], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonUnityNetworking.asmdef.meta b/Assets/Photon/PhotonUnityNetworking/Code/PhotonUnityNetworking.asmdef.meta new file mode 100644 index 00000000..e3e63aa8 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonUnityNetworking.asmdef.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 57c32fc907df0f54e8e6e8f0d2488336 +timeCreated: 1537459565 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs b/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs new file mode 100644 index 00000000..360e9ac2 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs @@ -0,0 +1,826 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Contains the PhotonView class. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System; + using UnityEngine; + using UnityEngine.Serialization; + using System.Collections.Generic; + using Photon.Realtime; + + #if UNITY_EDITOR + using UnityEditor; + #endif + + /// + /// A PhotonView identifies an object across the network (viewID) and configures how the controlling client updates remote instances. + /// + /// \ingroup publicApi + [AddComponentMenu("Photon Networking/Photon View")] + public class PhotonView : MonoBehaviour + { + #if UNITY_EDITOR + [UnityEditor.InitializeOnLoadMethod] + private static void SetPhotonViewExecutionOrder() + { + int photonViewExecutionOrder = -16000; + GameObject go = new GameObject(); + PhotonView pv = go.AddComponent(); + MonoScript monoScript = MonoScript.FromMonoBehaviour(pv); + + if (photonViewExecutionOrder != MonoImporter.GetExecutionOrder(monoScript)) + { + MonoImporter.SetExecutionOrder(monoScript, photonViewExecutionOrder); // very early but allows other scripts to run even earlier... + } + + DestroyImmediate(go); + } + #endif + + #if UNITY_EDITOR + [ContextMenu("Open PUN Wizard")] + void OpenPunWizard() + { + EditorApplication.ExecuteMenuItem("Window/Photon Unity Networking/PUN Wizard"); + } + #endif + + #if UNITY_EDITOR + // Suppressing compiler warning "this variable is never used". Only used in the CustomEditor, only in Editor + #pragma warning disable 0414 + [SerializeField] + bool ObservedComponentsFoldoutOpen = true; + #pragma warning restore 0414 + #endif + + #if UNITY_EDITOR + /// called by Editor to reset the component + private void Reset() + { + observableSearch = ObservableSearch.AutoFindAll; + } + #endif + + + + [FormerlySerializedAs("group")] + public byte Group = 0; + + // NOTE: this is now an integer because unity won't serialize short (needed for instantiation). we SEND only a short though! + // NOTE: prefabs have a prefixField of -1. this is replaced with any currentLevelPrefix that's used at runtime. instantiated GOs get their prefix set pre-instantiation (so those are not -1 anymore) + public int Prefix + { + get + { + if (this.prefixField == -1 && PhotonNetwork.NetworkingClient != null) + { + this.prefixField = PhotonNetwork.currentLevelPrefix; + } + + return this.prefixField; + } + set { this.prefixField = value; } + } + + // this field is serialized by unity. that means it is copied when instantiating a persistent obj into the scene + [FormerlySerializedAs("prefixBackup")] + public int prefixField = -1; + + + + /// + /// This is the InstantiationData that was passed when calling PhotonNetwork.Instantiate* (if that was used to spawn this prefab) + /// + public object[] InstantiationData + { + get { return this.instantiationDataField; } + protected internal set { this.instantiationDataField = value; } + } + + internal object[] instantiationDataField; + + /// + /// For internal use only, don't use + /// + protected internal List lastOnSerializeDataSent = null; + protected internal List syncValues; + + /// + /// For internal use only, don't use + /// + protected internal object[] lastOnSerializeDataReceived = null; + + [FormerlySerializedAs("synchronization")] + public ViewSynchronization Synchronization = ViewSynchronization.UnreliableOnChange; + + protected internal bool mixedModeIsReliable = false; + + /// Defines if ownership of this PhotonView is fixed, can be requested or simply taken. + /// + /// Note that you can't edit this value at runtime. + /// The options are described in enum OwnershipOption. + /// The current owner has to implement IPunCallbacks.OnOwnershipRequest to react to the ownership request. + /// + [FormerlySerializedAs("ownershipTransfer")] + public OwnershipOption OwnershipTransfer = OwnershipOption.Fixed; + + + public enum ObservableSearch { Manual, AutoFindActive, AutoFindAll } + + /// Default to manual so existing PVs in projects default to same as before. Reset() changes this to AutoAll for new implementations. + public ObservableSearch observableSearch = ObservableSearch.Manual; + + public List ObservedComponents; + + + + internal MonoBehaviour[] RpcMonoBehaviours; + + + + [Obsolete("Renamed. Use IsRoomView instead")] + public bool IsSceneView + { + get { return this.IsRoomView; } + } + + /// True if the PhotonView was loaded with the scene (game object) or instantiated with InstantiateRoomObject. + /// + /// Room objects are not owned by a particular player but belong to the scene. Thus they don't get destroyed when their + /// creator leaves the game and the current Master Client can control them (whoever that is). + /// The ownerId is 0 (player IDs are 1 and up). + /// + public bool IsRoomView + { + get { return this.CreatorActorNr == 0; } + } + + public bool IsOwnerActive + { + get { return this.Owner != null && !this.Owner.IsInactive; } + } + + /// + /// True if the PhotonView is "mine" and can be controlled by this client. + /// + /// + /// PUN has an ownership concept that defines who can control and destroy each PhotonView. + /// True in case the controller matches the local Player. + /// True if this is a scene photonview (null owner and ownerId == 0) on the Master client. + /// + public bool IsMine { get; private set; } + public bool AmController + { + get { return this.IsMine; } + } + + public Player Controller { get; private set; } + + public int CreatorActorNr { get; private set; } + + public bool AmOwner { get; private set; } + + + /// + /// The owner of a PhotonView is the creator of an object by default Ownership can be transferred and the owner may not be in the room anymore. Objects in the scene don't have an owner. + /// + /// + /// The owner/controller of a PhotonView is also the client which sends position updates of the GameObject. + /// + /// Ownership can be transferred to another player with PhotonView.TransferOwnership or any player can request + /// ownership by calling the PhotonView's RequestOwnership method. + /// The current owner has to implement IPunCallbacks.OnOwnershipRequest to react to the ownership request. + /// + public Player Owner { get; private set; } + + + + [NonSerialized] + private int ownerActorNr; + + public int OwnerActorNr + { + get { return this.ownerActorNr; } + set + { + if (value != 0 && this.ownerActorNr == value) + { + return; + } + + Player prevOwner = this.Owner; + + this.Owner = PhotonNetwork.CurrentRoom == null ? null : PhotonNetwork.CurrentRoom.GetPlayer(value, true); + this.ownerActorNr = this.Owner != null ? this.Owner.ActorNumber : value; + + this.AmOwner = PhotonNetwork.LocalPlayer != null && this.ownerActorNr == PhotonNetwork.LocalPlayer.ActorNumber; + + this.UpdateCallbackLists(); + if (!ReferenceEquals(this.OnOwnerChangeCallbacks, null)) + { + for (int i = 0, cnt = this.OnOwnerChangeCallbacks.Count; i < cnt; ++i) + { + this.OnOwnerChangeCallbacks[i].OnOwnerChange(this.Owner, prevOwner); + } + } + } + } + + + [NonSerialized] + private int controllerActorNr; + + public int ControllerActorNr + { + get { return this.controllerActorNr; } + set + { + Player prevController = this.Controller; + + this.Controller = PhotonNetwork.CurrentRoom == null ? null : PhotonNetwork.CurrentRoom.GetPlayer(value, true); + if (this.Controller != null && this.Controller.IsInactive) + { + this.Controller = PhotonNetwork.MasterClient; + } + this.controllerActorNr = this.Controller != null ? this.Controller.ActorNumber : value; + + this.IsMine = PhotonNetwork.LocalPlayer != null && this.controllerActorNr == PhotonNetwork.LocalPlayer.ActorNumber; + + if (!ReferenceEquals(this.Controller, prevController)) + { + this.UpdateCallbackLists(); + if (!ReferenceEquals(this.OnControllerChangeCallbacks, null)) + { + for (int i = 0, cnt = this.OnControllerChangeCallbacks.Count; i < cnt; ++i) + { + this.OnControllerChangeCallbacks[i].OnControllerChange(this.Controller, prevController); + } + } + } + } + } + + + /// This field is the Scene ViewID (0 if not used). loaded with the scene, used in Awake(). + [SerializeField] + [FormerlySerializedAs("viewIdField")] + [HideInInspector] + public int sceneViewId = 0; // TODO: in best case, this is not public + + + /// This field is the "runtime" ViewID as backup for the property. + [NonSerialized] + private int viewIdField = 0; + + /// + /// The ID of the PhotonView. Identifies it in a networked game (per room). + /// + /// See: [Network Instantiation](@ref instantiateManual) + public int ViewID + { + get + { + return this.viewIdField; + } + + set + { + // TODO: Check if the isPlaying check is needed when the PhotonViewHandler is updated + if (value != 0 && this.viewIdField != 0) + { + Debug.LogWarning("Changing a ViewID while it's in use is not possible (except setting it to 0 (not being used). Current ViewID: " + this.viewIdField); + return; + } + + if (value == 0 && this.viewIdField != 0) + { + PhotonNetwork.LocalCleanPhotonView(this); + } + + this.viewIdField = value; + this.CreatorActorNr = value / PhotonNetwork.MAX_VIEW_IDS; // the creator can be derived from the viewId. this is also the initial owner and creator. + this.OwnerActorNr = this.CreatorActorNr; + this.ControllerActorNr = this.CreatorActorNr; + this.RebuildControllerCache(); + + + // if the viewID is set to a new, legit value, the view should register in the list of active PVs. + if (value != 0) + { + PhotonNetwork.RegisterPhotonView(this); + } + } + } + + [FormerlySerializedAs("instantiationId")] + public int InstantiationId; // if the view was instantiated with a GO, this GO has a instantiationID (first view's viewID) + + [SerializeField] + [HideInInspector] + public bool isRuntimeInstantiated; + + + protected internal bool removedFromLocalViewList; + + + /// Will FindObservables() and assign the sceneViewId, if that is != 0. This initializes the PhotonView if loaded with the scene. Called once by Unity, when this instance is created. + protected internal void Awake() + { + if (this.ViewID != 0) + { + return; + } + + if (this.sceneViewId != 0) + { + // PhotonNetwork.Instantiate will set a ViewID != 0 before the object awakes. So only objects loaded with the scene ever use the sceneViewId (even if the obj got pooled) + this.ViewID = this.sceneViewId; + } + + this.FindObservables(); + } + + + /// called by PhotonNetwork.LocalCleanupAnythingInstantiated + internal void ResetPhotonView(bool resetOwner) + { + //// If this was fired by this connection rejoining, reset the ownership cache to owner = creator. + //// TODO: This reset may not be needed at all with the ownership being invalidated next. + //if (resetOwner) + // ResetOwnership(); + + //this.ownershipCacheIsValid = OwnershipCacheState.Invalid; + + // Reset the delta check to force a complete update of owned objects, to ensure joining connections get full updates. + this.lastOnSerializeDataSent = null; + } + + + /// called by OnJoinedRoom, OnMasterClientSwitched, OnPlayerEnteredRoom and OnEvent for OwnershipUpdate + /// OnPlayerLeftRoom will set a new controller directly, if the controller or owner left + internal void RebuildControllerCache(bool ownerHasChanged = false) + { + //var prevController = this.controller; + + // objects without controller and room objects (ownerId 0) check if controller update is needed + if (this.controllerActorNr == 0 || this.OwnerActorNr == 0 || this.Owner == null || this.Owner.IsInactive) + { + var masterclient = PhotonNetwork.MasterClient; + this.ControllerActorNr = masterclient == null ? -1 : masterclient.ActorNumber; + } + else + { + this.ControllerActorNr = this.OwnerActorNr; + } + } + + + public void OnPreNetDestroy(PhotonView rootView) + { + UpdateCallbackLists(); + + if (!ReferenceEquals(OnPreNetDestroyCallbacks, null)) + for (int i = 0, cnt = OnPreNetDestroyCallbacks.Count; i < cnt; ++i) + { + OnPreNetDestroyCallbacks[i].OnPreNetDestroy(rootView); + } + } + + protected internal void OnDestroy() + { + if (!this.removedFromLocalViewList) + { + bool wasInList = PhotonNetwork.LocalCleanPhotonView(this); + + if (wasInList && this.InstantiationId > 0 && !PhotonHandler.AppQuits && PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + Debug.Log("PUN-instantiated '" + this.gameObject.name + "' got destroyed by engine. This is OK when loading levels. Otherwise use: PhotonNetwork.Destroy()."); + } + } + } + + + /// + /// Depending on the PhotonView's OwnershipTransfer setting, any client can request to become owner of the PhotonView. + /// + /// + /// Requesting ownership can give you control over a PhotonView, if the OwnershipTransfer setting allows that. + /// The current owner might have to implement IPunCallbacks.OnOwnershipRequest to react to the ownership request. + /// + /// The owner/controller of a PhotonView is also the client which sends position updates of the GameObject. + /// + public void RequestOwnership() + { + if (OwnershipTransfer != OwnershipOption.Fixed) + { + PhotonNetwork.RequestOwnership(this.ViewID, this.ownerActorNr); + } + else + { + if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + Debug.LogWarning("Attempting to RequestOwnership of GameObject '" + name + "' viewId: " + ViewID + + ", but PhotonView.OwnershipTransfer is set to Fixed."); + } + } + } + + /// + /// Transfers the ownership of this PhotonView (and GameObject) to another player. + /// + /// + /// The owner/controller of a PhotonView is also the client which sends position updates of the GameObject. + /// + public void TransferOwnership(Player newOwner) + { + if (newOwner != null) + TransferOwnership(newOwner.ActorNumber); + else + { + if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + Debug.LogWarning("Attempting to TransferOwnership of GameObject '" + name + "' viewId: " + ViewID + + ", but provided Player newOwner is null."); + } + } + } + + /// + /// Transfers the ownership of this PhotonView (and GameObject) to another player. + /// + /// + /// The owner/controller of a PhotonView is also the client which sends position updates of the GameObject. + /// + public void TransferOwnership(int newOwnerId) + { + if (OwnershipTransfer == OwnershipOption.Takeover || (OwnershipTransfer == OwnershipOption.Request && this.AmController)) + { + PhotonNetwork.TransferOwnership(this.ViewID, newOwnerId); + } + else + { + if (PhotonNetwork.LogLevel >= PunLogLevel.Informational) + { + if (OwnershipTransfer == OwnershipOption.Fixed) + Debug.LogWarning("Attempting to TransferOwnership of GameObject '" + name + "' viewId: " + ViewID + + " without the authority to do so. TransferOwnership is not allowed if PhotonView.OwnershipTransfer is set to Fixed."); + else if (OwnershipTransfer == OwnershipOption.Request) + Debug.LogWarning("Attempting to TransferOwnership of GameObject '" + name + "' viewId: " + ViewID + + " without the authority to do so. PhotonView.OwnershipTransfer is set to Request, so only the controller of this object can TransferOwnership."); + } + } + } + + /// + /// Will find IPunObservable components on this GameObject and nested children and add them to the ObservedComponents list. + /// + /// + /// This is called via PhotonView.Awake(), which in turn is called immediately by the engine's AddComponent method. + /// + /// Changing the ObservedComponents of a PhotonView at runtime can be problematic, if other clients are not also + /// updating their list. + /// + /// If true, FindObservables will work as if observableSearch is AutoFindActive. + public void FindObservables(bool force = false) + { + if (!force && this.observableSearch == ObservableSearch.Manual) + { + return; + } + + if (this.ObservedComponents == null) + { + this.ObservedComponents = new List(); + } + else + { + this.ObservedComponents.Clear(); + } + + this.transform.GetNestedComponentsInChildren(force || this.observableSearch == ObservableSearch.AutoFindAll, this.ObservedComponents); + } + + + public void SerializeView(PhotonStream stream, PhotonMessageInfo info) + { + if (this.ObservedComponents != null && this.ObservedComponents.Count > 0) + { + for (int i = 0; i < this.ObservedComponents.Count; ++i) + { + var component = this.ObservedComponents[i]; + if (component != null) + SerializeComponent(this.ObservedComponents[i], stream, info); + } + } + } + + public void DeserializeView(PhotonStream stream, PhotonMessageInfo info) + { + if (this.ObservedComponents != null && this.ObservedComponents.Count > 0) + { + for (int i = 0; i < this.ObservedComponents.Count; ++i) + { + var component = this.ObservedComponents[i]; + if (component != null) + DeserializeComponent(component, stream, info); + } + } + } + + protected internal void DeserializeComponent(Component component, PhotonStream stream, PhotonMessageInfo info) + { + IPunObservable observable = component as IPunObservable; + if (observable != null) + { + observable.OnPhotonSerializeView(stream, info); + } + else + { + Debug.LogError("Observed scripts have to implement IPunObservable. " + component + " does not. It is Type: " + component.GetType(), component.gameObject); + } + } + + protected internal void SerializeComponent(Component component, PhotonStream stream, PhotonMessageInfo info) + { + IPunObservable observable = component as IPunObservable; + if (observable != null) + { + observable.OnPhotonSerializeView(stream, info); + } + else + { + Debug.LogError("Observed scripts have to implement IPunObservable. " + component + " does not. It is Type: " + component.GetType(), component.gameObject); + } + } + + + /// + /// Can be used to refesh the list of MonoBehaviours on this GameObject while PhotonNetwork.UseRpcMonoBehaviourCache is true. + /// + /// + /// Set PhotonNetwork.UseRpcMonoBehaviourCache to true to enable the caching. + /// Uses this.GetComponents() to get a list of MonoBehaviours to call RPCs on (potentially). + /// + /// While PhotonNetwork.UseRpcMonoBehaviourCache is false, this method has no effect, + /// because the list is refreshed when a RPC gets called. + /// + public void RefreshRpcMonoBehaviourCache() + { + this.RpcMonoBehaviours = this.GetComponents(); + } + + + /// + /// Call a RPC method of this GameObject on remote clients of this room (or on all, including this client). + /// + /// + /// [Remote Procedure Calls](@ref rpcManual) are an essential tool in making multiplayer games with PUN. + /// It enables you to make every client in a room call a specific method. + /// + /// RPC calls can target "All" or the "Others". + /// Usually, the target "All" gets executed locally immediately after sending the RPC. + /// The "*ViaServer" options send the RPC to the server and execute it on this client when it's sent back. + /// Of course, calls are affected by this client's lag and that of remote clients. + /// + /// Each call automatically is routed to the same PhotonView (and GameObject) that was used on the + /// originating client. + /// + /// See: [Remote Procedure Calls](@ref rpcManual). + /// + /// The name of a fitting method that was has the RPC attribute. + /// The group of targets and the way the RPC gets sent. + /// The parameters that the RPC method has (must fit this call!). + public void RPC(string methodName, RpcTarget target, params object[] parameters) + { + PhotonNetwork.RPC(this, methodName, target, false, parameters); + } + + /// + /// Call a RPC method of this GameObject on remote clients of this room (or on all, including this client). + /// + /// + /// [Remote Procedure Calls](@ref rpcManual) are an essential tool in making multiplayer games with PUN. + /// It enables you to make every client in a room call a specific method. + /// + /// RPC calls can target "All" or the "Others". + /// Usually, the target "All" gets executed locally immediately after sending the RPC. + /// The "*ViaServer" options send the RPC to the server and execute it on this client when it's sent back. + /// Of course, calls are affected by this client's lag and that of remote clients. + /// + /// Each call automatically is routed to the same PhotonView (and GameObject) that was used on the + /// originating client. + /// + /// See: [Remote Procedure Calls](@ref rpcManual). + /// + ///The name of a fitting method that was has the RPC attribute. + ///The group of targets and the way the RPC gets sent. + /// + ///The parameters that the RPC method has (must fit this call!). + public void RpcSecure(string methodName, RpcTarget target, bool encrypt, params object[] parameters) + { + PhotonNetwork.RPC(this, methodName, target, encrypt, parameters); + } + + /// + /// Call a RPC method of this GameObject on remote clients of this room (or on all, including this client). + /// + /// + /// [Remote Procedure Calls](@ref rpcManual) are an essential tool in making multiplayer games with PUN. + /// It enables you to make every client in a room call a specific method. + /// + /// This method allows you to make an RPC calls on a specific player's client. + /// Of course, calls are affected by this client's lag and that of remote clients. + /// + /// Each call automatically is routed to the same PhotonView (and GameObject) that was used on the + /// originating client. + /// + /// See: [Remote Procedure Calls](@ref rpcManual). + /// + /// The name of a fitting method that was has the RPC attribute. + /// The group of targets and the way the RPC gets sent. + /// The parameters that the RPC method has (must fit this call!). + public void RPC(string methodName, Player targetPlayer, params object[] parameters) + { + PhotonNetwork.RPC(this, methodName, targetPlayer, false, parameters); + } + + /// + /// Call a RPC method of this GameObject on remote clients of this room (or on all, including this client). + /// + /// + /// [Remote Procedure Calls](@ref rpcManual) are an essential tool in making multiplayer games with PUN. + /// It enables you to make every client in a room call a specific method. + /// + /// This method allows you to make an RPC calls on a specific player's client. + /// Of course, calls are affected by this client's lag and that of remote clients. + /// + /// Each call automatically is routed to the same PhotonView (and GameObject) that was used on the + /// originating client. + /// + /// See: [Remote Procedure Calls](@ref rpcManual). + /// + ///The name of a fitting method that was has the RPC attribute. + ///The group of targets and the way the RPC gets sent. + /// + ///The parameters that the RPC method has (must fit this call!). + public void RpcSecure(string methodName, Player targetPlayer, bool encrypt, params object[] parameters) + { + PhotonNetwork.RPC(this, methodName, targetPlayer, encrypt, parameters); + } + + public static PhotonView Get(Component component) + { + return component.transform.GetParentComponent(); + } + + public static PhotonView Get(GameObject gameObj) + { + return gameObj.transform.GetParentComponent(); + } + + /// + /// Finds the PhotonView Component with a viewID in the scene + /// + /// + /// The PhotonView with ViewID. Returns null if none found + public static PhotonView Find(int viewID) + { + return PhotonNetwork.GetPhotonView(viewID); + } + + + #region Callback Interfaces + + + private struct CallbackTargetChange + { + public IPhotonViewCallback obj; + public Type type; + public bool add; + + public CallbackTargetChange(IPhotonViewCallback obj, Type type, bool add) + { + this.obj = obj; + this.type = type; + this.add = add; + } + } + + private Queue CallbackChangeQueue = new Queue(); + + private List OnPreNetDestroyCallbacks; + private List OnOwnerChangeCallbacks; + private List OnControllerChangeCallbacks; + + /// + /// Add object to all applicable callback interfaces. Object must implement at least one IOnPhotonViewCallback derived interface. + /// + /// An object that implements OnPhotonView callback interface(s). + public void AddCallbackTarget(IPhotonViewCallback obj) + { + CallbackChangeQueue.Enqueue(new CallbackTargetChange(obj, null, true)); + } + + /// + /// Remove object from all applicable callback interfaces. Object must implement at least one IOnPhotonViewCallback derived interface. + /// + /// An object that implements OnPhotonView callback interface(s). + public void RemoveCallbackTarget(IPhotonViewCallback obj) + { + CallbackChangeQueue.Enqueue(new CallbackTargetChange(obj, null, false)); + } + + /// + /// Add object to this PhotonView's callback. + /// T is the IOnPhotonViewCallback derived interface you want added to its associated callback list. + /// Supplying IOnPhotonViewCallback (the interface base class) as T will add ALL implemented IOnPhotonViewCallback Interfaces found on the object. + /// + public void AddCallback(IPhotonViewCallback obj) where T : class, IPhotonViewCallback + { + CallbackChangeQueue.Enqueue(new CallbackTargetChange(obj, typeof(T), true)); + } + + /// + /// Remove object from this PhotonView's callback list for T. + /// T is the IOnPhotonViewCallback derived interface you want removed from its associated callback list. + /// Supplying IOnPhotonViewCallback (the interface base class) as T will remove ALL implemented IOnPhotonViewCallback Interfaces found on the object. + /// + public void RemoveCallback(IPhotonViewCallback obj) where T : class, IPhotonViewCallback + { + CallbackChangeQueue.Enqueue(new CallbackTargetChange(obj, typeof(T), false)); + } + + /// + /// Apply any queued add/remove of interfaces from the callback lists. Typically called before looping callback lists. + /// + private void UpdateCallbackLists() + { + while (CallbackChangeQueue.Count > 0) + { + var item = CallbackChangeQueue.Dequeue(); + var obj = item.obj; + var type = item.type; + var add = item.add; + + if (type == null) + { + TryRegisterCallback(obj, ref OnPreNetDestroyCallbacks, add); + TryRegisterCallback(obj, ref OnOwnerChangeCallbacks, add); + TryRegisterCallback(obj, ref OnControllerChangeCallbacks, add); + } + else if (type == typeof(IOnPhotonViewPreNetDestroy)) + RegisterCallback(obj as IOnPhotonViewPreNetDestroy, ref OnPreNetDestroyCallbacks, add); + + else if (type == typeof(IOnPhotonViewOwnerChange)) + RegisterCallback(obj as IOnPhotonViewOwnerChange, ref OnOwnerChangeCallbacks, add); + + else if (type == typeof(IOnPhotonViewControllerChange)) + RegisterCallback(obj as IOnPhotonViewControllerChange, ref OnControllerChangeCallbacks, add); + } + } + + private void TryRegisterCallback(IPhotonViewCallback obj, ref List list, bool add) where T : class, IPhotonViewCallback + { + T iobj = obj as T; + if (iobj != null) + { + RegisterCallback(iobj, ref list, add); + } + } + + private void RegisterCallback(T obj, ref List list, bool add) where T : class, IPhotonViewCallback + { + if (ReferenceEquals(list, null)) + list = new List(); + + if (add) + { + if (!list.Contains(obj)) + list.Add(obj); + } + else + { + if (list.Contains(obj)) + list.Remove(obj); + } + } + + + #endregion Callback Interfaces + + + public override string ToString() + { + return string.Format("View {0}{3} on {1} {2}", this.ViewID, (this.gameObject != null) ? this.gameObject.name : "GO==null", (this.IsRoomView) ? "(scene)" : string.Empty, this.Prefix > 0 ? "lvl" + this.Prefix : ""); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs.meta new file mode 100644 index 00000000..7d5ee1bc --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PhotonView.cs.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: aa584fbee541324448dd18d8409c7a41 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: -16000 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PunClasses.cs b/Assets/Photon/PhotonUnityNetworking/Code/PunClasses.cs new file mode 100644 index 00000000..5fb74597 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PunClasses.cs @@ -0,0 +1,974 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Wraps up smaller classes that don't need their own file. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +#pragma warning disable 1587 +/// \defgroup publicApi Public API +/// \brief Groups the most important classes that you need to understand early on. +/// +/// \defgroup optionalGui Optional Gui Elements +/// \brief Useful GUI elements for PUN. +/// +/// \defgroup callbacks Callbacks +/// \brief Callback Interfaces +#pragma warning restore 1587 + + +namespace Photon.Pun +{ + using System; + using System.Collections.Generic; + using System.Reflection; + using ExitGames.Client.Photon; + using UnityEngine; + using UnityEngine.SceneManagement; + using Photon.Realtime; + using SupportClassPun = ExitGames.Client.Photon.SupportClass; + + + /// Replacement for RPC attribute with different name. Used to flag methods as remote-callable. + public class PunRPC : Attribute + { + } + + /// + /// This class adds the property photonView, while logging a warning when your game still uses the networkView. + /// + public class MonoBehaviourPun : MonoBehaviour + { + /// Cache field for the PhotonView on this GameObject. + private PhotonView pvCache; + + /// A cached reference to a PhotonView on this GameObject. + /// + /// If you intend to work with a PhotonView in a script, it's usually easier to write this.photonView. + /// + /// If you intend to remove the PhotonView component from the GameObject but keep this Photon.MonoBehaviour, + /// avoid this reference or modify this code to use PhotonView.Get(obj) instead. + /// + public PhotonView photonView + { + get + { + #if UNITY_EDITOR + // In the editor we want to avoid caching this at design time, so changes in PV structure appear immediately. + if (!Application.isPlaying || this.pvCache == null) + { + this.pvCache = PhotonView.Get(this); + } + #else + if (this.pvCache == null) + { + this.pvCache = PhotonView.Get(this); + } + #endif + return this.pvCache; + } + } + + //#if UNITY_EDITOR + //protected virtual void Reset() + //{ + // this.pvCache = this.transform.GetParentComponent(); + + // if (this.pvCache == null) + // { + // Debug.LogWarning(this.GetType().Name + " requires a PhotonView. No PhotonView was found, so one is being added to GameObject '" + this.transform.root.name + "'"); + // this.pvCache = this.transform.root.gameObject.AddComponent(); + // } + //} + //#endif + } + + + /// + /// This class provides a .photonView and all callbacks/events that PUN can call. Override the events/methods you want to use. + /// + /// + /// By extending this class, you can implement individual methods as override. + /// + /// Do not add new MonoBehaviour.OnEnable or MonoBehaviour.OnDisable + /// Instead, you should override those and call base.OnEnable and base.OnDisable. + /// + /// Visual Studio and MonoDevelop should provide the list of methods when you begin typing "override". + /// Your implementation does not have to call "base.method()". + /// + /// This class implements all callback interfaces and extends . + /// + /// \ingroup callbacks + // the documentation for the interface methods becomes inherited when Doxygen builds it. + public class MonoBehaviourPunCallbacks : MonoBehaviourPun, IConnectionCallbacks , IMatchmakingCallbacks , IInRoomCallbacks, ILobbyCallbacks, IWebRpcCallback, IErrorInfoCallback + { + public virtual void OnEnable() + { + PhotonNetwork.AddCallbackTarget(this); + } + + public virtual void OnDisable() + { + PhotonNetwork.RemoveCallbackTarget(this); + } + + /// + /// Called to signal that the raw connection got established but before the client can call operation on the server. + /// + /// + /// After the (low level transport) connection is established, the client will automatically send + /// the Authentication operation, which needs to get a response before the client can call other operations. + /// + /// Your logic should wait for either: OnRegionListReceived or OnConnectedToMaster. + /// + /// This callback is useful to detect if the server can be reached at all (technically). + /// Most often, it's enough to implement OnDisconnected(). + /// + /// This is not called for transitions from the masterserver to game servers. + /// + public virtual void OnConnected() + { + } + + /// + /// Called when the local user/client left a room, so the game's logic can clean up it's internal state. + /// + /// + /// When leaving a room, the LoadBalancingClient will disconnect the Game Server and connect to the Master Server. + /// This wraps up multiple internal actions. + /// + /// Wait for the callback OnConnectedToMaster, before you use lobbies and join or create rooms. + /// + public virtual void OnLeftRoom() + { + } + + /// + /// Called after switching to a new MasterClient when the current one leaves. + /// + /// + /// This is not called when this client enters a room. + /// The former MasterClient is still in the player list when this method get called. + /// + public virtual void OnMasterClientSwitched(Player newMasterClient) + { + } + + /// + /// Called when the server couldn't create a room (OpCreateRoom failed). + /// + /// + /// The most common cause to fail creating a room, is when a title relies on fixed room-names and the room already exists. + /// + /// Operation ReturnCode from the server. + /// Debug message for the error. + public virtual void OnCreateRoomFailed(short returnCode, string message) + { + } + + /// + /// Called when a previous OpJoinRoom call failed on the server. + /// + /// + /// The most common causes are that a room is full or does not exist (due to someone else being faster or closing the room). + /// + /// Operation ReturnCode from the server. + /// Debug message for the error. + public virtual void OnJoinRoomFailed(short returnCode, string message) + { + } + + /// + /// Called when this client created a room and entered it. OnJoinedRoom() will be called as well. + /// + /// + /// This callback is only called on the client which created a room (see OpCreateRoom). + /// + /// As any client might close (or drop connection) anytime, there is a chance that the + /// creator of a room does not execute OnCreatedRoom. + /// + /// If you need specific room properties or a "start signal", implement OnMasterClientSwitched() + /// and make each new MasterClient check the room's state. + /// + public virtual void OnCreatedRoom() + { + } + + /// + /// Called on entering a lobby on the Master Server. The actual room-list updates will call OnRoomListUpdate. + /// + /// + /// While in the lobby, the roomlist is automatically updated in fixed intervals (which you can't modify in the public cloud). + /// The room list gets available via OnRoomListUpdate. + /// + public virtual void OnJoinedLobby() + { + } + + /// + /// Called after leaving a lobby. + /// + /// + /// When you leave a lobby, [OpCreateRoom](@ref OpCreateRoom) and [OpJoinRandomRoom](@ref OpJoinRandomRoom) + /// automatically refer to the default lobby. + /// + public virtual void OnLeftLobby() + { + } + + /// + /// Called after disconnecting from the Photon server. It could be a failure or intentional + /// + /// + /// The reason for this disconnect is provided as DisconnectCause. + /// + public virtual void OnDisconnected(DisconnectCause cause) + { + } + + /// + /// Called when the Name Server provided a list of regions for your title. + /// + /// Check the RegionHandler class description, to make use of the provided values. + /// The currently used RegionHandler. + public virtual void OnRegionListReceived(RegionHandler regionHandler) + { + } + + /// + /// Called for any update of the room-listing while in a lobby (InLobby) on the Master Server. + /// + /// + /// Each item is a RoomInfo which might include custom properties (provided you defined those as lobby-listed when creating a room). + /// Not all types of lobbies provide a listing of rooms to the client. Some are silent and specialized for server-side matchmaking. + /// + public virtual void OnRoomListUpdate(List roomList) + { + } + + /// + /// Called when the LoadBalancingClient entered a room, no matter if this client created it or simply joined. + /// + /// + /// When this is called, you can access the existing players in Room.Players, their custom properties and Room.CustomProperties. + /// + /// In this callback, you could create player objects. For example in Unity, instantiate a prefab for the player. + /// + /// If you want a match to be started "actively", enable the user to signal "ready" (using OpRaiseEvent or a Custom Property). + /// + public virtual void OnJoinedRoom() + { + } + + /// + /// Called when a remote player entered the room. This Player is already added to the playerlist. + /// + /// + /// If your game starts with a certain number of players, this callback can be useful to check the + /// Room.playerCount and find out if you can start. + /// + public virtual void OnPlayerEnteredRoom(Player newPlayer) + { + } + + /// + /// Called when a remote player left the room or became inactive. Check otherPlayer.IsInactive. + /// + /// + /// If another player leaves the room or if the server detects a lost connection, this callback will + /// be used to notify your game logic. + /// + /// Depending on the room's setup, players may become inactive, which means they may return and retake + /// their spot in the room. In such cases, the Player stays in the Room.Players dictionary. + /// + /// If the player is not just inactive, it gets removed from the Room.Players dictionary, before + /// the callback is called. + /// + public virtual void OnPlayerLeftRoom(Player otherPlayer) + { + } + + /// + /// Called when a previous OpJoinRandom call failed on the server. + /// + /// + /// The most common causes are that a room is full or does not exist (due to someone else being faster or closing the room). + /// + /// When using multiple lobbies (via OpJoinLobby or a TypedLobby parameter), another lobby might have more/fitting rooms.
+ ///
+ /// Operation ReturnCode from the server. + /// Debug message for the error. + public virtual void OnJoinRandomFailed(short returnCode, string message) + { + } + + /// + /// Called when the client is connected to the Master Server and ready for matchmaking and other tasks. + /// + /// + /// The list of available rooms won't become available unless you join a lobby via LoadBalancingClient.OpJoinLobby. + /// You can join rooms and create them even without being in a lobby. The default lobby is used in that case. + /// + public virtual void OnConnectedToMaster() + { + } + + /// + /// Called when a room's custom properties changed. The propertiesThatChanged contains all that was set via Room.SetCustomProperties. + /// + /// + /// Since v1.25 this method has one parameter: Hashtable propertiesThatChanged.
+ /// Changing properties must be done by Room.SetCustomProperties, which causes this callback locally, too. + ///
+ /// + public virtual void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) + { + } + + /// + /// Called when custom player-properties are changed. Player and the changed properties are passed as object[]. + /// + /// + /// Changing properties must be done by Player.SetCustomProperties, which causes this callback locally, too. + /// + /// + /// Contains Player that changed. + /// Contains the properties that changed. + public virtual void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) + { + } + + /// + /// Called when the server sent the response to a FindFriends request. + /// + /// + /// After calling OpFindFriends, the Master Server will cache the friend list and send updates to the friend + /// list. The friends includes the name, userId, online state and the room (if any) for each requested user/friend. + /// + /// Use the friendList to update your UI and store it, if the UI should highlight changes. + /// + public virtual void OnFriendListUpdate(List friendList) + { + } + + /// + /// Called when your Custom Authentication service responds with additional data. + /// + /// + /// Custom Authentication services can include some custom data in their response. + /// When present, that data is made available in this callback as Dictionary. + /// While the keys of your data have to be strings, the values can be either string or a number (in Json). + /// You need to make extra sure, that the value type is the one you expect. Numbers become (currently) int64. + /// + /// Example: void OnCustomAuthenticationResponse(Dictionary<string, object> data) { ... } + /// + /// + public virtual void OnCustomAuthenticationResponse(Dictionary data) + { + } + + /// + /// Called when the custom authentication failed. Followed by disconnect! + /// + /// + /// Custom Authentication can fail due to user-input, bad tokens/secrets. + /// If authentication is successful, this method is not called. Implement OnJoinedLobby() or OnConnectedToMaster() (as usual). + /// + /// During development of a game, it might also fail due to wrong configuration on the server side. + /// In those cases, logging the debugMessage is very important. + /// + /// Unless you setup a custom authentication service for your app (in the [Dashboard](https://dashboard.photonengine.com)), + /// this won't be called! + /// + /// Contains a debug message why authentication failed. This has to be fixed during development. + public virtual void OnCustomAuthenticationFailed (string debugMessage) + { + } + + //TODO: Check if this needs to be implemented + // in: IOptionalInfoCallbacks + public virtual void OnWebRpcResponse(OperationResponse response) + { + } + + //TODO: Check if this needs to be implemented + // in: IOptionalInfoCallbacks + public virtual void OnLobbyStatisticsUpdate(List lobbyStatistics) + { + } + + /// + /// Called when the client receives an event from the server indicating that an error happened there. + /// + /// + /// In most cases this could be either: + /// 1. an error from webhooks plugin (if HasErrorInfo is enabled), read more here: + /// https://doc.photonengine.com/en-us/realtime/current/gameplay/web-extensions/webhooks#options + /// 2. an error sent from a custom server plugin via PluginHost.BroadcastErrorInfoEvent, see example here: + /// https://doc.photonengine.com/en-us/server/current/plugins/manual#handling_http_response + /// 3. an error sent from the server, for example, when the limit of cached events has been exceeded in the room + /// (all clients will be disconnected and the room will be closed in this case) + /// read more here: https://doc.photonengine.com/en-us/realtime/current/gameplay/cached-events#special_considerations + /// + /// object containing information about the error + public virtual void OnErrorInfo(ErrorInfo errorInfo) + { + } + } + + + /// + /// Container class for info about a particular message, RPC or update. + /// + /// \ingroup publicApi + public struct PhotonMessageInfo + { + private readonly int timeInt; + /// The sender of a message / event. May be null. + public readonly Player Sender; + public readonly PhotonView photonView; + + public PhotonMessageInfo(Player player, int timestamp, PhotonView view) + { + this.Sender = player; + this.timeInt = timestamp; + this.photonView = view; + } + + [Obsolete("Use SentServerTime instead.")] + public double timestamp + { + get + { + uint u = (uint) this.timeInt; + double t = u; + return t / 1000.0d; + } + } + + public double SentServerTime + { + get + { + uint u = (uint)this.timeInt; + double t = u; + return t / 1000.0d; + } + } + + public int SentServerTimestamp + { + get { return this.timeInt; } + } + + public override string ToString() + { + return string.Format("[PhotonMessageInfo: Sender='{1}' Senttime={0}]", this.SentServerTime, this.Sender); + } + } + + + + /// Defines Photon event-codes as used by PUN. + internal class PunEvent + { + public const byte RPC = 200; + public const byte SendSerialize = 201; + public const byte Instantiation = 202; + public const byte CloseConnection = 203; + public const byte Destroy = 204; + public const byte RemoveCachedRPCs = 205; + public const byte SendSerializeReliable = 206; // TS: added this but it's not really needed anymore + public const byte DestroyPlayer = 207; // TS: added to make others remove all GOs of a player + public const byte OwnershipRequest = 209; + public const byte OwnershipTransfer = 210; + public const byte VacantViewIds = 211; + public const byte OwnershipUpdate = 212; + } + + + /// + /// This container is used in OnPhotonSerializeView() to either provide incoming data of a PhotonView or for you to provide it. + /// + /// + /// The IsWriting property will be true if this client is the "owner" of the PhotonView (and thus the GameObject). + /// Add data to the stream and it's sent via the server to the other players in a room. + /// On the receiving side, IsWriting is false and the data should be read. + /// + /// Send as few data as possible to keep connection quality up. An empty PhotonStream will not be sent. + /// + /// Use either Serialize() for reading and writing or SendNext() and ReceiveNext(). The latter two are just explicit read and + /// write methods but do about the same work as Serialize(). It's a matter of preference which methods you use. + /// + /// \ingroup publicApi + public class PhotonStream + { + private List writeData; + private object[] readData; + private int currentItem; //Used to track the next item to receive. + + /// If true, this client should add data to the stream to send it. + public bool IsWriting { get; private set; } + + /// If true, this client should read data send by another client. + public bool IsReading + { + get { return !this.IsWriting; } + } + + /// Count of items in the stream. + public int Count + { + get { return this.IsWriting ? this.writeData.Count : this.readData.Length; } + } + + /// + /// Creates a stream and initializes it. Used by PUN internally. + /// + public PhotonStream(bool write, object[] incomingData) + { + this.IsWriting = write; + + if (!write && incomingData != null) + { + this.readData = incomingData; + } + } + + public void SetReadStream(object[] incomingData, int pos = 0) + { + this.readData = incomingData; + this.currentItem = pos; + this.IsWriting = false; + } + + internal void SetWriteStream(List newWriteData, int pos = 0) + { + if (pos != newWriteData.Count) + { + throw new Exception("SetWriteStream failed, because count does not match position value. pos: "+ pos + " newWriteData.Count:" + newWriteData.Count); + } + this.writeData = newWriteData; + this.currentItem = pos; + this.IsWriting = true; + } + + internal List GetWriteStream() + { + return this.writeData; + } + + + [Obsolete("Either SET the writeData with an empty List or use Clear().")] + internal void ResetWriteStream() + { + this.writeData.Clear(); + } + + /// Read next piece of data from the stream when IsReading is true. + public object ReceiveNext() + { + if (this.IsWriting) + { + Debug.LogError("Error: you cannot read this stream that you are writing!"); + return null; + } + + object obj = this.readData[this.currentItem]; + this.currentItem++; + return obj; + } + + /// Read next piece of data from the stream without advancing the "current" item. + public object PeekNext() + { + if (this.IsWriting) + { + Debug.LogError("Error: you cannot read this stream that you are writing!"); + return null; + } + + object obj = this.readData[this.currentItem]; + //this.currentItem++; + return obj; + } + + /// Add another piece of data to send it when IsWriting is true. + public void SendNext(object obj) + { + if (!this.IsWriting) + { + Debug.LogError("Error: you cannot write/send to this stream that you are reading!"); + return; + } + + this.writeData.Add(obj); + } + + [Obsolete("writeData is a list now. Use and re-use it directly.")] + public bool CopyToListAndClear(List target) + { + if (!this.IsWriting) return false; + + target.AddRange(this.writeData); + this.writeData.Clear(); + + return true; + } + + /// Turns the stream into a new object[]. + public object[] ToArray() + { + return this.IsWriting ? this.writeData.ToArray() : this.readData; + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref bool myBool) + { + if (this.IsWriting) + { + this.writeData.Add(myBool); + } + else + { + if (this.readData.Length > this.currentItem) + { + myBool = (bool) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref int myInt) + { + if (this.IsWriting) + { + this.writeData.Add(myInt); + } + else + { + if (this.readData.Length > this.currentItem) + { + myInt = (int) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref string value) + { + if (this.IsWriting) + { + this.writeData.Add(value); + } + else + { + if (this.readData.Length > this.currentItem) + { + value = (string) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref char value) + { + if (this.IsWriting) + { + this.writeData.Add(value); + } + else + { + if (this.readData.Length > this.currentItem) + { + value = (char) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref short value) + { + if (this.IsWriting) + { + this.writeData.Add(value); + } + else + { + if (this.readData.Length > this.currentItem) + { + value = (short) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref float obj) + { + if (this.IsWriting) + { + this.writeData.Add(obj); + } + else + { + if (this.readData.Length > this.currentItem) + { + obj = (float) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref Player obj) + { + if (this.IsWriting) + { + this.writeData.Add(obj); + } + else + { + if (this.readData.Length > this.currentItem) + { + obj = (Player) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref Vector3 obj) + { + if (this.IsWriting) + { + this.writeData.Add(obj); + } + else + { + if (this.readData.Length > this.currentItem) + { + obj = (Vector3) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref Vector2 obj) + { + if (this.IsWriting) + { + this.writeData.Add(obj); + } + else + { + if (this.readData.Length > this.currentItem) + { + obj = (Vector2) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + + /// + /// Will read or write the value, depending on the stream's IsWriting value. + /// + public void Serialize(ref Quaternion obj) + { + if (this.IsWriting) + { + this.writeData.Add(obj); + } + else + { + if (this.readData.Length > this.currentItem) + { + obj = (Quaternion) this.readData[this.currentItem]; + this.currentItem++; + } + } + } + } + + + public class SceneManagerHelper + { + public static string ActiveSceneName + { + get + { + Scene s = SceneManager.GetActiveScene(); + return s.name; + } + } + + public static int ActiveSceneBuildIndex + { + get { return SceneManager.GetActiveScene().buildIndex; } + } + + + #if UNITY_EDITOR + /// In Editor, we can access the active scene's name. + public static string EditorActiveSceneName + { + get { return SceneManager.GetActiveScene().name; } + } + #endif + } + + + /// + /// The default implementation of a PrefabPool for PUN, which actually Instantiates and Destroys GameObjects but pools a resource. + /// + /// + /// This pool is not actually storing GameObjects for later reuse. Instead, it's destroying used GameObjects. + /// However, prefabs will be loaded from a Resources folder and cached, which speeds up Instantiation a bit. + /// + /// The ResourceCache is public, so it can be filled without relying on the Resources folders. + /// + public class DefaultPool : IPunPrefabPool + { + /// Contains a GameObject per prefabId, to speed up instantiation. + public readonly Dictionary ResourceCache = new Dictionary(); + + /// Returns an inactive instance of a networked GameObject, to be used by PUN. + /// String identifier for the networked object. + /// Location of the new object. + /// Rotation of the new object. + /// + public GameObject Instantiate(string prefabId, Vector3 position, Quaternion rotation) + { + GameObject res = null; + bool cached = this.ResourceCache.TryGetValue(prefabId, out res); + if (!cached) + { + res = Resources.Load(prefabId); + if (res == null) + { + Debug.LogError("DefaultPool failed to load \"" + prefabId + "\". Make sure it's in a \"Resources\" folder. Or use a custom IPunPrefabPool."); + } + else + { + this.ResourceCache.Add(prefabId, res); + } + } + + bool wasActive = res.activeSelf; + if (wasActive) res.SetActive(false); + + GameObject instance =GameObject.Instantiate(res, position, rotation) as GameObject; + + if (wasActive) res.SetActive(true); + return instance; + } + + /// Simply destroys a GameObject. + /// The GameObject to get rid of. + public void Destroy(GameObject gameObject) + { + GameObject.Destroy(gameObject); + } + } + + + /// Small number of extension methods that make it easier for PUN to work cross-Unity-versions. + public static class PunExtensions + { + public static Dictionary ParametersOfMethods = new Dictionary(); + + public static ParameterInfo[] GetCachedParemeters(this MethodInfo mo) + { + ParameterInfo[] result; + bool cached = ParametersOfMethods.TryGetValue(mo, out result); + + if (!cached) + { + result = mo.GetParameters(); + ParametersOfMethods[mo] = result; + } + + return result; + } + + public static PhotonView[] GetPhotonViewsInChildren(this UnityEngine.GameObject go) + { + return go.GetComponentsInChildren(true) as PhotonView[]; + } + + public static PhotonView GetPhotonView(this UnityEngine.GameObject go) + { + return go.GetComponent() as PhotonView; + } + + /// compares the squared magnitude of target - second to given float value + public static bool AlmostEquals(this Vector3 target, Vector3 second, float sqrMagnitudePrecision) + { + return (target - second).sqrMagnitude < sqrMagnitudePrecision; // TODO: inline vector methods to optimize? + } + + /// compares the squared magnitude of target - second to given float value + public static bool AlmostEquals(this Vector2 target, Vector2 second, float sqrMagnitudePrecision) + { + return (target - second).sqrMagnitude < sqrMagnitudePrecision; // TODO: inline vector methods to optimize? + } + + /// compares the angle between target and second to given float value + public static bool AlmostEquals(this Quaternion target, Quaternion second, float maxAngle) + { + return Quaternion.Angle(target, second) < maxAngle; + } + + /// compares two floats and returns true of their difference is less than floatDiff + public static bool AlmostEquals(this float target, float second, float floatDiff) + { + return Mathf.Abs(target - second) < floatDiff; + } + + + public static bool CheckIsAssignableFrom(this Type to, Type from) + { + #if !NETFX_CORE + return to.IsAssignableFrom(from); + #else + return to.GetTypeInfo().IsAssignableFrom(from.GetTypeInfo()); + #endif + } + + public static bool CheckIsInterface(this Type to) + { + #if !NETFX_CORE + return to.IsInterface; + #else + return to.GetTypeInfo().IsInterface; + #endif + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/PunClasses.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/PunClasses.cs.meta new file mode 100644 index 00000000..94dc7738 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/PunClasses.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f40f16a0227e5c14293e269c875c0f9b +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/ServerSettings.cs b/Assets/Photon/PhotonUnityNetworking/Code/ServerSettings.cs new file mode 100644 index 00000000..021c85ab --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/ServerSettings.cs @@ -0,0 +1,100 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// ScriptableObject defining a server setup. An instance is created as PhotonServerSettings. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System; + using System.Collections.Generic; + using ExitGames.Client.Photon; + using Photon.Realtime; + using UnityEngine; + + /// + /// Collection of connection-relevant settings, used internally by PhotonNetwork.ConnectUsingSettings. + /// + /// + /// Includes the AppSettings class from the Realtime APIs plus some other, PUN-relevant, settings. + [Serializable] + [HelpURL("https://doc.photonengine.com/en-us/pun/v2/getting-started/initial-setup")] + public class ServerSettings : ScriptableObject + { + [Tooltip("Core Photon Server/Cloud settings.")] + public AppSettings AppSettings; + + /// Region that will be used by the Editor and Development Builds. This ensures all users will be in the same region for testing. + [Tooltip("Developer build override for Best Region.")] + public string DevRegion; + + [Tooltip("Log output by PUN.")] + public PunLogLevel PunLogging = PunLogLevel.ErrorsOnly; + + [Tooltip("Logs additional info for debugging.")] + public bool EnableSupportLogger; + + [Tooltip("Enables apps to keep the connection without focus.")] + public bool RunInBackground = true; + + [Tooltip("Simulates an online connection.\nPUN can be used as usual.")] + public bool StartInOfflineMode; + + [Tooltip("RPC name list.\nUsed as shortcut when sending calls.")] + public List RpcList = new List(); // set by scripts and or via Inspector + + #if UNITY_EDITOR + public bool DisableAutoOpenWizard; + public bool ShowSettings; + public bool DevRegionSetOnce; + #endif + + /// Sets appid and region code in the AppSettings. Used in Editor. + public void UseCloud(string cloudAppid, string code = "") + { + this.AppSettings.AppIdRealtime = cloudAppid; + this.AppSettings.Server = null; + this.AppSettings.FixedRegion = string.IsNullOrEmpty(code) ? null : code; + } + + /// Checks if a string is a Guid by attempting to create one. + /// The potential guid to check. + /// True if new Guid(val) did not fail. + public static bool IsAppId(string val) + { + try + { + new Guid(val); + } + catch + { + return false; + } + return true; + } + + /// Gets the "best region summary" from the preferences. + /// The best region code in preferences. + public static string BestRegionSummaryInPreferences + { + get { return PhotonNetwork.BestRegionSummaryInPreferences; } + } + + /// Sets the "best region summary" in the preferences to null. On next start, the client will ping all available. + public static void ResetBestRegionCodeInPreferences() + { + PhotonNetwork.BestRegionSummaryInPreferences = null; + } + + /// String summary of the AppSettings. + public override string ToString() + { + return "ServerSettings: " + this.AppSettings.ToStringFull(); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/ServerSettings.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/ServerSettings.cs.meta new file mode 100644 index 00000000..401bf342 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/ServerSettings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9f3758f8f58fdef43803eb9be1df0608 +labels: +- ExitGames +- PUN +- Photon +- Networking +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Utilities.meta b/Assets/Photon/PhotonUnityNetworking/Code/Utilities.meta new file mode 100644 index 00000000..2b0880b0 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Utilities.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d67e11e5c968e60489b4eeec4d85e165 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Utilities/NestedComponentUtilities.cs b/Assets/Photon/PhotonUnityNetworking/Code/Utilities/NestedComponentUtilities.cs new file mode 100644 index 00000000..d825e9cb --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Utilities/NestedComponentUtilities.cs @@ -0,0 +1,494 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace Photon.Pun +{ + + public static class NestedComponentUtilities + { + + public static T EnsureRootComponentExists(this Transform transform) + where T : Component + where NestedT : Component + { + var root = GetParentComponent(transform); + if (root) + { + var comp = root.GetComponent(); + + if (comp) + return comp; + + return root.gameObject.AddComponent(); + } + + return null; + } + + #region GetComponent Replacements + + // Recycled collections + private static Queue nodesQueue = new Queue(); + public static Dictionary searchLists = new Dictionary(); + private static Stack nodeStack = new Stack(); + + /// + /// Find T on supplied transform or any parent. Unlike GetComponentInParent, GameObjects do not need to be active to be found. + /// + public static T GetParentComponent(this Transform t) + where T : Component + { + T found = t.GetComponent(); + + if (found) + return found; + + var par = t.parent; + while (par) + { + found = par.GetComponent(); + if (found) + return found; + par = par.parent; + } + return null; + } + + + /// + /// Returns all T found between the child transform and its root. Order in List from child to parent, with the root/parent most being last. + /// + /// + /// + public static void GetNestedComponentsInParents(this Transform t, List list) + where T : Component + { + list.Clear(); + + while (t != null) + { + T obj = t.GetComponent(); + if (obj) + list.Add(obj); + + t = t.parent; + } + } + + public static T GetNestedComponentInChildren(this Transform t, bool includeInactive) + where T : class + where NestedT : class + { + // Look for the most obvious check first on the root. + var found = t.GetComponent(); + if (!ReferenceEquals(found, null)) + return found; + + // No root found, start testing layer by layer - root is the first layer. Add to queue. + nodesQueue.Clear(); + nodesQueue.Enqueue(t); + + while (nodesQueue.Count > 0) + { + var node = nodesQueue.Dequeue(); + + for (int c = 0, ccnt = node.childCount; c < ccnt; ++c) + { + var child = node.GetChild(c); + + // Ignore branches that are not active + if (!includeInactive && !child.gameObject.activeSelf) + continue; + + // Hit a nested node - don't search this node + if (!ReferenceEquals(child.GetComponent(), null)) + continue; + + // see if what we are looking for is on this node + found = child.GetComponent(); + + // Return if we found what we are looking for + if (!ReferenceEquals(found, null)) + return found; + + // Add node to queue for next depth pass since nothing was found on this layer. + nodesQueue.Enqueue(child); + } + + } + return found; + } + + /// + /// Same as GetComponentInParent, but will always include inactive objects in search. + /// + /// + /// + /// + /// + public static T GetNestedComponentInParent(this Transform t) + where T : class + where NestedT : class + { + T found = null; + + Transform node = t; + do + { + + found = node.GetComponent(); + + if (!ReferenceEquals(found, null)) + return found; + + // stop search on node with PV + if (!ReferenceEquals(node.GetComponent(), null)) + return null; + + node = node.parent; + } + while (!ReferenceEquals(node, null)); + + return null; + } + + /// + /// UNTESTED + /// + /// + /// + /// + /// + public static T GetNestedComponentInParents(this Transform t) + where T : class + where NestedT : class + { + // First try root + var found = t.GetComponent(); + + if (!ReferenceEquals(found, null)) + return found; + + /// Get the reverse list of transforms climbing for start up to netobject + var par = t.parent; + + while (!ReferenceEquals(par, null)) + { + found = par.GetComponent(); + if (!ReferenceEquals(found, null)) + return found; + + /// Stop climbing at the NetObj (this is how we detect nesting + if (!ReferenceEquals(par.GetComponent(), null)) + return null; + + par = par.parent; + }; + + return null; + } + + + /// + /// Finds components of type T on supplied transform, and every parent above that node, inclusively stopping on node StopSearchOnT component. + /// + /// + /// + /// + /// + /// + public static void GetNestedComponentsInParents(this Transform t, List list) + where T : class + where NestedT : class + { + + // Get components on the starting node - this is a given. + t.GetComponents(list); + + // If the starting node has the stop component, we are done. + if (!ReferenceEquals(t.GetComponent(), null)) + return; + + var tnode = t.parent; + + // If there is no parent, we are done. + if (ReferenceEquals(tnode, null)) + return; + + nodeStack.Clear(); + + while (true) + { + // add new parent to stack + nodeStack.Push(tnode); + + // if this node has the Stop, we are done recursing up. + if (!ReferenceEquals(tnode.GetComponent(), null)) + break; + + // Get the next parent node and add it to the stack + tnode = tnode.parent; + + // Stop recursing up if the parent is null + if (ReferenceEquals(tnode, null)) + break; + } + + if (nodeStack.Count == 0) + return; + + System.Type type = typeof(T); + + // Acquire the right searchlist from our pool + List searchList; + if (!searchLists.ContainsKey(type)) + { + searchList = new List(); + searchLists.Add(type, searchList); + } + else + { + searchList = searchLists[type] as List; + } + + // Reverse iterate the nodes found. This produces a GetComponentInParent that starts from the parent Stop down to the provided transform + while (nodeStack.Count > 0) + { + var node = nodeStack.Pop(); + + node.GetComponents(searchList); + list.AddRange(searchList); + } + } + + + /// + /// Same as GetComponentsInChildren, but will not recurse into children with component of the DontRecurseOnT type. This allows nesting of PhotonViews/NetObjects to be respected. + /// + /// + /// + /// Pass null and a reused list will be used. Consume immediately. + public static List GetNestedComponentsInChildren(this Transform t, List list, bool includeInactive = true) + where T : class + where NestedT : class + { + System.Type type = typeof(T); + + // Temp lists are also recycled. Get/Create a reusable List of this type. + List searchList; + if (!searchLists.ContainsKey(type)) + searchLists.Add(type, searchList = new List()); + else + searchList = searchLists[type] as List; + + nodesQueue.Clear(); + + if (list == null) + list = new List(); + + // Get components on starting transform - no exceptions + t.GetComponents(list); + + // Add first layer of children to the queue for next layer processing. + for (int i = 0, cnt = t.childCount; i < cnt; ++i) + { + var child = t.GetChild(i); + + // Ignore inactive nodes (optional) + if (!includeInactive && !child.gameObject.activeSelf) + continue; + + // ignore nested DontRecurseOnT + if (!ReferenceEquals(child.GetComponent(), null)) + continue; + + nodesQueue.Enqueue(child); + } + + // Recurse node layers + while (nodesQueue.Count > 0) + { + var node = nodesQueue.Dequeue(); + + // Add found components on this gameobject node + node.GetComponents(searchList); + list.AddRange(searchList); + + // Add children to the queue for next layer processing. + for (int i = 0, cnt = node.childCount; i < cnt; ++i) + { + var child = node.GetChild(i); + + // Ignore inactive nodes (optional) + if (!includeInactive && !child.gameObject.activeSelf) + continue; + + // ignore nested NestedT + if (!ReferenceEquals(child.GetComponent(), null)) + continue; + + nodesQueue.Enqueue(child); + } + } + + return list; + } + + /// + /// Same as GetComponentsInChildren, but will not recurse into children with component of the DontRecurseOnT type. This allows nesting of PhotonViews/NetObjects to be respected. + /// + /// + /// + /// Pass null and a reused list will be used. Consume immediately. + public static List GetNestedComponentsInChildren(this Transform t, List list, bool includeInactive = true, params System.Type[] stopOn) + where T : class + { + System.Type type = typeof(T); + + // Temp lists are also recycled. Get/Create a reusable List of this type. + List searchList; + if (!searchLists.ContainsKey(type)) + searchLists.Add(type, searchList = new List()); + else + searchList = searchLists[type] as List; + + nodesQueue.Clear(); + + // Get components on starting transform - no exceptions + t.GetComponents(list); + + // Add first layer of children to the queue for next layer processing. + for (int i = 0, cnt = t.childCount; i < cnt; ++i) + { + var child = t.GetChild(i); + + // Ignore inactive nodes (optional) + if (!includeInactive && !child.gameObject.activeSelf) + continue; + + // ignore nested DontRecurseOnT + bool stopRecurse = false; + for (int s = 0, scnt = stopOn.Length; s < scnt; ++s) + { + if (!ReferenceEquals(child.GetComponent(stopOn[s]), null)) + { + stopRecurse = true; + break; + } + } + if (stopRecurse) + continue; + + nodesQueue.Enqueue(child); + } + + // Recurse node layers + while (nodesQueue.Count > 0) + { + var node = nodesQueue.Dequeue(); + + // Add found components on this gameobject node + node.GetComponents(searchList); + list.AddRange(searchList); + + // Add children to the queue for next layer processing. + for (int i = 0, cnt = node.childCount; i < cnt; ++i) + { + var child = node.GetChild(i); + + // Ignore inactive nodes (optional) + if (!includeInactive && !child.gameObject.activeSelf) + continue; + + // ignore nested NestedT + bool stopRecurse = false; + for (int s = 0, scnt = stopOn.Length; s < scnt; ++s) + { + if (!ReferenceEquals(child.GetComponent(stopOn[s]), null)) + { + stopRecurse = true; + break; + } + } + + if (stopRecurse) + continue; + + nodesQueue.Enqueue(child); + } + } + + return list; + } + + /// + /// Same as GetComponentsInChildren, but will not recurse into children with component of the NestedT type. This allows nesting of PhotonViews/NetObjects to be respected. + /// + /// Cast found components to this type. Typically Component, but any other class/interface will work as long as they are assignable from SearchT. + /// Find components of this class or interface type. + /// + /// + /// + /// + /// + public static void GetNestedComponentsInChildren(this Transform t, bool includeInactive, List list) + where T : class + where SearchT : class + { + list.Clear(); + + // If this is inactive, nothing will be found. Give up now if we are restricted to active. + if (!includeInactive && !t.gameObject.activeSelf) + return; + + System.Type searchType = typeof(SearchT); + + // Temp lists are also recycled. Get/Create a reusable List of this type. + List searchList; + if (!searchLists.ContainsKey(searchType)) + searchLists.Add(searchType, searchList = new List()); + else + searchList = searchLists[searchType] as List; + + // Recurse child nodes one layer at a time. Using a Queue allows this to happen without a lot of work. + nodesQueue.Clear(); + nodesQueue.Enqueue(t); + + while (nodesQueue.Count > 0) + { + var node = nodesQueue.Dequeue(); + + // Add found components on this gameobject node + searchList.Clear(); + node.GetComponents(searchList); + foreach (var comp in searchList) + { + var casted = comp as T; + if (!ReferenceEquals(casted, null)) + list.Add(casted); + } + + // Add children to the queue for next layer processing. + for (int i = 0, cnt = node.childCount; i < cnt; ++i) + { + var child = node.GetChild(i); + + // Ignore inactive nodes (optional) + if (!includeInactive && !child.gameObject.activeSelf) + continue; + + // ignore nested DontRecurseOnT + if (!ReferenceEquals(child.GetComponent(), null)) + continue; + + nodesQueue.Enqueue(child); + } + } + + } + + #endregion + } + +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Utilities/NestedComponentUtilities.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Utilities/NestedComponentUtilities.cs.meta new file mode 100644 index 00000000..71efce1d --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Utilities/NestedComponentUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 40bca7ec270007b40a4de315c071f4d3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views.meta b/Assets/Photon/PhotonUnityNetworking/Code/Views.meta new file mode 100644 index 00000000..965d75b3 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: a724ff00b77e85d44a2af6baf46fc6a2 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs new file mode 100644 index 00000000..10381160 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs @@ -0,0 +1,572 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Component to synchronize Mecanim animations via PUN. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using System.Collections.Generic; + using UnityEngine; + + + /// + /// This class helps you to synchronize Mecanim animations + /// Simply add the component to your GameObject and make sure that + /// the PhotonAnimatorView is added to the list of observed components + /// + /// + /// When Using Trigger Parameters, make sure the component that sets the trigger is higher in the stack of Components on the GameObject than 'PhotonAnimatorView' + /// Triggers are raised true during one frame only. + /// + [AddComponentMenu("Photon Networking/Photon Animator View")] + public class PhotonAnimatorView : MonoBehaviourPun, IPunObservable + { + #region Enums + + public enum ParameterType + { + Float = 1, + Int = 3, + Bool = 4, + Trigger = 9, + } + + + public enum SynchronizeType + { + Disabled = 0, + Discrete = 1, + Continuous = 2, + } + + + [System.Serializable] + public class SynchronizedParameter + { + public ParameterType Type; + public SynchronizeType SynchronizeType; + public string Name; + } + + + [System.Serializable] + public class SynchronizedLayer + { + public SynchronizeType SynchronizeType; + public int LayerIndex; + } + + #endregion + + + #region Properties + + #if PHOTON_DEVELOP + public PhotonAnimatorView ReceivingSender; + #endif + + #endregion + + + #region Members + + private bool TriggerUsageWarningDone; + + private Animator m_Animator; + + private PhotonStreamQueue m_StreamQueue = new PhotonStreamQueue(120); + + //These fields are only used in the CustomEditor for this script and would trigger a + //"this variable is never used" warning, which I am suppressing here + #pragma warning disable 0414 + + [HideInInspector] + [SerializeField] + private bool ShowLayerWeightsInspector = true; + + [HideInInspector] + [SerializeField] + private bool ShowParameterInspector = true; + + #pragma warning restore 0414 + + [HideInInspector] + [SerializeField] + private List m_SynchronizeParameters = new List(); + + [HideInInspector] + [SerializeField] + private List m_SynchronizeLayers = new List(); + + private Vector3 m_ReceiverPosition; + private float m_LastDeserializeTime; + private bool m_WasSynchronizeTypeChanged = true; + + /// + /// Cached raised triggers that are set to be synchronized in discrete mode. since a Trigger only stay up for less than a frame, + /// We need to cache it until the next discrete serialization call. + /// + List m_raisedDiscreteTriggersCache = new List(); + + #endregion + + + #region Unity + + private void Awake() + { + this.m_Animator = GetComponent(); + } + + private void Update() + { + if (this.m_Animator.applyRootMotion && this.photonView.IsMine == false && PhotonNetwork.IsConnected == true) + { + this.m_Animator.applyRootMotion = false; + } + + if (PhotonNetwork.InRoom == false || PhotonNetwork.CurrentRoom.PlayerCount <= 1) + { + this.m_StreamQueue.Reset(); + return; + } + + if (this.photonView.IsMine == true) + { + this.SerializeDataContinuously(); + + this.CacheDiscreteTriggers(); + } + else + { + this.DeserializeDataContinuously(); + } + } + + #endregion + + + #region Setup Synchronizing Methods + + /// + /// Caches the discrete triggers values for keeping track of raised triggers, and will be reseted after the sync routine got performed + /// + public void CacheDiscreteTriggers() + { + for (int i = 0; i < this.m_SynchronizeParameters.Count; ++i) + { + SynchronizedParameter parameter = this.m_SynchronizeParameters[i]; + + if (parameter.SynchronizeType == SynchronizeType.Discrete && parameter.Type == ParameterType.Trigger && this.m_Animator.GetBool(parameter.Name)) + { + if (parameter.Type == ParameterType.Trigger) + { + this.m_raisedDiscreteTriggersCache.Add(parameter.Name); + break; + } + } + } + } + + /// + /// Check if a specific layer is configured to be synchronize + /// + /// Index of the layer. + /// True if the layer is synchronized + public bool DoesLayerSynchronizeTypeExist(int layerIndex) + { + return this.m_SynchronizeLayers.FindIndex(item => item.LayerIndex == layerIndex) != -1; + } + + /// + /// Check if the specified parameter is configured to be synchronized + /// + /// The name of the parameter. + /// True if the parameter is synchronized + public bool DoesParameterSynchronizeTypeExist(string name) + { + return this.m_SynchronizeParameters.FindIndex(item => item.Name == name) != -1; + } + + /// + /// Get a list of all synchronized layers + /// + /// List of SynchronizedLayer objects + public List GetSynchronizedLayers() + { + return this.m_SynchronizeLayers; + } + + /// + /// Get a list of all synchronized parameters + /// + /// List of SynchronizedParameter objects + public List GetSynchronizedParameters() + { + return this.m_SynchronizeParameters; + } + + /// + /// Gets the type how the layer is synchronized + /// + /// Index of the layer. + /// Disabled/Discrete/Continuous + public SynchronizeType GetLayerSynchronizeType(int layerIndex) + { + int index = this.m_SynchronizeLayers.FindIndex(item => item.LayerIndex == layerIndex); + + if (index == -1) + { + return SynchronizeType.Disabled; + } + + return this.m_SynchronizeLayers[index].SynchronizeType; + } + + /// + /// Gets the type how the parameter is synchronized + /// + /// The name of the parameter. + /// Disabled/Discrete/Continuous + public SynchronizeType GetParameterSynchronizeType(string name) + { + int index = this.m_SynchronizeParameters.FindIndex(item => item.Name == name); + + if (index == -1) + { + return SynchronizeType.Disabled; + } + + return this.m_SynchronizeParameters[index].SynchronizeType; + } + + /// + /// Sets the how a layer should be synchronized + /// + /// Index of the layer. + /// Disabled/Discrete/Continuous + public void SetLayerSynchronized(int layerIndex, SynchronizeType synchronizeType) + { + if (Application.isPlaying == true) + { + this.m_WasSynchronizeTypeChanged = true; + } + + int index = this.m_SynchronizeLayers.FindIndex(item => item.LayerIndex == layerIndex); + + if (index == -1) + { + this.m_SynchronizeLayers.Add(new SynchronizedLayer {LayerIndex = layerIndex, SynchronizeType = synchronizeType}); + } + else + { + this.m_SynchronizeLayers[index].SynchronizeType = synchronizeType; + } + } + + /// + /// Sets the how a parameter should be synchronized + /// + /// The name of the parameter. + /// The type of the parameter. + /// Disabled/Discrete/Continuous + public void SetParameterSynchronized(string name, ParameterType type, SynchronizeType synchronizeType) + { + if (Application.isPlaying == true) + { + this.m_WasSynchronizeTypeChanged = true; + } + + int index = this.m_SynchronizeParameters.FindIndex(item => item.Name == name); + + if (index == -1) + { + this.m_SynchronizeParameters.Add(new SynchronizedParameter {Name = name, Type = type, SynchronizeType = synchronizeType}); + } + else + { + this.m_SynchronizeParameters[index].SynchronizeType = synchronizeType; + } + } + + #endregion + + + #region Serialization + + private void SerializeDataContinuously() + { + if (this.m_Animator == null) + { + return; + } + + for (int i = 0; i < this.m_SynchronizeLayers.Count; ++i) + { + if (this.m_SynchronizeLayers[i].SynchronizeType == SynchronizeType.Continuous) + { + this.m_StreamQueue.SendNext(this.m_Animator.GetLayerWeight(this.m_SynchronizeLayers[i].LayerIndex)); + } + } + + for (int i = 0; i < this.m_SynchronizeParameters.Count; ++i) + { + SynchronizedParameter parameter = this.m_SynchronizeParameters[i]; + + if (parameter.SynchronizeType == SynchronizeType.Continuous) + { + switch (parameter.Type) + { + case ParameterType.Bool: + this.m_StreamQueue.SendNext(this.m_Animator.GetBool(parameter.Name)); + break; + case ParameterType.Float: + this.m_StreamQueue.SendNext(this.m_Animator.GetFloat(parameter.Name)); + break; + case ParameterType.Int: + this.m_StreamQueue.SendNext(this.m_Animator.GetInteger(parameter.Name)); + break; + case ParameterType.Trigger: + if (!TriggerUsageWarningDone) + { + TriggerUsageWarningDone = true; + Debug.Log("PhotonAnimatorView: When using triggers, make sure this component is last in the stack.\n" + + "If you still experience issues, implement triggers as a regular RPC \n" + + "or in custom IPunObservable component instead",this); + + } + this.m_StreamQueue.SendNext(this.m_Animator.GetBool(parameter.Name)); + break; + } + } + } + } + + + private void DeserializeDataContinuously() + { + if (this.m_StreamQueue.HasQueuedObjects() == false) + { + return; + } + + for (int i = 0; i < this.m_SynchronizeLayers.Count; ++i) + { + if (this.m_SynchronizeLayers[i].SynchronizeType == SynchronizeType.Continuous) + { + this.m_Animator.SetLayerWeight(this.m_SynchronizeLayers[i].LayerIndex, (float) this.m_StreamQueue.ReceiveNext()); + } + } + + for (int i = 0; i < this.m_SynchronizeParameters.Count; ++i) + { + SynchronizedParameter parameter = this.m_SynchronizeParameters[i]; + + if (parameter.SynchronizeType == SynchronizeType.Continuous) + { + switch (parameter.Type) + { + case ParameterType.Bool: + this.m_Animator.SetBool(parameter.Name, (bool) this.m_StreamQueue.ReceiveNext()); + break; + case ParameterType.Float: + this.m_Animator.SetFloat(parameter.Name, (float) this.m_StreamQueue.ReceiveNext()); + break; + case ParameterType.Int: + this.m_Animator.SetInteger(parameter.Name, (int) this.m_StreamQueue.ReceiveNext()); + break; + case ParameterType.Trigger: + this.m_Animator.SetBool(parameter.Name, (bool) this.m_StreamQueue.ReceiveNext()); + break; + } + } + } + } + + private void SerializeDataDiscretly(PhotonStream stream) + { + for (int i = 0; i < this.m_SynchronizeLayers.Count; ++i) + { + if (this.m_SynchronizeLayers[i].SynchronizeType == SynchronizeType.Discrete) + { + stream.SendNext(this.m_Animator.GetLayerWeight(this.m_SynchronizeLayers[i].LayerIndex)); + } + } + + for (int i = 0; i < this.m_SynchronizeParameters.Count; ++i) + { + + SynchronizedParameter parameter = this.m_SynchronizeParameters[i]; + + if (parameter.SynchronizeType == SynchronizeType.Discrete) + { + switch (parameter.Type) + { + case ParameterType.Bool: + stream.SendNext(this.m_Animator.GetBool(parameter.Name)); + break; + case ParameterType.Float: + stream.SendNext(this.m_Animator.GetFloat(parameter.Name)); + break; + case ParameterType.Int: + stream.SendNext(this.m_Animator.GetInteger(parameter.Name)); + break; + case ParameterType.Trigger: + if (!TriggerUsageWarningDone) + { + TriggerUsageWarningDone = true; + Debug.Log("PhotonAnimatorView: When using triggers, make sure this component is last in the stack.\n" + + "If you still experience issues, implement triggers as a regular RPC \n" + + "or in custom IPunObservable component instead",this); + + } + // here we can't rely on the current real state of the trigger, we might have missed its raise + stream.SendNext(this.m_raisedDiscreteTriggersCache.Contains(parameter.Name)); + break; + } + } + } + + // reset the cache, we've synchronized. + this.m_raisedDiscreteTriggersCache.Clear(); + } + + private void DeserializeDataDiscretly(PhotonStream stream) + { + for (int i = 0; i < this.m_SynchronizeLayers.Count; ++i) + { + if (this.m_SynchronizeLayers[i].SynchronizeType == SynchronizeType.Discrete) + { + this.m_Animator.SetLayerWeight(this.m_SynchronizeLayers[i].LayerIndex, (float) stream.ReceiveNext()); + } + } + + for (int i = 0; i < this.m_SynchronizeParameters.Count; ++i) + { + SynchronizedParameter parameter = this.m_SynchronizeParameters[i]; + + if (parameter.SynchronizeType == SynchronizeType.Discrete) + { + switch (parameter.Type) + { + case ParameterType.Bool: + if (stream.PeekNext() is bool == false) + { + return; + } + this.m_Animator.SetBool(parameter.Name, (bool) stream.ReceiveNext()); + break; + case ParameterType.Float: + if (stream.PeekNext() is float == false) + { + return; + } + + this.m_Animator.SetFloat(parameter.Name, (float) stream.ReceiveNext()); + break; + case ParameterType.Int: + if (stream.PeekNext() is int == false) + { + return; + } + + this.m_Animator.SetInteger(parameter.Name, (int) stream.ReceiveNext()); + break; + case ParameterType.Trigger: + if (stream.PeekNext() is bool == false) + { + return; + } + + if ((bool) stream.ReceiveNext()) + { + this.m_Animator.SetTrigger(parameter.Name); + } + break; + } + } + } + } + + private void SerializeSynchronizationTypeState(PhotonStream stream) + { + byte[] states = new byte[this.m_SynchronizeLayers.Count + this.m_SynchronizeParameters.Count]; + + for (int i = 0; i < this.m_SynchronizeLayers.Count; ++i) + { + states[i] = (byte) this.m_SynchronizeLayers[i].SynchronizeType; + } + + for (int i = 0; i < this.m_SynchronizeParameters.Count; ++i) + { + states[this.m_SynchronizeLayers.Count + i] = (byte) this.m_SynchronizeParameters[i].SynchronizeType; + } + + stream.SendNext(states); + } + + private void DeserializeSynchronizationTypeState(PhotonStream stream) + { + byte[] state = (byte[]) stream.ReceiveNext(); + + for (int i = 0; i < this.m_SynchronizeLayers.Count; ++i) + { + this.m_SynchronizeLayers[i].SynchronizeType = (SynchronizeType) state[i]; + } + + for (int i = 0; i < this.m_SynchronizeParameters.Count; ++i) + { + this.m_SynchronizeParameters[i].SynchronizeType = (SynchronizeType) state[this.m_SynchronizeLayers.Count + i]; + } + } + + public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) + { + if (this.m_Animator == null) + { + return; + } + + if (stream.IsWriting == true) + { + if (this.m_WasSynchronizeTypeChanged == true) + { + this.m_StreamQueue.Reset(); + this.SerializeSynchronizationTypeState(stream); + + this.m_WasSynchronizeTypeChanged = false; + } + + this.m_StreamQueue.Serialize(stream); + this.SerializeDataDiscretly(stream); + } + else + { + #if PHOTON_DEVELOP + if( ReceivingSender != null ) + { + ReceivingSender.OnPhotonSerializeView( stream, info ); + } + else + #endif + { + if (stream.PeekNext() is byte[]) + { + this.DeserializeSynchronizationTypeState(stream); + } + + this.m_StreamQueue.Deserialize(stream); + this.DeserializeDataDiscretly(stream); + } + } + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs.meta new file mode 100644 index 00000000..9232492e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonAnimatorView.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9b8c4a61274f60b4ea5fb4299cfdbf14 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbody2DView.cs b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbody2DView.cs new file mode 100644 index 00000000..ba6333db --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbody2DView.cs @@ -0,0 +1,111 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Component to synchronize 2d rigidbodies via PUN. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEngine; + + + [RequireComponent(typeof(Rigidbody2D))] + [AddComponentMenu("Photon Networking/Photon Rigidbody 2D View")] + public class PhotonRigidbody2DView : MonoBehaviourPun, IPunObservable + { + private float m_Distance; + private float m_Angle; + + private Rigidbody2D m_Body; + + private Vector2 m_NetworkPosition; + + private float m_NetworkRotation; + + [HideInInspector] + public bool m_SynchronizeVelocity = true; + [HideInInspector] + public bool m_SynchronizeAngularVelocity = false; + + [HideInInspector] + public bool m_TeleportEnabled = false; + [HideInInspector] + public float m_TeleportIfDistanceGreaterThan = 3.0f; + + public void Awake() + { + this.m_Body = GetComponent(); + + this.m_NetworkPosition = new Vector2(); + } + + public void FixedUpdate() + { + if (!this.photonView.IsMine) + { + this.m_Body.position = Vector2.MoveTowards(this.m_Body.position, this.m_NetworkPosition, this.m_Distance * (1.0f / PhotonNetwork.SerializationRate)); + this.m_Body.rotation = Mathf.MoveTowards(this.m_Body.rotation, this.m_NetworkRotation, this.m_Angle * (1.0f / PhotonNetwork.SerializationRate)); + } + } + + public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) + { + if (stream.IsWriting) + { + stream.SendNext(this.m_Body.position); + stream.SendNext(this.m_Body.rotation); + + if (this.m_SynchronizeVelocity) + { + stream.SendNext(this.m_Body.velocity); + } + + if (this.m_SynchronizeAngularVelocity) + { + stream.SendNext(this.m_Body.angularVelocity); + } + } + else + { + this.m_NetworkPosition = (Vector2)stream.ReceiveNext(); + this.m_NetworkRotation = (float)stream.ReceiveNext(); + + if (this.m_TeleportEnabled) + { + if (Vector3.Distance(this.m_Body.position, this.m_NetworkPosition) > this.m_TeleportIfDistanceGreaterThan) + { + this.m_Body.position = this.m_NetworkPosition; + } + } + + if (this.m_SynchronizeVelocity || this.m_SynchronizeAngularVelocity) + { + float lag = Mathf.Abs((float)(PhotonNetwork.Time - info.SentServerTime)); + + if (m_SynchronizeVelocity) + { + this.m_Body.velocity = (Vector2)stream.ReceiveNext(); + + this.m_NetworkPosition += this.m_Body.velocity * lag; + + this.m_Distance = Vector2.Distance(this.m_Body.position, this.m_NetworkPosition); + } + + if (this.m_SynchronizeAngularVelocity) + { + this.m_Body.angularVelocity = (float)stream.ReceiveNext(); + + this.m_NetworkRotation += this.m_Body.angularVelocity * lag; + + this.m_Angle = Mathf.Abs(this.m_Body.rotation - this.m_NetworkRotation); + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbody2DView.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbody2DView.cs.meta new file mode 100644 index 00000000..b2e6d087 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbody2DView.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0e7cb724808c322458aa4d15f5035fa9 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbodyView.cs b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbodyView.cs new file mode 100644 index 00000000..de3405ad --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbodyView.cs @@ -0,0 +1,112 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Component to synchronize rigidbodies via PUN. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEngine; + + + [RequireComponent(typeof(Rigidbody))] + [AddComponentMenu("Photon Networking/Photon Rigidbody View")] + public class PhotonRigidbodyView : MonoBehaviourPun, IPunObservable + { + private float m_Distance; + private float m_Angle; + + private Rigidbody m_Body; + + private Vector3 m_NetworkPosition; + + private Quaternion m_NetworkRotation; + + [HideInInspector] + public bool m_SynchronizeVelocity = true; + [HideInInspector] + public bool m_SynchronizeAngularVelocity = false; + + [HideInInspector] + public bool m_TeleportEnabled = false; + [HideInInspector] + public float m_TeleportIfDistanceGreaterThan = 3.0f; + + public void Awake() + { + this.m_Body = GetComponent(); + + this.m_NetworkPosition = new Vector3(); + this.m_NetworkRotation = new Quaternion(); + } + + public void FixedUpdate() + { + if (!this.photonView.IsMine) + { + this.m_Body.position = Vector3.MoveTowards(this.m_Body.position, this.m_NetworkPosition, this.m_Distance * (1.0f / PhotonNetwork.SerializationRate)); + this.m_Body.rotation = Quaternion.RotateTowards(this.m_Body.rotation, this.m_NetworkRotation, this.m_Angle * (1.0f / PhotonNetwork.SerializationRate)); + } + } + + public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) + { + if (stream.IsWriting) + { + stream.SendNext(this.m_Body.position); + stream.SendNext(this.m_Body.rotation); + + if (this.m_SynchronizeVelocity) + { + stream.SendNext(this.m_Body.velocity); + } + + if (this.m_SynchronizeAngularVelocity) + { + stream.SendNext(this.m_Body.angularVelocity); + } + } + else + { + this.m_NetworkPosition = (Vector3)stream.ReceiveNext(); + this.m_NetworkRotation = (Quaternion)stream.ReceiveNext(); + + if (this.m_TeleportEnabled) + { + if (Vector3.Distance(this.m_Body.position, this.m_NetworkPosition) > this.m_TeleportIfDistanceGreaterThan) + { + this.m_Body.position = this.m_NetworkPosition; + } + } + + if (this.m_SynchronizeVelocity || this.m_SynchronizeAngularVelocity) + { + float lag = Mathf.Abs((float)(PhotonNetwork.Time - info.SentServerTime)); + + if (this.m_SynchronizeVelocity) + { + this.m_Body.velocity = (Vector3)stream.ReceiveNext(); + + this.m_NetworkPosition += this.m_Body.velocity * lag; + + this.m_Distance = Vector3.Distance(this.m_Body.position, this.m_NetworkPosition); + } + + if (this.m_SynchronizeAngularVelocity) + { + this.m_Body.angularVelocity = (Vector3)stream.ReceiveNext(); + + this.m_NetworkRotation = Quaternion.Euler(this.m_Body.angularVelocity * lag) * this.m_NetworkRotation; + + this.m_Angle = Quaternion.Angle(this.m_Body.rotation, this.m_NetworkRotation); + } + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbodyView.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbodyView.cs.meta new file mode 100644 index 00000000..e8c398fb --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonRigidbodyView.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 64179f3720bbfe947b7724caa67b7c1d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformView.cs b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformView.cs new file mode 100644 index 00000000..4745a2b1 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformView.cs @@ -0,0 +1,194 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Component to synchronize Transforms via PUN PhotonView. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEngine; + + [AddComponentMenu("Photon Networking/Photon Transform View")] + [HelpURL("https://doc.photonengine.com/en-us/pun/v2/gameplay/synchronization-and-state")] + public class PhotonTransformView : MonoBehaviourPun, IPunObservable + { + private float m_Distance; + private float m_Angle; + + private Vector3 m_Direction; + private Vector3 m_NetworkPosition; + private Vector3 m_StoredPosition; + + private Quaternion m_NetworkRotation; + + public bool m_SynchronizePosition = true; + public bool m_SynchronizeRotation = true; + public bool m_SynchronizeScale = false; + + [Tooltip("Indicates if localPosition and localRotation should be used. Scale ignores this setting, and always uses localScale to avoid issues with lossyScale.")] + public bool m_UseLocal; + + bool m_firstTake = false; + + public void Awake() + { + m_StoredPosition = transform.localPosition; + m_NetworkPosition = Vector3.zero; + + m_NetworkRotation = Quaternion.identity; + } + + private void Reset() + { + // Only default to true with new instances. useLocal will remain false for old projects that are updating PUN. + m_UseLocal = true; + } + + void OnEnable() + { + m_firstTake = true; + } + + public void Update() + { + var tr = transform; + + if (!this.photonView.IsMine) + { + if (m_UseLocal) + + { + tr.localPosition = Vector3.MoveTowards(tr.localPosition, this.m_NetworkPosition, this.m_Distance * Time.deltaTime * PhotonNetwork.SerializationRate); + tr.localRotation = Quaternion.RotateTowards(tr.localRotation, this.m_NetworkRotation, this.m_Angle * Time.deltaTime * PhotonNetwork.SerializationRate); + } + else + { + tr.position = Vector3.MoveTowards(tr.position, this.m_NetworkPosition, this.m_Distance * Time.deltaTime * PhotonNetwork.SerializationRate); + tr.rotation = Quaternion.RotateTowards(tr.rotation, this.m_NetworkRotation, this.m_Angle * Time.deltaTime * PhotonNetwork.SerializationRate); + } + } + } + + public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) + { + var tr = transform; + + // Write + if (stream.IsWriting) + { + if (this.m_SynchronizePosition) + { + if (m_UseLocal) + { + this.m_Direction = tr.localPosition - this.m_StoredPosition; + this.m_StoredPosition = tr.localPosition; + stream.SendNext(tr.localPosition); + stream.SendNext(this.m_Direction); + } + else + { + this.m_Direction = tr.position - this.m_StoredPosition; + this.m_StoredPosition = tr.position; + stream.SendNext(tr.position); + stream.SendNext(this.m_Direction); + } + } + + if (this.m_SynchronizeRotation) + { + if (m_UseLocal) + { + stream.SendNext(tr.localRotation); + } + else + { + stream.SendNext(tr.rotation); + } + } + + if (this.m_SynchronizeScale) + { + stream.SendNext(tr.localScale); + } + } + // Read + else + { + if (this.m_SynchronizePosition) + { + this.m_NetworkPosition = (Vector3)stream.ReceiveNext(); + this.m_Direction = (Vector3)stream.ReceiveNext(); + + if (m_firstTake) + { + if (m_UseLocal) + tr.localPosition = this.m_NetworkPosition; + else + tr.position = this.m_NetworkPosition; + + this.m_Distance = 0f; + } + else + { + float lag = Mathf.Abs((float)(PhotonNetwork.Time - info.SentServerTime)); + this.m_NetworkPosition += this.m_Direction * lag; + if (m_UseLocal) + { + this.m_Distance = Vector3.Distance(tr.localPosition, this.m_NetworkPosition); + } + else + { + this.m_Distance = Vector3.Distance(tr.position, this.m_NetworkPosition); + } + } + + } + + if (this.m_SynchronizeRotation) + { + this.m_NetworkRotation = (Quaternion)stream.ReceiveNext(); + + if (m_firstTake) + { + this.m_Angle = 0f; + + if (m_UseLocal) + { + tr.localRotation = this.m_NetworkRotation; + } + else + { + tr.rotation = this.m_NetworkRotation; + } + } + else + { + if (m_UseLocal) + { + this.m_Angle = Quaternion.Angle(tr.localRotation, this.m_NetworkRotation); + } + else + { + this.m_Angle = Quaternion.Angle(tr.rotation, this.m_NetworkRotation); + } + } + } + + if (this.m_SynchronizeScale) + { + tr.localScale = (Vector3)stream.ReceiveNext(); + } + + if (m_firstTake) + { + m_firstTake = false; + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformView.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformView.cs.meta new file mode 100644 index 00000000..c6c45cb5 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformView.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 627855c7f81362d41938ffe0b1475957 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs new file mode 100644 index 00000000..92f64aaa --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs @@ -0,0 +1,557 @@ +// ---------------------------------------------------------------------------- +// +// PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH +// +// +// Component to synchronize Transforms via PUN PhotonView. +// +// developer@exitgames.com +// ---------------------------------------------------------------------------- + + +namespace Photon.Pun +{ + using UnityEngine; + using System.Collections.Generic; + + + /// + /// This class helps you to synchronize position, rotation and scale + /// of a GameObject. It also gives you many different options to make + /// the synchronized values appear smooth, even when the data is only + /// send a couple of times per second. + /// Simply add the component to your GameObject and make sure that + /// the PhotonTransformViewClassic is added to the list of observed components + /// + [AddComponentMenu("Photon Networking/Photon Transform View Classic")] + public class PhotonTransformViewClassic : MonoBehaviourPun, IPunObservable + { + //As this component is very complex, we separated it into multiple classes. + //The PositionModel, RotationModel and ScaleMode store the data you are able to + //configure in the inspector while the "control" objects below are actually moving + //the object and calculating all the inter- and extrapolation + + [HideInInspector] + public PhotonTransformViewPositionModel m_PositionModel = new PhotonTransformViewPositionModel(); + + [HideInInspector] + public PhotonTransformViewRotationModel m_RotationModel = new PhotonTransformViewRotationModel(); + + [HideInInspector] + public PhotonTransformViewScaleModel m_ScaleModel = new PhotonTransformViewScaleModel(); + + PhotonTransformViewPositionControl m_PositionControl; + PhotonTransformViewRotationControl m_RotationControl; + PhotonTransformViewScaleControl m_ScaleControl; + + PhotonView m_PhotonView; + + bool m_ReceivedNetworkUpdate = false; + + /// + /// Flag to skip initial data when Object is instantiated and rely on the first deserialized data instead. + /// + bool m_firstTake = false; + + void Awake() + { + this.m_PhotonView = GetComponent(); + + this.m_PositionControl = new PhotonTransformViewPositionControl(this.m_PositionModel); + this.m_RotationControl = new PhotonTransformViewRotationControl(this.m_RotationModel); + this.m_ScaleControl = new PhotonTransformViewScaleControl(this.m_ScaleModel); + } + + void OnEnable() + { + m_firstTake = true; + } + + void Update() + { + if (this.m_PhotonView == null || this.m_PhotonView.IsMine == true || PhotonNetwork.IsConnectedAndReady == false) + { + return; + } + + this.UpdatePosition(); + this.UpdateRotation(); + this.UpdateScale(); + } + + void UpdatePosition() + { + if (this.m_PositionModel.SynchronizeEnabled == false || this.m_ReceivedNetworkUpdate == false) + { + return; + } + + transform.localPosition = this.m_PositionControl.UpdatePosition(transform.localPosition); + } + + void UpdateRotation() + { + if (this.m_RotationModel.SynchronizeEnabled == false || this.m_ReceivedNetworkUpdate == false) + { + return; + } + + transform.localRotation = this.m_RotationControl.GetRotation(transform.localRotation); + } + + void UpdateScale() + { + if (this.m_ScaleModel.SynchronizeEnabled == false || this.m_ReceivedNetworkUpdate == false) + { + return; + } + + transform.localScale = this.m_ScaleControl.GetScale(transform.localScale); + } + + /// + /// These values are synchronized to the remote objects if the interpolation mode + /// or the extrapolation mode SynchronizeValues is used. Your movement script should pass on + /// the current speed (in units/second) and turning speed (in angles/second) so the remote + /// object can use them to predict the objects movement. + /// + /// The current movement vector of the object in units/second. + /// The current turn speed of the object in angles/second. + public void SetSynchronizedValues(Vector3 speed, float turnSpeed) + { + this.m_PositionControl.SetSynchronizedValues(speed, turnSpeed); + } + + + public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) + { + this.m_PositionControl.OnPhotonSerializeView(transform.localPosition, stream, info); + this.m_RotationControl.OnPhotonSerializeView(transform.localRotation, stream, info); + this.m_ScaleControl.OnPhotonSerializeView(transform.localScale, stream, info); + + if (stream.IsReading == true) + { + this.m_ReceivedNetworkUpdate = true; + + // force latest data to avoid initial drifts when player is instantiated. + if (m_firstTake) + { + m_firstTake = false; + + if (this.m_PositionModel.SynchronizeEnabled) + { + this.transform.localPosition = this.m_PositionControl.GetNetworkPosition(); + } + + if (this.m_RotationModel.SynchronizeEnabled) + { + this.transform.localRotation = this.m_RotationControl.GetNetworkRotation(); + } + + if (this.m_ScaleModel.SynchronizeEnabled) + { + this.transform.localScale = this.m_ScaleControl.GetNetworkScale(); + } + } + } + } + } + + + [System.Serializable] + public class PhotonTransformViewPositionModel + { + public enum InterpolateOptions + { + Disabled, + FixedSpeed, + EstimatedSpeed, + SynchronizeValues, + Lerp + } + + + public enum ExtrapolateOptions + { + Disabled, + SynchronizeValues, + EstimateSpeedAndTurn, + FixedSpeed, + } + + + public bool SynchronizeEnabled; + + public bool TeleportEnabled = true; + public float TeleportIfDistanceGreaterThan = 3f; + + public InterpolateOptions InterpolateOption = InterpolateOptions.EstimatedSpeed; + public float InterpolateMoveTowardsSpeed = 1f; + + public float InterpolateLerpSpeed = 1f; + + public ExtrapolateOptions ExtrapolateOption = ExtrapolateOptions.Disabled; + public float ExtrapolateSpeed = 1f; + public bool ExtrapolateIncludingRoundTripTime = true; + public int ExtrapolateNumberOfStoredPositions = 1; + } + + public class PhotonTransformViewPositionControl + { + PhotonTransformViewPositionModel m_Model; + float m_CurrentSpeed; + double m_LastSerializeTime; + Vector3 m_SynchronizedSpeed = Vector3.zero; + float m_SynchronizedTurnSpeed = 0; + + Vector3 m_NetworkPosition; + Queue m_OldNetworkPositions = new Queue(); + + bool m_UpdatedPositionAfterOnSerialize = true; + + public PhotonTransformViewPositionControl(PhotonTransformViewPositionModel model) + { + m_Model = model; + } + + Vector3 GetOldestStoredNetworkPosition() + { + Vector3 oldPosition = m_NetworkPosition; + + if (m_OldNetworkPositions.Count > 0) + { + oldPosition = m_OldNetworkPositions.Peek(); + } + + return oldPosition; + } + + /// + /// These values are synchronized to the remote objects if the interpolation mode + /// or the extrapolation mode SynchronizeValues is used. Your movement script should pass on + /// the current speed (in units/second) and turning speed (in angles/second) so the remote + /// object can use them to predict the objects movement. + /// + /// The current movement vector of the object in units/second. + /// The current turn speed of the object in angles/second. + public void SetSynchronizedValues(Vector3 speed, float turnSpeed) + { + m_SynchronizedSpeed = speed; + m_SynchronizedTurnSpeed = turnSpeed; + } + + /// + /// Calculates the new position based on the values setup in the inspector + /// + /// The current position. + /// The new position. + public Vector3 UpdatePosition(Vector3 currentPosition) + { + Vector3 targetPosition = GetNetworkPosition() + GetExtrapolatedPositionOffset(); + + switch (m_Model.InterpolateOption) + { + case PhotonTransformViewPositionModel.InterpolateOptions.Disabled: + if (m_UpdatedPositionAfterOnSerialize == false) + { + currentPosition = targetPosition; + m_UpdatedPositionAfterOnSerialize = true; + } + + break; + + case PhotonTransformViewPositionModel.InterpolateOptions.FixedSpeed: + currentPosition = Vector3.MoveTowards(currentPosition, targetPosition, Time.deltaTime * m_Model.InterpolateMoveTowardsSpeed); + break; + + case PhotonTransformViewPositionModel.InterpolateOptions.EstimatedSpeed: + if (m_OldNetworkPositions.Count == 0) + { + // special case: we have no previous updates in memory, so we can't guess a speed! + break; + } + + // knowing the last (incoming) position and the one before, we can guess a speed. + // note that the speed is times sendRateOnSerialize! we send X updates/sec, so our estimate has to factor that in. + float estimatedSpeed = (Vector3.Distance(m_NetworkPosition, GetOldestStoredNetworkPosition()) / m_OldNetworkPositions.Count) * PhotonNetwork.SerializationRate; + + // move towards the targetPosition (including estimates, if that's active) with the speed calculated from the last updates. + currentPosition = Vector3.MoveTowards(currentPosition, targetPosition, Time.deltaTime * estimatedSpeed); + break; + + case PhotonTransformViewPositionModel.InterpolateOptions.SynchronizeValues: + if (m_SynchronizedSpeed.magnitude == 0) + { + currentPosition = targetPosition; + } + else + { + currentPosition = Vector3.MoveTowards(currentPosition, targetPosition, Time.deltaTime * m_SynchronizedSpeed.magnitude); + } + + break; + + case PhotonTransformViewPositionModel.InterpolateOptions.Lerp: + currentPosition = Vector3.Lerp(currentPosition, targetPosition, Time.deltaTime * m_Model.InterpolateLerpSpeed); + break; + } + + if (m_Model.TeleportEnabled == true) + { + if (Vector3.Distance(currentPosition, GetNetworkPosition()) > m_Model.TeleportIfDistanceGreaterThan) + { + currentPosition = GetNetworkPosition(); + } + } + + return currentPosition; + } + + /// + /// Gets the last position that was received through the network + /// + /// + public Vector3 GetNetworkPosition() + { + return m_NetworkPosition; + } + + /// + /// Calculates an estimated position based on the last synchronized position, + /// the time when the last position was received and the movement speed of the object + /// + /// Estimated position of the remote object + public Vector3 GetExtrapolatedPositionOffset() + { + float timePassed = (float)(PhotonNetwork.Time - m_LastSerializeTime); + + if (m_Model.ExtrapolateIncludingRoundTripTime == true) + { + timePassed += (float)PhotonNetwork.GetPing() / 1000f; + } + + Vector3 extrapolatePosition = Vector3.zero; + + switch (m_Model.ExtrapolateOption) + { + case PhotonTransformViewPositionModel.ExtrapolateOptions.SynchronizeValues: + Quaternion turnRotation = Quaternion.Euler(0, m_SynchronizedTurnSpeed * timePassed, 0); + extrapolatePosition = turnRotation * (m_SynchronizedSpeed * timePassed); + break; + case PhotonTransformViewPositionModel.ExtrapolateOptions.FixedSpeed: + Vector3 moveDirection = (m_NetworkPosition - GetOldestStoredNetworkPosition()).normalized; + + extrapolatePosition = moveDirection * m_Model.ExtrapolateSpeed * timePassed; + break; + case PhotonTransformViewPositionModel.ExtrapolateOptions.EstimateSpeedAndTurn: + Vector3 moveDelta = (m_NetworkPosition - GetOldestStoredNetworkPosition()) * PhotonNetwork.SerializationRate; + extrapolatePosition = moveDelta * timePassed; + break; + } + + return extrapolatePosition; + } + + public void OnPhotonSerializeView(Vector3 currentPosition, PhotonStream stream, PhotonMessageInfo info) + { + if (m_Model.SynchronizeEnabled == false) + { + return; + } + + if (stream.IsWriting == true) + { + SerializeData(currentPosition, stream, info); + } + else + { + DeserializeData(stream, info); + } + + m_LastSerializeTime = PhotonNetwork.Time; + m_UpdatedPositionAfterOnSerialize = false; + } + + void SerializeData(Vector3 currentPosition, PhotonStream stream, PhotonMessageInfo info) + { + stream.SendNext(currentPosition); + m_NetworkPosition = currentPosition; + + if (m_Model.ExtrapolateOption == PhotonTransformViewPositionModel.ExtrapolateOptions.SynchronizeValues || + m_Model.InterpolateOption == PhotonTransformViewPositionModel.InterpolateOptions.SynchronizeValues) + { + stream.SendNext(m_SynchronizedSpeed); + stream.SendNext(m_SynchronizedTurnSpeed); + } + } + + void DeserializeData(PhotonStream stream, PhotonMessageInfo info) + { + Vector3 readPosition = (Vector3)stream.ReceiveNext(); + if (m_Model.ExtrapolateOption == PhotonTransformViewPositionModel.ExtrapolateOptions.SynchronizeValues || + m_Model.InterpolateOption == PhotonTransformViewPositionModel.InterpolateOptions.SynchronizeValues) + { + m_SynchronizedSpeed = (Vector3)stream.ReceiveNext(); + m_SynchronizedTurnSpeed = (float)stream.ReceiveNext(); + } + + if (m_OldNetworkPositions.Count == 0) + { + // if we don't have old positions yet, this is the very first update this client reads. let's use this as current AND old position. + m_NetworkPosition = readPosition; + } + + // the previously received position becomes the old(er) one and queued. the new one is the m_NetworkPosition + m_OldNetworkPositions.Enqueue(m_NetworkPosition); + m_NetworkPosition = readPosition; + + // reduce items in queue to defined number of stored positions. + while (m_OldNetworkPositions.Count > m_Model.ExtrapolateNumberOfStoredPositions) + { + m_OldNetworkPositions.Dequeue(); + } + } + } + + + [System.Serializable] + public class PhotonTransformViewRotationModel + { + public enum InterpolateOptions + { + Disabled, + RotateTowards, + Lerp, + } + + + public bool SynchronizeEnabled; + + public InterpolateOptions InterpolateOption = InterpolateOptions.RotateTowards; + public float InterpolateRotateTowardsSpeed = 180; + public float InterpolateLerpSpeed = 5; + } + + public class PhotonTransformViewRotationControl + { + PhotonTransformViewRotationModel m_Model; + Quaternion m_NetworkRotation; + + public PhotonTransformViewRotationControl(PhotonTransformViewRotationModel model) + { + m_Model = model; + } + + /// + /// Gets the last rotation that was received through the network + /// + /// + public Quaternion GetNetworkRotation() + { + return m_NetworkRotation; + } + + public Quaternion GetRotation(Quaternion currentRotation) + { + switch (m_Model.InterpolateOption) + { + default: + case PhotonTransformViewRotationModel.InterpolateOptions.Disabled: + return m_NetworkRotation; + case PhotonTransformViewRotationModel.InterpolateOptions.RotateTowards: + return Quaternion.RotateTowards(currentRotation, m_NetworkRotation, m_Model.InterpolateRotateTowardsSpeed * Time.deltaTime); + case PhotonTransformViewRotationModel.InterpolateOptions.Lerp: + return Quaternion.Lerp(currentRotation, m_NetworkRotation, m_Model.InterpolateLerpSpeed * Time.deltaTime); + } + } + + public void OnPhotonSerializeView(Quaternion currentRotation, PhotonStream stream, PhotonMessageInfo info) + { + if (m_Model.SynchronizeEnabled == false) + { + return; + } + + if (stream.IsWriting == true) + { + stream.SendNext(currentRotation); + m_NetworkRotation = currentRotation; + } + else + { + m_NetworkRotation = (Quaternion)stream.ReceiveNext(); + } + } + } + + + [System.Serializable] + public class PhotonTransformViewScaleModel + { + public enum InterpolateOptions + { + Disabled, + MoveTowards, + Lerp, + } + + + public bool SynchronizeEnabled; + + public InterpolateOptions InterpolateOption = InterpolateOptions.Disabled; + public float InterpolateMoveTowardsSpeed = 1f; + public float InterpolateLerpSpeed; + } + + public class PhotonTransformViewScaleControl + { + PhotonTransformViewScaleModel m_Model; + Vector3 m_NetworkScale = Vector3.one; + + public PhotonTransformViewScaleControl(PhotonTransformViewScaleModel model) + { + m_Model = model; + } + + /// + /// Gets the last scale that was received through the network + /// + /// + public Vector3 GetNetworkScale() + { + return m_NetworkScale; + } + + public Vector3 GetScale(Vector3 currentScale) + { + switch (m_Model.InterpolateOption) + { + default: + case PhotonTransformViewScaleModel.InterpolateOptions.Disabled: + return m_NetworkScale; + case PhotonTransformViewScaleModel.InterpolateOptions.MoveTowards: + return Vector3.MoveTowards(currentScale, m_NetworkScale, m_Model.InterpolateMoveTowardsSpeed * Time.deltaTime); + case PhotonTransformViewScaleModel.InterpolateOptions.Lerp: + return Vector3.Lerp(currentScale, m_NetworkScale, m_Model.InterpolateLerpSpeed * Time.deltaTime); + } + } + + public void OnPhotonSerializeView(Vector3 currentScale, PhotonStream stream, PhotonMessageInfo info) + { + if (m_Model.SynchronizeEnabled == false) + { + return; + } + + if (stream.IsWriting == true) + { + stream.SendNext(currentScale); + m_NetworkScale = currentScale; + } + else + { + m_NetworkScale = (Vector3)stream.ReceiveNext(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs.meta b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs.meta new file mode 100644 index 00000000..7400c645 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Code/Views/PhotonTransformViewClassic.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8efc6b1d64977384eb3405357896c656 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos.meta b/Assets/Photon/PhotonUnityNetworking/Demos.meta new file mode 100644 index 00000000..de368b6b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cb8ec42b3fa78bd4f9a20b7de289d9cd +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids.meta new file mode 100644 index 00000000..77b85b0c --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 836b5819c0347f0458f3e374fa3c2230 +folderAsset: yes +timeCreated: 1508416790 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials.meta new file mode 100644 index 00000000..cbb77c47 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: eb89ce1e7485b214d8f27d2f3901474c +folderAsset: yes +timeCreated: 1505213271 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerAsteroid.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerAsteroid.mat new file mode 100644 index 00000000..8011ccb2 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerAsteroid.mat @@ -0,0 +1,153 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: FlyerAsteroid + m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 2800000, guid: bfc02e2f0447eaf4190d17879193f0e2, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _SpecGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.3 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + data: + first: + name: _Alpha + second: 1 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0.2, g: 0.2, b: 0.2, a: 1} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} + data: + first: + name: _SpecColor + second: {r: 0.15686275, g: 0.15686275, b: 0.15686275, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerAsteroid.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerAsteroid.mat.meta new file mode 100644 index 00000000..71b1eeed --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerAsteroid.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 968fc57e6928a5448ae7d0644246d534 +timeCreated: 1505213348 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerPlayership.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerPlayership.mat new file mode 100644 index 00000000..7c7b2032 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerPlayership.mat @@ -0,0 +1,149 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: FlyerPlayership + m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: b28381ec2a3dce5459a8fd396a0eb560, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 2800000, guid: 34b19bc20b665b240af9c0fc9d0086f6, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 2800000, guid: 88217866776ce4c49944ecb360a5c6ca, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 2800000, guid: 2b0c5290f03c1e84dbb05f573458a568, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _SpecGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.8 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 1 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 1.8382353, g: 1.8382353, b: 1.8382353, a: 1} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} + data: + first: + name: _SpecColor + second: {r: 0.078431375, g: 0.078431375, b: 0.078431375, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerPlayership.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerPlayership.mat.meta new file mode 100644 index 00000000..5bc029ce --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/FlyerPlayership.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 99fced4bc2985174cac8512dc765d2bc +timeCreated: 1505213348 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/ParticleAfterburner.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/ParticleAfterburner.mat new file mode 100644 index 00000000..1711a99b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/ParticleAfterburner.mat @@ -0,0 +1,40 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 3 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: ParticleAfterburner + m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: [] + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _InvFade + second: 1.26696432 + m_Colors: + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} + data: + first: + name: _TintColor + second: {r: 1, g: 1, b: 1, a: 1} + data: + first: + name: _EmisColor + second: {r: .200000003, g: .200000003, b: .200000003, a: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/ParticleAfterburner.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/ParticleAfterburner.mat.meta new file mode 100644 index 00000000..641b7e21 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/ParticleAfterburner.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dc1a05fba9a6af241a25a35b4caf5e27 +timeCreated: 1505213349 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteSmooth.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteSmooth.mat new file mode 100644 index 00000000..102df8e7 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteSmooth.mat @@ -0,0 +1,174 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: WhiteSmooth + m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _UVSEC_UV1 + m_CustomRenderQueue: -1 + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: c798603beb3c1fc4a96620cf6b35cc32, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Occlusion + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _SpecGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _AlphaTestRef + second: .5 + data: + first: + name: _Lightmapping + second: 1 + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Parallax + second: .0199999996 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: .100000001 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _EmissionScaleUI + second: 0 + data: + first: + name: _Metallic + second: .100000001 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 0} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} + data: + first: + name: _SpecularColor + second: {r: .156862751, g: .156862751, b: .156862751, a: 1} + data: + first: + name: _EmissionColorUI + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _EmissionColorWithMapUI + second: {r: 1, g: 1, b: 1, a: 1} + data: + first: + name: _SpecColor + second: {r: .117647059, g: .117647059, b: .117647059, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteSmooth.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteSmooth.mat.meta new file mode 100644 index 00000000..c58e789b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteSmooth.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b05171e12835ff84fb155f51d69d7c31 +timeCreated: 1505213348 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteUnlit.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteUnlit.mat new file mode 100644 index 00000000..a2d7e489 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteUnlit.mat @@ -0,0 +1,180 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: WhiteUnlit + m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _UVSEC_UV1 + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: c798603beb3c1fc4a96620cf6b35cc32, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _Occlusion + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _SpecGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: .5 + data: + first: + name: _AlphaTestRef + second: .5 + data: + first: + name: _Parallax + second: .0199999996 + data: + first: + name: _Lightmapping + second: 1 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: .100000001 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: .100000001 + data: + first: + name: _EmissionScaleUI + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 0} + data: + first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} + data: + first: + name: _SpecColor + second: {r: .117647059, g: .117647059, b: .117647059, a: 1} + data: + first: + name: _SpecularColor + second: {r: .156862751, g: .156862751, b: .156862751, a: 1} + data: + first: + name: _EmissionColorUI + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _EmissionColorWithMapUI + second: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteUnlit.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteUnlit.mat.meta new file mode 100644 index 00000000..52da6ad7 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Materials/WhiteUnlit.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 073b1ee561def20429e655b5c8893ad4 +timeCreated: 1505213348 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models.meta new file mode 100644 index 00000000..a5aee6d9 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ffc8b1d9f846b0f4d9e60bafe6e61a83 +folderAsset: yes +timeCreated: 1505213276 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Asteroid01.fbx b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Asteroid01.fbx new file mode 100644 index 00000000..f42f8a82 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Asteroid01.fbx differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Asteroid01.fbx.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Asteroid01.fbx.meta new file mode 100644 index 00000000..5c516222 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Asteroid01.fbx.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 401fae203bae0ee428e401e7f9af9be8 +timeCreated: 1505213349 +licenseType: Store +ModelImporter: + serializedVersion: 19 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: prop_asteroid_02 + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleRotations: 1 + optimizeGameObjects: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + rootMotionBoneName: + hasTranslationDoF: 0 + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 0 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/FlyerAsteroidB.fbx b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/FlyerAsteroidB.fbx new file mode 100644 index 00000000..d2f6ee8a Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/FlyerAsteroidB.fbx differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/FlyerAsteroidB.fbx.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/FlyerAsteroidB.fbx.meta new file mode 100644 index 00000000..b075a4fa --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/FlyerAsteroidB.fbx.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: 757fc9771ce30dc468c775b392518d81 +timeCreated: 1505213349 +licenseType: Store +ModelImporter: + serializedVersion: 19 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: FlyerAsteroidB001 + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleRotations: 1 + optimizeGameObjects: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + rootMotionBoneName: + hasTranslationDoF: 0 + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 0 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/LaserBolt.fbx b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/LaserBolt.fbx new file mode 100644 index 00000000..36138567 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/LaserBolt.fbx differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/LaserBolt.fbx.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/LaserBolt.fbx.meta new file mode 100644 index 00000000..2a2a5109 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/LaserBolt.fbx.meta @@ -0,0 +1,76 @@ +fileFormatVersion: 2 +guid: efbb13993d8043d4ba5c752ed4b1a2bc +timeCreated: 1505213349 +licenseType: Store +ModelImporter: + serializedVersion: 19 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: LaserBolt + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleRotations: 1 + optimizeGameObjects: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + rootMotionBoneName: + hasTranslationDoF: 0 + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 0 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials.meta new file mode 100644 index 00000000..0f84162f --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5b0355c289df177488ae398e713b4769 +folderAsset: yes +timeCreated: 1505213298 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/Asteroid.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/Asteroid.mat new file mode 100644 index 00000000..97a526f4 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/Asteroid.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Asteroid + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: .5 + data: + first: + name: _Parallax + second: .0199999996 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: .5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: .588235319, g: .588235319, b: .588235319, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/Asteroid.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/Asteroid.mat.meta new file mode 100644 index 00000000..01c912c2 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/Asteroid.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: be2c382f522695c4fa3947ac8e1d4457 +timeCreated: 1505213349 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/FlyerAsteroid1.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/FlyerAsteroid1.mat new file mode 100644 index 00000000..a96cf027 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/FlyerAsteroid1.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: FlyerAsteroid1 + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 0.5, g: 0.5, b: 0.5, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/FlyerAsteroid1.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/FlyerAsteroid1.mat.meta new file mode 100644 index 00000000..56a3c5d5 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/FlyerAsteroid1.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 294f02eac9561704ebe4baa5b1bc4163 +timeCreated: 1505302910 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipGlow.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipGlow.mat new file mode 100644 index 00000000..fbbd1d2b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipGlow.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: SpaceshipGlow + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: .5 + data: + first: + name: _Parallax + second: .0199999996 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: .5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: .588235319, g: .588235319, b: .588235319, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipGlow.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipGlow.mat.meta new file mode 100644 index 00000000..85e7daaa --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipGlow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 609dbe3d30c4bf84ca15ce89479d7919 +timeCreated: 1505213348 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipHull.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipHull.mat new file mode 100644 index 00000000..ce594958 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipHull.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: SpaceshipHull + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: .5 + data: + first: + name: _Parallax + second: .0199999996 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: .5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: .337254912, g: .337254912, b: .337254912, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipHull.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipHull.mat.meta new file mode 100644 index 00000000..049a0ffe --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Materials/SpaceshipHull.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: de6b3d1666741b24597a4349a143eeb7 +timeCreated: 1505213349 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Spaceship.fbx b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Spaceship.fbx new file mode 100644 index 00000000..0479ea8c Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Spaceship.fbx differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Spaceship.fbx.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Spaceship.fbx.meta new file mode 100644 index 00000000..889ed62f --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Models/Spaceship.fbx.meta @@ -0,0 +1,77 @@ +fileFormatVersion: 2 +guid: 65e16ec6a1570944a980e4988e715ae6 +timeCreated: 1505213349 +licenseType: Store +ModelImporter: + serializedVersion: 19 + fileIDToRecycleName: + 100000: //RootNode + 400000: //RootNode + 2300000: //RootNode + 3300000: //RootNode + 4300000: Spaceship + 9500000: //RootNode + materials: + importMaterials: 1 + materialName: 0 + materialSearch: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleRotations: 1 + optimizeGameObjects: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + clipAnimations: [] + isReadable: 1 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + importBlendShapes: 1 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + optimizeMeshForGPU: 1 + keepQuads: 0 + weldVertices: 1 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVPackMargin: 4 + useFileScale: 1 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + importAnimation: 1 + copyAvatar: 0 + humanDescription: + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + rootMotionBoneName: + hasTranslationDoF: 0 + lastHumanDescriptionAvatarSource: {instanceID: 0} + animationType: 2 + humanoidOversampling: 1 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs.meta new file mode 100644 index 00000000..7c7099fd --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bec40e338146dc14592b49339a98d089 +folderAsset: yes +timeCreated: 1505378214 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/Bullet.prefab b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/Bullet.prefab new file mode 100644 index 00000000..83a46387 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/Bullet.prefab @@ -0,0 +1,118 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &152888 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 490228} + - 33: {fileID: 3315548} + - 23: {fileID: 2373554} + - 135: {fileID: 13586356} + - 54: {fileID: 5434924} + - 114: {fileID: 11494744} + m_Layer: 8 + m_Name: Bullet + m_TagString: Bullet + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &490228 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152888} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!23 &2373554 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152888} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 2100000, guid: 073b1ee561def20429e655b5c8893ad4, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!33 &3315548 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152888} + m_Mesh: {fileID: 4300000, guid: efbb13993d8043d4ba5c752ed4b1a2bc, type: 3} +--- !u!54 &5434924 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152888} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 0 + m_Interpolate: 1 + m_Constraints: 116 + m_CollisionDetection: 1 +--- !u!114 &11494744 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152888} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6321a7d9112988841b7223ac6a925bfc, type: 3} + m_Name: + m_EditorClassIdentifier: + OriginalDirection: {x: 0, y: 0, z: 0} +--- !u!135 &13586356 +SphereCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 152888} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 152888} + m_IsPrefabParent: 1 diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/Bullet.prefab.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/Bullet.prefab.meta new file mode 100644 index 00000000..13976c01 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/Bullet.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5624ee9da9d10514ea7b808e83979c85 +timeCreated: 1505221345 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerListEntry.prefab b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerListEntry.prefab new file mode 100644 index 00000000..42055aa1 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerListEntry.prefab @@ -0,0 +1,626 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &137106 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22410286} + - 222: {fileID: 22229642} + - 114: {fileID: 11446740} + - 114: {fileID: 11423484} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &149278 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22497082} + - 222: {fileID: 22253856} + - 114: {fileID: 11430814} + - 114: {fileID: 11412146} + - 114: {fileID: 11447404} + m_Layer: 5 + m_Name: PlayerReadyButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &155222 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22434874} + - 222: {fileID: 22225450} + - 114: {fileID: 11450088} + - 114: {fileID: 11491512} + m_Layer: 5 + m_Name: PlayerReadyImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &162990 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22423522} + - 222: {fileID: 22263000} + - 114: {fileID: 11470916} + - 114: {fileID: 11440512} + m_Layer: 5 + m_Name: PlayerNameText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &168016 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22451220} + - 222: {fileID: 22244016} + - 114: {fileID: 11495884} + - 114: {fileID: 11433370} + m_Layer: 5 + m_Name: PlayerColorImage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &195212 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22441276} + - 222: {fileID: 22226744} + - 114: {fileID: 11475786} + - 114: {fileID: 11493046} + - 114: {fileID: 11413184} + - 114: {fileID: 11475118} + m_Layer: 5 + m_Name: PlayerListEntry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11412146 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 149278} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11430814} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11413184 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 195212} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 75 + m_PreferredWidth: -1 + m_PreferredHeight: 75 + m_FlexibleWidth: -1 + m_FlexibleHeight: 0 +--- !u!114 &11423484 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137106} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &11430814 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 149278} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11433370 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 50 + m_MinHeight: 50 + m_PreferredWidth: 50 + m_PreferredHeight: 50 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11440512 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 162990} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 +--- !u!114 &11446740 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137106} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Ready? +--- !u!114 &11447404 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 149278} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 150 + m_MinHeight: -1 + m_PreferredWidth: 150 + m_PreferredHeight: -1 + m_FlexibleWidth: 0 + m_FlexibleHeight: -1 +--- !u!114 &11450088 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155222} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 1, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: bd293dc32f4aaf94e8274f2fac2cdf89, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11470916 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 162990} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Player Name +--- !u!114 &11475118 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 195212} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b92420fa27b32d43a6a35af7781c5d8, type: 3} + m_Name: + m_EditorClassIdentifier: + PlayerNameText: {fileID: 11470916} + PlayerColorImage: {fileID: 11495884} + PlayerReadyButton: {fileID: 11412146} + PlayerReadyImage: {fileID: 11450088} +--- !u!114 &11475786 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 195212} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: c222cd02c447941edb09ecb6433229ce, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11491512 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155222} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 50 + m_MinHeight: 50 + m_PreferredWidth: 50 + m_PreferredHeight: 50 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11493046 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 195212} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 3 + m_Spacing: 10 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 1 +--- !u!114 &11495884 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168016} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22225450 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155222} +--- !u!222 &22226744 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 195212} +--- !u!222 &22229642 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137106} +--- !u!222 &22244016 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168016} +--- !u!222 &22253856 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 149278} +--- !u!222 &22263000 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 162990} +--- !u!224 &22410286 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 137106} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 22497082} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22423522 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 162990} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 22441276} + m_RootOrder: 1 + 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!224 &22434874 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 155222} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 22441276} + m_RootOrder: 3 + 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!224 &22441276 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 195212} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22451220} + - {fileID: 22423522} + - {fileID: 22497082} + - {fileID: 22434874} + m_Father: {fileID: 0} + m_RootOrder: 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!224 &22451220 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168016} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 22441276} + m_RootOrder: 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!224 &22497082 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 149278} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22410286} + m_Father: {fileID: 22441276} + m_RootOrder: 2 + 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!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 195212} + m_IsPrefabParent: 1 diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerListEntry.prefab.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerListEntry.prefab.meta new file mode 100644 index 00000000..c86b1606 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerListEntry.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d68bf8413681d9b4aa7328277e632e3f +timeCreated: 1505379840 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerOverviewEntry.prefab b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerOverviewEntry.prefab new file mode 100644 index 00000000..017ab8e6 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerOverviewEntry.prefab @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &168392 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22415550} + - 222: {fileID: 22285266} + - 114: {fileID: 11472648} + m_Layer: 5 + m_Name: PlayerOverviewEntry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11472648 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168392} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Player 12345 + + Score: 123 + + Lives: 10' +--- !u!222 &22285266 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168392} +--- !u!224 &22415550 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 168392} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 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!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 168392} + m_IsPrefabParent: 1 diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerOverviewEntry.prefab.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerOverviewEntry.prefab.meta new file mode 100644 index 00000000..61c7048b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/PlayerOverviewEntry.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f03d1c686a26a1d4da99a4186b0bb1ab +timeCreated: 1505982913 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/RoomListEntry.prefab b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/RoomListEntry.prefab new file mode 100644 index 00000000..f65c6e39 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/RoomListEntry.prefab @@ -0,0 +1,543 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &104826 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22447080} + - 222: {fileID: 22294486} + - 114: {fileID: 11471358} + - 114: {fileID: 11459942} + m_Layer: 5 + m_Name: RoomNameText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &114706 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22408730} + - 222: {fileID: 22287926} + - 114: {fileID: 11481936} + - 114: {fileID: 11466726} + - 114: {fileID: 11460614} + - 114: {fileID: 11446524} + m_Layer: 5 + m_Name: RoomListEntry + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &134178 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22483914} + - 222: {fileID: 22240184} + - 114: {fileID: 11498752} + - 114: {fileID: 11484216} + - 114: {fileID: 11414810} + m_Layer: 5 + m_Name: JoinRoomButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &148318 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22419880} + - 222: {fileID: 22204396} + - 114: {fileID: 11440274} + - 114: {fileID: 11460062} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &161226 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22427766} + - 222: {fileID: 22213590} + - 114: {fileID: 11488528} + - 114: {fileID: 11439134} + m_Layer: 5 + m_Name: RoomPlayersText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11414810 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134178} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 100 + m_MinHeight: -1 + m_PreferredWidth: 100 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11439134 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161226} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 50 + m_MinHeight: -1 + m_PreferredWidth: 50 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 +--- !u!114 &11440274 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Join +--- !u!114 &11446524 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 40b744eae97c5fa47879a477d0f0b667, type: 3} + m_Name: + m_EditorClassIdentifier: + RoomNameText: {fileID: 11471358} + RoomPlayersText: {fileID: 11488528} + JoinRoomButton: {fileID: 11484216} +--- !u!114 &11459942 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 104826} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: 1 + m_FlexibleHeight: -1 +--- !u!114 &11460062 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148318} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &11460614 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 50 + m_PreferredWidth: -1 + m_PreferredHeight: 50 + m_FlexibleWidth: -1 + m_FlexibleHeight: 0 +--- !u!114 &11466726 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -405508275, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 3 + m_Spacing: 10 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 +--- !u!114 &11471358 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 104826} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Room Name +--- !u!114 &11481936 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114706} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: c222cd02c447941edb09ecb6433229ce, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11484216 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134178} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11498752} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11488528 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161226} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 0 / 0 +--- !u!114 &11498752 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134178} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &22204396 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148318} +--- !u!222 &22213590 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161226} +--- !u!222 &22240184 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134178} +--- !u!222 &22287926 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114706} +--- !u!222 &22294486 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 104826} +--- !u!224 &22408730 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 114706} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22447080} + - {fileID: 22427766} + - {fileID: 22483914} + m_Father: {fileID: 0} + m_RootOrder: 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!224 &22419880 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 148318} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 22483914} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &22427766 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 161226} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 22408730} + m_RootOrder: 1 + 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!224 &22447080 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 104826} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 22408730} + m_RootOrder: 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!224 &22483914 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 134178} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 22419880} + m_Father: {fileID: 22408730} + m_RootOrder: 2 + 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!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 114706} + m_IsPrefabParent: 1 diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/RoomListEntry.prefab.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/RoomListEntry.prefab.meta new file mode 100644 index 00000000..f8c755cd --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Prefabs/RoomListEntry.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 03c5e15309335324fba99d68e38cb08b +timeCreated: 1505378968 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources.meta new file mode 100644 index 00000000..fff2d4c3 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0a944631b9e05c542937258f0681e963 +folderAsset: yes +timeCreated: 1505218998 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/BigAsteroid.prefab b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/BigAsteroid.prefab new file mode 100644 index 00000000..ba1c29fa --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/BigAsteroid.prefab @@ -0,0 +1,155 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &140850 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 418212} + - 33: {fileID: 3340722} + - 23: {fileID: 2393178} + - 136: {fileID: 13680552} + - 114: {fileID: 11407986} + - 114: {fileID: 11488924} + - 114: {fileID: 11434552} + - 54: {fileID: 5432676} + m_Layer: 0 + m_Name: BigAsteroid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &418212 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 140850} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!23 &2393178 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 140850} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 2100000, guid: 968fc57e6928a5448ae7d0644246d534, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!33 &3340722 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 140850} + m_Mesh: {fileID: 4300000, guid: 401fae203bae0ee428e401e7f9af9be8, type: 3} +--- !u!54 &5432676 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 140850} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 4 + m_CollisionDetection: 1 +--- !u!114 &11407986 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 140850} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aa584fbee541324448dd18d8409c7a41, type: 3} + m_Name: + m_EditorClassIdentifier: + ObservedComponentsFoldoutOpen: 1 + Group: 0 + prefixField: -1 + Synchronization: 3 + OwnershipTransfer: 0 + ObservedComponents: + - {fileID: 11488924} + viewIdField: 0 + InstantiationId: -1 + isRuntimeInstantiated: 0 +--- !u!114 &11434552 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 140850} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c852cc8bbc743374083cab6f7df68bb7, type: 3} + m_Name: + m_EditorClassIdentifier: + isLargeAsteroid: 1 +--- !u!114 &11488924 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 140850} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 64179f3720bbfe947b7724caa67b7c1d, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SynchronizeVelocity: 1 + m_SynchronizeAngularVelocity: 1 +--- !u!136 &13680552 +CapsuleCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 140850} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 9.061199 + m_Height: 28.60951 + m_Direction: 0 + m_Center: {x: 0.03, y: -0.01, z: -0.05} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 140850} + m_IsPrefabParent: 1 diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/BigAsteroid.prefab.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/BigAsteroid.prefab.meta new file mode 100644 index 00000000..872c3ecf --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/BigAsteroid.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 15f43343ba0a60e47a63d28496373c3f +timeCreated: 1505221098 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/SmallAsteroid.prefab b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/SmallAsteroid.prefab new file mode 100644 index 00000000..59ff27b8 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/SmallAsteroid.prefab @@ -0,0 +1,155 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &151774 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 455668} + - 33: {fileID: 3330816} + - 23: {fileID: 2359794} + - 136: {fileID: 13617098} + - 114: {fileID: 11477742} + - 114: {fileID: 11453902} + - 114: {fileID: 11460080} + - 54: {fileID: 5445788} + m_Layer: 0 + m_Name: SmallAsteroid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &455668 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151774} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!23 &2359794 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151774} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 2100000, guid: 968fc57e6928a5448ae7d0644246d534, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!33 &3330816 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151774} + m_Mesh: {fileID: 4300000, guid: 757fc9771ce30dc468c775b392518d81, type: 3} +--- !u!54 &5445788 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151774} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 4 + m_CollisionDetection: 1 +--- !u!114 &11453902 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 64179f3720bbfe947b7724caa67b7c1d, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SynchronizeVelocity: 1 + m_SynchronizeAngularVelocity: 1 +--- !u!114 &11460080 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c852cc8bbc743374083cab6f7df68bb7, type: 3} + m_Name: + m_EditorClassIdentifier: + isLargeAsteroid: 0 +--- !u!114 &11477742 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151774} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aa584fbee541324448dd18d8409c7a41, type: 3} + m_Name: + m_EditorClassIdentifier: + ObservedComponentsFoldoutOpen: 1 + Group: 0 + prefixField: -1 + Synchronization: 3 + OwnershipTransfer: 0 + ObservedComponents: + - {fileID: 11453902} + viewIdField: 0 + InstantiationId: -1 + isRuntimeInstantiated: 0 +--- !u!136 &13617098 +CapsuleCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 151774} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 5 + m_Height: 12 + m_Direction: 0 + m_Center: {x: 0, y: 0, z: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 151774} + m_IsPrefabParent: 1 diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/SmallAsteroid.prefab.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/SmallAsteroid.prefab.meta new file mode 100644 index 00000000..7f9b5937 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/SmallAsteroid.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 18a79aea49b60d342b7a672b7a34edbe +timeCreated: 1505221248 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/Spaceship.prefab b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/Spaceship.prefab new file mode 100644 index 00000000..50c6cc4b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/Spaceship.prefab @@ -0,0 +1,3275 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &167808 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 476512} + - 198: {fileID: 19801310} + - 199: {fileID: 19957282} + m_Layer: 8 + m_Name: Destruction + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &178952 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 498316} + - 33: {fileID: 3313632} + - 23: {fileID: 2304546} + - 54: {fileID: 5473192} + - 114: {fileID: 11464560} + - 114: {fileID: 11417374} + - 114: {fileID: 11435718} + - 136: {fileID: 13675448} + m_Layer: 8 + m_Name: Spaceship + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &185348 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 4: {fileID: 472082} + - 198: {fileID: 19832664} + - 199: {fileID: 19915712} + m_Layer: 8 + m_Name: EngineTrail + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &472082 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185348} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.25, z: -3.25} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 498316} + m_RootOrder: 0 +--- !u!4 &476512 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167808} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 498316} + m_RootOrder: 1 +--- !u!4 &498316 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178952} + 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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 472082} + - {fileID: 476512} + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!23 &2304546 +MeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178952} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 2100000, guid: b05171e12835ff84fb155f51d69d7c31, type: 2} + - {fileID: 2100000, guid: 073b1ee561def20429e655b5c8893ad4, type: 2} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 1 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!33 &3313632 +MeshFilter: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178952} + m_Mesh: {fileID: 4300000, guid: 65e16ec6a1570944a980e4988e715ae6, type: 3} +--- !u!54 &5473192 +Rigidbody: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178952} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 0 + m_IsKinematic: 0 + m_Interpolate: 1 + m_Constraints: 84 + m_CollisionDetection: 1 +--- !u!114 &11417374 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178952} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 64179f3720bbfe947b7724caa67b7c1d, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SynchronizeVelocity: 1 + m_SynchronizeAngularVelocity: 1 + m_TeleportEnabled: 1 + m_TeleportIfDistanceGreaterThan: 3 +--- !u!114 &11435718 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178952} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c565458f43b8ad4469a2ca341c210318, type: 3} + m_Name: + m_EditorClassIdentifier: + RotationSpeed: 90 + MovementSpeed: 2 + MaxSpeed: 0.1 + Destruction: {fileID: 19801310} + EngineTrail: {fileID: 185348} + BulletPrefab: {fileID: 152888, guid: 5624ee9da9d10514ea7b808e83979c85, type: 2} +--- !u!114 &11464560 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178952} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aa584fbee541324448dd18d8409c7a41, type: 3} + m_Name: + m_EditorClassIdentifier: + ObservedComponentsFoldoutOpen: 1 + Group: 0 + prefixField: -1 + Synchronization: 3 + OwnershipTransfer: 0 + ObservedComponents: + - {fileID: 11417374} + viewIdField: 0 + InstantiationId: -1 + isRuntimeInstantiated: 0 +--- !u!136 &13675448 +CapsuleCollider: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178952} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + m_Radius: 1.70434 + m_Height: 6.570561 + m_Direction: 2 + m_Center: {x: 0, y: 0.5, z: -0.2} +--- !u!198 &19801310 +ParticleSystem: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167808} + serializedVersion: 2 + lengthInSec: 2 + startDelay: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + speed: 1 + randomSeed: 0 + looping: 0 + prewarm: 0 + playOnAwake: 0 + moveWithTransform: 1 + scalingMode: 2 + InitialModule: + serializedVersion: 2 + enabled: 1 + startLifetime: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0.39999998 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minMaxState: 3 + startSpeed: + scalar: 40 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0.25 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minMaxState: 3 + startColor: + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294571731 + maxColor: + serializedVersion: 2 + rgba: 4279401179 + minMaxState: 2 + startSize: + scalar: 2 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0.1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minMaxState: 3 + startRotationX: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotationY: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotation: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + randomizeRotationDirection: 0 + gravityModifier: 0 + maxNumParticles: 1000 + rotation3D: 0 + ShapeModule: + serializedVersion: 2 + enabled: 1 + type: 10 + radius: 1 + angle: 25 + length: 5 + boxX: 1 + boxY: 1 + boxZ: 1 + arc: 360 + placementMode: 0 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + randomDirection: 0 + EmissionModule: + enabled: 1 + serializedVersion: 2 + m_Type: 0 + rate: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + cnt0: 100 + cnt1: 30 + cnt2: 30 + cnt3: 30 + cntmax0: 100 + cntmax1: 30 + cntmax2: 30 + cntmax3: 30 + time0: 0 + time1: 0 + time2: 0 + time3: 0 + m_BurstCount: 1 + SizeModule: + enabled: 0 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + RotationModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + ColorModule: + enabled: 1 + gradient: + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 16777215 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 47031 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294967295 + maxColor: + serializedVersion: 2 + rgba: 4294967295 + minMaxState: 1 + UVModule: + enabled: 0 + frameOverTime: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + randomRow: 1 + VelocityModule: + enabled: 1 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + ForceModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + enabled: 0 + multiplier: 1 + ClampVelocityModule: + enabled: 0 + x: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + magnitude: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxis: 0 + inWorldSpace: 0 + dampen: 1 + SizeBySpeedModule: + enabled: 0 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + range: {x: 0, y: 1} + RotationBySpeedModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294967295 + maxColor: + serializedVersion: 2 + rgba: 4294967295 + minMaxState: 1 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 2 + type: 0 + collisionMode: 0 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_Bounce: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_EnergyLossOnCollision: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + minKillSpeed: 0 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 1 + SubModule: + enabled: 0 + subEmitterBirth: {fileID: 0} + subEmitterBirth1: {fileID: 0} + subEmitterCollision: {fileID: 0} + subEmitterCollision1: {fileID: 0} + subEmitterDeath: {fileID: 0} + subEmitterDeath1: {fileID: 0} +--- !u!198 &19832664 +ParticleSystem: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185348} + serializedVersion: 2 + lengthInSec: 5 + startDelay: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + speed: 1 + randomSeed: 0 + looping: 1 + prewarm: 0 + playOnAwake: 1 + moveWithTransform: 0 + scalingMode: 2 + InitialModule: + serializedVersion: 2 + enabled: 1 + startLifetime: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startSpeed: + scalar: 2.5 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startColor: + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294967295 + maxColor: + serializedVersion: 2 + rgba: 4294967295 + minMaxState: 0 + startSize: + scalar: 3 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotationX: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotationY: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + startRotation: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + randomizeRotationDirection: 0 + gravityModifier: 0 + maxNumParticles: 1000 + rotation3D: 0 + ShapeModule: + serializedVersion: 2 + enabled: 1 + type: 4 + radius: 0.3 + angle: 0 + length: 5 + boxX: 1 + boxY: 1 + boxZ: 1 + arc: 360 + placementMode: 0 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + randomDirection: 0 + EmissionModule: + enabled: 1 + serializedVersion: 2 + m_Type: 0 + rate: + scalar: 40 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + cnt0: 30 + cnt1: 30 + cnt2: 30 + cnt3: 30 + cntmax0: 30 + cntmax1: 30 + cntmax2: 30 + cntmax3: 30 + time0: 0 + time1: 0 + time2: 0 + time3: 0 + m_BurstCount: 0 + SizeModule: + enabled: 1 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + RotationModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + ColorModule: + enabled: 1 + gradient: + maxGradient: + key0: + serializedVersion: 2 + rgba: 3372154994 + key1: + serializedVersion: 2 + rgba: 570395392 + key2: + serializedVersion: 2 + rgba: 16051257 + key3: + serializedVersion: 2 + rgba: 15784338 + key4: + serializedVersion: 2 + rgba: 15784343 + key5: + serializedVersion: 2 + rgba: 16771822 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 3470 + ctime2: 8674 + ctime3: 18697 + ctime4: 30647 + ctime5: 65535 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 29491 + atime2: 65535 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 6 + m_NumAlphaKeys: 3 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294967295 + maxColor: + serializedVersion: 2 + rgba: 4294967295 + minMaxState: 1 + UVModule: + enabled: 0 + frameOverTime: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + randomRow: 1 + VelocityModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + ForceModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + enabled: 0 + multiplier: 1 + ClampVelocityModule: + enabled: 0 + x: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + z: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + magnitude: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxis: 0 + inWorldSpace: 0 + dampen: 1 + SizeBySpeedModule: + enabled: 0 + curve: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 1 + range: {x: 0, y: 1} + RotationBySpeedModule: + enabled: 0 + x: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + y: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + curve: + scalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + maxGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + key0: + serializedVersion: 2 + rgba: 4294967295 + key1: + serializedVersion: 2 + rgba: 4294967295 + key2: + serializedVersion: 2 + rgba: 0 + key3: + serializedVersion: 2 + rgba: 0 + key4: + serializedVersion: 2 + rgba: 0 + key5: + serializedVersion: 2 + rgba: 0 + key6: + serializedVersion: 2 + rgba: 0 + key7: + serializedVersion: 2 + rgba: 0 + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minColor: + serializedVersion: 2 + rgba: 4294967295 + maxColor: + serializedVersion: 2 + rgba: 4294967295 + minMaxState: 1 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 2 + type: 0 + collisionMode: 0 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_Bounce: + scalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + m_EnergyLossOnCollision: + scalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minMaxState: 0 + minKillSpeed: 0 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 1 + SubModule: + enabled: 0 + subEmitterBirth: {fileID: 0} + subEmitterBirth1: {fileID: 0} + subEmitterCollision: {fileID: 0} + subEmitterCollision1: {fileID: 0} + subEmitterDeath: {fileID: 0} + subEmitterDeath1: {fileID: 0} +--- !u!199 &19915712 +ParticleSystemRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 185348} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 0 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} +--- !u!199 &19957282 +ParticleSystemRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 167808} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_Materials: + - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_UseLightProbes: 1 + m_ReflectionProbeUsage: 0 + m_ProbeAnchor: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 178952} + m_IsPrefabParent: 1 diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/Spaceship.prefab.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/Spaceship.prefab.meta new file mode 100644 index 00000000..8bf55c4f --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Resources/Spaceship.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 775dd0a15ad25a544b33ad40ef0da1f0 +timeCreated: 1505220991 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes.meta new file mode 100644 index 00000000..4c814e6e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 93a466838cecd764a94035c8b6f1596b +folderAsset: yes +timeCreated: 1505212609 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-GameScene.unity b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-GameScene.unity new file mode 100644 index 00000000..0dc9085b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-GameScene.unity @@ -0,0 +1,4053 @@ +%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: 8 + 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.4482475, g: 0.49827433, b: 0.57558244, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 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 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &385559766 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 385559770} + - component: {fileID: 385559767} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &385559767 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 385559766} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 68187d3cf4c8746aaa64930f1a766a38, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &385559770 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 385559766} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &502488015 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 502488017} + - component: {fileID: 502488016} + 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 &502488016 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 502488015} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 0.75 + m_Range: 10 + m_SpotAngle: 30 + 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_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &502488017 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 502488015} + m_LocalRotation: {x: 0.5609856, y: -0.43045935, z: -0.09229592, w: 0.7010574} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 45, y: -90, z: -60} +--- !u!1 &523789977 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 523789982} + - component: {fileID: 523789981} + - component: {fileID: 523789979} + - component: {fileID: 523789978} + 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 &523789978 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 523789977} + m_Enabled: 1 +--- !u!124 &523789979 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 523789977} + m_Enabled: 1 +--- !u!20 &523789981 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 523789977} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.11764706, g: 0.11764706, b: 0.1764706, a: 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: 1 + orthographic size: 80 + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &523789982 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 523789977} + m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067} + m_LocalPosition: {x: 0, y: 20, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0} +--- !u!1 &601629550 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 601629551} + - component: {fileID: 601629553} + - component: {fileID: 601629552} + m_Layer: 5 + m_Name: InfoText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &601629551 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 601629550} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2024847293} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 800, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &601629552 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 601629550} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &601629553 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 601629550} +--- !u!1 &964925485 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 964925486} + - component: {fileID: 964925487} + - component: {fileID: 964925488} + - component: {fileID: 964925489} + m_Layer: 0 + m_Name: GameManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &964925486 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964925485} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &964925487 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964925485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 86aba39379844aa428b0d3c0a3d92534, type: 3} + m_Name: + m_EditorClassIdentifier: + InfoText: {fileID: 601629552} + AsteroidPrefabs: + - {fileID: 151774, guid: 18a79aea49b60d342b7a672b7a34edbe, type: 2} + - {fileID: 140850, guid: 15f43343ba0a60e47a63d28496373c3f, type: 2} +--- !u!114 &964925488 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964925485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b579f4077cd5953489882224d803b137, type: 3} + m_Name: + m_EditorClassIdentifier: + PlayerOverviewEntryPrefab: {fileID: 168392, guid: f03d1c686a26a1d4da99a4186b0bb1ab, + type: 2} +--- !u!114 &964925489 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964925485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ffc398cf76e6d458caf303b5fceea504, type: 3} + m_Name: + m_EditorClassIdentifier: + Countdown: 5 + Text: {fileID: 601629552} +--- !u!1 &1363212416 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1363212417} + - component: {fileID: 1363212420} + - component: {fileID: 1363212419} + - component: {fileID: 1363212418} + m_Layer: 5 + m_Name: PlayerOverviewPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1363212417 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1363212416} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2024847293} + m_RootOrder: 1 + 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: -100} + m_SizeDelta: {x: 0, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1363212418 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1363212416} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b579f4077cd5953489882224d803b137, type: 3} + m_Name: + m_EditorClassIdentifier: + PlayerOverviewEntryPrefab: {fileID: 168392, guid: f03d1c686a26a1d4da99a4186b0bb1ab, + type: 2} +--- !u!114 &1363212419 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1363212416} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2095666955, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 10 + m_Right: 10 + m_Top: 10 + m_Bottom: 10 + m_ChildAlignment: 4 + m_StartCorner: 0 + m_StartAxis: 1 + m_CellSize: {x: 250, y: 150} + m_Spacing: {x: 0, y: 0} + m_Constraint: 0 + m_ConstraintCount: 2 +--- !u!222 &1363212420 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1363212416} +--- !u!1 &1638220037 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1638220040} + - component: {fileID: 1638220039} + - component: {fileID: 1638220038} + m_Layer: 0 + m_Name: StarField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!199 &1638220038 +ParticleSystemRenderer: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1638220037} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 0 + m_Materials: + - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_RenderMode: 0 + m_SortMode: 0 + m_MinParticleSize: 0 + m_MaxParticleSize: 0.5 + m_CameraVelocityScale: 0 + m_VelocityScale: 0 + m_LengthScale: 2 + m_SortingFudge: 0 + m_NormalDirection: 1 + m_RenderAlignment: 0 + m_Pivot: {x: 0, y: 0, z: 0} + m_UseCustomVertexStreams: 0 + m_VertexStreams: 0001030405 + m_Mesh: {fileID: 0} + m_Mesh1: {fileID: 0} + m_Mesh2: {fileID: 0} + m_Mesh3: {fileID: 0} + m_MaskInteraction: 0 +--- !u!198 &1638220039 +ParticleSystem: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1638220037} + serializedVersion: 5 + lengthInSec: 999 + simulationSpeed: 1 + stopAction: 0 + looping: 1 + prewarm: 1 + playOnAwake: 1 + useUnscaledTime: 0 + autoRandomSeed: 1 + useRigidbodyForVelocity: 1 + startDelay: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + moveWithTransform: 0 + moveWithCustomTransform: {fileID: 0} + scalingMode: 2 + randomSeed: 0 + InitialModule: + serializedVersion: 3 + enabled: 1 + startLifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 20 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 5 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startColor: + serializedVersion: 2 + minMaxState: 2 + minColor: {r: 0.8745098, g: 0.99607843, b: 1, a: 1} + maxColor: {r: 1, g: 0.99215686, b: 0.7647059, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + startSize: + serializedVersion: 2 + minMaxState: 3 + scalar: 3 + minScalar: 0.10000001 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0.033333335 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + startSizeY: + serializedVersion: 2 + minMaxState: 3 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startSizeZ: + serializedVersion: 2 + minMaxState: 3 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationX: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotationY: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startRotation: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + randomizeRotationDirection: 0 + maxNumParticles: 500 + size3D: 0 + rotation3D: 0 + gravityModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ShapeModule: + serializedVersion: 5 + enabled: 1 + type: 5 + angle: 25 + length: 5 + boxThickness: {x: 0, y: 0, z: 0} + radiusThickness: 1 + donutRadius: 0.2 + m_Position: {x: 0, y: 0, z: 0} + m_Rotation: {x: 0, y: 0, z: 0} + m_Scale: {x: 300, y: 200, z: 1} + placementMode: 0 + m_MeshMaterialIndex: 0 + m_MeshNormalOffset: 0 + m_Mesh: {fileID: 0} + m_MeshRenderer: {fileID: 0} + m_SkinnedMeshRenderer: {fileID: 0} + m_UseMeshMaterialIndex: 0 + m_UseMeshColors: 1 + alignToDirection: 0 + randomDirectionAmount: 0 + sphericalDirectionAmount: 0 + randomPositionAmount: 0 + radius: + value: 1 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + arc: + value: 360 + mode: 0 + spread: 0 + speed: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + EmissionModule: + enabled: 1 + serializedVersion: 4 + rateOverTime: + serializedVersion: 2 + minMaxState: 0 + scalar: 10 + minScalar: 10 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rateOverDistance: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_BurstCount: 0 + m_Bursts: [] + SizeModule: + enabled: 1 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + RotationModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + ColorModule: + enabled: 1 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 0} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0.98039216} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 12722 + atime2: 43562 + atime3: 65535 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 4 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + UVModule: + enabled: 0 + mode: 0 + frameOverTime: + serializedVersion: 2 + minMaxState: 1 + scalar: 0.9999 + minScalar: 0.9999 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + startFrame: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + tilesX: 1 + tilesY: 1 + animationType: 0 + rowIndex: 0 + cycles: 1 + uvChannelMask: -1 + flipU: 0 + flipV: 0 + randomRow: 1 + sprites: + - sprite: {fileID: 0} + VelocityModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + speedModifier: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + InheritVelocityModule: + enabled: 0 + m_Mode: 0 + m_Curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + ForceModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + inWorldSpace: 0 + randomizePerFrame: 0 + ExternalForcesModule: + enabled: 0 + multiplier: 1 + ClampVelocityModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + magnitude: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxis: 0 + inWorldSpace: 0 + multiplyDragByParticleSize: 1 + multiplyDragByParticleVelocity: 1 + dampen: 1 + drag: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + NoiseModule: + enabled: 0 + strength: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthY: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + strengthZ: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + frequency: 0.5 + damping: 1 + octaves: 1 + octaveMultiplier: 0.5 + octaveScale: 2 + quality: 2 + scrollSpeed: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remap: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapY: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapZ: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + remapEnabled: 0 + positionAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + rotationAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + sizeAmount: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + SizeBySpeedModule: + enabled: 0 + curve: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + z: + serializedVersion: 2 + minMaxState: 1 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 1 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 1 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + range: {x: 0, y: 1} + separateAxes: 0 + RotationBySpeedModule: + enabled: 0 + x: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + y: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + curve: + serializedVersion: 2 + minMaxState: 0 + scalar: 0.7853982 + minScalar: 0.7853982 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + separateAxes: 0 + range: {x: 0, y: 1} + ColorBySpeedModule: + enabled: 0 + gradient: + serializedVersion: 2 + minMaxState: 1 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + range: {x: 0, y: 1} + CollisionModule: + enabled: 0 + serializedVersion: 3 + type: 0 + collisionMode: 0 + colliderForce: 0 + multiplyColliderForceByParticleSize: 0 + multiplyColliderForceByParticleSpeed: 0 + multiplyColliderForceByCollisionAngle: 1 + plane0: {fileID: 0} + plane1: {fileID: 0} + plane2: {fileID: 0} + plane3: {fileID: 0} + plane4: {fileID: 0} + plane5: {fileID: 0} + m_Dampen: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_Bounce: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + m_EnergyLossOnCollision: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minKillSpeed: 0 + maxKillSpeed: 10000 + radiusScale: 1 + collidesWith: + serializedVersion: 2 + m_Bits: 4294967295 + maxCollisionShapes: 256 + quality: 0 + voxelSize: 0.5 + collisionMessages: 0 + collidesWithDynamic: 1 + interiorCollisions: 1 + TriggerModule: + enabled: 0 + collisionShape0: {fileID: 0} + collisionShape1: {fileID: 0} + collisionShape2: {fileID: 0} + collisionShape3: {fileID: 0} + collisionShape4: {fileID: 0} + collisionShape5: {fileID: 0} + inside: 1 + outside: 0 + enter: 0 + exit: 0 + radiusScale: 1 + SubModule: + serializedVersion: 2 + enabled: 0 + subEmitters: + - serializedVersion: 2 + emitter: {fileID: 0} + type: 0 + properties: 0 + LightsModule: + enabled: 0 + ratio: 0 + light: {fileID: 0} + randomDistribution: 1 + color: 1 + range: 1 + intensity: 1 + rangeCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + intensityCurve: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + maxLights: 20 + TrailModule: + enabled: 0 + mode: 0 + ratio: 1 + lifetime: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minVertexDistance: 0.2 + textureMode: 0 + ribbonCount: 1 + worldSpace: 0 + dieWithParticles: 1 + sizeAffectsWidth: 1 + sizeAffectsLifetime: 0 + inheritParticleColor: 1 + generateLightingData: 0 + splitSubEmitterRibbons: 0 + colorOverLifetime: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + widthOverTrail: + serializedVersion: 2 + minMaxState: 0 + scalar: 1 + minScalar: 1 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorOverTrail: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + CustomDataModule: + enabled: 0 + mode0: 0 + vectorComponentCount0: 4 + color0: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel0: Color + vector0_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_0: X + vector0_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_1: Y + vector0_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_2: Z + vector0_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel0_3: W + mode1: 0 + vectorComponentCount1: 4 + color1: + serializedVersion: 2 + minMaxState: 0 + minColor: {r: 1, g: 1, b: 1, a: 1} + maxColor: {r: 1, g: 1, b: 1, a: 1} + maxGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + minGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + colorLabel1: Color + vector1_0: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_0: X + vector1_1: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_1: Y + vector1_2: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_2: Z + vector1_3: + serializedVersion: 2 + minMaxState: 0 + scalar: 0 + minScalar: 0 + maxCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + minCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + vectorLabel1_3: W +--- !u!4 &1638220040 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1638220037} + m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_LocalPosition: {x: 0, y: -20, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} +--- !u!1 &2024847289 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2024847293} + - component: {fileID: 2024847292} + - component: {fileID: 2024847291} + - component: {fileID: 2024847290} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2024847290 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2024847289} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &2024847291 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2024847289} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 1 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &2024847292 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2024847289} + 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 &2024847293 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2024847289} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 601629551} + - {fileID: 1363212417} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-GameScene.unity.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-GameScene.unity.meta new file mode 100644 index 00000000..5683a7ef --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-GameScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 98efc37d6307844488eb3e4247dde7e9 +timeCreated: 1505212676 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-LobbyScene.unity b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-LobbyScene.unity new file mode 100644 index 00000000..2be034af --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-LobbyScene.unity @@ -0,0 +1,5045 @@ +%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: 8 + 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.37311912, g: 0.3807398, b: 0.3587272, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 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 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &38029883 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 38029884} + - component: {fileID: 38029888} + - component: {fileID: 38029887} + - component: {fileID: 38029886} + - component: {fileID: 38029885} + m_Layer: 5 + m_Name: LeaveGameButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &38029884 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 38029883} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 971815288} + m_Father: {fileID: 1370510200} + 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: 250, y: 100} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &38029885 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 38029883} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &38029886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 38029883} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 38029887} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: OnLeaveGameButtonClicked + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &38029887 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 38029883} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &38029888 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 38029883} +--- !u!1 &66803651 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 66803652} + - component: {fileID: 66803655} + - component: {fileID: 66803654} + - component: {fileID: 66803653} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &66803652 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 66803651} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 889509551} + m_Father: {fileID: 1953198248} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -17, y: -17} + m_Pivot: {x: 0, y: 1} +--- !u!114 &66803653 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 66803651} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &66803654 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 66803651} +--- !u!114 &66803655 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 66803651} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &167093379 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 167093380} + - component: {fileID: 167093382} + - component: {fileID: 167093381} + - component: {fileID: 167093383} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &167093380 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 167093379} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1020245480} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &167093381 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 167093379} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 244 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Show Room List +--- !u!222 &167093382 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 167093379} +--- !u!114 &167093383 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 167093379} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &224103365 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 224103366} + - component: {fileID: 224103368} + - component: {fileID: 224103367} + m_Layer: 5 + m_Name: JoinRandomRoomText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224103366 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 224103365} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 751292281} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 972.19775, y: -290} + m_SizeDelta: {x: 1344.3955, y: 380} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &224103367 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 224103365} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Trying to join random room... +--- !u!222 &224103368 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 224103365} +--- !u!1 &240084374 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 240084375} + - component: {fileID: 240084378} + - component: {fileID: 240084377} + - component: {fileID: 240084376} + m_Layer: 5 + m_Name: CancelButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &240084375 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 240084374} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 777225157} + m_Father: {fileID: 1406502567} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 797.19775, y: -325} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &240084376 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 240084374} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 240084377} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: OnBackButtonClicked + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: SelectionPanel + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &240084377 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 240084374} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &240084378 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 240084374} +--- !u!1 &300358607 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 300358608} + - component: {fileID: 300358610} + - component: {fileID: 300358609} + - component: {fileID: 300358611} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &300358608 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 300358607} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 800069348} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &300358609 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 300358607} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Start Game +--- !u!222 &300358610 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 300358607} +--- !u!114 &300358611 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 300358607} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &328590475 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 328590476} + - component: {fileID: 328590480} + - component: {fileID: 328590479} + - component: {fileID: 328590478} + m_Layer: 5 + m_Name: PlayerNameInput + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &328590476 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 328590475} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 453351678} + - {fileID: 1665410345} + m_Father: {fileID: 964844638} + 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!114 &328590478 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 328590475} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 328590479} + m_TextComponent: {fileID: 1665410346} + m_Placeholder: {fileID: 453351679} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &328590479 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 328590475} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &328590480 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 328590475} +--- !u!1 &340491865 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 340491866} + - component: {fileID: 340491868} + - component: {fileID: 340491867} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &340491866 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 340491865} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1683117734} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &340491867 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 340491865} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &340491868 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 340491865} +--- !u!1 &453351677 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 453351678} + - component: {fileID: 453351680} + - component: {fileID: 453351679} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &453351678 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 453351677} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 328590476} + 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 &453351679 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 453351677} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter Player Name +--- !u!222 &453351680 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 453351677} +--- !u!1 &516933158 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 516933163} + - component: {fileID: 516933162} + - component: {fileID: 516933161} + - component: {fileID: 516933160} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &516933160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 516933158} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &516933161 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 516933158} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 1 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &516933162 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 516933158} + 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 &516933163 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 516933158} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1165784657} + - {fileID: 1310044696} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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 &523789977 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 523789982} + - component: {fileID: 523789981} + - component: {fileID: 523789979} + - component: {fileID: 523789978} + 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 &523789978 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 523789977} + m_Enabled: 1 +--- !u!124 &523789979 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 523789977} + m_Enabled: 1 +--- !u!20 &523789981 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 523789977} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &523789982 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 523789977} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &559824083 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 559824084} + - component: {fileID: 559824086} + - component: {fileID: 559824085} + - component: {fileID: 559824087} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &559824084 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 559824083} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1585818851} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &559824085 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 559824083} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Create Room +--- !u!222 &559824086 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 559824083} +--- !u!114 &559824087 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 559824083} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &615277852 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 615277853} + - component: {fileID: 615277855} + - component: {fileID: 615277854} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &615277853 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 615277852} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1541721127} + 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 &615277854 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 615277852} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Enter Room Name +--- !u!222 &615277855 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 615277852} +--- !u!1 &635595324 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 635595325} + - component: {fileID: 635595327} + - component: {fileID: 635595326} + m_Layer: 5 + m_Name: PunMeteoroid + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &635595325 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 635595324} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1165784657} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -50} + m_SizeDelta: {x: 796, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &635595326 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 635595324} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 64 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 290 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: PUN Asteroids +--- !u!222 &635595327 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 635595324} +--- !u!1 &693710617 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 693710618} + - component: {fileID: 693710620} + - component: {fileID: 693710619} + - component: {fileID: 693710621} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &693710618 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 693710617} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1629836470} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &693710619 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 693710617} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 244 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Join Random Room +--- !u!222 &693710620 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 693710617} +--- !u!114 &693710621 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 693710617} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &751292280 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 751292281} + - component: {fileID: 751292283} + - component: {fileID: 751292282} + - component: {fileID: 751292284} + m_Layer: 5 + m_Name: JoinRandomRoomPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &751292281 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 751292280} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224103366} + m_Father: {fileID: 1310044696} + m_RootOrder: 3 + 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.000030517578} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &751292282 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 751292280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66efb24ed46044ab8a039599cbc47d7b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &751292283 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 751292280} +--- !u!114 &751292284 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 751292280} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 300 + m_Right: 300 + m_Top: 100 + m_Bottom: 400 + m_ChildAlignment: 1 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &759308734 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 759308735} + - component: {fileID: 759308737} + - component: {fileID: 759308736} + m_Layer: 5 + m_Name: ConnectionStatus + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &759308735 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 759308734} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1165784657} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 50} + m_SizeDelta: {x: 0, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &759308736 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 759308734} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 290 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: ' Connection Status:' +--- !u!222 &759308737 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 759308734} +--- !u!1 &777225156 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 777225157} + - component: {fileID: 777225159} + - component: {fileID: 777225158} + - component: {fileID: 777225160} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &777225157 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777225156} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 240084375} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &777225158 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777225156} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Cancel +--- !u!222 &777225159 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777225156} +--- !u!114 &777225160 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 777225156} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &796836991 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 796836992} + - component: {fileID: 796836994} + - component: {fileID: 796836993} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &796836992 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 796836991} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1541721127} + 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 &796836993 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 796836991} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &796836994 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 796836991} +--- !u!1 &800069347 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 800069348} + - component: {fileID: 800069352} + - component: {fileID: 800069351} + - component: {fileID: 800069350} + - component: {fileID: 800069349} + m_Layer: 5 + m_Name: StartGameButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &800069348 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 800069347} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 300358608} + m_Father: {fileID: 1370510200} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -250, y: 100} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &800069349 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 800069347} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &800069350 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 800069347} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 800069351} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: OnStartGameButtonClicked + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &800069351 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 800069347} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &800069352 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 800069347} +--- !u!1 &870805489 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 870805490} + - component: {fileID: 870805492} + - component: {fileID: 870805491} + - component: {fileID: 870805493} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &870805490 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 870805489} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1848066143} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &870805491 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 870805489} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Login +--- !u!222 &870805492 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 870805489} +--- !u!114 &870805493 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 870805489} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &871182533 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 871182534} + - component: {fileID: 871182537} + - component: {fileID: 871182536} + - component: {fileID: 871182535} + m_Layer: 5 + m_Name: Scrollbar Vertical + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &871182534 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 871182533} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 968632494} + m_Father: {fileID: 1953198248} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: -17} + m_Pivot: {x: 1, y: 1} +--- !u!114 &871182535 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 871182533} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1475666856} + m_HandleRect: {fileID: 1475666855} + m_Direction: 2 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &871182536 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 871182533} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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 +--- !u!222 &871182537 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 871182533} +--- !u!1 &889509550 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 889509551} + - component: {fileID: 889509552} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &889509551 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 889509550} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 66803652} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &889509552 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 889509550} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 1 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &953796484 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 953796485} + - component: {fileID: 953796487} + - component: {fileID: 953796486} + - component: {fileID: 953796488} + m_Layer: 5 + m_Name: RoomListPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &953796485 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 953796484} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1953198248} + - {fileID: 1776772161} + m_Father: {fileID: 1310044696} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &953796486 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 953796484} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66efb24ed46044ab8a039599cbc47d7b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &953796487 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 953796484} +--- !u!114 &953796488 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 953796484} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 300 + m_Right: 300 + m_Top: 100 + m_Bottom: 100 + m_ChildAlignment: 1 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 1 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &955672033 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 955672034} + - component: {fileID: 955672036} + - component: {fileID: 955672035} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &955672034 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 955672033} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1856119462} + 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 &955672035 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 955672033} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 2 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Max Players +--- !u!222 &955672036 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 955672033} +--- !u!1 &964844637 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 964844638} + - component: {fileID: 964844641} + - component: {fileID: 964844640} + - component: {fileID: 964844639} + m_Layer: 5 + m_Name: LoginPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &964844638 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964844637} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 328590476} + - {fileID: 1848066143} + m_Father: {fileID: 1310044696} + 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.000030517578} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &964844639 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964844637} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2095666955, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 100 + m_Bottom: 400 + m_ChildAlignment: 1 + m_StartCorner: 0 + m_StartAxis: 0 + m_CellSize: {x: 300, y: 50} + m_Spacing: {x: 50, y: 50} + m_Constraint: 1 + m_ConstraintCount: 2 +--- !u!114 &964844640 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964844637} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66efb24ed46044ab8a039599cbc47d7b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &964844641 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964844637} +--- !u!1 &968632493 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 968632494} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &968632494 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 968632493} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1475666855} + m_Father: {fileID: 871182534} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &971815287 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 971815288} + - component: {fileID: 971815290} + - component: {fileID: 971815289} + - component: {fileID: 971815291} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &971815288 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 971815287} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 38029884} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &971815289 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 971815287} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Leave Game +--- !u!222 &971815290 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 971815287} +--- !u!114 &971815291 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 971815287} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &1014227906 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1014227907} + - component: {fileID: 1014227910} + - component: {fileID: 1014227909} + - component: {fileID: 1014227908} + m_Layer: 5 + m_Name: Scrollbar Horizontal + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1014227907 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1014227906} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1683117734} + m_Father: {fileID: 1953198248} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -17, y: 20} + m_Pivot: {x: 0, y: 0} +--- !u!114 &1014227908 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1014227906} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 340491867} + m_HandleRect: {fileID: 340491866} + m_Direction: 0 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1014227909 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1014227906} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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 +--- !u!222 &1014227910 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1014227906} +--- !u!1 &1020245479 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1020245480} + - component: {fileID: 1020245483} + - component: {fileID: 1020245482} + - component: {fileID: 1020245481} + - component: {fileID: 1020245484} + m_Layer: 5 + m_Name: RoomListButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1020245480 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020245479} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 167093380} + m_Father: {fileID: 1771933900} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 972.19775, y: -325} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1020245481 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020245479} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1020245482} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: OnRoomListButtonClicked + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: RoomListPanel + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1020245482 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020245479} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1020245483 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020245479} +--- !u!114 &1020245484 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020245479} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 300 + m_MinHeight: -1 + m_PreferredWidth: 300 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1165784656 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1165784657} + - component: {fileID: 1165784659} + - component: {fileID: 1165784658} + - component: {fileID: 1165784660} + m_Layer: 5 + m_Name: TopPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1165784657 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1165784656} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 635595325} + - {fileID: 759308735} + - {fileID: 1496080348} + m_Father: {fileID: 516933163} + m_RootOrder: 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: -100} + m_SizeDelta: {x: 0, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1165784658 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1165784656} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1165784659 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1165784656} +--- !u!114 &1165784660 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1165784656} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe0a55ef565e3984f8866c5c91e3c2fd, type: 3} + m_Name: + m_EditorClassIdentifier: + ConnectionStatusText: {fileID: 759308736} +--- !u!1 &1251081872 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1251081873} + - component: {fileID: 1251081875} + - component: {fileID: 1251081874} + - component: {fileID: 1251081876} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1251081873 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1251081872} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1452023753} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1251081874 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1251081872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 244 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Create Room +--- !u!222 &1251081875 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1251081872} +--- !u!114 &1251081876 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1251081872} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &1310044695 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1310044696} + - component: {fileID: 1310044698} + - component: {fileID: 1310044697} + - component: {fileID: 1310044699} + m_Layer: 5 + m_Name: MainPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1310044696 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310044695} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 964844638} + - {fileID: 1771933900} + - {fileID: 1406502567} + - {fileID: 751292281} + - {fileID: 953796485} + - {fileID: 1370510200} + m_Father: {fileID: 516933163} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 440} + m_SizeDelta: {x: 0, y: 880} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1310044697 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310044695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 84fd812a67908014cb408f749ca7a55e, type: 3} + m_Name: + m_EditorClassIdentifier: + LoginPanel: {fileID: 964844637} + PlayerNameInput: {fileID: 328590478} + SelectionPanel: {fileID: 1771933899} + CreateRoomPanel: {fileID: 1406502566} + RoomNameInputField: {fileID: 1541721128} + MaxPlayersInputField: {fileID: 1856119463} + JoinRandomRoomPanel: {fileID: 751292280} + RoomListPanel: {fileID: 953796484} + RoomListContent: {fileID: 889509550} + RoomListEntryPrefab: {fileID: 114706, guid: 03c5e15309335324fba99d68e38cb08b, type: 2} + InsideRoomPanel: {fileID: 1370510199} + StartGameButton: {fileID: 800069350} + PlayerListEntryPrefab: {fileID: 195212, guid: d68bf8413681d9b4aa7328277e632e3f, + type: 2} +--- !u!222 &1310044698 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310044695} +--- !u!114 &1310044699 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310044695} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b28dd60f6abf16d4094cf0f642a043e2, type: 3} + m_Name: + m_EditorClassIdentifier: + dontDestroyOnLoad: 0 +--- !u!1 &1370510199 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1370510200} + - component: {fileID: 1370510202} + - component: {fileID: 1370510201} + - component: {fileID: 1370510203} + m_Layer: 5 + m_Name: InsideRoomPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1370510200 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1370510199} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 38029884} + - {fileID: 800069348} + m_Father: {fileID: 1310044696} + m_RootOrder: 5 + 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.000061035156} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1370510201 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1370510199} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66efb24ed46044ab8a039599cbc47d7b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1370510202 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1370510199} +--- !u!114 &1370510203 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1370510199} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 300 + m_Right: 300 + m_Top: 100 + m_Bottom: 400 + m_ChildAlignment: 1 + m_Spacing: 0 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1406502566 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1406502567} + - component: {fileID: 1406502569} + - component: {fileID: 1406502568} + - component: {fileID: 1406502570} + m_Layer: 5 + m_Name: CreateRoomPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1406502567 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1406502566} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1571776196} + - {fileID: 1541721127} + - {fileID: 1953383542} + - {fileID: 1856119462} + - {fileID: 240084375} + - {fileID: 1585818851} + m_Father: {fileID: 1310044696} + 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: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1406502568 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1406502566} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66efb24ed46044ab8a039599cbc47d7b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1406502569 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1406502566} +--- !u!114 &1406502570 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1406502566} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2095666955, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 100 + m_Bottom: 400 + m_ChildAlignment: 1 + m_StartCorner: 0 + m_StartAxis: 0 + m_CellSize: {x: 300, y: 50} + m_Spacing: {x: 50, y: 50} + m_Constraint: 1 + m_ConstraintCount: 2 +--- !u!1 &1452023752 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1452023753} + - component: {fileID: 1452023756} + - component: {fileID: 1452023755} + - component: {fileID: 1452023754} + - component: {fileID: 1452023757} + m_Layer: 5 + m_Name: CreateRoomButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1452023753 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452023752} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1251081873} + m_Father: {fileID: 1771933900} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 972.19775, y: -125} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1452023754 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452023752} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1452023755} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: SetActivePanel + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: CreateRoomPanel + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1452023755 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452023752} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1452023756 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452023752} +--- !u!114 &1452023757 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452023752} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 300 + m_MinHeight: -1 + m_PreferredWidth: 300 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1475666854 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1475666855} + - component: {fileID: 1475666857} + - component: {fileID: 1475666856} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1475666855 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1475666854} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 968632494} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.9999999} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1475666856 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1475666854} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1475666857 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1475666854} +--- !u!1 &1496080347 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1496080348} + - component: {fileID: 1496080350} + - component: {fileID: 1496080349} + m_Layer: 5 + m_Name: Logo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1496080348 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1496080347} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1165784657} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -100, y: 0} + m_SizeDelta: {x: 200, y: 200} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1496080349 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1496080347} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 56bbc6b42271d4177ac313247f47ac1f, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1496080350 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1496080347} +--- !u!1 &1541721126 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1541721127} + - component: {fileID: 1541721130} + - component: {fileID: 1541721129} + - component: {fileID: 1541721128} + m_Layer: 5 + m_Name: RoomNameInput + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1541721127 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541721126} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 615277853} + - {fileID: 796836992} + m_Father: {fileID: 1406502567} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 1147.1978, y: -125} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1541721128 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541721126} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1541721129} + m_TextComponent: {fileID: 796836993} + m_Placeholder: {fileID: 615277854} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &1541721129 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541721126} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1541721130 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1541721126} +--- !u!1 &1571776195 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1571776196} + - component: {fileID: 1571776198} + - component: {fileID: 1571776197} + m_Layer: 5 + m_Name: RoomNameText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1571776196 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1571776195} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1406502567} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 797.19775, y: -125} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1571776197 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1571776195} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Room Name +--- !u!222 &1571776198 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1571776195} +--- !u!1 &1585818850 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1585818851} + - component: {fileID: 1585818854} + - component: {fileID: 1585818853} + - component: {fileID: 1585818852} + m_Layer: 5 + m_Name: CreateRoomButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1585818851 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1585818850} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 559824084} + m_Father: {fileID: 1406502567} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 1147.1978, y: -325} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1585818852 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1585818850} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1585818853} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: OnCreateRoomButtonClicked + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1585818853 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1585818850} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1585818854 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1585818850} +--- !u!1 &1629836469 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1629836470} + - component: {fileID: 1629836473} + - component: {fileID: 1629836472} + - component: {fileID: 1629836471} + - component: {fileID: 1629836474} + m_Layer: 5 + m_Name: JoinRandomRoomButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1629836470 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1629836469} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 693710618} + m_Father: {fileID: 1771933900} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 972.19775, y: -225} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1629836471 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1629836469} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1629836472} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: OnJoinRandomRoomButtonClicked + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: JoinRandomRoomPanel + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1629836472 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1629836469} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1629836473 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1629836469} +--- !u!114 &1629836474 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1629836469} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: 300 + m_MinHeight: -1 + m_PreferredWidth: 300 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1665410344 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1665410345} + - component: {fileID: 1665410347} + - component: {fileID: 1665410346} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1665410345 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1665410344} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 328590476} + 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 &1665410346 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1665410344} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1665410347 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1665410344} +--- !u!1 &1683117733 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1683117734} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1683117734 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1683117733} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 340491866} + m_Father: {fileID: 1014227907} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1771933899 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1771933900} + - component: {fileID: 1771933902} + - component: {fileID: 1771933901} + - component: {fileID: 1771933903} + m_Layer: 5 + m_Name: SelectionPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1771933900 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771933899} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1452023753} + - {fileID: 1629836470} + - {fileID: 1020245480} + m_Father: {fileID: 1310044696} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1771933901 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771933899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66efb24ed46044ab8a039599cbc47d7b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1771933902 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771933899} +--- !u!114 &1771933903 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1771933899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2095666955, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 100 + m_Bottom: 400 + m_ChildAlignment: 1 + m_StartCorner: 0 + m_StartAxis: 0 + m_CellSize: {x: 300, y: 50} + m_Spacing: {x: 50, y: 50} + m_Constraint: 1 + m_ConstraintCount: 1 +--- !u!1 &1776772160 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1776772161} + - component: {fileID: 1776772165} + - component: {fileID: 1776772164} + - component: {fileID: 1776772163} + - component: {fileID: 1776772162} + m_Layer: 5 + m_Name: BackButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1776772161 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1776772160} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1928118586} + m_Father: {fileID: 953796485} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0} + m_AnchorMax: {x: 0.5, y: 0} + m_AnchoredPosition: {x: 0, y: 50} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1776772162 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1776772160} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: -1 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1776772163 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1776772160} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1776772164} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: OnBackButtonClicked + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1776772164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1776772160} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1776772165 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1776772160} +--- !u!1 &1806893537 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1806893540} + - component: {fileID: 1806893538} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1806893538 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1806893537} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 68187d3cf4c8746aaa64930f1a766a38, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1806893540 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1806893537} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1848066142 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1848066143} + - component: {fileID: 1848066147} + - component: {fileID: 1848066146} + - component: {fileID: 1848066145} + m_Layer: 5 + m_Name: LoginButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1848066143 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1848066142} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 870805490} + m_Father: {fileID: 964844638} + 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.5, y: 0.5} +--- !u!114 &1848066145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1848066142} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1848066146} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1310044697} + m_MethodName: OnLoginButtonClicked + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: DemoWorker + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1848066146 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1848066142} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1848066147 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1848066142} +--- !u!1 &1856119461 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1856119462} + - component: {fileID: 1856119465} + - component: {fileID: 1856119464} + - component: {fileID: 1856119463} + m_Layer: 5 + m_Name: MaxPlayersInput + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1856119462 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1856119461} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 955672034} + - {fileID: 1902466499} + m_Father: {fileID: 1406502567} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 1147.1978, y: -225} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1856119463 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1856119461} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1856119464} + m_TextComponent: {fileID: 1902466500} + m_Placeholder: {fileID: 955672035} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &1856119464 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1856119461} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1856119465 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1856119461} +--- !u!1 &1902466498 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1902466499} + - component: {fileID: 1902466501} + - component: {fileID: 1902466500} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1902466499 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902466498} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1856119462} + 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 &1902466500 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902466498} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 0 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &1902466501 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902466498} +--- !u!1 &1928118585 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1928118586} + - component: {fileID: 1928118588} + - component: {fileID: 1928118587} + - component: {fileID: 1928118589} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1928118586 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1928118585} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1776772161} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1928118587 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1928118585} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Back +--- !u!222 &1928118588 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1928118585} +--- !u!114 &1928118589 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1928118585} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!1 &1953198247 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1953198248} + - component: {fileID: 1953198251} + - component: {fileID: 1953198250} + - component: {fileID: 1953198249} + m_Layer: 5 + m_Name: RoomListScrollView + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1953198248 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953198247} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 66803652} + - {fileID: 1014227907} + - {fileID: 871182534} + m_Father: {fileID: 953796485} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 972.19775, y: -440} + m_SizeDelta: {x: 1344.3955, y: 680} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1953198249 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953198247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: c222cd02c447941edb09ecb6433229ce, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1953198250 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953198247} +--- !u!114 &1953198251 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953198247} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 889509551} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 1 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 66803652} + m_HorizontalScrollbar: {fileID: 1014227908} + m_VerticalScrollbar: {fileID: 871182535} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1 &1953383541 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1953383542} + - component: {fileID: 1953383544} + - component: {fileID: 1953383543} + m_Layer: 5 + m_Name: MaxPlayersText + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1953383542 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953383541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1406502567} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 797.19775, y: -225} + m_SizeDelta: {x: 300, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1953383543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953383541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Max Players +--- !u!222 &1953383544 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1953383541} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-LobbyScene.unity.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-LobbyScene.unity.meta new file mode 100644 index 00000000..4ccbbc77 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scenes/DemoAsteroids-LobbyScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c8a9d1312a49dc8488a9b32d83d659c7 +timeCreated: 1505212662 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts.meta new file mode 100644 index 00000000..5e14af37 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3ae075de96c44c449ad885c6e84ffb5c +folderAsset: yes +timeCreated: 1505219105 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/AsteroidsGame.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/AsteroidsGame.cs new file mode 100644 index 00000000..52d6de16 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/AsteroidsGame.cs @@ -0,0 +1,35 @@ +using UnityEngine; + +namespace Photon.Pun.Demo.Asteroids +{ + public class AsteroidsGame + { + public const float ASTEROIDS_MIN_SPAWN_TIME = 5.0f; + public const float ASTEROIDS_MAX_SPAWN_TIME = 10.0f; + + public const float PLAYER_RESPAWN_TIME = 4.0f; + + public const int PLAYER_MAX_LIVES = 3; + + public const string PLAYER_LIVES = "PlayerLives"; + public const string PLAYER_READY = "IsPlayerReady"; + public const string PLAYER_LOADED_LEVEL = "PlayerLoadedLevel"; + + public static Color GetColor(int colorChoice) + { + switch (colorChoice) + { + case 0: return Color.red; + case 1: return Color.green; + case 2: return Color.blue; + case 3: return Color.yellow; + case 4: return Color.cyan; + case 5: return Color.grey; + case 6: return Color.magenta; + case 7: return Color.white; + } + + return Color.black; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/AsteroidsGame.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/AsteroidsGame.cs.meta new file mode 100644 index 00000000..978301ec --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/AsteroidsGame.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a3a5d301bebde6547b43d377600a3e57 +timeCreated: 1505986699 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game.meta new file mode 100644 index 00000000..6d92a99c --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 8d3277e3b6ea2fa4885437f70ca2497c +folderAsset: yes +timeCreated: 1505225963 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Asteroid.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Asteroid.cs new file mode 100644 index 00000000..f1910063 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Asteroid.cs @@ -0,0 +1,123 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Asteroid Demo +// +// +// Asteroid Component +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using UnityEngine; + +using Random = UnityEngine.Random; +using Photon.Pun.UtilityScripts; + +namespace Photon.Pun.Demo.Asteroids +{ + public class Asteroid : MonoBehaviour + { + public bool isLargeAsteroid; + + private bool isDestroyed; + + private PhotonView photonView; + +#pragma warning disable 0109 + private new Rigidbody rigidbody; +#pragma warning restore 0109 + + #region UNITY + + public void Awake() + { + photonView = GetComponent(); + + rigidbody = GetComponent(); + + if (photonView.InstantiationData != null) + { + rigidbody.AddForce((Vector3) photonView.InstantiationData[0]); + rigidbody.AddTorque((Vector3) photonView.InstantiationData[1]); + + isLargeAsteroid = (bool) photonView.InstantiationData[2]; + } + } + + public void Update() + { + if (!photonView.IsMine) + { + return; + } + + if (Mathf.Abs(transform.position.x) > Camera.main.orthographicSize * Camera.main.aspect || Mathf.Abs(transform.position.z) > Camera.main.orthographicSize) + { + // Out of the screen + PhotonNetwork.Destroy(gameObject); + } + } + + public void OnCollisionEnter(Collision collision) + { + if (isDestroyed) + { + return; + } + + if (collision.gameObject.CompareTag("Bullet")) + { + if (photonView.IsMine) + { + Bullet bullet = collision.gameObject.GetComponent(); + bullet.Owner.AddScore(isLargeAsteroid ? 2 : 1); + + DestroyAsteroidGlobally(); + } + else + { + DestroyAsteroidLocally(); + } + } + else if (collision.gameObject.CompareTag("Player")) + { + if (photonView.IsMine) + { + collision.gameObject.GetComponent().RPC("DestroySpaceship", RpcTarget.All); + + DestroyAsteroidGlobally(); + } + } + } + + #endregion + + private void DestroyAsteroidGlobally() + { + isDestroyed = true; + + if (isLargeAsteroid) + { + int numberToSpawn = Random.Range(3, 6); + + for (int counter = 0; counter < numberToSpawn; ++counter) + { + Vector3 force = Quaternion.Euler(0, counter * 360.0f / numberToSpawn, 0) * Vector3.forward * Random.Range(0.5f, 1.5f) * 300.0f; + Vector3 torque = Random.insideUnitSphere * Random.Range(500.0f, 1500.0f); + object[] instantiationData = {force, torque, false, PhotonNetwork.Time}; + + PhotonNetwork.InstantiateRoomObject("SmallAsteroid", transform.position + force.normalized * 10.0f, Quaternion.Euler(0, Random.value * 180.0f, 0), 0, instantiationData); + } + } + + PhotonNetwork.Destroy(gameObject); + } + + private void DestroyAsteroidLocally() + { + isDestroyed = true; + + GetComponent().enabled = false; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Asteroid.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Asteroid.cs.meta new file mode 100644 index 00000000..6778bcfd --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Asteroid.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c852cc8bbc743374083cab6f7df68bb7 +timeCreated: 1505219178 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/AsteroidsGameManager.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/AsteroidsGameManager.cs new file mode 100644 index 00000000..8cff2ca0 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/AsteroidsGameManager.cs @@ -0,0 +1,267 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Asteroid demo +// +// +// Game Manager for the Asteroid Demo +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using System.Collections; + +using UnityEngine; +using UnityEngine.UI; + +using Photon.Realtime; +using Photon.Pun.UtilityScripts; +using Hashtable = ExitGames.Client.Photon.Hashtable; + +namespace Photon.Pun.Demo.Asteroids +{ + public class AsteroidsGameManager : MonoBehaviourPunCallbacks + { + public static AsteroidsGameManager Instance = null; + + public Text InfoText; + + public GameObject[] AsteroidPrefabs; + + #region UNITY + + public void Awake() + { + Instance = this; + } + + public override void OnEnable() + { + base.OnEnable(); + + CountdownTimer.OnCountdownTimerHasExpired += OnCountdownTimerIsExpired; + } + + public void Start() + { + Hashtable props = new Hashtable + { + {AsteroidsGame.PLAYER_LOADED_LEVEL, true} + }; + PhotonNetwork.LocalPlayer.SetCustomProperties(props); + } + + public override void OnDisable() + { + base.OnDisable(); + + CountdownTimer.OnCountdownTimerHasExpired -= OnCountdownTimerIsExpired; + } + + #endregion + + #region COROUTINES + + private IEnumerator SpawnAsteroid() + { + while (true) + { + yield return new WaitForSeconds(Random.Range(AsteroidsGame.ASTEROIDS_MIN_SPAWN_TIME, AsteroidsGame.ASTEROIDS_MAX_SPAWN_TIME)); + + Vector2 direction = Random.insideUnitCircle; + Vector3 position = Vector3.zero; + + if (Mathf.Abs(direction.x) > Mathf.Abs(direction.y)) + { + // Make it appear on the left/right side + position = new Vector3(Mathf.Sign(direction.x) * Camera.main.orthographicSize * Camera.main.aspect, 0, direction.y * Camera.main.orthographicSize); + } + else + { + // Make it appear on the top/bottom + position = new Vector3(direction.x * Camera.main.orthographicSize * Camera.main.aspect, 0, Mathf.Sign(direction.y) * Camera.main.orthographicSize); + } + + // Offset slightly so we are not out of screen at creation time (as it would destroy the asteroid right away) + position -= position.normalized * 0.1f; + + + Vector3 force = -position.normalized * 1000.0f; + Vector3 torque = Random.insideUnitSphere * Random.Range(500.0f, 1500.0f); + object[] instantiationData = {force, torque, true}; + + PhotonNetwork.InstantiateRoomObject("BigAsteroid", position, Quaternion.Euler(Random.value * 360.0f, Random.value * 360.0f, Random.value * 360.0f), 0, instantiationData); + } + } + + private IEnumerator EndOfGame(string winner, int score) + { + float timer = 5.0f; + + while (timer > 0.0f) + { + InfoText.text = string.Format("Player {0} won with {1} points.\n\n\nReturning to login screen in {2} seconds.", winner, score, timer.ToString("n2")); + + yield return new WaitForEndOfFrame(); + + timer -= Time.deltaTime; + } + + PhotonNetwork.LeaveRoom(); + } + + #endregion + + #region PUN CALLBACKS + + public override void OnDisconnected(DisconnectCause cause) + { + UnityEngine.SceneManagement.SceneManager.LoadScene("DemoAsteroids-LobbyScene"); + } + + public override void OnLeftRoom() + { + PhotonNetwork.Disconnect(); + } + + public override void OnMasterClientSwitched(Player newMasterClient) + { + if (PhotonNetwork.LocalPlayer.ActorNumber == newMasterClient.ActorNumber) + { + StartCoroutine(SpawnAsteroid()); + } + } + + public override void OnPlayerLeftRoom(Player otherPlayer) + { + CheckEndOfGame(); + } + + public override void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) + { + if (changedProps.ContainsKey(AsteroidsGame.PLAYER_LIVES)) + { + CheckEndOfGame(); + return; + } + + if (!PhotonNetwork.IsMasterClient) + { + return; + } + + + // if there was no countdown yet, the master client (this one) waits until everyone loaded the level and sets a timer start + int startTimestamp; + bool startTimeIsSet = CountdownTimer.TryGetStartTime(out startTimestamp); + + if (changedProps.ContainsKey(AsteroidsGame.PLAYER_LOADED_LEVEL)) + { + if (CheckAllPlayerLoadedLevel()) + { + if (!startTimeIsSet) + { + CountdownTimer.SetStartTime(); + } + } + else + { + // not all players loaded yet. wait: + Debug.Log("setting text waiting for players! ",this.InfoText); + InfoText.text = "Waiting for other players..."; + } + } + + } + + #endregion + + + // called by OnCountdownTimerIsExpired() when the timer ended + private void StartGame() + { + Debug.Log("StartGame!"); + + // on rejoin, we have to figure out if the spaceship exists or not + // if this is a rejoin (the ship is already network instantiated and will be setup via event) we don't need to call PN.Instantiate + + + float angularStart = (360.0f / PhotonNetwork.CurrentRoom.PlayerCount) * PhotonNetwork.LocalPlayer.GetPlayerNumber(); + float x = 20.0f * Mathf.Sin(angularStart * Mathf.Deg2Rad); + float z = 20.0f * Mathf.Cos(angularStart * Mathf.Deg2Rad); + Vector3 position = new Vector3(x, 0.0f, z); + Quaternion rotation = Quaternion.Euler(0.0f, angularStart, 0.0f); + + PhotonNetwork.Instantiate("Spaceship", position, rotation, 0); // avoid this call on rejoin (ship was network instantiated before) + + if (PhotonNetwork.IsMasterClient) + { + StartCoroutine(SpawnAsteroid()); + } + } + + private bool CheckAllPlayerLoadedLevel() + { + foreach (Player p in PhotonNetwork.PlayerList) + { + object playerLoadedLevel; + + if (p.CustomProperties.TryGetValue(AsteroidsGame.PLAYER_LOADED_LEVEL, out playerLoadedLevel)) + { + if ((bool) playerLoadedLevel) + { + continue; + } + } + + return false; + } + + return true; + } + + private void CheckEndOfGame() + { + bool allDestroyed = true; + + foreach (Player p in PhotonNetwork.PlayerList) + { + object lives; + if (p.CustomProperties.TryGetValue(AsteroidsGame.PLAYER_LIVES, out lives)) + { + if ((int) lives > 0) + { + allDestroyed = false; + break; + } + } + } + + if (allDestroyed) + { + if (PhotonNetwork.IsMasterClient) + { + StopAllCoroutines(); + } + + string winner = ""; + int score = -1; + + foreach (Player p in PhotonNetwork.PlayerList) + { + if (p.GetScore() > score) + { + winner = p.NickName; + score = p.GetScore(); + } + } + + StartCoroutine(EndOfGame(winner, score)); + } + } + + private void OnCountdownTimerIsExpired() + { + StartGame(); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/AsteroidsGameManager.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/AsteroidsGameManager.cs.meta new file mode 100644 index 00000000..5647089e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/AsteroidsGameManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 86aba39379844aa428b0d3c0a3d92534 +timeCreated: 1505219187 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Bullet.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Bullet.cs new file mode 100644 index 00000000..07d9d728 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Bullet.cs @@ -0,0 +1,31 @@ +using Photon.Realtime; +using UnityEngine; + +namespace Photon.Pun.Demo.Asteroids +{ + public class Bullet : MonoBehaviour + { + public Player Owner { get; private set; } + + public void Start() + { + Destroy(gameObject, 3.0f); + } + + public void OnCollisionEnter(Collision collision) + { + Destroy(gameObject); + } + + public void InitializeBullet(Player owner, Vector3 originalDirection, float lag) + { + Owner = owner; + + transform.forward = originalDirection; + + Rigidbody rigidbody = GetComponent(); + rigidbody.velocity = originalDirection * 200.0f; + rigidbody.position += rigidbody.velocity * lag; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Bullet.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Bullet.cs.meta new file mode 100644 index 00000000..f51738ba --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Bullet.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6321a7d9112988841b7223ac6a925bfc +timeCreated: 1505219203 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/PlayerOverviewPanel.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/PlayerOverviewPanel.cs new file mode 100644 index 00000000..aaca6848 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/PlayerOverviewPanel.cs @@ -0,0 +1,71 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Asteroid Demo, +// +// +// Player Overview Panel +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using System.Collections.Generic; + +using UnityEngine; +using UnityEngine.UI; + +using ExitGames.Client.Photon; +using Photon.Realtime; +using Photon.Pun.UtilityScripts; + +namespace Photon.Pun.Demo.Asteroids +{ + public class PlayerOverviewPanel : MonoBehaviourPunCallbacks + { + public GameObject PlayerOverviewEntryPrefab; + + private Dictionary playerListEntries; + + #region UNITY + + public void Awake() + { + playerListEntries = new Dictionary(); + + foreach (Player p in PhotonNetwork.PlayerList) + { + GameObject entry = Instantiate(PlayerOverviewEntryPrefab); + entry.transform.SetParent(gameObject.transform); + entry.transform.localScale = Vector3.one; + entry.GetComponent().color = AsteroidsGame.GetColor(p.GetPlayerNumber()); + entry.GetComponent().text = string.Format("{0}\nScore: {1}\nLives: {2}", p.NickName, p.GetScore(), AsteroidsGame.PLAYER_MAX_LIVES); + + playerListEntries.Add(p.ActorNumber, entry); + } + } + + #endregion + + #region PUN CALLBACKS + + public override void OnPlayerLeftRoom(Player otherPlayer) + { + GameObject go = null; + if (this.playerListEntries.TryGetValue(otherPlayer.ActorNumber, out go)) + { + Destroy(playerListEntries[otherPlayer.ActorNumber]); + playerListEntries.Remove(otherPlayer.ActorNumber); + } + } + + public override void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) + { + GameObject entry; + if (playerListEntries.TryGetValue(targetPlayer.ActorNumber, out entry)) + { + entry.GetComponent().text = string.Format("{0}\nScore: {1}\nLives: {2}", targetPlayer.NickName, targetPlayer.GetScore(), targetPlayer.CustomProperties[AsteroidsGame.PLAYER_LIVES]); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/PlayerOverviewPanel.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/PlayerOverviewPanel.cs.meta new file mode 100644 index 00000000..6ded1215 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/PlayerOverviewPanel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b579f4077cd5953489882224d803b137 +timeCreated: 1505982910 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Spaceship.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Spaceship.cs new file mode 100644 index 00000000..523b9cdb --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Spaceship.cs @@ -0,0 +1,220 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Asteroid Demo, +// +// +// Spaceship +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using System.Collections; + +using UnityEngine; + +using Photon.Pun.UtilityScripts; +using Hashtable = ExitGames.Client.Photon.Hashtable; + +namespace Photon.Pun.Demo.Asteroids +{ + public class Spaceship : MonoBehaviour + { + public float RotationSpeed = 90.0f; + public float MovementSpeed = 2.0f; + public float MaxSpeed = 0.2f; + + public ParticleSystem Destruction; + public GameObject EngineTrail; + public GameObject BulletPrefab; + + private PhotonView photonView; + +#pragma warning disable 0109 + private new Rigidbody rigidbody; + private new Collider collider; + private new Renderer renderer; +#pragma warning restore 0109 + + private float rotation = 0.0f; + private float acceleration = 0.0f; + private float shootingTimer = 0.0f; + + private bool controllable = true; + + #region UNITY + + public void Awake() + { + photonView = GetComponent(); + + rigidbody = GetComponent(); + collider = GetComponent(); + renderer = GetComponent(); + } + + public void Start() + { + foreach (Renderer r in GetComponentsInChildren()) + { + r.material.color = AsteroidsGame.GetColor(photonView.Owner.GetPlayerNumber()); + } + } + + public void Update() + { + if (!photonView.AmOwner || !controllable) + { + return; + } + + // we don't want the master client to apply input to remote ships while the remote player is inactive + if (this.photonView.CreatorActorNr != PhotonNetwork.LocalPlayer.ActorNumber) + { + return; + } + + rotation = Input.GetAxis("Horizontal"); + acceleration = Input.GetAxis("Vertical"); + + if (Input.GetButton("Jump") && shootingTimer <= 0.0) + { + shootingTimer = 0.2f; + + photonView.RPC("Fire", RpcTarget.AllViaServer, rigidbody.position, rigidbody.rotation); + } + + if (shootingTimer > 0.0f) + { + shootingTimer -= Time.deltaTime; + } + } + + public void FixedUpdate() + { + if (!photonView.IsMine) + { + return; + } + + if (!controllable) + { + return; + } + + Quaternion rot = rigidbody.rotation * Quaternion.Euler(0, rotation * RotationSpeed * Time.fixedDeltaTime, 0); + rigidbody.MoveRotation(rot); + + Vector3 force = (rot * Vector3.forward) * acceleration * 1000.0f * MovementSpeed * Time.fixedDeltaTime; + rigidbody.AddForce(force); + + if (rigidbody.velocity.magnitude > (MaxSpeed * 1000.0f)) + { + rigidbody.velocity = rigidbody.velocity.normalized * MaxSpeed * 1000.0f; + } + + CheckExitScreen(); + } + + #endregion + + #region COROUTINES + + private IEnumerator WaitForRespawn() + { + yield return new WaitForSeconds(AsteroidsGame.PLAYER_RESPAWN_TIME); + + photonView.RPC("RespawnSpaceship", RpcTarget.AllViaServer); + } + + #endregion + + #region PUN CALLBACKS + + [PunRPC] + public void DestroySpaceship() + { + rigidbody.velocity = Vector3.zero; + rigidbody.angularVelocity = Vector3.zero; + + collider.enabled = false; + renderer.enabled = false; + + controllable = false; + + EngineTrail.SetActive(false); + Destruction.Play(); + + if (photonView.IsMine) + { + object lives; + if (PhotonNetwork.LocalPlayer.CustomProperties.TryGetValue(AsteroidsGame.PLAYER_LIVES, out lives)) + { + PhotonNetwork.LocalPlayer.SetCustomProperties(new Hashtable {{AsteroidsGame.PLAYER_LIVES, ((int) lives <= 1) ? 0 : ((int) lives - 1)}}); + + if (((int) lives) > 1) + { + StartCoroutine("WaitForRespawn"); + } + } + } + } + + [PunRPC] + public void Fire(Vector3 position, Quaternion rotation, PhotonMessageInfo info) + { + float lag = (float) (PhotonNetwork.Time - info.SentServerTime); + GameObject bullet; + + /** Use this if you want to fire one bullet at a time **/ + bullet = Instantiate(BulletPrefab, position, Quaternion.identity) as GameObject; + bullet.GetComponent().InitializeBullet(photonView.Owner, (rotation * Vector3.forward), Mathf.Abs(lag)); + + + /** Use this if you want to fire two bullets at once **/ + //Vector3 baseX = rotation * Vector3.right; + //Vector3 baseZ = rotation * Vector3.forward; + + //Vector3 offsetLeft = -1.5f * baseX - 0.5f * baseZ; + //Vector3 offsetRight = 1.5f * baseX - 0.5f * baseZ; + + //bullet = Instantiate(BulletPrefab, rigidbody.position + offsetLeft, Quaternion.identity) as GameObject; + //bullet.GetComponent().InitializeBullet(photonView.Owner, baseZ, Mathf.Abs(lag)); + //bullet = Instantiate(BulletPrefab, rigidbody.position + offsetRight, Quaternion.identity) as GameObject; + //bullet.GetComponent().InitializeBullet(photonView.Owner, baseZ, Mathf.Abs(lag)); + } + + [PunRPC] + public void RespawnSpaceship() + { + collider.enabled = true; + renderer.enabled = true; + + controllable = true; + + EngineTrail.SetActive(true); + Destruction.Stop(); + } + + #endregion + + private void CheckExitScreen() + { + if (Camera.main == null) + { + return; + } + + if (Mathf.Abs(rigidbody.position.x) > (Camera.main.orthographicSize * Camera.main.aspect)) + { + rigidbody.position = new Vector3(-Mathf.Sign(rigidbody.position.x) * Camera.main.orthographicSize * Camera.main.aspect, 0, rigidbody.position.z); + rigidbody.position -= rigidbody.position.normalized * 0.1f; // offset a little bit to avoid looping back & forth between the 2 edges + } + + if (Mathf.Abs(rigidbody.position.z) > Camera.main.orthographicSize) + { + rigidbody.position = new Vector3(rigidbody.position.x, rigidbody.position.y, -Mathf.Sign(rigidbody.position.z) * Camera.main.orthographicSize); + rigidbody.position -= rigidbody.position.normalized * 0.1f; // offset a little bit to avoid looping back & forth between the 2 edges + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Spaceship.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Spaceship.cs.meta new file mode 100644 index 00000000..55735ff1 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Game/Spaceship.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c565458f43b8ad4469a2ca341c210318 +timeCreated: 1505219195 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby.meta new file mode 100644 index 00000000..4a40ee1b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7087de22e901cb24d91f7c256e564de6 +folderAsset: yes +timeCreated: 1505225982 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyMainPanel.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyMainPanel.cs new file mode 100644 index 00000000..cab7eeaa --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyMainPanel.cs @@ -0,0 +1,372 @@ +using ExitGames.Client.Photon; +using Photon.Realtime; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +namespace Photon.Pun.Demo.Asteroids +{ + public class LobbyMainPanel : MonoBehaviourPunCallbacks + { + [Header("Login Panel")] + public GameObject LoginPanel; + + public InputField PlayerNameInput; + + [Header("Selection Panel")] + public GameObject SelectionPanel; + + [Header("Create Room Panel")] + public GameObject CreateRoomPanel; + + public InputField RoomNameInputField; + public InputField MaxPlayersInputField; + + [Header("Join Random Room Panel")] + public GameObject JoinRandomRoomPanel; + + [Header("Room List Panel")] + public GameObject RoomListPanel; + + public GameObject RoomListContent; + public GameObject RoomListEntryPrefab; + + [Header("Inside Room Panel")] + public GameObject InsideRoomPanel; + + public Button StartGameButton; + public GameObject PlayerListEntryPrefab; + + private Dictionary cachedRoomList; + private Dictionary roomListEntries; + private Dictionary playerListEntries; + + #region UNITY + + public void Awake() + { + PhotonNetwork.AutomaticallySyncScene = true; + + cachedRoomList = new Dictionary(); + roomListEntries = new Dictionary(); + + PlayerNameInput.text = "Player " + Random.Range(1000, 10000); + } + + #endregion + + #region PUN CALLBACKS + + public override void OnConnectedToMaster() + { + this.SetActivePanel(SelectionPanel.name); + } + + public override void OnRoomListUpdate(List roomList) + { + ClearRoomListView(); + + UpdateCachedRoomList(roomList); + UpdateRoomListView(); + } + + public override void OnJoinedLobby() + { + // whenever this joins a new lobby, clear any previous room lists + cachedRoomList.Clear(); + ClearRoomListView(); + } + + // note: when a client joins / creates a room, OnLeftLobby does not get called, even if the client was in a lobby before + public override void OnLeftLobby() + { + cachedRoomList.Clear(); + ClearRoomListView(); + } + + public override void OnCreateRoomFailed(short returnCode, string message) + { + SetActivePanel(SelectionPanel.name); + } + + public override void OnJoinRoomFailed(short returnCode, string message) + { + SetActivePanel(SelectionPanel.name); + } + + public override void OnJoinRandomFailed(short returnCode, string message) + { + string roomName = "Room " + Random.Range(1000, 10000); + + RoomOptions options = new RoomOptions {MaxPlayers = 8}; + + PhotonNetwork.CreateRoom(roomName, options, null); + } + + public override void OnJoinedRoom() + { + // joining (or entering) a room invalidates any cached lobby room list (even if LeaveLobby was not called due to just joining a room) + cachedRoomList.Clear(); + + + SetActivePanel(InsideRoomPanel.name); + + if (playerListEntries == null) + { + playerListEntries = new Dictionary(); + } + + foreach (Player p in PhotonNetwork.PlayerList) + { + GameObject entry = Instantiate(PlayerListEntryPrefab); + entry.transform.SetParent(InsideRoomPanel.transform); + entry.transform.localScale = Vector3.one; + entry.GetComponent().Initialize(p.ActorNumber, p.NickName); + + object isPlayerReady; + if (p.CustomProperties.TryGetValue(AsteroidsGame.PLAYER_READY, out isPlayerReady)) + { + entry.GetComponent().SetPlayerReady((bool) isPlayerReady); + } + + playerListEntries.Add(p.ActorNumber, entry); + } + + StartGameButton.gameObject.SetActive(CheckPlayersReady()); + + Hashtable props = new Hashtable + { + {AsteroidsGame.PLAYER_LOADED_LEVEL, false} + }; + PhotonNetwork.LocalPlayer.SetCustomProperties(props); + } + + public override void OnLeftRoom() + { + SetActivePanel(SelectionPanel.name); + + foreach (GameObject entry in playerListEntries.Values) + { + Destroy(entry.gameObject); + } + + playerListEntries.Clear(); + playerListEntries = null; + } + + public override void OnPlayerEnteredRoom(Player newPlayer) + { + GameObject entry = Instantiate(PlayerListEntryPrefab); + entry.transform.SetParent(InsideRoomPanel.transform); + entry.transform.localScale = Vector3.one; + entry.GetComponent().Initialize(newPlayer.ActorNumber, newPlayer.NickName); + + playerListEntries.Add(newPlayer.ActorNumber, entry); + + StartGameButton.gameObject.SetActive(CheckPlayersReady()); + } + + public override void OnPlayerLeftRoom(Player otherPlayer) + { + Destroy(playerListEntries[otherPlayer.ActorNumber].gameObject); + playerListEntries.Remove(otherPlayer.ActorNumber); + + StartGameButton.gameObject.SetActive(CheckPlayersReady()); + } + + public override void OnMasterClientSwitched(Player newMasterClient) + { + if (PhotonNetwork.LocalPlayer.ActorNumber == newMasterClient.ActorNumber) + { + StartGameButton.gameObject.SetActive(CheckPlayersReady()); + } + } + + public override void OnPlayerPropertiesUpdate(Player targetPlayer, Hashtable changedProps) + { + if (playerListEntries == null) + { + playerListEntries = new Dictionary(); + } + + GameObject entry; + if (playerListEntries.TryGetValue(targetPlayer.ActorNumber, out entry)) + { + object isPlayerReady; + if (changedProps.TryGetValue(AsteroidsGame.PLAYER_READY, out isPlayerReady)) + { + entry.GetComponent().SetPlayerReady((bool) isPlayerReady); + } + } + + StartGameButton.gameObject.SetActive(CheckPlayersReady()); + } + + #endregion + + #region UI CALLBACKS + + public void OnBackButtonClicked() + { + if (PhotonNetwork.InLobby) + { + PhotonNetwork.LeaveLobby(); + } + + SetActivePanel(SelectionPanel.name); + } + + public void OnCreateRoomButtonClicked() + { + string roomName = RoomNameInputField.text; + roomName = (roomName.Equals(string.Empty)) ? "Room " + Random.Range(1000, 10000) : roomName; + + byte maxPlayers; + byte.TryParse(MaxPlayersInputField.text, out maxPlayers); + maxPlayers = (byte) Mathf.Clamp(maxPlayers, 2, 8); + + RoomOptions options = new RoomOptions {MaxPlayers = maxPlayers, PlayerTtl = 10000 }; + + PhotonNetwork.CreateRoom(roomName, options, null); + } + + public void OnJoinRandomRoomButtonClicked() + { + SetActivePanel(JoinRandomRoomPanel.name); + + PhotonNetwork.JoinRandomRoom(); + } + + public void OnLeaveGameButtonClicked() + { + PhotonNetwork.LeaveRoom(); + } + + public void OnLoginButtonClicked() + { + string playerName = PlayerNameInput.text; + + if (!playerName.Equals("")) + { + PhotonNetwork.LocalPlayer.NickName = playerName; + PhotonNetwork.ConnectUsingSettings(); + } + else + { + Debug.LogError("Player Name is invalid."); + } + } + + public void OnRoomListButtonClicked() + { + if (!PhotonNetwork.InLobby) + { + PhotonNetwork.JoinLobby(); + } + + SetActivePanel(RoomListPanel.name); + } + + public void OnStartGameButtonClicked() + { + PhotonNetwork.CurrentRoom.IsOpen = false; + PhotonNetwork.CurrentRoom.IsVisible = false; + + PhotonNetwork.LoadLevel("DemoAsteroids-GameScene"); + } + + #endregion + + private bool CheckPlayersReady() + { + if (!PhotonNetwork.IsMasterClient) + { + return false; + } + + foreach (Player p in PhotonNetwork.PlayerList) + { + object isPlayerReady; + if (p.CustomProperties.TryGetValue(AsteroidsGame.PLAYER_READY, out isPlayerReady)) + { + if (!(bool) isPlayerReady) + { + return false; + } + } + else + { + return false; + } + } + + return true; + } + + private void ClearRoomListView() + { + foreach (GameObject entry in roomListEntries.Values) + { + Destroy(entry.gameObject); + } + + roomListEntries.Clear(); + } + + public void LocalPlayerPropertiesUpdated() + { + StartGameButton.gameObject.SetActive(CheckPlayersReady()); + } + + private void SetActivePanel(string activePanel) + { + LoginPanel.SetActive(activePanel.Equals(LoginPanel.name)); + SelectionPanel.SetActive(activePanel.Equals(SelectionPanel.name)); + CreateRoomPanel.SetActive(activePanel.Equals(CreateRoomPanel.name)); + JoinRandomRoomPanel.SetActive(activePanel.Equals(JoinRandomRoomPanel.name)); + RoomListPanel.SetActive(activePanel.Equals(RoomListPanel.name)); // UI should call OnRoomListButtonClicked() to activate this + InsideRoomPanel.SetActive(activePanel.Equals(InsideRoomPanel.name)); + } + + private void UpdateCachedRoomList(List roomList) + { + foreach (RoomInfo info in roomList) + { + // Remove room from cached room list if it got closed, became invisible or was marked as removed + if (!info.IsOpen || !info.IsVisible || info.RemovedFromList) + { + if (cachedRoomList.ContainsKey(info.Name)) + { + cachedRoomList.Remove(info.Name); + } + + continue; + } + + // Update cached room info + if (cachedRoomList.ContainsKey(info.Name)) + { + cachedRoomList[info.Name] = info; + } + // Add new room info to cache + else + { + cachedRoomList.Add(info.Name, info); + } + } + } + + private void UpdateRoomListView() + { + foreach (RoomInfo info in cachedRoomList.Values) + { + GameObject entry = Instantiate(RoomListEntryPrefab); + entry.transform.SetParent(RoomListContent.transform); + entry.transform.localScale = Vector3.one; + entry.GetComponent().Initialize(info.Name, (byte)info.PlayerCount, info.MaxPlayers); + + roomListEntries.Add(info.Name, entry); + } + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyMainPanel.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyMainPanel.cs.meta new file mode 100644 index 00000000..a0bb73a3 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyMainPanel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 84fd812a67908014cb408f749ca7a55e +timeCreated: 1505228123 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyTopPanel.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyTopPanel.cs new file mode 100644 index 00000000..36727385 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyTopPanel.cs @@ -0,0 +1,22 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace Photon.Pun.Demo.Asteroids +{ + public class LobbyTopPanel : MonoBehaviour + { + private readonly string connectionStatusMessage = " Connection Status: "; + + [Header("UI References")] + public Text ConnectionStatusText; + + #region UNITY + + public void Update() + { + ConnectionStatusText.text = connectionStatusMessage + PhotonNetwork.NetworkClientState; + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyTopPanel.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyTopPanel.cs.meta new file mode 100644 index 00000000..1c842ce3 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/LobbyTopPanel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fe0a55ef565e3984f8866c5c91e3c2fd +timeCreated: 1505378258 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/PlayerListEntry.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/PlayerListEntry.cs new file mode 100644 index 00000000..f76b2bff --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/PlayerListEntry.cs @@ -0,0 +1,97 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Asteroid Demo, +// +// +// Player List Entry +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using UnityEngine; +using UnityEngine.UI; + +using ExitGames.Client.Photon; +using Photon.Realtime; +using Photon.Pun.UtilityScripts; + +namespace Photon.Pun.Demo.Asteroids +{ + public class PlayerListEntry : MonoBehaviour + { + [Header("UI References")] + public Text PlayerNameText; + + public Image PlayerColorImage; + public Button PlayerReadyButton; + public Image PlayerReadyImage; + + private int ownerId; + private bool isPlayerReady; + + #region UNITY + + public void OnEnable() + { + PlayerNumbering.OnPlayerNumberingChanged += OnPlayerNumberingChanged; + } + + public void Start() + { + if (PhotonNetwork.LocalPlayer.ActorNumber != ownerId) + { + PlayerReadyButton.gameObject.SetActive(false); + } + else + { + Hashtable initialProps = new Hashtable() {{AsteroidsGame.PLAYER_READY, isPlayerReady}, {AsteroidsGame.PLAYER_LIVES, AsteroidsGame.PLAYER_MAX_LIVES}}; + PhotonNetwork.LocalPlayer.SetCustomProperties(initialProps); + PhotonNetwork.LocalPlayer.SetScore(0); + + PlayerReadyButton.onClick.AddListener(() => + { + isPlayerReady = !isPlayerReady; + SetPlayerReady(isPlayerReady); + + Hashtable props = new Hashtable() {{AsteroidsGame.PLAYER_READY, isPlayerReady}}; + PhotonNetwork.LocalPlayer.SetCustomProperties(props); + + if (PhotonNetwork.IsMasterClient) + { + FindObjectOfType().LocalPlayerPropertiesUpdated(); + } + }); + } + } + + public void OnDisable() + { + PlayerNumbering.OnPlayerNumberingChanged -= OnPlayerNumberingChanged; + } + + #endregion + + public void Initialize(int playerId, string playerName) + { + ownerId = playerId; + PlayerNameText.text = playerName; + } + + private void OnPlayerNumberingChanged() + { + foreach (Player p in PhotonNetwork.PlayerList) + { + if (p.ActorNumber == ownerId) + { + PlayerColorImage.color = AsteroidsGame.GetColor(p.GetPlayerNumber()); + } + } + } + + public void SetPlayerReady(bool playerReady) + { + PlayerReadyButton.GetComponentInChildren().text = playerReady ? "Ready!" : "Ready?"; + PlayerReadyImage.enabled = playerReady; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/PlayerListEntry.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/PlayerListEntry.cs.meta new file mode 100644 index 00000000..9a0a4395 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/PlayerListEntry.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6b92420fa27b32d43a6a35af7781c5d8 +timeCreated: 1505382856 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/RoomListEntry.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/RoomListEntry.cs new file mode 100644 index 00000000..52b52182 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/RoomListEntry.cs @@ -0,0 +1,35 @@ +using UnityEngine; +using UnityEngine.UI; + +namespace Photon.Pun.Demo.Asteroids +{ + public class RoomListEntry : MonoBehaviour + { + public Text RoomNameText; + public Text RoomPlayersText; + public Button JoinRoomButton; + + private string roomName; + + public void Start() + { + JoinRoomButton.onClick.AddListener(() => + { + if (PhotonNetwork.InLobby) + { + PhotonNetwork.LeaveLobby(); + } + + PhotonNetwork.JoinRoom(roomName); + }); + } + + public void Initialize(string name, byte currentPlayers, byte maxPlayers) + { + roomName = name; + + RoomNameText.text = name; + RoomPlayersText.text = currentPlayers + " / " + maxPlayers; + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/RoomListEntry.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/RoomListEntry.cs.meta new file mode 100644 index 00000000..aa7269f7 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Scripts/Lobby/RoomListEntry.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 40b744eae97c5fa47879a477d0f0b667 +timeCreated: 1505743562 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures.meta new file mode 100644 index 00000000..90949484 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fc9f7bb3bfb617048b28071ed312932e +folderAsset: yes +timeCreated: 1505213282 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerAsteroidEmissive.tif b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerAsteroidEmissive.tif new file mode 100644 index 00000000..9bb3f2c0 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerAsteroidEmissive.tif differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerAsteroidEmissive.tif.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerAsteroidEmissive.tif.meta new file mode 100644 index 00000000..e141a042 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerAsteroidEmissive.tif.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: bfc02e2f0447eaf4190d17879193f0e2 +timeCreated: 1505213348 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipAlbedo.tif b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipAlbedo.tif new file mode 100644 index 00000000..dffd108b Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipAlbedo.tif differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipAlbedo.tif.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipAlbedo.tif.meta new file mode 100644 index 00000000..2376c3ce --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipAlbedo.tif.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: b28381ec2a3dce5459a8fd396a0eb560 +timeCreated: 1505213348 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipEmission.tif b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipEmission.tif new file mode 100644 index 00000000..035917fc Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipEmission.tif differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipEmission.tif.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipEmission.tif.meta new file mode 100644 index 00000000..4117d9a1 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipEmission.tif.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 88217866776ce4c49944ecb360a5c6ca +timeCreated: 1505213348 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipOcclusion.tif b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipOcclusion.tif new file mode 100644 index 00000000..5b8ec841 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipOcclusion.tif differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipOcclusion.tif.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipOcclusion.tif.meta new file mode 100644 index 00000000..f51fa6e9 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoAsteroids/Textures/FlyerPlayershipOcclusion.tif.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 34b19bc20b665b240af9c0fc9d0086f6 +timeCreated: 1505213348 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub.meta new file mode 100644 index 00000000..2b636b86 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 76393d857f3f83e4eac6e8fe98f97c3d +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/DemoHub-Scene.unity b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/DemoHub-Scene.unity new file mode 100644 index 00000000..fcc2156b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/DemoHub-Scene.unity @@ -0,0 +1,10194 @@ +%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: 8 + 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.2, g: 0.2, b: 0.2, a: 1} + m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} + m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, 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} +--- !u!157 &4 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 1 + m_BakeResolution: 50 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 0 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 0 +--- !u!196 &5 +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.16666666 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &26083089 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 26083092} + - component: {fileID: 26083091} + - component: {fileID: 26083090} + - component: {fileID: 26083094} + - component: {fileID: 26083093} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &26083090 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 26083089} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.69411767} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 954746d370bc8934299c8c8267543f4f, type: 3} + m_FontSize: 87 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 100 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: PUN Demo Hub +--- !u!222 &26083091 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 26083089} +--- !u!224 &26083092 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 26083089} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1403074535} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 60} + m_SizeDelta: {x: -20, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &26083093 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 26083089} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &26083094 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 26083089} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &37422736 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 37422737} + - component: {fileID: 37422738} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &37422737 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 37422736} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 915886283} + m_Father: {fileID: 551375295} + m_RootOrder: 14 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -509} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &37422738 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 37422736} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &67265450 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 67265451} + - component: {fileID: 67265453} + - component: {fileID: 67265452} + m_Layer: 5 + m_Name: Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &67265451 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 67265450} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1668938352} + 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.5, y: 1} +--- !u!114 &67265452 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 67265450} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 'Select a demo to learn more about it. + + You should open individual scenes in the Editor to dissect how they work. + + + Look out for Console output. Especially in Editor (double click logs to jump to + their origin in source).' +--- !u!222 &67265453 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 67265450} +--- !u!1 &106371555 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 106371556} + - component: {fileID: 106371557} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &106371556 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 106371555} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 888895983} + m_Father: {fileID: 551375295} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -129} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &106371557 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 106371555} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1001 &113381785 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1181794900} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: -20 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Open Doc (www) + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OpenDocLink + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &143923623 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 143923624} + - component: {fileID: 143923627} + - component: {fileID: 143923626} + - component: {fileID: 143923625} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &143923624 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 143923623} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 551375295} + 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: 1} +--- !u!114 &143923625 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 143923623} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &143923626 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 143923623} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Basics +--- !u!222 &143923627 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 143923623} +--- !u!1 &149856765 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 149856766} + - component: {fileID: 149856767} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &149856766 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 149856765} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1490199881} + m_Father: {fileID: 551375295} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &149856767 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 149856765} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &150709270 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 150709271} + - component: {fileID: 150709274} + - component: {fileID: 150709273} + - component: {fileID: 150709272} + - component: {fileID: 150709276} + - component: {fileID: 150709275} + m_Layer: 5 + m_Name: Canvas In Demo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &150709271 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 150709270} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 396548456} + - {fileID: 540802615} + 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, y: 0} +--- !u!114 &150709272 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 150709270} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &150709273 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 150709270} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &150709274 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 150709270} + 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: 32767 + m_TargetDisplay: 0 +--- !u!114 &150709275 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 150709270} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f877c2f2d403a4d4f975fb1fd64fe7e8, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!225 &150709276 +CanvasGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 150709270} + m_Enabled: 1 + m_Alpha: 0 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!1 &193153675 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 193153676} + - component: {fileID: 193153677} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &193153676 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 193153675} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1951521710} + m_Father: {fileID: 1668938352} + m_RootOrder: 3 + 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!114 &193153677 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 193153675} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &200717655 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 200717656} + - component: {fileID: 200717657} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &200717656 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 200717655} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1132461342} + m_Father: {fileID: 551375295} + m_RootOrder: 10 + 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!114 &200717657 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 200717655} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &203501713 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 724579011} + serializedVersion: 5 + m_Component: + - component: {fileID: 203501714} + - component: {fileID: 203501717} + - component: {fileID: 203501716} + - component: {fileID: 203501715} + - component: {fileID: 203501718} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &203501714 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 203501713} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 851199461} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &203501715 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 203501713} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &203501716 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 203501713} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Mecanim Animations +--- !u!222 &203501717 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 203501713} +--- !u!114 &203501718 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 203501713} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &222424837 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 222424838} + - component: {fileID: 222424842} + - component: {fileID: 222424841} + - component: {fileID: 222424840} + - component: {fileID: 222424839} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &222424838 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 222424837} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 554092594} + m_Father: {fileID: 829058214} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &222424839 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 222424837} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &222424840 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 222424837} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 222424841} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: LoadBalancing + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &222424841 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 222424837} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &222424842 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 222424837} +--- !u!1 &222730892 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 222730893} + - component: {fileID: 222730895} + - component: {fileID: 222730894} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &222730893 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 222730892} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1668938352} + 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: 1} +--- !u!114 &222730894 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 222730892} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: PUN Demo Hub +--- !u!222 &222730895 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 222730892} +--- !u!1 &223430521 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1774371626} + serializedVersion: 5 + m_Component: + - component: {fileID: 223430522} + - component: {fileID: 223430525} + - component: {fileID: 223430524} + - component: {fileID: 223430523} + - component: {fileID: 223430526} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &223430522 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 223430521} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1392037098} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &223430523 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 223430521} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &223430524 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 223430521} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Demo Worker +--- !u!222 &223430525 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 223430521} +--- !u!114 &223430526 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 223430521} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &224436541 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 335914395} + serializedVersion: 5 + m_Component: + - component: {fileID: 224436542} + - component: {fileID: 224436545} + - component: {fileID: 224436544} + - component: {fileID: 224436543} + - component: {fileID: 224436546} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &224436542 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 224436541} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 260261143} + m_Father: {fileID: 1571208211} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &224436543 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 224436541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 224436544} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: RPGMovement + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &224436544 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 224436541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &224436545 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 224436541} +--- !u!114 &224436546 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 224436541} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &253478104 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 253478105} + - component: {fileID: 253478106} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &253478105 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 253478104} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1746070928} + m_Father: {fileID: 551375295} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -471} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &253478106 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 253478104} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &260261142 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 335914395} + serializedVersion: 5 + m_Component: + - component: {fileID: 260261143} + - component: {fileID: 260261146} + - component: {fileID: 260261145} + - component: {fileID: 260261144} + - component: {fileID: 260261147} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &260261143 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 260261142} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 224436542} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &260261144 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 260261142} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &260261145 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 260261142} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: RPG Movement +--- !u!222 &260261146 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 260261142} +--- !u!114 &260261147 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 335914395} + m_GameObject: {fileID: 260261142} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &260582354 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 260582355} + - component: {fileID: 260582359} + - component: {fileID: 260582358} + - component: {fileID: 260582357} + - component: {fileID: 260582356} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &260582355 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 260582354} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 416820563} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &260582356 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 260582354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &260582357 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 260582354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &260582358 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 260582354} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Cockpit +--- !u!222 &260582359 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 260582354} +--- !u!1001 &335914395 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1571208211} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: RPG Movement + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: RPGMovement + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &368540241 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 253478105} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: 2D Game + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: 2DGame + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &394588530 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1819941567} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: -20 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OpenScene + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Load Demo + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &396548452 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 396548456} + - component: {fileID: 396548455} + - component: {fileID: 396548454} + - component: {fileID: 396548453} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &396548453 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 396548452} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0.054523338, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 396548454} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 150709275} + m_MethodName: BackToHub + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &396548454 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 396548452} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 9587663c4d27e47b19a118aabaac4a08, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &396548455 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 396548452} +--- !u!224 &396548456 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 396548452} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 150709271} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -5, y: 5} + m_SizeDelta: {x: 32, y: 32} + m_Pivot: {x: 1, y: 0} +--- !u!1 &416820562 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 416820563} + - component: {fileID: 416820567} + - component: {fileID: 416820566} + - component: {fileID: 416820565} + - component: {fileID: 416820564} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &416820563 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 416820562} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 260582355} + m_Father: {fileID: 451137676} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &416820564 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 416820562} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &416820565 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 416820562} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 416820566} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: PunCockpit + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &416820566 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 416820562} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &416820567 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 416820562} +--- !u!1 &451137675 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 451137676} + - component: {fileID: 451137677} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &451137676 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 451137675} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 416820563} + m_Father: {fileID: 551375295} + m_RootOrder: 19 + 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!114 &451137677 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 451137675} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &464556068 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 464556069} + - component: {fileID: 464556072} + - component: {fileID: 464556071} + - component: {fileID: 464556070} + m_Layer: 5 + m_Name: Watermark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &464556069 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 464556068} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1136221079} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 159, y: 159} + m_Pivot: {x: 1, y: 0} +--- !u!114 &464556070 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 464556068} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 464556071} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &464556071 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 464556068} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.2784314} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 56bbc6b42271d4177ac313247f47ac1f, type: 3} + m_Type: 0 + m_PreserveAspect: 1 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &464556072 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 464556068} +--- !u!1 &467397063 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 467397065} + - component: {fileID: 467397064} + m_Layer: 0 + m_Name: EventSystemSpawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &467397064 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 467397063} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 68187d3cf4c8746aaa64930f1a766a38, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &467397065 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 467397063} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 449, y: 229, z: 0} + m_LocalScale: {x: 1.1225, y: 1.1225, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &523419312 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 193153676} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: -20 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Open Tutorial (www) + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OpenTutorialLink + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &529195475 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 529195476} + - component: {fileID: 529195479} + - component: {fileID: 529195478} + - component: {fileID: 529195477} + m_Layer: 5 + m_Name: Scrollbar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &529195476 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 529195475} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1441541974} + m_Father: {fileID: 1174516281} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 1, y: 0.5} +--- !u!114 &529195477 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 529195475} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1819294242} + m_HandleRect: {fileID: 1819294241} + m_Direction: 2 + m_Value: 0 + m_Size: 1 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &529195478 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 529195475} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: c222cd02c447941edb09ecb6433229ce, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &529195479 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 529195475} +--- !u!1001 &530281235 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 712771298} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Chat + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: Chat + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &540802611 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 540802615} + - component: {fileID: 540802612} + m_Layer: 0 + m_Name: EventSystemSpawner + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &540802612 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 540802611} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 68187d3cf4c8746aaa64930f1a766a38, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &540802615 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 540802611} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 150709271} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &551375294 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 551375295} + - component: {fileID: 551375296} + - component: {fileID: 551375297} + m_Layer: 5 + m_Name: List Content Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &551375295 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 551375294} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 143923624} + - {fileID: 1159945305} + - {fileID: 662795186} + - {fileID: 106371556} + - {fileID: 149856766} + - {fileID: 979202780} + - {fileID: 1446904508} + - {fileID: 843004323} + - {fileID: 712771298} + - {fileID: 1349473983} + - {fileID: 200717656} + - {fileID: 1571208211} + - {fileID: 2028051375} + - {fileID: 253478105} + - {fileID: 37422737} + - {fileID: 778027956} + - {fileID: 2014222391} + - {fileID: 829058214} + - {fileID: 1401296516} + - {fileID: 451137676} + m_Father: {fileID: 1927706826} + 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: -5, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &551375296 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 551375294} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 0 + m_Spacing: 8 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!114 &551375297 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 551375294} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1741964061, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 0 + m_VerticalFit: 2 +--- !u!1 &554092593 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 554092594} + - component: {fileID: 554092598} + - component: {fileID: 554092597} + - component: {fileID: 554092596} + - component: {fileID: 554092595} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &554092594 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 554092593} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 222424838} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &554092595 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 554092593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &554092596 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 554092593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &554092597 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 554092593} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: LoadBalancing +--- !u!222 &554092598 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 554092593} +--- !u!1001 &571238925 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1446904508} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Pickup, Teams, Scores + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: PickupTeamsScores + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &598418033 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 530281235} + serializedVersion: 5 + m_Component: + - component: {fileID: 598418034} + - component: {fileID: 598418037} + - component: {fileID: 598418036} + - component: {fileID: 598418035} + - component: {fileID: 598418038} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &598418034 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 598418033} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2107589019} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &598418035 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 598418033} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &598418036 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 598418033} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Chat +--- !u!222 &598418037 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 598418033} +--- !u!114 &598418038 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 598418033} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1001 &626387486 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1159945305} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Demo Boxes + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: DemoBoxes + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &662795185 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 662795186} + - component: {fileID: 662795187} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &662795186 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 662795185} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1392037098} + m_Father: {fileID: 551375295} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -91} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &662795187 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 662795185} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1001 &685742142 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 106371556} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Movement Smoothing + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: MovementSmoothing + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &712771297 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 712771298} + - component: {fileID: 712771299} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &712771298 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 712771297} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2107589019} + m_Father: {fileID: 551375295} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &712771299 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 712771297} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1001 &724579011 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 2028051375} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Mecanim Animations + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: MecanimAnimations + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &736309006 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 685742142} + serializedVersion: 5 + m_Component: + - component: {fileID: 736309007} + - component: {fileID: 736309010} + - component: {fileID: 736309009} + - component: {fileID: 736309008} + - component: {fileID: 736309011} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &736309007 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 736309006} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 888895983} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &736309008 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 736309006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &736309009 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 736309006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Movement Smoothing +--- !u!222 &736309010 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 736309006} +--- !u!114 &736309011 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 736309006} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1001 &757667770 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 763421055} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: -20 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Main Doc (www) + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: OpenMainWebLink + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &763421054 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 763421055} + - component: {fileID: 763421056} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &763421055 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 763421054} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2119830721} + m_Father: {fileID: 1668938352} + m_RootOrder: 6 + 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: 200, y: 30} + m_Pivot: {x: 0, y: 0} +--- !u!114 &763421056 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 763421054} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 1 + m_MinWidth: 40 + m_MinHeight: 30 + m_PreferredWidth: 40 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &768385444 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 768385445} + - component: {fileID: 768385449} + - component: {fileID: 768385448} + - component: {fileID: 768385447} + - component: {fileID: 768385446} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &768385445 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768385444} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1365140810} + m_Father: {fileID: 1349473983} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &768385446 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768385444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &768385447 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768385444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 768385448} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Asteroids + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &768385448 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768385444} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &768385449 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 768385444} +--- !u!1 &769670909 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 769670910} + m_Layer: 5 + m_Name: Hub Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &769670910 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 769670909} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1174516281} + - {fileID: 1668938352} + m_Father: {fileID: 1136221079} + 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: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &778027955 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 778027956} + - component: {fileID: 778027957} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &778027956 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 778027955} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1013577080} + m_Father: {fileID: 551375295} + m_RootOrder: 15 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -547} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &778027957 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 778027955} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &829058213 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 829058214} + - component: {fileID: 829058215} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &829058214 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 829058213} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 222424838} + m_Father: {fileID: 551375295} + m_RootOrder: 17 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -129} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &829058215 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 829058213} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &843004322 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 843004323} + - component: {fileID: 843004326} + - component: {fileID: 843004325} + - component: {fileID: 843004324} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &843004323 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 843004322} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 551375295} + m_RootOrder: 7 + 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: 1} +--- !u!114 &843004324 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 843004322} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &843004325 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 843004322} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Feature Demos +--- !u!222 &843004326 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 843004322} +--- !u!1 &851199460 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 724579011} + serializedVersion: 5 + m_Component: + - component: {fileID: 851199461} + - component: {fileID: 851199464} + - component: {fileID: 851199463} + - component: {fileID: 851199462} + - component: {fileID: 851199465} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &851199461 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 851199460} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 203501714} + m_Father: {fileID: 2028051375} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &851199462 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 851199460} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 851199463} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: MecanimAnimations + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &851199463 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 851199460} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &851199464 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 851199460} +--- !u!114 &851199465 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 724579011} + m_GameObject: {fileID: 851199460} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &855476138 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1724614324} + serializedVersion: 5 + m_Component: + - component: {fileID: 855476139} + - component: {fileID: 855476142} + - component: {fileID: 855476141} + - component: {fileID: 855476140} + - component: {fileID: 855476143} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &855476139 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 855476138} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1472075402} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &855476140 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 855476138} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &855476141 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 855476138} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Ownership Transfer +--- !u!222 &855476142 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 855476138} +--- !u!114 &855476143 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 855476138} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &888895982 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 685742142} + serializedVersion: 5 + m_Component: + - component: {fileID: 888895983} + - component: {fileID: 888895986} + - component: {fileID: 888895985} + - component: {fileID: 888895984} + - component: {fileID: 888895987} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &888895983 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 888895982} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 736309007} + m_Father: {fileID: 106371556} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &888895984 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 888895982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 888895985} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: MovementSmoothing + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &888895985 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 888895982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &888895986 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 888895982} +--- !u!114 &888895987 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 685742142} + m_GameObject: {fileID: 888895982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &915886282 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1943996745} + serializedVersion: 5 + m_Component: + - component: {fileID: 915886283} + - component: {fileID: 915886286} + - component: {fileID: 915886285} + - component: {fileID: 915886284} + - component: {fileID: 915886287} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &915886283 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 915886282} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 954629820} + m_Father: {fileID: 37422737} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &915886284 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 915886282} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 915886285} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: FriendsAndAuth + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &915886285 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 915886282} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &915886286 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 915886282} +--- !u!114 &915886287 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 915886282} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &954629819 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1943996745} + serializedVersion: 5 + m_Component: + - component: {fileID: 954629820} + - component: {fileID: 954629823} + - component: {fileID: 954629822} + - component: {fileID: 954629821} + - component: {fileID: 954629824} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &954629820 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 954629819} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 915886283} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &954629821 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 954629819} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &954629822 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 954629819} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Friends & Authentication +--- !u!222 &954629823 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 954629819} +--- !u!114 &954629824 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1943996745} + m_GameObject: {fileID: 954629819} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &979202779 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 979202780} + - component: {fileID: 979202781} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &979202780 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 979202779} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1472075402} + m_Father: {fileID: 551375295} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -129} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &979202781 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 979202779} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1013577079 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1112516774} + serializedVersion: 5 + m_Component: + - component: {fileID: 1013577080} + - component: {fileID: 1013577083} + - component: {fileID: 1013577082} + - component: {fileID: 1013577081} + - component: {fileID: 1013577084} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1013577080 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1013577079} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1286520547} + m_Father: {fileID: 778027956} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1013577081 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1013577079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1013577082} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: TurnBasedGame + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1013577082 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1013577079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1013577083 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1013577079} +--- !u!114 &1013577084 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1013577079} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1013614459 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 757667770} + serializedVersion: 5 + m_Component: + - component: {fileID: 1013614460} + - component: {fileID: 1013614464} + - component: {fileID: 1013614463} + - component: {fileID: 1013614462} + - component: {fileID: 1013614461} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1013614460 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 1013614459} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 2119830721} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1013614461 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 1013614459} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1013614462 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 1013614459} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1013614463 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 1013614459} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Main Doc (www) +--- !u!222 &1013614464 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 1013614459} +--- !u!1 &1015865426 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1015865431} + - component: {fileID: 1015865430} + - component: {fileID: 1015865428} + - component: {fileID: 1015865427} + 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 &1015865427 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1015865426} + m_Enabled: 1 +--- !u!124 &1015865428 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1015865426} + m_Enabled: 1 +--- !u!20 &1015865430 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1015865426} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1015865431 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1015865426} + 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_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1070167232 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1389694865} + serializedVersion: 5 + m_Component: + - component: {fileID: 1070167233} + - component: {fileID: 1070167236} + - component: {fileID: 1070167235} + - component: {fileID: 1070167234} + - component: {fileID: 1070167237} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1070167233 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1070167232} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1490199881} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1070167234 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1070167232} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1070167235 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1070167232} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Basic Tutorial +--- !u!222 &1070167236 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1070167232} +--- !u!114 &1070167237 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1070167232} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &1092661494 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 394588530} + serializedVersion: 5 + m_Component: + - component: {fileID: 1092661495} + - component: {fileID: 1092661497} + - component: {fileID: 1092661496} + - component: {fileID: 1092661498} + - component: {fileID: 1092661499} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1092661495 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1092661494} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1787721935} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1092661496 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1092661494} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Load Demo +--- !u!222 &1092661497 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1092661494} +--- !u!114 &1092661498 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1092661494} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1092661499 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1092661494} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1001 &1112516774 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 778027956} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Turn Based Game + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: TurnBasedGame + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1132461341 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1132461342} + - component: {fileID: 1132461346} + - component: {fileID: 1132461345} + - component: {fileID: 1132461344} + - component: {fileID: 1132461343} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1132461342 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1132461341} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1630120029} + m_Father: {fileID: 200717656} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1132461343 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1132461341} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1132461344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1132461341} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1132461345} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: SlotRacer + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1132461345 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1132461341} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1132461346 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1132461341} +--- !u!1 &1136221078 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1136221079} + - component: {fileID: 1136221082} + - component: {fileID: 1136221081} + - component: {fileID: 1136221080} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1136221079 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1136221078} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1452237460} + - {fileID: 464556069} + - {fileID: 769670910} + - {fileID: 1403074535} + m_Father: {fileID: 0} + m_RootOrder: 2 + 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!114 &1136221080 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1136221078} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1136221081 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1136221078} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0.5 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1136221082 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1136221078} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 1 + 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!1 &1159945304 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1159945305} + - component: {fileID: 1159945306} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1159945305 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1159945304} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1996388972} + m_Father: {fileID: 551375295} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -53} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1159945306 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1159945304} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1174516280 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1174516281} + m_Layer: 5 + m_Name: List Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1174516281 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1174516280} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1927706826} + - {fileID: 529195476} + m_Father: {fileID: 769670910} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 315, y: 0} + m_Pivot: {x: 0, y: 0.5} +--- !u!1 &1181794899 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1181794900} + - component: {fileID: 1181794901} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1181794900 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1181794899} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 0.99999994} + m_Children: + - {fileID: 1262887352} + m_Father: {fileID: 1668938352} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1181794901 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1181794899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1187450192 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 571238925} + serializedVersion: 5 + m_Component: + - component: {fileID: 1187450193} + - component: {fileID: 1187450196} + - component: {fileID: 1187450195} + - component: {fileID: 1187450194} + - component: {fileID: 1187450197} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1187450193 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1187450192} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1449626443} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1187450194 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1187450192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1187450195 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1187450192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Pickup, Teams, Scores +--- !u!222 &1187450196 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1187450192} +--- !u!114 &1187450197 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1187450192} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &1223797533 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1223797534} + - component: {fileID: 1223797535} + m_Layer: 5 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1223797534 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1223797533} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1668938352} + m_RootOrder: 5 + 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!114 &1223797535 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1223797533} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 100 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1262887351 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 113381785} + serializedVersion: 5 + m_Component: + - component: {fileID: 1262887352} + - component: {fileID: 1262887356} + - component: {fileID: 1262887355} + - component: {fileID: 1262887354} + - component: {fileID: 1262887353} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1262887352 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1262887351} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1513827850} + m_Father: {fileID: 1181794900} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1262887353 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1262887351} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1262887354 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1262887351} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1262887355} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: OpenDocLink + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1262887355 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1262887351} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1262887356 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1262887351} +--- !u!1 &1286520546 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1112516774} + serializedVersion: 5 + m_Component: + - component: {fileID: 1286520547} + - component: {fileID: 1286520550} + - component: {fileID: 1286520549} + - component: {fileID: 1286520548} + - component: {fileID: 1286520551} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1286520547 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1286520546} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1013577080} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1286520548 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1286520546} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1286520549 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1286520546} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Turn Based Game +--- !u!222 &1286520550 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1286520546} +--- !u!114 &1286520551 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1112516774} + m_GameObject: {fileID: 1286520546} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &1349473982 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1349473983} + - component: {fileID: 1349473984} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1349473983 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1349473982} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 768385445} + m_Father: {fileID: 551375295} + m_RootOrder: 9 + 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!114 &1349473984 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1349473982} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1365140809 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1365140810} + - component: {fileID: 1365140814} + - component: {fileID: 1365140813} + - component: {fileID: 1365140812} + - component: {fileID: 1365140811} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1365140810 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1365140809} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 768385445} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1365140811 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1365140809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1365140812 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1365140809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1365140813 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1365140809} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Asteroids +--- !u!222 &1365140814 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1365140809} +--- !u!1001 &1389694865 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 149856766} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Basic Tutorial + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: BasicTutorial + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1392037097 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1774371626} + serializedVersion: 5 + m_Component: + - component: {fileID: 1392037098} + - component: {fileID: 1392037101} + - component: {fileID: 1392037100} + - component: {fileID: 1392037099} + - component: {fileID: 1392037102} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1392037098 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 1392037097} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 223430522} + m_Father: {fileID: 662795186} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1392037099 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 1392037097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1392037100} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: DemoWorker + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1392037100 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 1392037097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1392037101 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 1392037097} +--- !u!114 &1392037102 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1774371626} + m_GameObject: {fileID: 1392037097} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1401296512 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1401296516} + - component: {fileID: 1401296515} + - component: {fileID: 1401296514} + - component: {fileID: 1401296513} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1401296513 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1401296512} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &1401296514 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1401296512} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Advanced +--- !u!222 &1401296515 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1401296512} +--- !u!224 &1401296516 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1401296512} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 551375295} + m_RootOrder: 18 + 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: 1} +--- !u!1 &1403074531 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1403074535} + - component: {fileID: 1403074532} + - component: {fileID: 1403074533} + m_Layer: 5 + m_Name: Editor SplashScreen Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!225 &1403074532 +CanvasGroup: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1403074531} + m_Enabled: 1 + m_Alpha: 1 + m_Interactable: 1 + m_BlocksRaycasts: 1 + m_IgnoreParentGroups: 0 +--- !u!114 &1403074533 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1403074531} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f8d56a54ae062da4a87516fb994f4e30, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!224 &1403074535 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1403074531} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2120715325} + - {fileID: 26083092} + - {fileID: 1823079760} + m_Father: {fileID: 1136221079} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1441541973 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1441541974} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1441541974 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1441541973} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1819294241} + m_Father: {fileID: 529195476} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1446904507 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1446904508} + - component: {fileID: 1446904509} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1446904508 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1446904507} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1449626443} + m_Father: {fileID: 551375295} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -281} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1446904509 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1446904507} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1449626442 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 571238925} + serializedVersion: 5 + m_Component: + - component: {fileID: 1449626443} + - component: {fileID: 1449626446} + - component: {fileID: 1449626445} + - component: {fileID: 1449626444} + - component: {fileID: 1449626447} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1449626443 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1449626442} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1187450193} + m_Father: {fileID: 1446904508} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1449626444 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1449626442} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1449626445} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: PickupTeamsScores + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1449626445 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1449626442} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1449626446 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1449626442} +--- !u!114 &1449626447 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 571238925} + m_GameObject: {fileID: 1449626442} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1452237459 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1452237460} + - component: {fileID: 1452237462} + - component: {fileID: 1452237461} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1452237460 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452237459} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1136221079} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1452237461 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452237459} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66efb24ed46044ab8a039599cbc47d7b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1452237462 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1452237459} +--- !u!1 &1472075401 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1724614324} + serializedVersion: 5 + m_Component: + - component: {fileID: 1472075402} + - component: {fileID: 1472075405} + - component: {fileID: 1472075404} + - component: {fileID: 1472075403} + - component: {fileID: 1472075406} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1472075402 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 1472075401} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 855476139} + m_Father: {fileID: 979202780} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1472075403 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 1472075401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1472075404} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: OwnershipTransfer + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1472075404 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 1472075401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1472075405 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 1472075401} +--- !u!114 &1472075406 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1724614324} + m_GameObject: {fileID: 1472075401} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1490199880 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 1389694865} + serializedVersion: 5 + m_Component: + - component: {fileID: 1490199881} + - component: {fileID: 1490199884} + - component: {fileID: 1490199883} + - component: {fileID: 1490199882} + - component: {fileID: 1490199885} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1490199881 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1490199880} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1070167233} + m_Father: {fileID: 149856766} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1490199882 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1490199880} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1490199883} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: BasicTutorial + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1490199883 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1490199880} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1490199884 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1490199880} +--- !u!114 &1490199885 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 1389694865} + m_GameObject: {fileID: 1490199880} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1513827849 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 113381785} + serializedVersion: 5 + m_Component: + - component: {fileID: 1513827850} + - component: {fileID: 1513827854} + - component: {fileID: 1513827853} + - component: {fileID: 1513827852} + - component: {fileID: 1513827851} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1513827850 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1513827849} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1262887352} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1513827851 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1513827849} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1513827852 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1513827849} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1513827853 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1513827849} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Open Doc (www) +--- !u!222 &1513827854 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 113381785} + m_GameObject: {fileID: 1513827849} +--- !u!1 &1571208210 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1571208211} + - component: {fileID: 1571208212} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1571208211 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1571208210} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 224436542} + m_Father: {fileID: 551375295} + m_RootOrder: 11 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -395} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1571208212 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1571208210} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1602607499 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 626387486} + serializedVersion: 5 + m_Component: + - component: {fileID: 1602607500} + - component: {fileID: 1602607503} + - component: {fileID: 1602607502} + - component: {fileID: 1602607501} + - component: {fileID: 1602607504} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1602607500 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1602607499} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1996388972} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1602607501 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1602607499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1602607502 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1602607499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Demo Boxes +--- !u!222 &1602607503 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1602607499} +--- !u!114 &1602607504 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1602607499} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &1630120028 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1630120029} + - component: {fileID: 1630120033} + - component: {fileID: 1630120032} + - component: {fileID: 1630120031} + - component: {fileID: 1630120030} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1630120029 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1630120028} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1132461342} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1630120030 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1630120028} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!114 &1630120031 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1630120028} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1630120032 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1630120028} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Slot Racer +--- !u!222 &1630120033 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1630120028} +--- !u!1 &1668938349 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1668938352} + - component: {fileID: 1668938351} + - component: {fileID: 1668938350} + - component: {fileID: 1668938353} + m_Layer: 5 + m_Name: Content Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1668938350 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1668938349} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.392} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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 +--- !u!222 &1668938351 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1668938349} +--- !u!224 &1668938352 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1668938349} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 222730893} + - {fileID: 67265451} + - {fileID: 1819941567} + - {fileID: 193153676} + - {fileID: 1181794900} + - {fileID: 1223797534} + - {fileID: 763421055} + m_Father: {fileID: 769670910} + 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: 160, y: 0} + m_SizeDelta: {x: -320, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1668938353 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1668938349} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1297475563, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 5 + m_Right: 5 + m_Top: 5 + m_Bottom: 5 + m_ChildAlignment: 0 + m_Spacing: 20 + m_ChildForceExpandWidth: 1 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 1 + m_ChildControlHeight: 1 +--- !u!1 &1695202265 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1695202267} + - component: {fileID: 1695202266} + m_Layer: 0 + m_Name: Manager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1695202266 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1695202265} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ed6ca7d1055974cc7847025558e8a903, type: 3} + m_Name: + m_EditorClassIdentifier: + TitleText: {fileID: 222730894} + DescriptionText: {fileID: 67265452} + OpenSceneButton: {fileID: 1787721934} + OpenTutorialLinkButton: {fileID: 193153675} + OpenDocLinkButton: {fileID: 1181794899} +--- !u!4 &1695202267 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1695202265} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1724614324 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 979202780} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Ownership Transfer + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: OwnershipTransfer + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1739441512 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 368540241} + serializedVersion: 5 + m_Component: + - component: {fileID: 1739441513} + - component: {fileID: 1739441516} + - component: {fileID: 1739441515} + - component: {fileID: 1739441514} + - component: {fileID: 1739441517} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1739441513 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1739441512} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1746070928} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1739441514 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1739441512} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &1739441515 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1739441512} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: 2D Game +--- !u!222 &1739441516 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1739441512} +--- !u!114 &1739441517 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1739441512} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &1746070927 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 368540241} + serializedVersion: 5 + m_Component: + - component: {fileID: 1746070928} + - component: {fileID: 1746070931} + - component: {fileID: 1746070930} + - component: {fileID: 1746070929} + - component: {fileID: 1746070932} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1746070928 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1746070927} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1739441513} + m_Father: {fileID: 253478105} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1746070929 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1746070927} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1746070930} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: 2DGame + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1746070930 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1746070927} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1746070931 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1746070927} +--- !u!114 &1746070932 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 368540241} + m_GameObject: {fileID: 1746070927} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1001 &1774371626 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 662795186} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Demo Worker + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: DemoWorker + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1787721934 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 394588530} + serializedVersion: 5 + m_Component: + - component: {fileID: 1787721935} + - component: {fileID: 1787721938} + - component: {fileID: 1787721937} + - component: {fileID: 1787721936} + - component: {fileID: 1787721939} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1787721935 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1787721934} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1092661495} + m_Father: {fileID: 1819941567} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1787721936 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1787721934} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1787721937} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: OpenScene + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1787721937 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1787721934} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1787721938 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1787721934} +--- !u!114 &1787721939 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 394588530} + m_GameObject: {fileID: 1787721934} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1819294240 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1819294241} + - component: {fileID: 1819294243} + - component: {fileID: 1819294242} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1819294241 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1819294240} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1441541974} + 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: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1819294242 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1819294240} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 0.627451} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1819294243 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1819294240} +--- !u!1 &1819941566 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1819941567} + - component: {fileID: 1819941568} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1819941567 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1819941566} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1787721935} + m_Father: {fileID: 1668938352} + m_RootOrder: 2 + 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!114 &1819941568 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1819941566} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &1823079757 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1823079760} + - component: {fileID: 1823079759} + - component: {fileID: 1823079758} + - component: {fileID: 1823079761} + m_Layer: 5 + m_Name: Description + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1823079758 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1823079757} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.69411767} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 954746d370bc8934299c8c8267543f4f, type: 3} + m_FontSize: 27 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: "Build and run this. \nStart a second client or playmode in Editor." +--- !u!222 &1823079759 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1823079757} +--- !u!224 &1823079760 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1823079757} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1403074535} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: -17.9} + m_SizeDelta: {x: -20, y: 60} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1823079761 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1823079757} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &1927706825 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1927706826} + - component: {fileID: 1927706830} + - component: {fileID: 1927706829} + - component: {fileID: 1927706828} + - component: {fileID: 1927706827} + m_Layer: 5 + m_Name: ScrollList Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1927706826 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1927706825} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 551375295} + m_Father: {fileID: 1174516281} + 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: -10, y: -2.5} + m_SizeDelta: {x: -20, y: -5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1927706827 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1927706825} + m_Enabled: 0 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 1 +--- !u!114 &1927706828 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1927706825} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1927706829 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1927706825} +--- !u!114 &1927706830 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1927706825} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 551375295} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 1 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 0} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 529195477} + m_HorizontalScrollbarVisibility: 0 + m_VerticalScrollbarVisibility: 0 + m_HorizontalScrollbarSpacing: 0 + m_VerticalScrollbarSpacing: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!1001 &1943996745 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 37422737} + m_Modifications: + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_AnchorMax.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.x + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Pivot.y + value: .5 + objectReference: {fileID: 0} + - target: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_Text + value: Friends & Authentication + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 1695202266} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: SelectDemo + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + objectReference: {fileID: 0} + - target: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, type: 2} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_StringArgument + value: FriendsAndAuth + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1951521709 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 523419312} + serializedVersion: 5 + m_Component: + - component: {fileID: 1951521710} + - component: {fileID: 1951521713} + - component: {fileID: 1951521712} + - component: {fileID: 1951521711} + - component: {fileID: 1951521714} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1951521710 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 1951521709} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2091525287} + m_Father: {fileID: 193153676} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1951521711 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 1951521709} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1951521712} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: OpenTutorialLink + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1951521712 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 1951521709} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1951521713 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 1951521709} +--- !u!114 &1951521714 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 1951521709} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1996388971 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 626387486} + serializedVersion: 5 + m_Component: + - component: {fileID: 1996388972} + - component: {fileID: 1996388975} + - component: {fileID: 1996388974} + - component: {fileID: 1996388973} + - component: {fileID: 1996388976} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1996388972 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1996388971} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1602607500} + m_Father: {fileID: 1159945305} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1996388973 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1996388971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1996388974} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: DemoBoxes + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1996388974 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1996388971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1996388975 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1996388971} +--- !u!114 &1996388976 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 626387486} + m_GameObject: {fileID: 1996388971} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &2014222390 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2014222391} + - component: {fileID: 2014222394} + - component: {fileID: 2014222393} + - component: {fileID: 2014222392} + m_Layer: 5 + m_Name: Title + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &2014222391 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2014222390} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 551375295} + m_RootOrder: 16 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -152} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &2014222392 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2014222390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!114 &2014222393 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2014222390} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 22 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 0 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: +--- !u!222 &2014222394 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2014222390} +--- !u!1 &2028051374 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2028051375} + - component: {fileID: 2028051376} + m_Layer: 5 + m_Name: Button Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &2028051375 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2028051374} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 851199461} + m_Father: {fileID: 551375295} + m_RootOrder: 12 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 142.5, y: -433} + m_SizeDelta: {x: 285, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2028051376 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2028051374} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1679637790, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: 30 + m_PreferredWidth: -1 + m_PreferredHeight: 30 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 +--- !u!1 &2091525286 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194774, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 523419312} + serializedVersion: 5 + m_Component: + - component: {fileID: 2091525287} + - component: {fileID: 2091525290} + - component: {fileID: 2091525289} + - component: {fileID: 2091525288} + - component: {fileID: 2091525291} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2091525287 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 2091525286} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1951521710} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -10, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2091525288 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 2091525286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 9d234639538a34b8d9e3cc6362a7afd0, type: 3} + m_Name: + m_EditorClassIdentifier: + Selectable: {fileID: 0} + NormalColor: {r: 1, g: 1, b: 1, a: 1} + HoverColor: {r: 0, g: 0, b: 0, a: 1} +--- !u!114 &2091525289 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494770, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 2091525286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: e00995507c2406448b4c8429136104dd, type: 3} + m_FontSize: 24 + m_FontStyle: 0 + m_BestFit: 1 + m_MinSize: 10 + m_MaxSize: 24 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Open Tutorial (www) +--- !u!222 &2091525290 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294774, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 2091525286} +--- !u!114 &2091525291 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11490564, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 523419312} + m_GameObject: {fileID: 2091525286} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1573420865, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 +--- !u!1 &2107589018 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 530281235} + serializedVersion: 5 + m_Component: + - component: {fileID: 2107589019} + - component: {fileID: 2107589022} + - component: {fileID: 2107589021} + - component: {fileID: 2107589020} + - component: {fileID: 2107589023} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2107589019 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 2107589018} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 598418034} + m_Father: {fileID: 712771298} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2107589020 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 2107589018} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2107589021} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: SelectDemo + m_Mode: 5 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: Chat + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &2107589021 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 2107589018} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2107589022 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 2107589018} +--- !u!114 &2107589023 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 530281235} + m_GameObject: {fileID: 2107589018} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &2119830720 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 194772, guid: 4f826638dd73749d88747935ea56c522, type: 2} + m_PrefabInternal: {fileID: 757667770} + serializedVersion: 5 + m_Component: + - component: {fileID: 2119830721} + - component: {fileID: 2119830725} + - component: {fileID: 2119830724} + - component: {fileID: 2119830723} + - component: {fileID: 2119830722} + m_Layer: 5 + m_Name: Button Regular + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2119830721 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22494772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 2119830720} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1013614460} + m_Father: {fileID: 763421055} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2119830722 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11456662, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 2119830720} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e0e8b381f2c05442ca5c01638958156a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &2119830723 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494768, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 2119830720} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 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: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2119830724} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1695202266} + m_MethodName: OpenMainWebLink + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &2119830724 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11494766, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 2119830720} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2119830725 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 22294772, guid: 4f826638dd73749d88747935ea56c522, + type: 2} + m_PrefabInternal: {fileID: 757667770} + m_GameObject: {fileID: 2119830720} +--- !u!1 &2120715324 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2120715325} + - component: {fileID: 2120715327} + - component: {fileID: 2120715326} + m_Layer: 5 + m_Name: Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2120715325 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2120715324} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1403074535} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2120715326 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2120715324} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 66efb24ed46044ab8a039599cbc47d7b, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2120715327 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2120715324} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/DemoHub-Scene.unity.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/DemoHub-Scene.unity.meta new file mode 100644 index 00000000..53bf3e92 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/DemoHub-Scene.unity.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 7dfd47dc8b9484dd79d8636d8603a9e5 +DefaultImporter: + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor.meta new file mode 100644 index 00000000..b398e00e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 857fb0c989c46264a8568187f4ef7fac +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunDemos.DemoHubEditor.asmdef b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunDemos.DemoHubEditor.asmdef new file mode 100644 index 00000000..1a9bb2a6 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunDemos.DemoHubEditor.asmdef @@ -0,0 +1,11 @@ +{ + "name": "PunDemos.DemoHubEditor", + "references": [ + "PhotonUnityNetworking", + "PhotonRealtime" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunDemos.DemoHubEditor.asmdef.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunDemos.DemoHubEditor.asmdef.meta new file mode 100644 index 00000000..f0c33573 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunDemos.DemoHubEditor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e9a89c21e4f5b294eb31fb8166e13303 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunStartup.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunStartup.cs new file mode 100644 index 00000000..7b305fdc --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunStartup.cs @@ -0,0 +1,166 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Photon Unity Demos +// +// +// Used to setup the demo build settings and load the first demo scene (if imported into a new empty project). +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using UnityEditor.SceneManagement; +using UnityEngine; +using UnityEditor; + +using Photon.Pun; +using Photon.Realtime; +using ExitGames.Client.Photon; +using UnityEngine.SceneManagement; + +namespace Photon.Pun.Demo.Hub +{ + [InitializeOnLoad] + public class PunStartup : MonoBehaviour + { + + static PunStartup() + { + bool doneBefore = EditorPrefs.GetBool("PunDemosOpenedBefore"); + if (!doneBefore) + { + EditorApplication.update += OnUpdate; + } + } + + static void OnUpdate() + { + if (EditorApplication.isUpdating || Application.isPlaying) + { + return; + } + + bool doneBefore = EditorPrefs.GetBool("PunDemosOpenedBefore"); + EditorPrefs.SetBool("PunDemosOpenedBefore", true); + EditorApplication.update -= OnUpdate; + + if (doneBefore) + { + return; + } + + if (string.IsNullOrEmpty(SceneManagerHelper.EditorActiveSceneName) && EditorBuildSettings.scenes.Length == 0) + { + LoadPunDemoHub(); + SetPunDemoBuildSettings(); + Debug.Log("No scene was open. Loaded PUN Demo Hub Scene and added demos to build settings. Ready to go! This auto-setup is now disabled in this Editor."); + } + } + + [MenuItem("Window/Photon Unity Networking/Configure Demos (build setup)", false, 5)] + public static void SetupDemo() + { + SetPunDemoBuildSettings(); + } + + //[MenuItem("Window/Photon Unity Networking/PUN Demo Loader Reset")] + //protected static void ResetDemoLoader() + //{ + // EditorPrefs.DeleteKey("PunDemosOpenedBefore"); + //} + + public static void LoadPunDemoHub() + { + string scenePath = FindAssetPath("DemoHub-Scene t:scene"); + if (!string.IsNullOrEmpty(scenePath)) + { + EditorSceneManager.OpenScene (scenePath); + Selection.activeObject = AssetDatabase.LoadMainAssetAtPath (scenePath); + } + } + + /// Finds the asset path base on its name or search query: https://docs.unity3d.com/ScriptReference/AssetDatabase.FindAssets.html + /// The asset path. String.Empty, if not found. + /// Asset filter for AssetDatabase.FindAssets. + public static string FindAssetPath(string asset) + { + string[] guids = AssetDatabase.FindAssets(asset, null); + if (guids.Length < 1) + { + Debug.LogError("We have a problem finding the asset: " + asset); + return string.Empty; + } else + { + return AssetDatabase.GUIDToAssetPath(guids[0]); + } + } + + /// + /// Finds scenes in "Assets/Photon Unity Networking/Demos/", excludes those in folder "PUNGuide_M2H" and applies remaining scenes to build settings. The one with "Hub" in it first. + /// + public static void SetPunDemoBuildSettings() + { + string _PunPath = string.Empty; + + string _thisPath = PhotonNetwork.FindAssetPath ("PunStartUp"); + + _thisPath = Application.dataPath + _thisPath.Substring (6); // remove "Assets/" + + //_PunPath = PhotonEditorUtils.GetParent(_thisPath,"Photon"); + + if (string.IsNullOrEmpty(_PunPath)) + { + _PunPath = Application.dataPath+"/Photon"; + } + + // find path of pun guide + + string[] tempPaths = Directory.GetDirectories(_PunPath, "Demos*", SearchOption.AllDirectories); + if (tempPaths == null) + { + return; + } + + List sceneAr = new List (); + + // find scenes of guide + foreach (string guidePath in tempPaths) + { + tempPaths = Directory.GetFiles (guidePath, "*.unity", SearchOption.AllDirectories); + + if (tempPaths == null || tempPaths.Length == 0) + { + return; + } + + // add found guide scenes to build settings + for (int i = 0; i < tempPaths.Length; i++) + { + //Debug.Log(tempPaths[i]); + string path = tempPaths [i].Substring (Application.dataPath.Length - "Assets".Length); + path = path.Replace ('\\', '/'); + //Debug.Log(path); + + if (path.Contains ("PUNGuide_M2H") || path.Contains("DemoLoadBalancing")) + { + continue; + } + + // edited to avoid old scene to be included. + if (path.Contains ("DemoHub-Scene")) + { + sceneAr.Insert (0, new EditorBuildSettingsScene (path, true)); + continue; + } + + sceneAr.Add (new EditorBuildSettingsScene (path, true)); + } + } + + EditorBuildSettings.scenes = sceneAr.ToArray(); + EditorSceneManager.OpenScene(sceneAr[0].path); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunStartup.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunStartup.cs.meta new file mode 100644 index 00000000..8e5597a8 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Editor/PunStartup.cs.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6bafe5c223c99ab44a5f70010efdae47 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts.meta new file mode 100644 index 00000000..3eb52d31 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c8b3e10be8e7cbb4a887448e72c0c02a +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/DemoHubManager.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/DemoHubManager.cs new file mode 100644 index 00000000..0040c544 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/DemoHubManager.cs @@ -0,0 +1,311 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Photon Unity Demos +// +// +// Used as starting point to let developer choose amongst all demos available. +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.SceneManagement; + +using System.Collections.Generic; + +using Photon.Pun.Demo.Cockpit; + +namespace Photon.Pun.Demo.Hub +{ + public class DemoHubManager : MonoBehaviour { + + + public Text TitleText; + public Text DescriptionText; + public GameObject OpenSceneButton; + public GameObject OpenTutorialLinkButton; + public GameObject OpenDocLinkButton; + + string MainDemoWebLink = "https://doc.photonengine.com/en-us/pun/v2/getting-started/pun-intro"; + + struct DemoData + { + public string Title; + public string Description; + public string Scene; + public string TutorialLink; + public string DocLink; + } + + Dictionary _data = new Dictionary(); + + string currentSelection; + + // Use this for initialization + void Awake () { + + PunCockpit.Embedded = false; + + OpenSceneButton.SetActive(false); + + OpenTutorialLinkButton.SetActive(false); + OpenDocLinkButton.SetActive(false); + + // Setup data + _data.Add( + "DemoBoxes", + new DemoData() + { + Title = "Demo Boxes", + Description = "Uses ConnectAndJoinRandom script.\n" + + "(joins a random room or creates one)\n" + + "\n" + + "Instantiates simple prefabs.\n" + + "Synchronizes positions without smoothing.\n" + + "Shows that RPCs target a specific object.", + Scene = "DemoBoxes-Scene" + } + ); + + _data.Add( + "DemoWorker", + new DemoData() + { + Title = "Demo Worker", + Description = "Joins the default lobby and shows existing rooms.\n" + + "Lets you create or join a room.\n" + + "Instantiates an animated character.\n" + + "Synchronizes position and animation state of character with smoothing.\n" + + "Implements simple in-room Chat via RPC calls.", + Scene = "DemoWorker-Scene" + } + ); + + _data.Add( + "MovementSmoothing", + new DemoData() + { + Title = "Movement Smoothing", + Description = "Uses ConnectAndJoinRandom script.\n" + + "Shows several basic ways to synchronize positions between controlling client and remote ones.\n" + + "The TransformView is a good default to use.", + Scene = "DemoSynchronization-Scene" + } + ); + + _data.Add( + "BasicTutorial", + new DemoData() + { + Title = "Basic Tutorial", + Description = "All custom code for connection, player and scene management.\n" + + "Auto synchronization of room levels.\n" + + "Uses PhotonAnimatoView for Animator synch.\n" + + "New Unity UI all around, for Menus and player health HUD.\n" + + "Full step by step tutorial available online.", + Scene = "PunBasics-Launcher" , + TutorialLink = "https://doc.photonengine.com/en-us/pun/v2/demos-and-tutorials/pun-basics-tutorial/intro" + } + ); + + _data.Add( + "OwnershipTransfer", + new DemoData() + { + Title = "Ownership Transfer", + Description = "Shows how to transfer the ownership of a PhotonView.\n" + + "The owner will send position updates of the GameObject.\n" + + "Transfer can be edited per PhotonView and set to Fixed (no transfer), Request (owner has to agree) or Takeover (owner can't object).", + Scene = "DemoChangeOwner-Scene" + } + ); + + _data.Add( + "PickupTeamsScores", + new DemoData() + { + Title = "Pickup, Teams, Scores", + Description = "Uses ConnectAndJoinRandom script.\n" + + "Implements item pickup with RPCs.\n" + + "Uses Custom Properties for Teams.\n" + + "Counts score per player and team.\n" + + "Uses Player extension methods for easy Custom Property access.", + Scene = "DemoPickup-Scene" + } + ); + + _data.Add( + "Chat", + new DemoData() + { + Title = "Chat", + Description = "Uses the Chat API.\n" + + "Simple UI.\n" + + "You can enter any User ID.\n" + + "Automatically subscribes some channels.\n" + + "Allows simple commands via text.\n" + + "\n" + + "Requires configuration of Chat App ID in ServerSettings.", + Scene = "DemoChat-Scene", + DocLink = "http://j.mp/2iwQkPJ" + } + ); + + _data.Add( + "RPGMovement", + new DemoData() + { + Title = "RPG Movement", + Description = "Demonstrates how to use the PhotonTransformView component to synchronize position updates smoothly using inter- and extrapolation.\n" + + "\n" + + "This demo also shows how to setup a Mecanim Animator to update animations automatically based on received position updates (without sending explicit animation updates).", + Scene = "DemoRPGMovement-Scene" + } + ); + + _data.Add( + "MecanimAnimations", + new DemoData() + { + Title = "Mecanim Animations", + Description = "This demo shows how to use the PhotonAnimatorView component to easily synchronize Mecanim animations.\n" + + "\n" + + "It also demonstrates another feature of the PhotonTransformView component which gives you more control how position updates are inter-/extrapolated by telling the component how fast the object moves and turns using SetSynchronizedValues().", + Scene = "DemoMecanim-Scene" + } + ); + + _data.Add( + "2DGame", + new DemoData() + { + Title = "2D Game Demo", + Description = "Synchronizes animations, positions and physics in a 2D scene.", + Scene = "Demo2DJumpAndRunWithPhysics-Scene" + } + ); + + _data.Add( + "FriendsAndAuth", + new DemoData() + { + Title = "Friends & Authentication", + Description = "Shows connect with or without (server-side) authentication.\n" + + "\n" + + "Authentication requires minor server-side setup (in Dashboard).\n" + + "\n" + + "Once connected, you can find (made up) friends.\nJoin a room just to see how that gets visible in friends list.", + Scene = "DemoFriends-Scene" + } + ); + + _data.Add( + "TurnBasedGame", + new DemoData() + { + Title = "'Rock Paper Scissor' Turn Based Game", + Description = "Demonstrate TurnBased Game Mechanics using PUN.\n" + + "\n" + + "It makes use of the TurnBasedManager Utility Script", + Scene = "DemoRPS-Scene" + } + ); + + _data.Add( + "Asteroids", + new DemoData() + { + Title = "Asteroids", + Description = "Simple asteroid game based on the Unity learning asset.\n", + Scene = "DemoAsteroids-LobbyScene" + } + ); + + _data.Add( + "SlotRacer", + new DemoData() + { + Title = "Slot Racer", + Description = "Simple SlotRacing game.\n", + Scene = "SlotCar-Scene" + } + ); + + + _data.Add( + "LoadBalancing", + new DemoData() + { + Title = "Load Balancing", + Description = "Shows how to use the raw LoadBalancing system.\n" + + "\n" + + "This is a simple test scene to connect and join a random room, without using PUN but the actual LoadBalancing api only", + Scene = "DemoLoadBalancing-Scene" + } + ); + + _data.Add( + "PunCockpit", + new DemoData() + { + Title = "Cockpit", + Description = "Controls most aspect of PUN.\n" + + "Connection, Lobby, Room access, Player control", + Scene = "PunCockpit-Scene" + } + ); + } + + public void SelectDemo(string Reference) + { + currentSelection = Reference; + + TitleText.text = _data[currentSelection].Title; + DescriptionText.text = _data[currentSelection].Description; + + OpenSceneButton.SetActive(!string.IsNullOrEmpty(_data[currentSelection].Scene)); + + OpenTutorialLinkButton.SetActive(!string.IsNullOrEmpty(_data[currentSelection].TutorialLink)); + OpenDocLinkButton.SetActive(!string.IsNullOrEmpty(_data[currentSelection].DocLink)); + } + + public void OpenScene() + { + if (string.IsNullOrEmpty(currentSelection)) + { + Debug.LogError("Bad setup, a CurrentSelection is expected at this point"); + return; + } + + SceneManager.LoadScene(_data[currentSelection].Scene); + } + + public void OpenTutorialLink() + { + if (string.IsNullOrEmpty(currentSelection)) + { + Debug.LogError("Bad setup, a CurrentSelection is expected at this point"); + return; + } + + Application.OpenURL(_data[currentSelection].TutorialLink); + } + + public void OpenDocLink() + { + if (string.IsNullOrEmpty(currentSelection)) + { + Debug.LogError("Bad setup, a CurrentSelection is expected at this point"); + return; + } + + Application.OpenURL(_data[currentSelection].DocLink); + } + + public void OpenMainWebLink() + { + Application.OpenURL(MainDemoWebLink); + } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/DemoHubManager.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/DemoHubManager.cs.meta new file mode 100644 index 00000000..42165ce1 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/DemoHubManager.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ed6ca7d1055974cc7847025558e8a903 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/ToDemoHubButton.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/ToDemoHubButton.cs new file mode 100644 index 00000000..9bcb9ca9 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/ToDemoHubButton.cs @@ -0,0 +1,93 @@ +// -------------------------------------------------------------------------------------------------------------------- +// +// Part of: Photon Unity Demos +// +// +// Present a button on all launched demos from hub to allow getting back to the demo hub. +// +// developer@exitgames.com +// -------------------------------------------------------------------------------------------------------------------- + +using UnityEngine; +using UnityEngine.SceneManagement; +using UnityEngine.EventSystems; + +namespace Photon.Pun.Demo.Hub +{ + /// + /// Present a button on all launched demos from hub to allow getting back to the demo hub. + /// + public class ToDemoHubButton : MonoBehaviour + { + + private static ToDemoHubButton instance; + + + CanvasGroup _canvasGroup; + + public static ToDemoHubButton Instance + { + get + { + if (instance == null) + { + instance = FindObjectOfType(typeof (ToDemoHubButton)) as ToDemoHubButton; + } + + return instance; + } + } + + public void Awake() + { + if (Instance != null && Instance != this) + { + Destroy(gameObject); + } + } + + // Use this for initialization + public void Start() + { + DontDestroyOnLoad(gameObject); + + _canvasGroup = GetComponent(); + + + } + + + + + public void Update() + { + bool sceneZeroLoaded = false; + + #if UNITY_5 && !UNITY_5_0 && !UNITY_5_1 && !UNITY_5_2 || UNITY_5_3_OR_NEWER + sceneZeroLoaded = SceneManager.GetActiveScene().buildIndex == 0; + #else + sceneZeroLoaded = Application.loadedLevel == 0; + #endif + + if (sceneZeroLoaded && _canvasGroup.alpha!= 0f) + { + _canvasGroup.alpha = 0f; + _canvasGroup.interactable = false; + } + + if (!sceneZeroLoaded && _canvasGroup.alpha!= 1f) + { + _canvasGroup.alpha = 1f; + _canvasGroup.interactable = true; + } + + } + + public void BackToHub() + { + PhotonNetwork.Disconnect(); + SceneManager.LoadScene(0); + } + + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/ToDemoHubButton.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/ToDemoHubButton.cs.meta new file mode 100644 index 00000000..c09ac61e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Scripts/ToDemoHubButton.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f877c2f2d403a4d4f975fb1fd64fe7e8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites.meta new file mode 100644 index 00000000..1b91c942 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cf88f7f45947fce43aece510bff3df94 +folderAsset: yes +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/Gradient.png b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/Gradient.png new file mode 100644 index 00000000..67e1ce23 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/Gradient.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/Gradient.png.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/Gradient.png.meta new file mode 100644 index 00000000..9d6d0ccb --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/Gradient.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 66efb24ed46044ab8a039599cbc47d7b +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -2 + maxTextureSize: 256 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 16 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 256 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 9f2a0d94850205c449718d6a65b6da2c + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/OutlinedSquaredBox.png b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/OutlinedSquaredBox.png new file mode 100644 index 00000000..dcfa148f Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/OutlinedSquaredBox.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/OutlinedSquaredBox.png.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/OutlinedSquaredBox.png.meta new file mode 100644 index 00000000..f39ba786 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/OutlinedSquaredBox.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: c222cd02c447941edb09ecb6433229ce +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -3 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 16 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 1, y: 1, z: 1, w: 1} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 0ca28098c6f2a0a4ba4f7e88ae619ca9 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/PunIcon-White-129.png b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/PunIcon-White-129.png new file mode 100644 index 00000000..885c22f7 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/PunIcon-White-129.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/PunIcon-White-129.png.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/PunIcon-White-129.png.meta new file mode 100644 index 00000000..f2575b87 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/PunIcon-White-129.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 56bbc6b42271d4177ac313247f47ac1f +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -2 + maxTextureSize: 128 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 128 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 10108fb3311b5d345a644c65ddc43a0d + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/toHub.png b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/toHub.png new file mode 100644 index 00000000..4e76dd33 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/toHub.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/toHub.png.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/toHub.png.meta new file mode 100644 index 00000000..4ee0cd43 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/Sprites/toHub.png.meta @@ -0,0 +1,88 @@ +fileFormatVersion: 2 +guid: 9587663c4d27e47b19a118aabaac4a08 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: 1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 1024 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: ee3e00e31e5bd4b46a24452999412510 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/toHub.png b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/toHub.png new file mode 100644 index 00000000..4e76dd33 Binary files /dev/null and b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/toHub.png differ diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/toHub.png.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/toHub.png.meta new file mode 100644 index 00000000..bc9ea272 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoHub/toHub.png.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: 56d51860189dbec438e8e3fba90c46cc +TextureImporter: + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + linearTexture: 1 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: .25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + textureFormat: -1 + maxTextureSize: 1024 + textureSettings: + filterMode: -1 + aniso: 1 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + textureType: 2 + buildTargetSettings: [] diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural.meta new file mode 100644 index 00000000..e054359d --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5be0f48c310a256419f65a4919c8ea94 +folderAsset: yes +timeCreated: 1521730220 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials.meta new file mode 100644 index 00000000..5a9de16d --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 26fec7636ebd7ae43a99e2c187ed6500 +folderAsset: yes +timeCreated: 1524052388 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Black.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Black.mat new file mode 100644 index 00000000..ac0555c3 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Black.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Black + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.33 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 0.06666667, g: 0.06666667, b: 0.06666667, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Black.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Black.mat.meta new file mode 100644 index 00000000..e8d280e7 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Black.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1598ff147655ecb4893e78f88baa9475 +timeCreated: 1524052433 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/LightGreen.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/LightGreen.mat new file mode 100644 index 00000000..f2b22eeb --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/LightGreen.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: LightGreen + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 0.6397059, g: 0.63179064, b: 0.35277897, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/LightGreen.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/LightGreen.mat.meta new file mode 100644 index 00000000..8b4a8341 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/LightGreen.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cd644746d7159df42b0c206b559af881 +timeCreated: 1524052433 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Orange.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Orange.mat new file mode 100644 index 00000000..e87d9e3e --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Orange.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Orange + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.32 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0.2 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 1, g: 0.52796555, b: 0, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Orange.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Orange.mat.meta new file mode 100644 index 00000000..e6a34f8d --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Orange.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09adc4af150569a4cb996354c367b8c8 +timeCreated: 1524052433 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Red.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Red.mat new file mode 100644 index 00000000..761e980f --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Red.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Red + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.45 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 0.7058823, g: 0.15069398, b: 0, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Red.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Red.mat.meta new file mode 100644 index 00000000..38a7cd17 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Red.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ad7ce727a68a61f4897679b81da7b344 +timeCreated: 1524052433 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Yellow.mat b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Yellow.mat new file mode 100644 index 00000000..de2ee654 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Yellow.mat @@ -0,0 +1,138 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Yellow + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + data: + first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + data: + first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + data: + first: + name: _SrcBlend + second: 1 + data: + first: + name: _DstBlend + second: 0 + data: + first: + name: _Cutoff + second: 0.5 + data: + first: + name: _Parallax + second: 0.02 + data: + first: + name: _ZWrite + second: 1 + data: + first: + name: _Glossiness + second: 0.5 + data: + first: + name: _BumpScale + second: 1 + data: + first: + name: _OcclusionStrength + second: 1 + data: + first: + name: _DetailNormalMapScale + second: 1 + data: + first: + name: _UVSec + second: 0 + data: + first: + name: _Mode + second: 0 + data: + first: + name: _Metallic + second: 0 + m_Colors: + data: + first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} + data: + first: + name: _Color + second: {r: 0.972, g: 0.72733563, b: 0.025086528, a: 1} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Yellow.mat.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Yellow.mat.meta new file mode 100644 index 00000000..0ad53217 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Materials/Yellow.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90623549d4482f042ade35d8a0758e35 +timeCreated: 1524052433 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Procedural-Scene.unity b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Procedural-Scene.unity new file mode 100644 index 00000000..dd9e376a --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Procedural-Scene.unity @@ -0,0 +1,4439 @@ +%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: 8 + 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.4465934, g: 0.49642956, b: 0.5748249, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 1 + m_LightmapEditorSettings: + serializedVersion: 9 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 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 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &42831105 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 42831106} + - component: {fileID: 42831108} + - component: {fileID: 42831107} + m_Layer: 5 + m_Name: Item Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &42831106 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 42831105} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1690523948} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &42831107 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 42831105} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &42831108 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 42831105} +--- !u!1 &93472685 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 93472686} + - component: {fileID: 93472689} + - component: {fileID: 93472688} + - component: {fileID: 93472687} + m_Layer: 5 + m_Name: SeedInputField + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &93472686 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 93472685} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1020297616} + - {fileID: 2127117989} + m_Father: {fileID: 1929788163} + 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.5, y: 0.5} +--- !u!114 &93472687 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 93472685} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 575553740, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 93472688} + m_TextComponent: {fileID: 2127117990} + m_Placeholder: {fileID: 1020297617} + m_ContentType: 0 + m_InputType: 0 + m_AsteriskChar: 42 + m_KeyboardType: 0 + m_LineType: 0 + m_HideMobileInput: 0 + m_CharacterValidation: 0 + m_CharacterLimit: 0 + m_OnEndEdit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+SubmitEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.InputField+OnChangeEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_CustomCaretColor: 0 + m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} + m_Text: + m_CaretBlinkRate: 0.85 + m_CaretWidth: 1 + m_ReadOnly: 0 +--- !u!114 &93472688 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 93472685} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &93472689 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 93472685} +--- !u!1 &142176412 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 142176413} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &142176413 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 142176412} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 964671156} + m_Father: {fileID: 884195382} + m_RootOrder: 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} + m_SizeDelta: {x: 0, y: 28} + m_Pivot: {x: 0.5, y: 1} +--- !u!1 &241628338 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 241628339} + - component: {fileID: 241628342} + - component: {fileID: 241628341} + - component: {fileID: 241628340} + m_Layer: 5 + m_Name: WorldSizeDropdown + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &241628339 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 241628338} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1934144130} + - {fileID: 998483549} + - {fileID: 1173861833} + m_Father: {fileID: 1929788163} + m_RootOrder: 3 + 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!114 &241628340 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 241628338} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 853051423, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 241628341} + m_Template: {fileID: 1173861833} + m_CaptionText: {fileID: 1934144131} + m_CaptionImage: {fileID: 0} + m_ItemText: {fileID: 692211483} + m_ItemImage: {fileID: 0} + m_Value: 0 + m_Options: + m_Options: + - m_Text: Tiny + m_Image: {fileID: 0} + - m_Text: Small + m_Image: {fileID: 0} + - m_Text: Medium + m_Image: {fileID: 0} + - m_Text: Large + m_Image: {fileID: 0} + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Dropdown+DropdownEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &241628341 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 241628338} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &241628342 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 241628338} +--- !u!1 &354167498 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 354167499} + - component: {fileID: 354167501} + - component: {fileID: 354167500} + m_Layer: 5 + m_Name: Item Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &354167499 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 354167498} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1690523948} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &354167500 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 354167498} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &354167501 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 354167498} +--- !u!1 &468838070 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 468838071} + - component: {fileID: 468838072} + m_Layer: 5 + m_Name: Item + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &468838071 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 468838070} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 856218580} + - {fileID: 644289229} + - {fileID: 622815610} + m_Father: {fileID: 1165692945} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &468838072 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 468838070} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 856218581} + toggleTransition: 1 + graphic: {fileID: 644289230} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IsOn: 1 +--- !u!1 &470194926 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 470194927} + - component: {fileID: 470194930} + - component: {fileID: 470194929} + - component: {fileID: 470194928} + m_Layer: 5 + m_Name: Scrollbar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &470194927 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 470194926} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 969246709} + m_Father: {fileID: 783750644} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!114 &470194928 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 470194926} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 2069828756} + m_HandleRect: {fileID: 2069828755} + m_Direction: 2 + m_Value: 0 + m_Size: 0.2 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &470194929 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 470194926} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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 +--- !u!222 &470194930 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 470194926} +--- !u!1 &575937113 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 575937114} + - component: {fileID: 575937116} + - component: {fileID: 575937115} + m_Layer: 5 + m_Name: ConfirmPropertiesLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &575937114 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575937113} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1929788163} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &575937115 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575937113} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Confirm Properties +--- !u!222 &575937116 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 575937113} +--- !u!1 &593478102 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 593478103} + - component: {fileID: 593478105} + - component: {fileID: 593478104} + m_Layer: 5 + m_Name: WorldSizeLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &593478103 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 593478102} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1929788163} + m_RootOrder: 2 + 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!114 &593478104 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 593478102} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: World Size +--- !u!222 &593478105 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 593478102} +--- !u!1 &606350403 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 606350404} + - component: {fileID: 606350406} + - component: {fileID: 606350405} + m_Layer: 5 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &606350404 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 606350403} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1292010358} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -15, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &606350405 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 606350403} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &606350406 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 606350403} +--- !u!1 &622815609 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 622815610} + - component: {fileID: 622815612} + - component: {fileID: 622815611} + m_Layer: 5 + m_Name: Item Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &622815610 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 622815609} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 468838071} + 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: 5, y: -0.5} + m_SizeDelta: {x: -30, y: -3} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &622815611 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 622815609} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Option A +--- !u!222 &622815612 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 622815609} +--- !u!1 &644289228 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 644289229} + - component: {fileID: 644289231} + - component: {fileID: 644289230} + m_Layer: 5 + m_Name: Item Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &644289229 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 644289228} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 468838071} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &644289230 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 644289228} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &644289231 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 644289228} +--- !u!1 &654442009 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 654442010} + - component: {fileID: 654442012} + - component: {fileID: 654442011} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &654442010 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 654442009} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1488070012} + 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: -7.5, y: -0.5} + m_SizeDelta: {x: -35, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &654442011 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 654442009} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Small +--- !u!222 &654442012 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 654442009} +--- !u!1 &692211481 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 692211482} + - component: {fileID: 692211484} + - component: {fileID: 692211483} + m_Layer: 5 + m_Name: Item Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &692211482 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 692211481} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1690523948} + 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: 5, y: -0.5} + m_SizeDelta: {x: -30, y: -3} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &692211483 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 692211481} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Option A +--- !u!222 &692211484 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 692211481} +--- !u!1 &783750643 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 783750644} + - component: {fileID: 783750647} + - component: {fileID: 783750646} + - component: {fileID: 783750645} + m_Layer: 5 + m_Name: Template + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &783750644 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 783750643} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1528072962} + - {fileID: 470194927} + m_Father: {fileID: 1488070012} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 2} + m_SizeDelta: {x: 0, y: 150} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &783750645 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 783750643} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 1165692945} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 2 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 1528072962} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 470194928} + m_HorizontalScrollbarVisibility: 0 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: 0 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &783750646 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 783750643} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &783750647 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 783750643} +--- !u!1 &826901329 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 826901330} + - component: {fileID: 826901333} + - component: {fileID: 826901332} + - component: {fileID: 826901331} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &826901330 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 826901329} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1606608942} + m_Father: {fileID: 1173861833} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -18, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &826901331 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 826901329} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10917, 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 +--- !u!222 &826901332 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 826901329} +--- !u!114 &826901333 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 826901329} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &855656182 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 855656183} + - component: {fileID: 855656185} + - component: {fileID: 855656184} + m_Layer: 5 + m_Name: Item Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &855656183 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855656182} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 964671156} + 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: 5, y: -0.5} + m_SizeDelta: {x: -30, y: -3} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &855656184 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855656182} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Option A +--- !u!222 &855656185 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 855656182} +--- !u!1 &856218579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 856218580} + - component: {fileID: 856218582} + - component: {fileID: 856218581} + m_Layer: 5 + m_Name: Item Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &856218580 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 856218579} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 468838071} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &856218581 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 856218579} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &856218582 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 856218579} +--- !u!1 &884195381 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 884195382} + - component: {fileID: 884195385} + - component: {fileID: 884195384} + - component: {fileID: 884195383} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &884195382 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 884195381} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 142176413} + m_Father: {fileID: 1613415644} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -18, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &884195383 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 884195381} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10917, 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 +--- !u!222 &884195384 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 884195381} +--- !u!114 &884195385 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 884195381} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &964671155 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 964671156} + - component: {fileID: 964671157} + m_Layer: 5 + m_Name: Item + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &964671156 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964671155} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1466988472} + - {fileID: 1988710370} + - {fileID: 855656183} + m_Father: {fileID: 142176413} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &964671157 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 964671155} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1466988473} + toggleTransition: 1 + graphic: {fileID: 1988710371} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IsOn: 1 +--- !u!1 &969246708 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 969246709} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &969246709 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 969246708} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2069828755} + m_Father: {fileID: 470194927} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &988250821 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 988250822} + - component: {fileID: 988250824} + - component: {fileID: 988250823} + m_Layer: 5 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &988250822 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 988250821} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1488070012} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -15, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &988250823 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 988250821} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &988250824 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 988250821} +--- !u!1 &998483548 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 998483549} + - component: {fileID: 998483551} + - component: {fileID: 998483550} + m_Layer: 5 + m_Name: Arrow + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &998483549 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 998483548} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 241628339} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -15, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &998483550 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 998483548} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10915, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &998483551 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 998483548} +--- !u!1 &1020297615 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1020297616} + - component: {fileID: 1020297618} + - component: {fileID: 1020297617} + m_Layer: 5 + m_Name: Placeholder + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1020297616 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020297615} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 93472686} + 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 &1020297617 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020297615} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + 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: 0 +--- !u!222 &1020297618 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1020297615} +--- !u!1 &1061556579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1061556581} + - component: {fileID: 1061556580} + 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 &1061556580 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1061556579} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 0.8 + m_Range: 10 + m_SpotAngle: 30 + 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_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 4 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1061556581 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1061556579} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1085221506 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1085221507} + - component: {fileID: 1085221509} + - component: {fileID: 1085221508} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1085221507 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1085221506} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1180046996} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1085221508 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1085221506} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Confirm +--- !u!222 &1085221509 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1085221506} +--- !u!1 &1165692944 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1165692945} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1165692945 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1165692944} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 468838071} + m_Father: {fileID: 1528072962} + m_RootOrder: 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} + m_SizeDelta: {x: 0, y: 28} + m_Pivot: {x: 0.5, y: 1} +--- !u!1 &1173861832 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1173861833} + - component: {fileID: 1173861836} + - component: {fileID: 1173861835} + - component: {fileID: 1173861834} + m_Layer: 5 + m_Name: Template + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1173861833 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1173861832} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 826901330} + - {fileID: 1611806622} + m_Father: {fileID: 241628339} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 2} + m_SizeDelta: {x: 0, y: 150} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1173861834 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1173861832} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 1606608942} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 2 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 826901330} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 1611806623} + m_HorizontalScrollbarVisibility: 0 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: 0 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1173861835 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1173861832} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1173861836 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1173861832} +--- !u!1 &1175071813 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1175071814} + - component: {fileID: 1175071816} + - component: {fileID: 1175071815} + m_Layer: 5 + m_Name: ClusterSizeLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1175071814 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1175071813} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1929788163} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1175071815 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1175071813} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Cluster Size +--- !u!222 &1175071816 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1175071813} +--- !u!1 &1180046995 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1180046996} + - component: {fileID: 1180046999} + - component: {fileID: 1180046998} + - component: {fileID: 1180046997} + m_Layer: 5 + m_Name: ConfirmPropertiesButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1180046996 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1180046995} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1085221507} + m_Father: {fileID: 1929788163} + m_RootOrder: 9 + 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!114 &1180046997 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1180046995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0.31764707, g: 0.3372549, b: 0.38431373, a: 1} + m_HighlightedColor: {r: 0.8784314, g: 0.48235294, b: 0, a: 1} + m_PressedColor: {r: 0.8784314, g: 0, b: 0, 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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1180046998} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1180046998 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1180046995} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1180046999 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1180046995} +--- !u!1 &1212938683 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1212938684} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1212938684 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1212938683} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1312602900} + m_Father: {fileID: 1611806622} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1241389190 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1241389192} + - component: {fileID: 1241389191} + m_Layer: 0 + m_Name: World + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1241389191 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1241389190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4190307f26497ca49b67855340776e0a, type: 3} + m_Name: + m_EditorClassIdentifier: + WorldMaterials: + - {fileID: 2100000, guid: 1598ff147655ecb4893e78f88baa9475, type: 2} + - {fileID: 2100000, guid: ad7ce727a68a61f4897679b81da7b344, type: 2} + - {fileID: 2100000, guid: 09adc4af150569a4cb996354c367b8c8, type: 2} + - {fileID: 2100000, guid: 90623549d4482f042ade35d8a0758e35, type: 2} + - {fileID: 2100000, guid: cd644746d7159df42b0c206b559af881, type: 2} +--- !u!4 &1241389192 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1241389190} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1292010357 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1292010358} + - component: {fileID: 1292010361} + - component: {fileID: 1292010360} + - component: {fileID: 1292010359} + m_Layer: 5 + m_Name: WorldTypeDropdown + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1292010358 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1292010357} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1729779148} + - {fileID: 606350404} + - {fileID: 1613415644} + m_Father: {fileID: 1929788163} + m_RootOrder: 7 + 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!114 &1292010359 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1292010357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 853051423, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1292010360} + m_Template: {fileID: 1613415644} + m_CaptionText: {fileID: 1729779149} + m_CaptionImage: {fileID: 0} + m_ItemText: {fileID: 855656184} + m_ItemImage: {fileID: 0} + m_Value: 1 + m_Options: + m_Options: + - m_Text: Flat + m_Image: {fileID: 0} + - m_Text: Standard + m_Image: {fileID: 0} + - m_Text: Mountain + m_Image: {fileID: 0} + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Dropdown+DropdownEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1292010360 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1292010357} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1292010361 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1292010357} +--- !u!1 &1312602899 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1312602900} + - component: {fileID: 1312602902} + - component: {fileID: 1312602901} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1312602900 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1312602899} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1212938684} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.2} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1312602901 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1312602899} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1312602902 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1312602899} +--- !u!1 &1322345396 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1322345397} + - component: {fileID: 1322345399} + - component: {fileID: 1322345398} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1322345397 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1322345396} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1483679466} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.2} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1322345398 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1322345396} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1322345399 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1322345396} +--- !u!1 &1393989726 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1393989727} + - component: {fileID: 1393989729} + - component: {fileID: 1393989728} + m_Layer: 5 + m_Name: WorldTypeLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1393989727 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1393989726} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1929788163} + m_RootOrder: 6 + 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!114 &1393989728 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1393989726} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: World Type +--- !u!222 &1393989729 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1393989726} +--- !u!1 &1396161232 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1396161233} + - component: {fileID: 1396161236} + - component: {fileID: 1396161235} + - component: {fileID: 1396161234} + m_Layer: 5 + m_Name: Scrollbar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1396161233 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1396161232} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1483679466} + m_Father: {fileID: 1613415644} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!114 &1396161234 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1396161232} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1322345398} + m_HandleRect: {fileID: 1322345397} + m_Direction: 2 + m_Value: 0 + m_Size: 0.2 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1396161235 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1396161232} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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 +--- !u!222 &1396161236 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1396161232} +--- !u!1 &1445111506 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1445111507} + - component: {fileID: 1445111509} + - component: {fileID: 1445111508} + m_Layer: 5 + m_Name: SeedLabel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1445111507 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1445111506} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1929788163} + 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!114 &1445111508 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1445111506} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 5 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Seed +--- !u!222 &1445111509 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1445111506} +--- !u!1 &1466988471 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1466988472} + - component: {fileID: 1466988474} + - component: {fileID: 1466988473} + m_Layer: 5 + m_Name: Item Background + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1466988472 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1466988471} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 964671156} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1466988473 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1466988471} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1466988474 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1466988471} +--- !u!1 &1483679465 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1483679466} + m_Layer: 5 + m_Name: Sliding Area + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1483679466 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1483679465} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1322345397} + m_Father: {fileID: 1396161233} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -20, y: -20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &1488070011 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1488070012} + - component: {fileID: 1488070015} + - component: {fileID: 1488070014} + - component: {fileID: 1488070013} + m_Layer: 5 + m_Name: ClusterSizeDropdown + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1488070012 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1488070011} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 654442010} + - {fileID: 988250822} + - {fileID: 783750644} + m_Father: {fileID: 1929788163} + m_RootOrder: 5 + 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!114 &1488070013 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1488070011} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 853051423, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1488070014} + m_Template: {fileID: 783750644} + m_CaptionText: {fileID: 654442011} + m_CaptionImage: {fileID: 0} + m_ItemText: {fileID: 622815611} + m_ItemImage: {fileID: 0} + m_Value: 0 + m_Options: + m_Options: + - m_Text: Small + m_Image: {fileID: 0} + - m_Text: Medium + m_Image: {fileID: 0} + - m_Text: Large + m_Image: {fileID: 0} + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Dropdown+DropdownEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1488070014 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1488070011} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1488070015 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1488070011} +--- !u!1 &1528072961 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1528072962} + - component: {fileID: 1528072965} + - component: {fileID: 1528072964} + - component: {fileID: 1528072963} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1528072962 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1528072961} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1165692945} + m_Father: {fileID: 783750644} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: -18, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &1528072963 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1528072961} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10917, 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 +--- !u!222 &1528072964 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1528072961} +--- !u!114 &1528072965 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1528072961} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -1200242548, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!1 &1531126553 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1531126557} + - component: {fileID: 1531126556} + - component: {fileID: 1531126555} + - component: {fileID: 1531126554} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1531126554 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1531126553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1531126555 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1531126553} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0.5 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 +--- !u!223 &1531126556 +Canvas: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1531126553} + 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 &1531126557 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1531126553} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 1929788163} + m_Father: {fileID: 0} + m_RootOrder: 3 + 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 &1606608941 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1606608942} + m_Layer: 5 + m_Name: Content + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1606608942 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1606608941} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1690523948} + m_Father: {fileID: 826901330} + m_RootOrder: 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} + m_SizeDelta: {x: 0, y: 28} + m_Pivot: {x: 0.5, y: 1} +--- !u!1 &1611806621 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1611806622} + - component: {fileID: 1611806625} + - component: {fileID: 1611806624} + - component: {fileID: 1611806623} + m_Layer: 5 + m_Name: Scrollbar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1611806622 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1611806621} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1212938684} + m_Father: {fileID: 1173861833} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 0} + m_Pivot: {x: 1, y: 1} +--- !u!114 &1611806623 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1611806621} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2061169968, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1312602901} + m_HandleRect: {fileID: 1312602900} + m_Direction: 2 + m_Value: 0 + m_Size: 0.2 + m_NumberOfSteps: 0 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Scrollbar+ScrollEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1611806624 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1611806621} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + 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 +--- !u!222 &1611806625 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1611806621} +--- !u!1 &1613415643 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1613415644} + - component: {fileID: 1613415647} + - component: {fileID: 1613415646} + - component: {fileID: 1613415645} + m_Layer: 5 + m_Name: Template + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1613415644 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1613415643} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 884195382} + - {fileID: 1396161233} + m_Father: {fileID: 1292010358} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: 0, y: 2} + m_SizeDelta: {x: 0, y: 150} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1613415645 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1613415643} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1367256648, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 142176413} + m_Horizontal: 0 + m_Vertical: 1 + m_MovementType: 2 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 884195382} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 1396161234} + m_HorizontalScrollbarVisibility: 0 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: 0 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &1613415646 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1613415643} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1613415647 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1613415643} +--- !u!1 &1690523947 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1690523948} + - component: {fileID: 1690523949} + m_Layer: 5 + m_Name: Item + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1690523948 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1690523947} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 354167499} + - {fileID: 42831106} + - {fileID: 692211482} + m_Father: {fileID: 1606608942} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1690523949 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1690523947} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 2109663825, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_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_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 354167500} + toggleTransition: 1 + graphic: {fileID: 42831107} + m_Group: {fileID: 0} + onValueChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Toggle+ToggleEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null + m_IsOn: 1 +--- !u!1 &1729779147 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1729779148} + - component: {fileID: 1729779150} + - component: {fileID: 1729779149} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1729779148 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1729779147} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1292010358} + 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: -7.5, y: -0.5} + m_SizeDelta: {x: -35, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1729779149 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1729779147} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Standard +--- !u!222 &1729779150 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1729779147} +--- !u!1 &1929788162 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1929788163} + - component: {fileID: 1929788166} + - component: {fileID: 1929788165} + - component: {fileID: 1929788164} + - component: {fileID: 1929788167} + m_Layer: 5 + m_Name: ControlPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1929788163 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1929788162} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1445111507} + - {fileID: 93472686} + - {fileID: 593478103} + - {fileID: 241628339} + - {fileID: 1175071814} + - {fileID: 1488070012} + - {fileID: 1393989727} + - {fileID: 1292010358} + - {fileID: 575937114} + - {fileID: 1180046996} + m_Father: {fileID: 1531126557} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 175, y: -125} + m_SizeDelta: {x: 300, y: 185} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1929788164 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1929788162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -2095666955, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Padding: + m_Left: 0 + m_Right: 0 + m_Top: 0 + m_Bottom: 0 + m_ChildAlignment: 4 + m_StartCorner: 0 + m_StartAxis: 0 + m_CellSize: {x: 140, y: 30} + m_Spacing: {x: 5, y: 5} + m_Constraint: 1 + m_ConstraintCount: 2 +--- !u!114 &1929788165 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1929788162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.036} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1929788166 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1929788162} +--- !u!114 &1929788167 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1929788162} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e821c7c24a983d941a2d2c4400ecf9f7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1934144129 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1934144130} + - component: {fileID: 1934144132} + - component: {fileID: 1934144131} + m_Layer: 5 + m_Name: Label + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1934144130 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1934144129} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 241628339} + 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: -7.5, y: -0.5} + m_SizeDelta: {x: -35, y: -13} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1934144131 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1934144129} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Tiny +--- !u!222 &1934144132 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1934144129} +--- !u!1 &1945219176 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1945219181} + - component: {fileID: 1945219180} + - component: {fileID: 1945219178} + - component: {fileID: 1945219177} + 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 &1945219177 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1945219176} + m_Enabled: 1 +--- !u!124 &1945219178 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1945219176} + m_Enabled: 1 +--- !u!20 &1945219180 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1945219176} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1945219181 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1945219176} + m_LocalRotation: {x: 0.38268346, y: 0, z: 0, w: 0.9238795} + m_LocalPosition: {x: 8, y: 30, z: -20} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0} +--- !u!1 &1988710369 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1988710370} + - component: {fileID: 1988710372} + - component: {fileID: 1988710371} + m_Layer: 5 + m_Name: Item Checkmark + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1988710370 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1988710369} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 964671156} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0.5} + m_AnchorMax: {x: 0, y: 0.5} + m_AnchoredPosition: {x: 10, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1988710371 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1988710369} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10901, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &1988710372 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1988710369} +--- !u!1 &1993827700 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1993827702} + - component: {fileID: 1993827701} + - component: {fileID: 1993827703} + m_Layer: 0 + m_Name: Scripts + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1993827701 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1993827700} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5c1b84a427010e0469ce0df07ab64dbc, type: 3} + m_Name: + m_EditorClassIdentifier: + AutoConnect: 1 + Version: 1 +--- !u!4 &1993827702 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1993827700} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1993827703 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1993827700} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 11937abc60ef5bc4796d4b3a3d273f83, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &2048411626 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2048411629} + - component: {fileID: 2048411627} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2048411627 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2048411626} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 68187d3cf4c8746aaa64930f1a766a38, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &2048411629 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2048411626} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2069828754 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2069828755} + - component: {fileID: 2069828757} + - component: {fileID: 2069828756} + m_Layer: 5 + m_Name: Handle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2069828755 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2069828754} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 969246709} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0.2} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2069828756 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2069828754} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &2069828757 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2069828754} +--- !u!1 &2127117988 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2127117989} + - component: {fileID: 2127117991} + - component: {fileID: 2127117990} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2127117989 +RectTransform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2127117988} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 93472686} + 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 &2127117990 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2127117988} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, 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_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 495c9e2a934bcc640a8d7427b13cb680, type: 3} + 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 &2127117991 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2127117988} diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Procedural-Scene.unity.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Procedural-Scene.unity.meta new file mode 100644 index 00000000..f83ca393 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Procedural-Scene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e1fad393017993c4893877b645062417 +timeCreated: 1521730297 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts.meta new file mode 100644 index 00000000..bc82c7da --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 66ccfe3c456c20c4f9de20d08685de69 +folderAsset: yes +timeCreated: 1521730244 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Block.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Block.cs new file mode 100644 index 00000000..3745b550 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Block.cs @@ -0,0 +1,14 @@ +using UnityEngine; + +namespace Photon.Pun.Demo.Procedural +{ + /// + /// The Block component is attach to each instantiated Block at runtime. + /// It provides the Block's ID as well as the parent's Cluster ID in order to apply modifications. + /// + public class Block : MonoBehaviour + { + public int BlockId { get; set; } + public int ClusterId { get; set; } + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Block.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Block.cs.meta new file mode 100644 index 00000000..e8d6cd78 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Block.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8b205f33043c113489ab36d5b56f7730 +timeCreated: 1521735355 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Cluster.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Cluster.cs new file mode 100644 index 00000000..7c5bc52b --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Cluster.cs @@ -0,0 +1,178 @@ +using System.Collections.Generic; + +using UnityEngine; + +using ExitGames.Client.Photon; + +namespace Photon.Pun.Demo.Procedural +{ + /// + /// The Cluster component has references to all Blocks that are part of this Cluster. + /// It provides functions for modifying single Blocks inside this Cluster. + /// It also handles modifications made to the world by other clients. + /// + public class Cluster : MonoBehaviourPunCallbacks + { + private string propertiesKey; + + private Dictionary propertiesValue; + + public int ClusterId { get; set; } + + public Dictionary Blocks { get; private set; } + + #region UNITY + + public void Awake() + { + Blocks = new Dictionary(); + + propertiesValue = new Dictionary(); + } + + /// + /// Sets the unique key of this Cluster used for storing modifications within the Custom Room Properties. + /// + private void Start() + { + propertiesKey = "Cluster " + ClusterId; + } + + #endregion + + #region CLASS FUNCTIONS + + /// + /// Adds a Block to the Cluster. + /// This is called by the WorldGenerator while the generation process is running. + /// In order to modify Blocks directly, we are storing the ID as well as a reference to the certain GameObject. + /// + public void AddBlock(int blockId, GameObject block) + { + Blocks.Add(blockId, block); + } + + /// + /// Gets called before a new world can be generated. + /// Destroys each Block from this Cluster and removes the data stored in the Custom Room Properties. + /// + public void DestroyCluster() + { + foreach (GameObject block in Blocks.Values) + { + Destroy(block); + } + + Blocks.Clear(); + + if (PhotonNetwork.IsMasterClient) + { + RemoveClusterFromRoomProperties(); + } + } + + /// + /// Decreases a Block's height locally before applying the modification to the Custom Room Properties. + /// + public void DecreaseBlockHeight(int blockId) + { + float height = Blocks[blockId].transform.localScale.y; + height = Mathf.Max((height - 1.0f), 0.0f); + + SetBlockHeightLocal(blockId, height); + } + + /// + /// Increases a Block's height locally before applying the modification to the Custom Room Properties. + /// + public void IncreaseBlockHeight(int blockId) + { + float height = Blocks[blockId].transform.localScale.y; + height = Mathf.Min((height + 1.0f), 8.0f); + + SetBlockHeightLocal(blockId, height); + } + + /// + /// Gets called when a remote client has modified a certain Block within this Cluster. + /// Called by the WorldGenerator or the Cluster itself after the Custom Room Properties have been updated. + /// + public void SetBlockHeightRemote(int blockId, float height) + { + GameObject block = Blocks[blockId]; + + Vector3 scale = block.transform.localScale; + Vector3 position = block.transform.localPosition; + + block.transform.localScale = new Vector3(scale.x, height, scale.z); + block.transform.localPosition = new Vector3(position.x, height / 2.0f, position.z); + } + + /// + /// Gets called whenever the local client modifies any Block within this Cluster. + /// The modification will be applied to the Block first before it is published to the Custom Room Properties. + /// + private void SetBlockHeightLocal(int blockId, float height) + { + GameObject block = Blocks[blockId]; + + Vector3 scale = block.transform.localScale; + Vector3 position = block.transform.localPosition; + + block.transform.localScale = new Vector3(scale.x, height, scale.z); + block.transform.localPosition = new Vector3(position.x, height / 2.0f, position.z); + + UpdateRoomProperties(blockId, height); + } + + /// + /// Gets called in order to update the Custom Room Properties with the modification made by the local client. + /// + private void UpdateRoomProperties(int blockId, float height) + { + propertiesValue[blockId] = height; + + Hashtable properties = new Hashtable {{propertiesKey, propertiesValue}}; + PhotonNetwork.CurrentRoom.SetCustomProperties(properties); + } + + /// + /// Removes the modifications of this Cluster from the Custom Room Properties. + /// + private void RemoveClusterFromRoomProperties() + { + Hashtable properties = new Hashtable {{propertiesKey, null}}; + PhotonNetwork.CurrentRoom.SetCustomProperties(properties); + } + + #endregion + + #region PUN CALLBACKS + + /// + /// Gets called whenever the Custom Room Properties are updated. + /// When the changed properties contain the previously set PropertiesKey (basically the Cluster ID), + /// the Cluster and its Blocks will be updated accordingly. + /// + public override void OnRoomPropertiesUpdate(Hashtable propertiesThatChanged) + { + if (propertiesThatChanged.ContainsKey(propertiesKey)) + { + if (propertiesThatChanged[propertiesKey] == null) + { + propertiesValue = new Dictionary(); + return; + } + + propertiesValue = (Dictionary) propertiesThatChanged[propertiesKey]; + + foreach (KeyValuePair pair in propertiesValue) + { + SetBlockHeightRemote(pair.Key, pair.Value); + } + } + } + + #endregion + } +} \ No newline at end of file diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Cluster.cs.meta b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Cluster.cs.meta new file mode 100644 index 00000000..349ddff7 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/Cluster.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3fde284a91e7bf14dbf72b084e11736d +timeCreated: 1521731876 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/IngameControlPanel.cs b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/IngameControlPanel.cs new file mode 100644 index 00000000..bf80b303 --- /dev/null +++ b/Assets/Photon/PhotonUnityNetworking/Demos/DemoProcedural/Scripts/IngameControlPanel.cs @@ -0,0 +1,269 @@ +using ExitGames.Client.Photon; +using Photon.Realtime; +using UnityEngine; +using UnityEngine.UI; + +namespace Photon.Pun.Demo.Procedural +{ + /// + /// The Ingame Control Panel basically controls the WorldGenerator. + /// It is only interactable for the current MasterClient in the room. + /// + public class IngameControlPanel : MonoBehaviourPunCallbacks + { + private bool isSeedValid; + + private InputField seedInputField; + private Dropdown worldSizeDropdown; + private Dropdown clusterSizeDropdown; + private Dropdown worldTypeDropdown; + private Button generateWorldButton; + + #region UNITY + + /// + /// When the object gets created, all necessary references are set up. + /// Also the UI elements get set up properly in order to control the WorldGenerator. + /// + public void Awake() + { + isSeedValid = false; + + seedInputField = GetComponentInChildren(); + seedInputField.characterLimit = 10; + seedInputField.characterValidation = InputField.CharacterValidation.Integer; + seedInputField.interactable = PhotonNetwork.PhotonServerSettings.StartInOfflineMode; + seedInputField.onValueChanged.AddListener((string value) => + { + int seed; + if (int.TryParse(value, out seed)) + { + isSeedValid = true; + WorldGenerator.Instance.Seed = seed; + } + else + { + isSeedValid = false; + Debug.LogError("Invalid Seed entered. Only numeric Seeds are allowed."); + } + }); + + worldSizeDropdown = GetComponentsInChildren()[0]; + worldSizeDropdown.interactable = PhotonNetwork.PhotonServerSettings.StartInOfflineMode; + worldSizeDropdown.onValueChanged.AddListener((int value) => + { + switch (value) + { + case 0: + { + WorldGenerator.Instance.WorldSize = WorldSize.Tiny; + break; + } + case 1: + { + WorldGenerator.Instance.WorldSize = WorldSize.Small; + break; + } + case 2: + { + WorldGenerator.Instance.WorldSize = WorldSize.Medium; + break; + } + case 3: + { + WorldGenerator.Instance.WorldSize = WorldSize.Large; + break; + } + } + }); + + clusterSizeDropdown = GetComponentsInChildren()[1]; + clusterSizeDropdown.interactable = PhotonNetwork.PhotonServerSettings.StartInOfflineMode; + clusterSizeDropdown.onValueChanged.AddListener((int value) => + { + switch (value) + { + case 0: + { + WorldGenerator.Instance.ClusterSize = ClusterSize.Small; + break; + } + case 1: + { + WorldGenerator.Instance.ClusterSize = ClusterSize.Medium; + break; + } + case 2: + { + WorldGenerator.Instance.ClusterSize = ClusterSize.Large; + break; + } + } + }); + + worldTypeDropdown = GetComponentsInChildren()[2]; + worldTypeDropdown.interactable = PhotonNetwork.PhotonServerSettings.StartInOfflineMode; + worldTypeDropdown.onValueChanged.AddListener((int value) => + { + switch (value) + { + case 0: + { + WorldGenerator.Instance.WorldType = WorldType.Flat; + break; + } + case 1: + { + WorldGenerator.Instance.WorldType = WorldType.Standard; + break; + } + case 2: + { + WorldGenerator.Instance.WorldType = WorldType.Mountain; + break; + } + } + }); + + generateWorldButton = GetComponentInChildren