diff --git a/Assets/GWConquest/Scripts/Inventory.cs b/Assets/GWConquest/Scripts/Inventory.cs index 7dc2a5a..da0a62b 100644 --- a/Assets/GWConquest/Scripts/Inventory.cs +++ b/Assets/GWConquest/Scripts/Inventory.cs @@ -1,6 +1,3 @@ -using UdpKit; - - using System; using System.Linq; using System.Collections.Generic; diff --git a/Assets/GWConquest/Scripts/UI/MainMenu.cs b/Assets/GWConquest/Scripts/UI/MainMenu.cs index 516c326..d34286f 100644 --- a/Assets/GWConquest/Scripts/UI/MainMenu.cs +++ b/Assets/GWConquest/Scripts/UI/MainMenu.cs @@ -1,7 +1,6 @@  using System; -using UdpKit; using UnityEngine; using Unity.Netcode; diff --git a/Assets/Photon.meta b/Assets/Photon.meta deleted file mode 100644 index 2615178..0000000 --- a/Assets/Photon.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6f3caea5f2da14eb98f395c25eb65341 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt.meta b/Assets/Photon/PhotonBolt.meta deleted file mode 100644 index 766e22d..0000000 --- a/Assets/Photon/PhotonBolt.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: ae53312a040092f4daec31164692734d -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/PhotonBolt.asmdef b/Assets/Photon/PhotonBolt/PhotonBolt.asmdef deleted file mode 100644 index 9e02a12..0000000 --- a/Assets/Photon/PhotonBolt/PhotonBolt.asmdef +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "PhotonBolt", - "references": [ - "PhotonRealtime" - ], - "includePlatforms": [], - "excludePlatforms": [] -} \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/PhotonBolt.asmdef.meta b/Assets/Photon/PhotonBolt/PhotonBolt.asmdef.meta deleted file mode 100644 index 79507bf..0000000 --- a/Assets/Photon/PhotonBolt/PhotonBolt.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8cd1d7a2fefc849a8a7618c0e950d050 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/README.txt b/Assets/Photon/PhotonBolt/README.txt deleted file mode 100644 index f2527f8..0000000 --- a/Assets/Photon/PhotonBolt/README.txt +++ /dev/null @@ -1,10 +0,0 @@ -DOCUMENTATION - -All of our documentation is now available here: -http://doc.photonengine.com/en/bolt/current/setup/overview - -SUPPORT - -Forum: http://forum.photonengine.com/categories/bolt-engine -Discord: https://discord.gg/0ya6ZpOvnShSCtbb -Email: support@boltengine.com \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/README.txt.meta b/Assets/Photon/PhotonBolt/README.txt.meta deleted file mode 100644 index d200b39..0000000 --- a/Assets/Photon/PhotonBolt/README.txt.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: cd5dbfb4829cdd34995dd62e019f1369 -TextScriptImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/assemblies.meta b/Assets/Photon/PhotonBolt/assemblies.meta deleted file mode 100644 index 12e20e9..0000000 --- a/Assets/Photon/PhotonBolt/assemblies.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 29655a3c7310bd2479f6396285048b6a -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.dll b/Assets/Photon/PhotonBolt/assemblies/bolt.dll deleted file mode 100644 index 36ebe2a..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/bolt.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.dll.meta b/Assets/Photon/PhotonBolt/assemblies/bolt.dll.meta deleted file mode 100644 index 96d09ee..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/bolt.dll.meta +++ /dev/null @@ -1,101 +0,0 @@ -fileFormatVersion: 2 -guid: 5b00bf8b25851d440940a40ec23344f4 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: - BoltEntity: -2500 - BoltPoll: -10000 - BoltSend: 10000 - Photon.Bolt.BoltEntity: -2500 - Photon.Bolt.Internal.BoltPoll: -10000 - Photon.Bolt.Internal.BoltSend: 10000 - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - - first: - Facebook: Win - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - Facebook: Win64 - second: - enabled: 1 - 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: OSXIntel - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - Standalone: OSXIntel64 - 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 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.dll.release b/Assets/Photon/PhotonBolt/assemblies/bolt.dll.release deleted file mode 100644 index 3b4ebb4..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/bolt.dll.release and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.dll.release.meta b/Assets/Photon/PhotonBolt/assemblies/bolt.dll.release.meta deleted file mode 100644 index 0da7bc5..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/bolt.dll.release.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 28cbdfd81352f8a43b0549c659031d66 -timeCreated: 1502965833 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll b/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll deleted file mode 100644 index 257d075..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb b/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb deleted file mode 100644 index cc8f4b8..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb.meta b/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb.meta deleted file mode 100644 index b617c13..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: af920fcaf3e02ba448618993cdbf1d93 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.meta b/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.meta deleted file mode 100644 index b965187..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.meta +++ /dev/null @@ -1,83 +0,0 @@ -fileFormatVersion: 2 -guid: 4e809339b83b091448c5ca56c9f14a93 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - : Linux - second: - enabled: 1 - settings: - CPU: x86 - - first: - : LinuxUniversal - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - : OSXIntel - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - : OSXIntel64 - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 1 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - - first: - Standalone: Linux64 - 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 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.xml b/Assets/Photon/PhotonBolt/assemblies/bolt.xml deleted file mode 100644 index ec63f5d..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/bolt.xml +++ /dev/null @@ -1,5536 +0,0 @@ - - - - bolt - - - - - Override this method and return true if you want the event listener to keep being attached to Bolt even - when Bolt shuts down and starts again. - - True/False - - *Example:* Configuring the persistence behaviour to keep this listener alive between startup and shutdown. - - - public override bool PersistBetweenStartupAndShutdown() { - return true; - } - - - - - - Callback triggered when the Bolt simulation is shutting down. - - - *Example:* Logging a message in the Bolt console when the server has shut down unexpectedly. - - - public override void BoltShutdown(AddCallback registerDoneCallback, UdpConnectionDisconnectReason disconnectReason = UdpConnectionDisconnectReason.Disconnected) { - BoltLog.Warn("Bolt is shutting down"); - - registerDoneCallback(() => - { - BoltLog.Warn("Bolt is down"); - SceneManager.LoadScene(0); - }); - } - - - - - - Callback triggered before the Bolt simulation starts. - - - *Example:* Logging a message in the console when Bolt is starting. - - - public override void BoltStartBegin() { - BoltLog.Info("Warning: Bolt is Starting..."); - } - - - - - - Callback triggered after the Bolt simulation starts. - - - *Example:* Logging a message in the console when Bolt is already started. - - - public override void BoltStartDone() { - BoltLog.Info("Warning: Bolt started..."); - } - - - - - - Callback triggered when Bolt was not able to initialize completely. - - - *Example:* Logging a message in the console when Bolt failed to start. - - - public override void BoltStartFailed(UdpConnectionDisconnectReason disconnectReason) { - BoltLog.Info("Warning: Bolt failed to start. Reason: {0}", disconnectReason); - } - - - - - - Callback triggered when a new binary stream data is being transferred. - - The sender connection - Stream Channel where the data will be sent - Stream Unique ID - - *Example:* Receiving data from BoltConnection. - - - public override void StreamDataStarted(BoltConnection connnection, UdpChannelName channel, ulong streamID) { - BoltLog.Info("Connection {0} is transfering data on channel {1}...", connection, channel); - } - - - - - - Callback triggered when a binary stream data has been aborted. - - The sender connection - Stream Channel where the data was being sent - Stream Unique ID - - *Example:* Receiving data from BoltConnection. - - - public override void StreamDataAborted(BoltConnection connnection, UdpChannelName channel, ulong streamID) { - BoltLog.Info("Stream {0} on channel {1} from connection {2} has been aborted.", streamID, channel, connection); - } - - - - - - Callback triggered when a new binary stream data is being transferred. - - The sender connection - Stream Channel where the data is being sent - Stream Unique ID - Stream transfer progress from 0 to 0.99 - - *Example:* Receiving data from BoltConnection. - - - public override void StreamDataProgress(BoltConnection connnection, UdpChannelName channel, ulong streamID, float progress) { - BoltLog.Info("Connection {0} is transfering data on channel {1} :: Transfer {2} on {3}%...", connection, channel, streamID, progress * 100); - } - - - - - - Callback triggered when binary stream data is received. - - The sender connection - The binary stream data - - *Example:* Receiving a custom player icon. - - - public override void StreamDataReceived(BoltConnection connnection, UdpStreamData data) { - Texture2D icon = new Texture2D(4, 4); - icon.LoadImage(data.Data); - - PlayerData playerData = (PlayerData)connection.userToken; - playerData.SetIcon(icon); - } - - - - - - Callback triggered before the new local scene is loaded. - - Name of scene being loaded - Token passed by the Server when loading the new scene. - - *Example:* Showing a splash screen when clients are loading the game scene. - - - public override void SceneLoadLocalBegin(string scene, IProtocolToken token) { - if(BoltNetwork.isClient && map.Equals(""GameScene"") { - SplashScreen.Show(SplashScreens.GameLoad); - } - } - - - - - - Callback triggered after the new local scene has been completely loaded. - - Name of scene that has loaded - Token passed by the Server when loading the new scene. - - *Example:* Hiding a splash screen that was shown during loading. - - - public override void SceneLoadLocalDone(string scene, IProtocolToken token) { - if(BoltNetwork.isClient && scene.Equals(""GameScene"") { - SplashScreen.Hide(); - } - } - - - - - - Callback triggered when a remote connection has completely loaded the current scene - - The remote connection - Token passed by the Server when loading the new scene. - - *Example:* Instantiating and configuring a player entity on the server and then assigning control to the client. - - - public override void SceneLoadRemoteDone(BoltConnection connection, IProtocolToken token) { - var player = BoltNetwork.Instantiate(BoltPrefabs.Player); - player.transform.position = spawnPoint.transform.position; - - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - Configure(player, initData); - - player.AssignControl(connection); - } - - - - - - Callback triggered when a client has become connected to this instance - - Endpoint of the connected client - - *Example:* Instantiating and configuring a player entity when a client connects to the server. - - - public override void Connected(BoltConnection connection) { - BoltLog.Info("Accept Token {0} using Connect Token {1}", connection.AcceptToken, connection.ConnectToken); - - var player = BoltNetwork.Instantiate(BoltPrefabs.Player); - player.transform.position = spawnPoint.transform.position; - - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - Configure(player, initData); - - player.AssignControl(connection); - } - - - - - - Callback triggered when a connection to remote server has failed - - The remote address - Connect token sent by the client when trying to connect. - - *Example:* Logging an error message when the remote connection has failed. - - - public override void ConnectFailed(UdpEndPoint endpoint, IProtocolToken token) { - BoltLog.Info(string.Format("Connection To ({0}:{1}) has failed", endpoint.Address.ToString(), endpoint.ToString())); - } - - - - - - Callback triggered when this instance receives an incoming client connection - - The incoming client endpoint - A data token sent from the incoming client - - *Example:* Accepting an incoming connection with user credentials in the data token. - - - public override void ConnectRequest(UdpEndPoint endpoint, IProtocolToken token) { - UserCredentials creds = (UserCredentials)token); - if(Authenticate(creds.username, creds.password)) { - BoltNetwork.Accept(connection.remoteEndPoint); - } - } - - - - - - Callback triggered when the connection to a remote server has been refused. - - The remote server endpoint - Data token sent by the refusing server - - *Example:* Logging an error message when the remote connection has been refused using an error message token from the server. - - - public override void ConnectRefused(UdpEndPoint endpoint, IProtocolToken token) { - ServerMessage.message = (ServerMessage)token; - BoltLog.Info(string.Format("Connection To ({0}:{1}) has been refused. Reason was {3}", - endpoint.Address.ToString(), endpoint.ToString(), serverMessage.errorDescription)); - } - - - - - - Callback triggered when trying to connect to a remote endpoint - - The remote server address - Token passed by the client when trying to connect to a server. - - *Example:* Logging a message when initializing a connection to server. - - - public override void ConnectAttempt((UdpEndPoint endpoint) { - BoltLog.Info(string.Format("To Remote Server At ({0}:{1})", endpoint.Address, endpoint.Port); - } - - - - - - Callback triggered when disconnected from remote server - - The remote server endpoint - - *Example:* Logging a disconnect message and returning to the main menu scene. - - - public override void Disconnected(BoltConnection connection) { - BoltLog.Info("Disconnected with Token {0}", connection.DisconnectToken); - BoltLog.Info("Returning to main menu..."); - Application.LoadLevel("MainMenu"); - } - - - - - - Callback triggered when this instance of Bolt loses control of a Bolt entity - - The controlled entity - - *Example:* Setting up game components to no longer control an entity. - - - public override void ControlOfEntityLost(BoltEntity entity) { - BoltLog.Info("Control lost with Token {0}", entity.ControlLostToken); - GameInput.instance.RemoveControlledEntity(entity); - MiniMap.instance.RemoveControlledEntity(entity); - } - - - - - - Callback triggered when this instance of bolt receieves control of a bolt entity - - The controlled entity - - *Example:* Setting up the game minimap and other components to use a specific entity as the player's controlled entity. - - - public override void ControlOfEntityGained(BoltEntity entity) { - GameInput.instance.SetControlledEntity(entity); - MiniMap.instance.SetControlledEntity(entity); - } - - - - - - Callback triggered when a new entity is attached to the bolt simulation - - The attached entity - - *Example:* Setting up the game minimap to show a newly attached entity. - - - public override void EntityAttached(BoltEntity entity) { - MiniMap.instance.SetKnownEntity(entity); - } - - - - - - Callback triggered when a new entity is detached from the bolt simulation - - The detached entity - - *Example:* Removing the newly detached entity from the game minimap. - - - public override void EntityDetached(BoltEntity entity) { - MiniMap.instance.RemoveKnownEntity(entity); - } - - - - - - Callback triggered when a bolt entity is recieved from the network - - The recieved bolt entity - - *Example:* Loggging connections from remote players in the client bolt console - - - public override void EntityReceived(BoltEntity entity) { - string name = entity.GetState<PlayerState>().Name; - BoltLog.Info(string.Format("{0} Has Connected", name)); - } - - - - - - Callback triggered when a bolt entity is frozen. - - The recieved bolt entity - - *Example:* Loggging connections from remote players in the client bolt console - - - public override void EntityFrozen(BoltEntity entity) { - string name = entity.GetState<PlayerState>().Name; - BoltLog.Info(string.Format("{0} Has been frozen", name)); - } - - - - - - Callback triggered when a bolt entity is thawed. - - The recieved bolt entity - - *Example:* Loggging connections from remote players in the client bolt console - - - public override void EntityThawed(BoltEntity entity) { - string name = entity.GetState<PlayerState>().Name; - BoltLog.Info(string.Format("{0} Has been thawed", name)); - } - - - - - - Callback triggered when the session list is updated. - - The updated session list - - *Example:* Loggging all sessions from the list. - - - public override void SessionListUpdated(Map<System.Guid, UdpSession> sessionList) { - BoltLog.Info("Session list updated: {0} total sessions", sessionList.Count); - - foreach (var session in sessionList) - { - UdpSession udpSession = session.Value as UdpSession; - BoltLog.Info("UdpSession {0} Source: {1}", udpSession.HostName, udpSession.Source); - } - } - - - - - - Callback triggered when connecting to a session has successful. - - The session the client was trying to connect to - Connection token - - *Example:* Loggging - - - public override void SessionConnected(UdpSession session, IProtocolToken token) - { - BoltLog.Error("Success to connect to session {0} with token {1}", session, token); - } - - - - - - Callback triggered when connecting to a session has failed. - - The session the client was trying to connect to - Connection token - Reason the operation has failed - - *Example:* Loggging - - - public override void SessionConnectFailed(UdpSession session, IProtocolToken token, UdpSessionError errorReason) - { - BoltLog.Error("Failed to connect to session {0} with token {1}", session, token); - } - - - - - - Callback triggered when the requested session creation was successful. - - The created session - - *Example:* Loggging - - - public override void SessionCreatedOrUpdated(UdpSession session) - { - BoltLog.Info("UdpSession {0} of type {1} was created", session.HostName, session.Source); - } - - - - - - Callback triggered when the requested session creation has failed. - - The failed session - Reason the operation has failed - - *Example:* Loggging - - - public override void SessionCreationFailed(UdpSession session, UdpSessionError errorReason) - { - BoltLog.Info("UdpSession {0} of type {1} has failed to create", session.HostName, session.Source); - } - - - - - - Use this function to finish any pending Control Command in the queue. - Usefull if when Bolt needs to be shutdown while a control command still running. - All command in the queue are marked as Finished. - - - - - Number of frames per second as the simulation rate - Defaults to 60 fps - - - - - Runs the Bolt Shutdown procedure, cleaning and resetting all necessary values in order to get Bolt ready - for a new startup process. - - NetworkMode when shutting down - - - - - - - - Invoked when the Application is about to Quit - - - - - Update all BoltGlobalBahaviours active in the scene. - This method will check accross all registered GlobalBehaviours classes which ones need to be - created or destroyed. - - Scene index to lookup for associated GlobalBehaviours. - Passing -1 will load only behaviours with no associated scene. - - - - Auto loads the predefined scene with the asigned Token - - - - - Temporary re-used list for holding current proxies that need to be frozen. - - - - - This method will register the internal Protocol Tokens used by Bolt - but will also look at the BoltProtocolTokenRegistry and register any Protocol Token - previously saved on the registry - - - - - Bolt behaviour to poll the network and step entities in the simulation - - - *Example:* if bolt is missing the ```BoltPoll`` behaviour then the simulation is broken and we should shut down. - - - void CheckBoltHealth() { - if(BoltNetwork.globalObject.GetComponent<BoltPoll>() == null) { - Debug.Log("BoltPoll is missing!); - GameApplication.Shutdown(ErrorCode.Bolt); - } - } - - - - - - - - - *Example:* if bolt is missing the ```BoltSend`` behaviour then the simulation is broken and we should shut down. - - - void CheckBoltHealth() { - if(BoltNetwork.globalObject.GetComponent<BoltSend>() == null) { - Debug.Log("BoltSend is missing!); - GameApplication.Shutdown(ErrorCode.Bolt); - } - } - - - - - - Defines where the entity prefab can be instantiated - - - - - Defines how the Unity Editor instance will be started, - If as server, client or none - - - - - Provides logging capabilities to a variety of outputs - - - *Example:* Logging with different status levels. - - - void OwnerOnAttack(BoltEntity player, BoltEntity target) { - if(!target.IsAttached) { - BoltLog.Error("Attempting to target an entity that is not attached: {0}", target.NetworkId); - } - else { - BoltLog.Info("{0} attack on {1}", player.NetworkId, target.NetworkId); - - var playerState = player.GetState<PlayerState>(); - var targetState = target.GetState<PlayerState>(); - - targetState.HP = -= playerState.BaseDamage * playerState.DamageModMultiplier; - } - } - - - - - - The interface providing log writing capabilities to an output - - - - - IWriter implementation that outputs to a file - - - - - IWriter implementation that outputs to the Bolt console - - - - - IWriter implementation that outputs to the system console out - - - - - IWriter implementation that outputs to Unity console - - - - - Sequence Generator creates a sequence of numbers - - - - - The in-game console window - - - *Example:* Writing a custom message to the console. - - - void Start() { - BoltConsole.Write("[Start:" + this.gameObject.name + "]); - } - - - - - - Write one line to the console - - Text to write - Color of the text - - *Example:* Writing a custom message to the console in color. - - - void OnDeath() { - BoltConsole.Write("[Death:" + this.gameObject.name + "], Color.Red); - } - - - - - - Write one line to the console - - Text to write - - *Example:* Writing a custom message to the console. - - - void OnSpawn() { - BoltConsole.Write("[Spawn:" + this.gameObject.name + "]); - } - - - - - - Interface that can be implemented to create custom event filtering rules - - - *Example:* An event filter that blocks chat events from a chat restricted player - - - public class ChatEventFilter : IEventFilter { - public bool EventReceived(Event evt) { - if(chatRestrictedPlayerList.ContainsKey(evt.RaisedBy)) { - return false; - } - else return true; - } - } - - - - - - Called when a new event is recieved - - The event data - Whether to accept or reject the event - - - - Default implementation of Bolt.IEventFilter that lets everything through - - - - - Interface that can be implemented on Bolt.GlobalEventListener, Bolt.EntityEventListener and Bolt.EntityEventListener<T> - to modify its invoke condition settings - - - *Example:* A custom server callback class that invokes events even when disabled. - - - [BoltGlobalBehaviour(BoltNetworkModes.Server)] - public class BoltServerCallbacks : Bolt.GlobalEventListener, Bolt.IEventListener { - public bool InvokeIfDisabled { return true; } - public bool InvokeIfGameObjectIsInactive { return true; } - - // event callback overrides below - } - - - - - - Signal to Bolt if this EventListener must receive events even if it's disabled. - Return true to receive events. - - - - - Signal to Bolt if this EventListener must receive events even if the GameObject is disabled. - Return true to receive events. - - - - - Represents a simple Object Pool manager - - - - - - Internal Object Pool - - - - - Check if the Pool has any Pooled Object - - True if there is any object to be reused on the pool - - - - Object Pool Constructor - - - - - Returns an instance to the Object Pool - - Object to the returned to Pool - - - - Returns a valid reference from the Pool. - If there is a old object on the Pool, returns it, if not, create a new one. - - Reference from the Object Pool - - - - Describe a Protocol Token that can be used to transfer data between peers - when running certain process on Bolt. - Read more at here - Utility methods to work with IProtocolTokens can be found on . - - - - - Used to deserialize the Token reading data from the data packet. - - Data packet that contains the Token info - - - - Used to serialize the Token by writing data into the data packet. - - Data packet used to store the Token info - - - - Used to deserialize the Token reading data from the data packet. - - Data packet that contains the Token info - - - - Used to serialize the Token by writing data into the data packet. - - Data packet used to store the Token info - - - - Used to reset all fields from a IProtocolToken in order to return it to the Pool - - - - - Utility methods to manage IProtocolToken's content - - - - - Convert the IProtocolToken into a byte array - - Token to be converted - Byte array with the Token content - - - - Convert a byte array into a IProtocolToken - - Byte array to be converted - IProtocolToken of type described on the byte array - - - - Writes a IProtocolToken into this UdpPacket - - Packet where the Token will be written - IProtocolToken to be written at the end of the Packet - - - - Reads a IProtocolToken from the UdpPacket - - Packet from where the Token will be read - IProtocolToken read from the tip of the Packet - - - - Handle Read and Write of a IProtocolToken based on the UdpPacket type, - if is true, this method will write the Token, - or read it otherwise. - - UdpPacket where the Token will be manupulated - IProtocolToken to be written or read - - - - Releases a PooledProtocolToken back to the Pool - - A IProtocolToken candidate that can be PooledProtocolToken instance - - - - Creates a new Protocol Token instance from a PooledProtocolToken type that can be reused by the pooling system - - Protocol Type that represents a PooledProtocolToken type - A new instance of a PooledProtocolToken - - - - Check if the Prefab Database contains a reference to a Bolt Entity - - BoltEntity to heck - True, if the BoltEntity is registred on the Prefabs Database - - - - Base class that all commands inherit from - - - - - The value of the BoltNetwork.serverFrame property of the computer this command was created on - - - - - Returns true if it's the first time this command executed - - - - - User assignable token that lets you pair arbitrary data with the command, this is not replicated over the network to any remote computers. - - - - - Convert a Command into a Bool. - Useful to check if the reference to a Command is not null - - Command to be checked - - - - Base class for unity behaviours that want to access Bolt methods - - - *Example:* Using Bolt.EntityBehaviour to write a simple PlayerController class. Attach to a valid bolt entity/prefab. - - - public class PlayerController : Bolt.EntityBehaviour<IPlayerState> { - - bool forward; - bool backward; - bool left; - bool right; - - public override void Initialized() { - MiniMap.instance.AddKnownPlayer(this.gameObject); - } - - public override void Attached() { - state.AddCallback("name", NameChanged); - state.AddCallback("team", TeamChanged); - } - - public override void ControlGained() { - GameCamera.instance.AddFollowTarget(this.transform); - MiniMap.instance.SetControlledPlayer(this.entity); - } - - public override SimulateOwner() { - if(state.health < 100) - { - state.health += state.healthRegen * BoltNetwork.frameDeltaTime; - } - } - - public override void SimulateController() { - IPlayerCommandInput input = PlayerCommand.Create(); - - PollKeys(); - - input.forward = forward; - input.backward = backward; - input.left = left; - input.right = right; - - entity.QueueInput(input); - } - - public override ExecuteCommand(Bolt.Command command, bool resetState) { - if(resetState) { - motor.SetState(cmd.Result.position); - } - else - { - cmd.Result.position = motor.Move(cmd.Input.forward, cmd.Input.backward, command.Input.left, command.Input.right); - - if (cmd.IsFirstExecution) { - AnimatePlayer(cmd); - } - } - } - } - - - - - - The entity for this behaviour - - Use the ```entity``` property to access the internal ```BoltEntity``` of the gameObject that this script is attached to. - - *Example:* Passing the ```entity``` of this gameObject to a ```MiniMap```, giving it the position, facing direction and the - entity state (such as team, alive/dead, hostile, etc). - - - public class PlayerController : Bolt.EntityBehaviour { - public override void ControlGained() { - GameCamera.instance.AddFollowTarget(this.transform); - MiniMap.instance.SetControlledPlayer(this.entity); - } - } - - - - - - Invoked when the entity has been initialized, before Attached - - - *Example:* Notifying a ```MiniMap``` class to draw this gameObject by overriding the ```Initialized()``` method. - - - public override void Initialized() { - MiniMap.instance.AddKnownPlayer(this.gameObject); - } - - - - - - Invoked when Bolt is aware of this entity and all internal state has been setup - - - *Example:* Overriding the ```Attached()``` method to add state change callbacks to the newly valid state. - - - public override void Attached() { - state.AddCallback("name", NameChanged); - state.AddCallback("team", TeamChanged); - } - - - - - - Invoked when this entity is removed from Bolt's awareness - - - *Example:* Notifying the game minimap to remove the entity upon detaching from the simulation. - - - public override void Detached() { - MiniMap.instance.RemoveKnownPlayer(this.entity); - { - - - - - - Invoked each simulation step on the owner - - - *Example:* Implementing an authoritative health regeneration update every 10th frame. Also fires the - DeathTrigger() on the state if health falls below zero. - - - public override SimulateOwner() { - if(state.alive && state.Health.Current <= 0) { - state.Health.alive = false; - state.DeathTrigger(); - } - else if(state.alive && (BoltNetwork.frame % 10) == 0) - { - state.Health.Current = Mathf.Clamp (state.Health.Current + (state.Health.RegenPer10 * BoltNetwork.frameDeltaTime), - // clamp from 0 to max health - 0, state.Health.Max); - } - } - - - - - - Invoked each simulation step on the controller - - - *Example:* Creating a simple WASD-style movement input command and adding it to the queue of inputs. One input command - should be added to the queue per execution and remember to create and compile a Command asset before using this method! - - - bool forward; - bool backward; - bool left; - bool right; - - public override void SimulateController() { - IPlayerCommandInput input = PlayerCommand.Create(); - - PollKeys(); - - input.forward = forward; - input.backward = backward; - input.left = left; - input.right = right; - - entity.QueueInput(input); - } - - - - - - Invoked when you gain control of this entity - - - *Example:* Using the ```ControlGained()``` callback to set up a ```GameCamera``` and ```MiniMap``` to focus on this entity. - - - public override void ControlGained() { - GameCamera.instance.AddFollowTarget(this.transform); - MiniMap.instance.ControlGained(this.entity); - } - - - - - - Invoked when you lost control of this entity - - - *Example:* Using the ```ControlLost()``` callback to remove the focus of a ```GameCamera``` and ```MiniMap```. - - - public override void ControlLost() { - GameCamera.instance.RemoveFollowTarget(); - MiniMap.instance.ControlLost(this.entity); - } - - - - - - Invoked on the owner when a remote connection is controlling this entity but we have not received any command for the current simulation frame. - - The last valid command received - - *Example:* Handling missing input commands by using the last received input command to continue moving in the same direction. - - - public override void MissingCommand(Bolt.Command previous) - { - WASDCommand cmd = (WASDCommand)command; - - cmd.Result.position motor.Move(cmd.Input.forward, cmd.Input.backward, cmd.Input.left, cmd.Input.right); - } - - - - - - Invoked on both the owner and controller to execute a command - - The command to execute - Indicates if we should reset the state of the local motor or not - - *Example:* Executing a simple WASD movement command. On the client this method can be called multiple times per fixed frame, - beginning with a reset to the last confirmed state (resetState == true), and then again for each unverified input command in the queue (resetState == false); - - Use the cmd.isFirstExecution property to do any type of one-shot behaviour such as playing sound or animations. This will prevent it from being called each time - the input is replayed on the client. - - Remember to create and compile a Command asset before using this method! - - - public override ExecuteCommand(Bolt.Command command, bool resetState) { - WASDCommand cmd = (WASDCommand)command; - if(resetState) { - motor.SetState(cmd.Result.position); - } - else { - cmd.Result.position = motor.Move(cmd.Input.forward, cmd.Input.backward, cmd.Input.left, cmd.Input.right); - - if (cmd.IsFirstExecution) { - AnimatePlayer(cmd); - } - } - } - - - - - - Utility callback used to signal to the user that this entity is about to be reset by a Command Result. - Using this method, you are able to signal Bolt that the Result of the Command is equaled the current state of your - entity, skipping all the recomputation needed when a Reset command arrives. - - The Command with ResetState flag as true for ExecuteCommand callback - True if you want to not recompute everything when local and remote Result match. False otherwise (default always recompute) - - - - Base class for unity behaviours that want to access Bolt methods with the state available also - - The type of state on this BoltEntity - - *Example:* Using the IPlayerState type as a parameter and using its property state.team in code. - - - public class PlayerController : Bolt.EntityBehaviour<IPlayerState> { - public override void ControlGained() { - state.AddCallback("team", TeamChanged); - } - - void TeamChanged() { - var nameplate = GetComponent<PlayerNameplate>(); - if (state.team == 0) nameplate.color = Color.Blue; - else nameplate.color = Color.Red; - } - } - - - - - - The state for this behaviours entity - - - *Example:* Using the ```state``` property to set up state callbacks. - - - public class PlayerController : Bolt.EntityBehaviour<IPlayerState> { - public override void ControlGained() { - state.AddCallback("team", TeamChanged); - } - - void TeamChanged() { - var nameplate = GetComponent<PlayerNameplate>(); - if (state.team == 0) nameplate.color = Color.Blue; - else nameplate.color = Color.Red; - } - } - - - - - - Not really sure why these aren't just pulled from UnityObject when needed? - - - - - This runs the commands received from the Controller of this entity. - - The number of executed commands - - - - Interface for unity behaviours that want to access Bolt methods - - - - - Interface for unity behaviours that want to access Bolt methods - - Bolt state of the entity - - - - Interface for unity behaviours that want to control for each connection an Entity can be replicated to. - - - - - Based on the BoltConnection, signal if this particular Entity must be replicated to it or not. - By default, all entities are replicated to all connections. - - Target BoltConnection to where the entity will be replicated - True to replicate the Entity for this connection, false otherwise - - - - Interface which can be implemented on a behaviour attached to an entity which lets you provide - custom priority calculations for state and events. - - - - - Called for calculating the priority of this entity for the connection passed in - - The connection we are calculating priority for - How many packets since we sent an update for this entity - The priority of the entity - - - - Called for calculating the priority of an event sent to this entity for the connection passed in - - The connection we are calculating priority for - The event we are calculating priority for - The priority of the event - - - - Base class that all events inherit from - - - *Example:* Using a LogEvent object to send a message. - - - void LogMessage(string message) { - var logEvt = new LogEvent(); - logEvt.message = message; - logEvt.Send(); - } - - - - - - Returns true if this event was sent from own connection - - - *Example:* Showing chat messages from other players. - - - public override void OnEvent(ChatEvent chatEvt) { - if(chatEvt.FromSelf) { - return; - } - - ChatWindow.instance.ShowMessage(chatEvt.message, chatEvt.timestamp); - } - - - - - - The connection which raised this event - - - *Example:* Blocking messages from players on a chat restricted list. - - - public override void OnEvent(ChatEvent chatEvt) { - if(chatRestrictedPlayerList.ContainsKey(chatEvt.RaisedBy)) { - return; - } - - ChatWindow.instance.ShowMessage(chatEvt.message, chatEvt.timestamp); - } - - - - - - Returns true if this is a global event / not an entity event - - - *Example:* Using the isGlobal property to determine whether to send local or whole-zone chat. - - - public override void OnEvent(ChatEvent chatEvt) { - if(chatEvt.isGlobalEvent) { - BroadcastZoneChat(chatEvt.message, chatEvt.timestamp); - } - else { - SendLocalChat(chatEvt.message, chatEvt.timestamp); - } - } - - - - - - The raw bytes of the event data - - - *Example:* Removing repeated chat messages by doing sequence comparison on the raw byte data and filtering out - any repeated messages after a certain limit. - - - public override void OnEvent(ChatEvent chatEvt) { - bool repeated = true; - - for(int i = 0; i < CHAT_REPEAT_LIMIT; i++) { - if(!chatEvt.BinaryData.SequenceEqual(previousChatEvts.GoBack(i).BinaryData) { - repeated = false; - break; - } - } - } - - - - - - Enqueue this object for sending across the network - - - *Example:* Sending a log message. - - - void LogMessage(string message) { - var logEvt = new LogEvent(); - logEvt.message = message; - logEvt.Send(); - } - - - - - - The Event implementation overrides this method to release any pending data that can be pooled, - like IProtocolToken references - - - - - The reliability mode of an event - - - - - The target of an entity event - - - - - The target of a global event - - - - - Called by Bolt to inspect a prefab before instantiating it. The object - returned from this method can be the prefab itself, it does not have - to be a unique instance. - - The id of the prefab we are looking for - A game object representing the prefab or an instance of the prefab - - - - This is called when bolt wants to create a new instance of an entity prefab. - - The id of this prefab - The position we want the instance instantiated at - The rotation we want the instance to take - The newly instantiate object, or null if a prefab with was not found - - - - This is called when Bolt wants to destroy the instance of an entity prefab. - - The instance to destroy - - - - Deault implementation of Bolt.IPrefabPool which uses GameObject.Instantiate and GameObject.Destroy - - - - - Base interface for all states - - - - - The Animator component associated with this entity state - - - - - A collection of all Animator components associated with this entity state - - - - - Set the animator object this state should use for reading/writing mecanim parameters - - The animator object to use - - - - Allows you to hook up a callback to a specific property - - The path of the property - The callback delegate - - - - Allows you to hook up a callback to a specific property - - The path of the property - The callback delegate - - - - Removes a callback from a property - - The path of the property - The callback delegate to remove - - - - Removes a callback from a property - - The path of the property - The callback delegate to remove - - - - Clears all callbacks currently set. This is useful when pooling entities and you wish to clear out the current callbacks before returning the entity to the pool. - - - - - Set a property dynamically by string name - - The property name to set - The property value to set - - - - Gets a property dynamically by string name - - The property name to get - - - - - Enum for Axis Selection - - - - All Axis - - - XY Axis - - - ZX Axis - - - YZ Axis - - - X Axis - - - Y Axis - - - Z Axis - - - Disabled for all Axis - - - - Enum for the Replication Mode - - - - - Enum to select which velocity used to extrapolate the position of the transform - - - - - Enum to select the Smoothing Algorithm - - - - - Enum to select the Transform Space of positioning - - - - - Enum to select the Rotation mode of Quaternions inside a Transform - - - - - Enum to select the Property Mecanim mode when synchonizing properties - - - - - Enum to select the mode where the Animation properties would be read and written - - - - - Uses the Animator methods to read and write values from the Animator controller - - - - - Uses Bolt property values from state to update the Mecanim properties - - - - - Enum to select the String encoding - - - - - Double buffer class represents a buffer with only 2 values, - swapped when you call @ - - - - - Shift the specified value into the buffer, while - saving the current value as the previous one - - The shift. - Value. - - - - Inits the buffer. - - The buffer itself. - Value to set on the both spots on the buffer. - - - - Contains the indices for all arrays that contain a specific property, in order - - - - - The amount of indices - - - - - Network object. - - - - - Network property describes one property of a State - - - - - The type of random function to use for network latency simulation - - - *Example:* - - - void WriteSettings() { - BoltConfig config = BoltRuntimeSettings.instance.GetConfigCopy(); - - if(config.simulatedRandomFunction == BoltRandomFunction.PerlinNoise) { - Debug.Log("Using Perlin Noise!"); - } - else { - Debug.Log("Using System.Random!"); - } - } - - - - - - - Whether to accept connnections automatically or use the manual process - - - *Example:* - - - void WriteSettings() { - BoltConfig config = BoltRuntimeSettings.instance.GetConfigCopy(); - - if(config.serverConnectionAcceptMode == BoltConnectionAcceptMode.Auto) { - Debug.Log("Using Automatic Connection Acceptance"); - } - else { - Debug.Log("Using Manual Connection Acceptance"); - } - } - - - - - - The target output of bolt logging - - - *Example:* Conditionally writing to the Unity console depending on the log target of the current config. - - - void WriteExtra(string message) { - BoltConfig config = BoltRuntimeSettings.instance.GetConfigCopy(); - - if(config.logTargets == BoltConfigLogTargets.Unity) { - Debug.Log(message); - } - } - - - - - - Bolt configuration settings object - - - *Example:* Starting a bolt server simulation internally requires a config parameter (there is a bit more to it not shown here). - - - TODO - - - - - - The number of fixed updates to the simulation per second - - - - - The UDP packet size in bytes - - - - - The max data payload size of a packet - - - - - The Stream UDP Packet Size in Byte - - - - - The max priority value for updating an entity - - - - - The max priority value for updating a property - - - - - Whether to scope connections manually or automatically - - - - - The output targets to write log messages - - - - - Whether dejitter delay buffering is disabled or not - - - - - Client Update Send Rate. - Default is every 3 frames - - - - - Interpolation delay on client - - - - - Min interpolation delay on client - - - - - Max interpolation delay on client - - - - - Server Update Send Rate. - - - - - Interpolation delay on server - - - - - Min interpolation delay on server - - - - - Max interpolation delay on server - - - - - The max number of server connections - - - - - Whether to use automatic or manual mode for accepting incoming client connection requests - - - - - Minimum number of command left in the internal buffer in order to dejitter command base behavior - - - - - The max number of input commands that can be queued at once. - - - - - The number of times to redundantly send input commands to the server. - - - - - Whether to use network latency simulation. - - - - - The packet loss rate to use in latency simulation. - - - - - The mean ping in milliseconds to use in latency simulation. - - - - - The deviation to use in ping simulation. - - - - - Whether to use Perlin Noise or System.Random function to create ping deviations. - - - - - Amount of time in milliseconds that the connection will be maintained before being closed by lack of response. - - - - - The timeout until a new connect request will be performed. - - - - - The max number of allowed connection attempts by a single client. This value is used to limit the number of - direct connection tries before the connection fails. - - - - - The max number of allowed connection attempts by a single client to LAN EndPoint of a Server. - This value is used to limit the number of direct connection tries before the connection fails. - - - - - Override the Local Request Attempts calculation - - - - - Disables the automatic scene loading controlled by Bolt. By setting this value to True, you need to manage - the scene synchronization between server and clients manually. - - - - - Enable IPv6 Support. Bolt will use IPv6 addresses on the client and server. - - - - - Sets the network mode and scenes that a Bolt.GlobalEventListener should be run on - - - *Example:* Setting up a server-side event listener to spawn players - - - [BoltGlobalBehaviour(BoltNetworkModes.Server)] - public class BoltServerCallbacks: Bolt.GlobalEventListener - { - public override void SceneLoadLocalDone(string map) { - SpawnServerPlayer(); - } - - public override void SceneLoadRemoteDone(BoltConnection connection) { - SpawnRemotePlayer(connection); - } - } - - - - - - Sets this behaviour to run only in server or client network mode. - for more info. - - - - - A list of scenes for this behaviour to run on. You can use a string with the - name of the Scene or use BoltScenes. - - - - - GlobalBehaviour will run both on Server and Client and on all scenes. - - - - - GlobalBehaviour will run on the specified mode and on all scenes. - - Select the in which - this GlobalBehaviour will execute. - - - - GlobalBehaviour will run on both Server and Client but only on the specified scenes. - You can use BoltScenes to select the available scenes. - - List of scene names - - - - GlobalBehaviour will run on the specified mode and only on the specified scenes. - - Select the in which - this GlobalBehaviour will execute. - List of scene names - - - - Global methods and properties to control Photon Bolt. - - - *Example:* How to load a map on the server and instantiate a server controlled player. - - - void LoadMap(string mapName) { - BoltNetwork.LoadScene(mapName); - var serverPlayer = BoltNetwork.Instantiate(BoltPrefabs.Player) as GameObject; - Configure(serverPlayer); - } - - - *Example:* How to connect to a server with known IP and port number. - - - void ConnectToServer(string host, int port) { - UdpEndPoint serverAddr = UdpEndPoint(UdpIPv4Address.Parse(host), (ushort)port); - BoltNetwork.Connect(server); - } - - - *Example:* How to use the BoltNetwork ```frame``` property in an Update loop. Here we recalculate the player path 3 times per second. - - - void Update() { - if(BoltNetwork.frame % 20) == 0) { - playerMotor.Repath(targetPos); - } - } - - - - - - All the connections connected to this host - - - *Example:* Terminating all connections. - - - void DisconnectAll() { - foreach(var connection in BoltNetwork.connections) { - connection.Disconnect(); - } - } - - - - - - All clients connected to this host - - - *Example:* Disconnecting all current clients. - - - void DisconnectAllClients() { - foreach(var client in BoltNetwork.clients) { - client.Disconnect(); - } - } - - - - - - Gets the current async operation. - - The current async operation. - - - - Returns an IEnumerable list of all Bolt Entities currently loaded into the scene - - - *Example:* A post-game method to destroy all minions/npcs in the server simulation. - - - void PostGameCleanup() { - foreach(var entity in BoltNetwork.Entities) { - if(entity.IsOwner && entity.StateIs<MinionState>) { - BoltNetwork.Destroy(entity); - } - } - } - - - - - - The current local simulation frame number - - - *Example:* Using the BoltNetwork frame in a loop to recalculate the player path once every 20 frames. - - - void FixedUpdate() { - if(BoltNetwork.frame % 20) == 0) { - playerMotor.Repath(targetPos); - } - } - - - - - - Normalized value of how much time have passed since the last FixedUpdate - - - - - The time the last fixed update begain, same as Time.fixedTime - - - - - The fixed frame delta, same as Time.fixedDeltaTime - - - *Example:* How to use ```frameDeltaTime``` to translate a player's per-second health regeneration - rate into a per-frame - value. - - - protected override void SimulateOwner() { - float hpRegen = BoltNetwork.frameDeltaTime * state.HealthRegen; - state.HP = Mathf.Clamp(state.HP + hpRegen, 0, 100); - } - - - - - - How many FixedUpdate frames per second bolt is configured to run - - - *Example:* Calculating the number of frames between footsteps from a time interval. - - - int FootstepFrameInterval(float stepTimeInterval) { - return Mathf.Round(stepTimeInterval / BoltNetwork.framesPerSecond); - } - - - - - - The global object that all global behaviours will be attached to - - - *Example:* The ```globalObject``` can be used as a root for attaching new scripts such as - GlobalEventListener callbacks. - - - protected override void SceneLoadLocalDone(string map) { - if(map.Equals("GameScene")) { - BoltNetwork.globalObject.AddComponent<ClientGameCallbacks>(); - } - } - - - - - - Returns true if this instance is a server or a client with at least one valid connection. - - - *Example:* Using the ```isConnected``` property to do an automatic reconnect loop. - - - void Update() { - if(!BoltNetwork.connected && BoltNetwork.time - lastReconnectTime > 30f) { - BoltNetwork.Connect(serverAddr); - lastReconnectTime = BoltNetwork.time; - } - } - - - - - - Returns true if this host is a client - - - *Example:* Implementing a client-side score sheet display to show the scores at the end of a game. - - - void GameOver(string winTeam) { - if(BoltNetwork.isClient) { - DisplayScoreSheet("Game Over", winTeam + " Team Wins!"; - } - } - - - - - - Returns true if Bolt was compiled in debug mode - - - *Example:* Showing an FPS and ping counter when in debug mode. - - - public override void BoltStartDone() { - if(BoltNetwork.isDebugMode) { - PingView.instance.Show(); - FPSCounter.instance.Show(); - } - } - - - - - - Signal if Bolt is running. - - - *Example:* How to use the ```isRunning``` property to detect a downtime and restart the server. - - - void Update() { - if(!BoltNetwork.isRunning && BoltNetwork.time > lastRestart + 30f) { - RestartServer(); - lastRestart = BoltNetwork.time; - } - } - - - - - - Returns true if this host is a server - - - *Example:* Using the ```isServer``` property to implement server specific logic such as spawning NPCs - after a new map has been generated. - - - public override void SceneLoadLocalDone(string map) { - GenerateMap(); - - if(BoltNetwork.isServer) - { - SpawnNPCs(); - } - } - - - - - - Returns true if this host is running in single player mode. - - true if is single player; otherwise, false. - - - - The max number of client connections to the server - - - *Example:* Using the max connections value to enforce server connection limits on an incoming client connection. - - - public override void ConnectRequest(UdpEndPoint clientAddr) - { - if(BoltNetwork.connections.Count == BoltNetwork.maxConnections) - { - BoltNetwork.Refuse(clientAddr); - return; - } - } - - - - - - A list of all BoltEntities in the server simulation - - - *Example:* Destroying all player entities using a foreach loop over ```BoltNetwork.SceneObjects``` and - finding the players with ```StateIs()```. - - - void DestroyAllPlayers() - { - foreach(var entity in BoltNetwork.SceneObjects) - { - if(entity.StateIs<IPlayerState>()) - { - BoltNetwork.Destroy(entity.gameObject); - } - } - } - - - - - - The scoping mode active - - - - - The server connection - - - *Example:* Displaying the current server IP address and port to the client. - - - void ShowServerEndpoint() { - UdpEndPoint serverEndPoint = BoltNetwork.server.remoteEndPoint; - Message.Show("Current Server", string.Format("({0}:{1}", serverEndPoint.Address, serverEndPoint.Port); - } - - - - - - On the server this returns the local frame, on a client this returns - the currently estimated frame of all server objects we have received - - - *Example:* Predicting the next possible fire frame on the client using the estimated ```serverFrame```. - - - void ClientFireWeapon(PlayerCommand cmd) { - if(weapon.nextFireFrame <= BoltNEtwork.serverFrame) { - state.FireTrigger(); - weapon.nextFireFrame = BoltNetwork.serverFrame + weapon.refireRate; - } - } - - - - - - The current server simulation time - - - *Example:* Using the ```serverTime``` property to display a message when the max game time - has expired. - - - void Update() { - if((BoltNetwork.serverTime - gameStartTime >= MAX_GAME_TIME) { - Message.Show("Game Over", "Time Has Expired!"); - } - } - - - - - - Gets the list of UdpSession received by the system. - - The session list. - - - - The local time, same as Time.time - - - *Example:* Using the ```time``` property to periodically play footstep sounds on the client. - - - void Footsteps() { - if(BoltNetwork.time >= lastFootstep + footstepInterval) { - audio.PlayOneShot(footstepSound); - lastFootstep = BoltNetwork.time; - } - } - - - - - - Gets the current UDP socket. - - The UDP socket. - - - - The current Photon Bolt assembly version number. - - - - - Gets the current Bolt version as string. - - - - - Extra info of the Current Bolt version. - - - - - Gets the Bolt Version description. - - The Bolt Version description. - - - - Manually add a global event listener - - The monobehaviour to invoke events on - - - - Manually add a global event callback - - - - - Manually remove a global event listener - - The monobehaviour to be removed - - - - Manually remove a global event callback - - - - - Enable LAN broadcasting - - The port to use for LAN broadcast. Default is 60000. - - *Example:* Enabling LAN broadcast after starting a new server using a specified port. - - - void StartServer(int port, string map) { - BoltLauncher.StartServer(serverAddr); - BoltNetwork.EnableLanBroadcast(port); - BoltNetwork.LoadScene(map); - } - - - - - - Disable LAN broadcasting - - - *Example:* Disabling LAN broadcasting at the end of a game. - - - void GameOver() { - foreach(var client in BoltNetwork.clients) { - client.Disconnect(); - } - BoltNetwork.DisableLanBroadcast(); - } - - - - - - Registers a type as a potential protocol token - - The type to register - - *Example* Registering two token types on startup. - - - public override void BoltStartDone() { - BoltNetwork.RegisterTokenClass<UserToken>(); - BoltNetwork.RegisterTokenClass<ServerMessage>(); - } - - - - - - Sets bolt to use a filter to accept or reject certain events based on custom filtering - - Your custom implementation of the IEventFilter interface - - *Example:* A custom event filter implementation which does nothing. - - - public class NullEventFilter : IEventFilter { - public bool EventReceived(Event ev) { - return true; - } - } - - - *Example:* Setting the ```NullEventFilter``` on startup. - - - public override void BoltStartDone() { - SetEventFilter(new NullEventFilter()); - } - - - - - - - Sets the simulated network loss/ping settings for this peer. - - Simulated loss, 0.0-1.0 - Simulated minimum ping - Simulated max ping - - - - Updates the session list from an external source - - New sessions list. - - - - Updates the scene objects for fast lookup. - - - - - Looks at the BoltConnection list for a specific connection reference based on its ID. - - Connection ID to check - Reference to a BoltConnection if the ID is valid - True if a BoltConnection was found - - - - Signal bolt to accept an incoming client connection request - - The UDP address of incoming client connection - - *Example:* Accepting an incoming connection. - - - public override void ConnectRequest(UdpEndPoint endpoint) { - BoltNetwork.Accept(endPoint); - } - - - - - - Signal bolt to accept an incoming client connection request - - The UDP address of incoming client connection - A data token from the server - - *Example:* Accepting an incoming connection and passing a data token to tell the client the preferred reconnect timeout. - - - public override void ConnectRequest(BoltConnection connection) { - ConnectionToken token = new ConnectionToken(); - connectionToken.retryTimeout = 30f; - - BoltNetwork.Accept(connection.remoteEndPoint, token); - } - - - - - - Connect to a server running on a specific port. This game server must be running on the local machine. - - Connect to a local server using its port - Optional Token used when connecting to server, this can be the client credentials - - *Example:* A method to connect to any server using only its port as a client. - - - void Connect(int port) { - BoltNetwork.Connect(port); - } - - - - - - Creating a new binary streaming channel - - Channel name - Reliability mode - Bandwidth priority - Channel name struct - - *Example:* Creating an unreliable stream channel for voice and a reliable stream channel for sending custom player icons. - - - public static UdpKit.UdpChannelName Voice; - public static UdpKit.UdpChannelName CustomPlayerIcon; - - public override void BoltStartBegin() { - Voice = BoltNetwork.CreateStreamChannel("Voice", UdpKit.UdpChannelMode.Unreliable, 1}); - CustomPlayerIcon = BoltNetwork.CreateStreamChannel("CustomPlayerIcon", UdpKit.UdpChannelMode.Reliable, 4}); - } - - - - - - Load a scene based on name, only possible on the Server - - The scene to load - - *Example:* A utility function to start a server and initialize the first map. - - public void StartServer(UdpEndPoint addr, string map) { - BoltLauncher.StartServer(addr); - BoltNetwork.LoadScene(map); - } - - - - - - Load a scene based on name, only possible on the Server - - The scene to load - A data token from the server - - *Example:* Passing a random tip to display to each client while the new map is loading. - - - public void ChangeMap(string map) { - ServerMessage message = new ServerMessage("Loading Map ...", GameTips.GetNext()); - BoltNetwork.LoadScene(map, message); - } - - - - - - Updates the internal loaded scene information. - This is useful if Bolt is *not* used to manage Scenes and this is done externally by the developer. - If the active Scene was changed, this must be invoked in order to signal that the internal data must - be updated. - - - - - Use this method to sync the local scene on the Client with the remote scene from the Server. - This method can only be invoked on the Client and it's only useful if you have the Auto Scene Load disabled. - - - *Example:* Receiving a signal from the server to sync scenes. - - - // On the game server, send an event when the player count reaches 3 - public override void Connected(BoltConnection connection) - { - if (BoltNetwork.Connections.Count() == 3) - { - LoadSceneEvent.Create().Send(); - } - } - - // On any GlobalEventListener on the client - public override void OnEvent(LoadSceneEvent evnt) - { - BoltLog.Info("Received load scene"); - BoltNetwork.LoadSceneSync(); - } - - - - - - Signal bolt to refuse an incoming connection request - - The UDP address of incoming client connection - - *Example:* Refusing an incoming connection. - - - public override void ConnectRequest(BoltConnection connection) { - BoltNetwork.Refuse(connection.remoteEndPoint); - } - - - - - - Signal bolt to refuse an incoming connection request - - The UDP address of incoming client connection - A data token from the server - - *Example:* Refusing an incoming connection and sending back an error message. - - - public override void ConnectRequest(BoltConnection connection) { - ErrorMessage errorMessage = new ErrorMessage("Connection Refused", "Server Is Full"); - - BoltNetwork.Refuse(connection.remoteEndPoint, errorMessage); - } - - - - - - Shutdown this instance. - - - - - Shutdowns Bolt Immediately. - - - - - Perform a hitbox rewind to get transform position at a given frame. - - The BoltHitboxBody to rewind - The frame (aka BoltNetwork.frame) to rewind to - The transform position of the hitbox on a given BoltNetwork.frame - - *Example:* Using PositionAtFrame to perform a dist check between a caster and target entity, but some frames back in time. - - - Vector3 RewindDistCheck(BoltEntity caster, BoltEntity target, int framesToRewind) { - casterHitbox = caster.GetComponent<BoltHitboxBody>(); - targetHitbox = caster.GetComponent<BoltHitboxBody>(); - casterRewindPos = BoltNetwork.PositionAtFrame(casterHitbox, BoltNetwork.frame - framesToRewind); - targetRewindPos = BoltNetwork.PositionAtFrame(targetHitbox, BoltNetwork.frame - framesToRewind); - return Vector3.Distance(casterRewindPos, targetRewindPos); - } - - - - - - Perform a raycast against Bolt hitboxes - - The ray to - The hitboxes that intersected the ray - - *Example:* Using RaycastAll to detect a hit event and apply damage in a player weapon firing method. - - - void FireWeaponOwner(PlayerCommand cmd, BoltEntity entity) { - if(entity.IsOwner) { - using(var hits = BoltNetwork.RaycastAll(new Ray(entity.transform.position, cmd.Input.targetPos)) { - var hit = hits.GetHit(0); - var targetEntity = hit.body.GetComponent<BoltEntity>(); - - if(targetEntity.StateIs<ILivingEntity>()) { - targetEntity.GetState<ILivingEntity>().HP -= activeWeapon.damage; - } - } - } - } - - - - - - Perform a raycast against Bolt hitboxes - - The ray to - The frame to roll back to when performing this raycast - The hitboxes that intersected the ray - - *Example:* Using RaycastAll to detect a hit event on a specific previous frame and then apply damage in a player weapon firing method. - - - void FireWeaponOwner(PlayerCommand cmd, BoltEntity entity) { - if(entity.IsOwner) { - using(var hits = BoltNetwork.RaycastAll(new Ray(entity.transform.position, cmd.Input.targetPos), - cmd.ServerFrame)) { - var hit = hits.GetHit(0); - var targetEntity = hit.body.GetComponent<BoltEntity>(); - - if(targetEntity.StateIs<ILivingEntity>()) { - targetEntity.GetState<ILivingEntity>().HP -= activeWeapon.damage; - } - } - } - } - - - - - - Perform a sphere overlap against Bolt hitboxes - - The origin of the sphere - The radius of the sphere - The hitboxes that overlapped with the sphere - - *Example:* Calculating the blast radius of a grenade. - - - void GrenadeOwner(PlayerCommand cmd, BoltEntity entity, IThrownWeapon grenade) { - if(entity.IsOwner) { - using(var hits = BoltNetwork.OverlapSphereAll(cmd.targetPos, grenade.explosionRadius)) { - for(int i = 0; i < hits.count; i++) { - var hit = hits.GetHit(i); - var targetEntity = hit.body.GetComponent<BoltEntity>(); - - if (targetEntity != entity && targetEntity.StateIs<ILivingEntity>()) { - targetEntity.GetState<ILivingEntity>().HP -= grenade.damage; - } - } - } - } - } - - - - - - Perform a sphere overlap against Bolt hitboxes - - The origin of the sphere - The radius of the sphere - The frame to rollback to for calculation - The hitboxes that overlapped with the sphere - - *Example:* Calculating the blast radius of a grenade. - - - void GrenadeOwner(PlayerCommand cmd, BoltEntity entity, IThrownWeapon grenade) { - if(entity.IsOwner) { - using(var hits = BoltNetwork.OverlapSphereAll(cmd.targetPos, grenade.explosionRadius, cmd.ServerFrame)) { - for(int i = 0; i < hits.count; i++) { - var hit = hits.GetHit(i); - var targetEntity = hit.body.GetComponent<BoltEntity>(); - - if (targetEntity != entity && targetEntity.StateIs<ILivingEntity>()) { - targetEntity.GetState<ILivingEntity>().HP -= grenade.damage; - } - } - } - } - } - - - - - - Manually attach an Entity. - - Game object. - The Entity to attach. - - - - Manually attach an Entity. - - Game object. - Token. - The attach. - - - - Manually detach an Entity. - - Game object. - - - - Manually detach an Entity. - - Game object. - Token. - - - - Remove a gameObject from the bolt simulation. - - The gameObject to remove - - *Example:* Destroying all player entities using a foreach loop over ```BoltNetwork.SceneObjects```. - - - void DestroyAllPlayers() { - foreach(var entity in BoltNetwork.SceneObjects) { - if(entity.StateIs<IPlayerState>()) { - BoltNetwork.Destroy(entity.gameObject); - } - } - } - - - - - - Remove a gameObject from the bolt simulation. - - The gameObject to remove - Optional Token used when destroying an Entity, this can be used to send information about the destruction. - - *Example:* Destroying all player entities using a foreach loop over ```BoltNetwork.SceneObjects``` and - sending a death recap message as a protocol token. - - - void DestroyAllPlayers() { - foreach(var entity in BoltNetwork.SceneObjects) { - if(entity.StateIs<IPlayerState>()) { - DeathRecap recap = new DeathRecap("Destroyed By Server"); - BoltNetwork.Destroy(entity.gameObject, recap); - } - } - } - - - - - - Find an entity based on unique id - - The id to look up - The entity if one was found, otherwise null - - *Example:* Locating an entity within the scene using an id provided by the input command. - - - public override void ExecuteCommand(Bolt.Command cmd, bool resetState) { - AttackCommand atkCmd = (AttackCommand)cmd; - vNetworkId targetId = atkCmd.Input.targetId; - - BoltEntity target = BoltNetwork.FindEntity(targetId); - activeWeapon.Fire(entity, target); - } - - - - - - Create a new entity in the simuation from a prefab - - The prefab to clone into the simulation - A reference to the new bolt entity - - *Example:* How to instantiate and configure a player entity inside a ```Bolt.GlobalEventListener``` on the server using - a public editor variable ```playerPrefab``` as the player prefab object. - - - public GameObject playerPrefab; - - public override void SceneLoadRemoteDone(BoltConnection connection) { - var player = BoltNetwork.Instantiate(playerPrefab); - player.transform.position = spawnPoint.transform.position; - - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - Configure(player, initData); - - player.AssignControl(connection); - } - - - - - - Create a new entity in the simuation from a prefab - - The prefab to clone into the simulation - A data token of max size 512 bytes - A reference to the new bolt entity - - *Example:* How to instantiate a player entity and allow to to configure itself with some initial data. - - - public GameObject playerPrefab; - - public override void SceneLoadRemoteDone(BoltConnection connection) { - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - var player = BoltNetwork.Instantiate(playerPrefab, initData); - player.AssignControl(connection); - } - - - - - - Create a new entity in the simuation from a prefab - - The prefab to clone into the simulation - A position vector - A rotation quaternion - A reference to the new bolt entity - - *Example:* How to instantiate and configure a player entity with the position and rotation set to match - that of the ```spawnPoint``` transform reference. - - - public GameObject playerPrefab; - - public override void SceneLoadRemoteDone(BoltConnection connection) { - var player = BoltNetwork.Instantiate(playerPrefab, spawnPoint.position, spawnPoint.rotation); - - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - Configure(player, initData); - - player.AssignControl(connection); - } - - - - - - Create a new entity in the simuation from a prefab - - The prefab to clone into the simulation - A data token of max size 512 bytes - A position vector - A rotation quaternion - A reference to the new bolt entity - - *Example:* How to instantiate and configure a player entity with both an initial data token and a given position / rotation. - - - public GameObject playerPrefab; - - public override void SceneLoadRemoteDone(BoltConnection connection) { - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - var player = BoltNetwork.Instantiate(playerPrefab, spawnPoint.position, spawnPoint.rotation); - - player.AssignControl(connection); - } - - - - - - Create a new entity in the simuation from a prefab - - The prefab to clone into the simulation - A reference to the new bolt entity - - *Example:* How to instantiate a player entity using the static ```BoltPrefabs``` class as a shortcut to the - player prefab object. - - - public override void SceneLoadRemoteDone(BoltConnection connection) { - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - var player = BoltNetwork.Instantiate(BoltPrefabs.Player, initData); - player.AssignControl(connection); - } - - - - - - Create a new entity in the simuation from a prefab - - The prefab to clone into the simulation - A data token of max size 512 bytes - A reference to the new bolt entity - - *Example:* How to instantiate a player entity and allow to to configure itself with some initial data using - static ```BoltPrefabs``` class as a shortcut to the player prefab object. - - - public override void SceneLoadRemoteDone(BoltConnection connection) { - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - var player = BoltNetwork.Instantiate(BoltPrefabs.Player, initData); - player.AssignControl(connection); - } - - - - - - Create a new entity in the simuation from a prefab - - The prefab to clone into the simulation - A position vector - A rotation quaternion - A reference to the new bolt entity - - *Example:* How to instantiate a player entity from the static ```BoltPrefabs``` class with a given position and rotation. - - - public override void SceneLoadRemoteDone(BoltConnection connection) { - var player = BoltNetwork.Instantiate(BoltPrefabs.Player, spawnPoint.position, spawnPoint.rotation); - - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - Configure(player, initData); - - player.AssignControl(connection); - } - - - - - - Create a new entity in the simuation from a prefab - - The prefab to clone into the simulation - A data token of max size 512 bytes - A position vector - A rotation quaternion - A reference to the new bolt entity - - *Example:* How to instantiate and configure a player entity inside a ```Bolt.GlobalEventListener``` on the server using - initial data and the static ```BoltPrefabs``` class as a shortcut to the player prefab id. - - - public override void SceneLoadRemoteDone(BoltConnection connection) { - var initData = prototype.GetNewPlayer(GameLogic.PlayableClass.Mercenary); - var player = BoltNetwork.Instantiate(BoltPrefabs.Player, spawnPoint.position, spawnPoint.rotation); - - player.AssignControl(connection); - } - - - - - - Async load Bolt Entity prefabs - - - *Example:* Preloading assets in the background before Bolt starts. - - - void loadInBackground() { - BoltNetwork.PreLoadPrefabDatabase(); - Resources.LoadAsync<myTerrain>("Terrain"); - } - - - - - - Sets a custom implementation for pooling prefabs - - The custom pooling implementation - - *Example:* Setting bolt to use a custom prefab pooling implementation. - - - public override void BoltStartDone() { - SetPrefabPool(new YourPrefabPool()); - } - - - - - - Whether the local simulation can receive entities instantiated from other connections - - WTrue/False - - *Example:* Configuring the server to allow receiving entities and open a LAN game. - - - void ConfigureServer() { - BoltNetwork.SetCanReceiveEntities(true); - BoltNetwork.EnableLanBroadcast(); - } - - - - - - Responsible by registering snapshots of the world hitboxes and perform lag compensated physics checks - like Raycasts and Sphere Overlap - - - - - Max number of past snapshots to store - - - - - List of all active in the scene - - - - - List of all world snapshots stored on the memory, used to run the physics checks - - - - - Register a new in the list of active hitboxes - - BoltHitBoxBody to be registered - - - - Removes a from the list of active hitboxes - - BoltHitBoxBody to be removed - - - - Creates and store a new snapshot of all active - - - - - Draws all stored snapshots for debugging purpose - - - - - Return the position of a at a certain frame in the past - - BoltHitboxBody to check the position - Frame when you want to check the position - Vetor3 with the position of the hitbox at the specified frame - - - - Return the position of a at a certain World Snapshot - - BoltHitboxBody to check the position - World snapshot when you want to check the position - Vetor3 with the position of the hitbox at the specified snapshot - - - - Perform a Raycast check against all stored in a certain frame in the past - If any of the hitboxes are hit by the raycast, it's returned as a . - - Raycast to perform the collision check - Frame from where to run the check - with all the hit information - - - - Perform a Raycast check against all stored in a certain World Snapshot - If any of the hitboxes are hit by the raycast, it's returned as a . - - Raycast to perform the collision check - World snapshot when you want to check the position - with all the hit information - - - - Perform a Sphere Overlap agains all in a certain frame in the past. - If any of the hitboxes are hit by the sphere, it's returned as a . - - Sphere origin - Sphere radius - Frame from where to run the check - with all the hit information - - - - Perform a Sphere Overlap agains all in a certain World Snapshot. - If any of the hitboxes are hit by the sphere, it's returned as a . - - Sphere origin - Sphere radius - World snapshot when you want to check the position - with all the hit information - - - - Search for a World Snapshot for a specific frame - If not found, return the last one if there is one - - Frame to look for a snapshot - World Snapshot found - True if a Snapshot was found, false otherwise - - - - Defines one hitbox on a BoltHitboxBody - - - *Example:* Resizing a sphere hitbox - - - void ResizeSphereHitbox(BoltHitbox hitbox, float newRadius) { - if(hitbox.hitboxShape != BoltHitboxShape.Sphere) { - Debug.Log("Attemping to resize a non-sphere hitbox"); - return; - } - - hitbox.hitboxSphereRadius = newRadius; - } - - - - - - BoltHitBox Shape - - - - - BoltHitBox Type - - - - - BoltHitBox center position - - - - - BoltHitBox box size - - - - - BoltHitBox sphere radius - - - - - Shape of the hitbox (box or sphere) - - - *Example:* Sorting the hitboxes in a body based on shape. - - - void ConfigureHitboxes(BoltHitboxBody body) { - foreach(BoltHitbox hitbox in body.hitboxes) { - switch(hitbox.hitboxShape) { - case BoltHitboxShape.Sphere: ConfigureSphere(hitbox); break; - case BoltHitboxShape.Box: ConfigureBox(hitbox); break; - } - } - } - - /// - - - - Type of the hitbox - - - *Example:* Modifying a base damage value depending on the area of the hit. - - - float CalculateDamage(BoltHitbox hit, float baseDamage) { - switch(hit.hitboxType) { - case BoltHitboxType.Head: return 2.0f * baseDamage; - - case BoltHitboxType.Leg: - case BoltHitboxType.UpperArm: return 0.7f * baseDamage; - - default: return baseDamage; - } - } - - - - - - Center of the hitbox in local coordinates - - - *Example:* Getting a vector that points from the player's weapon to the head of a target entity. - - - Vector3 GetHeadshotVector(BoltEntity target, IWeapon currentWeapon) { - BoltHitboxBody body = target.GetComponent<BoltHitboxBody%gt(); - BoltHitbox head = body.hitboxes[0]; - - foreach(BoltHitbox hitbox in body.hitboxes) { - if(hitbox.hitboxType == BoltHitboxType.Head) { - head = hitbox; - } - } - - return head.hitboxCenter - currentWeapon.fireOrigin; - } - - - - - - Size of the hitbox if this shape is a box - - - *Example:* A method to double the size of a player's head hitbox if it is a box. - - - void DoubleHeadSize(BoltHitboxBody body) { - foreach(BoltHitbox hitbox in body.hitboxes) { - if(hitbox.hitboxType == BoltHitboxType.Head) { - hitbox.hitboxBoxSize = hitbox.hitboxBoxSize * 2f; - } - } - } - - - - - - Type of the hitbox - - - *Example:* A method to double the size of a player's head hitbox if it is a sphere. - - - void DoubleHeadSize(BoltHitboxBody body) { - foreach(BoltHitbox hitbox in body.hitboxes) { - if(hitbox.hitboxType == BoltHitboxType.Head) { - hitbox.hitboxSphereRadius = hitbox.hitboxSphereRadius * 2f; - } - } - } - - - - - - Check overlap between Sphere and this HitBox - - Transformation matrix of HitBox from World to Local frame - - - True if sphere overlaps this HitBox - - - - Check Ray against HitBox - - Transformation matrix of HitBox from World to Local frame - HitBox scale - Ray origin - Ray direction - Hit distance - True if ray hits this HitBox - - - - Check overlap of sphere against sphere HitBox - - Sphere center - Sphere radius - True if overlap - - - - Check overlap of sphere against box HitBox - - Sphere center - Sphere radius - True if overlap - - - - Check Hit of Ray agains Sphere - - Ray origin - Ray direction - Sphere scale - Hit distance - True if ray hits the sphere, false otherwise - - - - Clamp the input vector values based on min and max vectors - - Vector to be campled - Min vector value - Max vector value - Clamped vector result - - - - Draw the Hit Box prepresentation as a gizmo to help visualize it - - - - - - Create a new Snapshot of the BoltHitboxBody - - BoltHitboxBody used to create the new Snapshot - New BoltHitboxBodySnapshot of the BoltHitboxBody - - - - Save a snapshot of the BoltHitboxBody - - BoltHitboxBody used as reference to store the snapshot - - - - Dispose this BoltHitboxBodySnapshot and return to Pool - - - - - Get the position of the HitBoxBody - - Position of the internal HitBoxBody - - - - Executes an Sphere Overlap agaist this HitBoxBody - - Sphere center - Sphere raius - List of hits - - - - Check Hit against HitBoxBody - - Ray origin - Ray direction - List of hits - - - - Create a Transformation Matrix based on the Transform from Local to World Position - - Base Transform used to create the Transformation Matrix - Transformation Matrix - - - - Create a Transformation Matrix based on the Transform from World to Local Position - - Base Transform used to create the Transformation Matrix - Transformation Matrix - - - - Draw the Snapshot on the screen using Gizmos for debbuging purposes. - - - - - What type of shape to use in a bolt hitbox - - - *Example:* Sorting the hitboxes in a body based on shape. - - - void ConfigureHitboxes(BoltHitboxBody body) { - foreach(BoltHitbox hitbox in body.hitboxes) { - switch(hitbox.hitboxShape) { - case BoltHitboxShape.Sphere: ConfigureSphere(hitbox); break; - case BoltHitboxShape.Box: ConfigureBox(hitbox); break; - } - } - } - - - - - - Defines a body of hitboxes to be tracked - - - *Example:* Adding a hitbox body to a character pre-configured with BoltHitbox components - - - void AddHitboxBody(BoltEntity entity) { - BoltHitbox[] hitboxes = entity.GetComponentsInChildren<BoltHitbox>(); - - BoltHitboxBody body = entity.AddComponent<BoltHitboxBody>(); - body.hitboxes = hitboxes; - } - - - - - - Signal if the Snapshot history of this HitboxBody must be shown - - - - - BoltHitbox used for Proximity checks - - - - - List of BoltHitbox from this Body - - - - - A hitbox which should contain all other hitboxes on this entity - - - - - An array of hitbox components that compose this body - - - *Example:* Finding all hitbox components on an entity and adding them to a hitbox body - - - void AddHitboxBody(BoltEntity entity) { - BoltHitbox[] hitboxes = entity.gameObject.GetComponentsInChildren<BoltHitbox>(); - - BoltHitboxBody body = entity.AddComponent<BoltHitboxBody>(); - body.hitboxes = hitboxes; - } - - - - - - The body area represented by a bolt hitbox - - - *Example:* Modifying a base damage value depending on the area of the hit. - - - float CalculateDamage(BoltHitbox hit, float baseDamage) { - switch(hit.hitboxType) { - case BoltHitboxType.Head: return 2.0f * baseDamage; - - case BoltHitboxType.Leg: - case BoltHitboxType.UpperArm: return 0.7f * baseDamage; - - default: return baseDamage; - } - } - - - - - - Create a new snapshot of the BoltHitboxBody and store internally - - BoltHitboxBody reference - - - - Dispose this Snapshot and return to Pool - - - - - Container for a group of BoltPhysicsHits - - - *Example:* Using ```BoltNetwork.RaycastAll()``` to detect hit events and processing the BoltPhysicsHits object that is returned. - - - void FireWeaponOwner(PlayerCommand cmd, BoltEntity entity) { - if(entity.IsOwner) { - using(BoltPhysicsHits hits = BoltNetwork.RaycastAll(new Ray(entity.transform.position, cmd.Input.targetPos), - cmd.ServerFrame)) { - var hit = hits.GetHit(0); - var targetEntity = hit.body.GetComponent<BoltEntity>(); - - if(targetEntity.StateIs<ILivingEntity>()) { - targetEntity.GetState<ILivingEntity>().HP -= activeWeapon.damage; - } - } - } - } - - - - - - How many hits we have in the collection - - - *Example:* Using the hit count to iterate through all hits - - void OnOwner(PlayerCommand cmd, BoltEntity entity) - { - if (entity.IsOwner) - { - using (BoltPhysicsHits hits = BoltNetwork.RaycastAll(new Ray(entity.transform.position, cmd.Input.targetPos), cmd.ServerFrame)) - { - for (int i = 0; i < hits.count; ++i) - { - var hit = hits.GetHit(i); - var targetEntity = hit.body.GetComponent<BoltEntity>(); - - if (targetEntity.StateIs<ILivingEntity>()) - { - targetEntity.GetState<ILivingEntity>().HP -= activeWeapon.damage; - } - } - } - } - } - - - - - - Array indexing of the hits in this object - - Index position - The BoltPhysicsHit at the given index - - *Example:* Using the array indexing to get the first object hit by a weapon firing raycast. - - - void FireWeaponOwner(PlayerCommand cmd, BoltEntity entity) { - if(entity.IsOwner) { - using(BoltPhysicsHits hits = BoltNetwork.RaycastAll(new Ray(entity.transform.position, cmd.Input.targetPos), - cmd.ServerFrame))0 { - - if(hit.count > 0) { - var hit = hits[0]; - var targetEntity = hit.body.GetComponent<BoltEntity>(); - - if(targetEntity.StateIs<ILivingEntity>()) { - targetEntity.GetState<ILivingEntity>().HP -= activeWeapon.damage; - } - } - } - } - } - - - - - - Get the hit at a specific index - - Index position - The BoltPhysicsHit at the given index - - *Example:* Using the GetHit method to find the first object hit by a weapon firing raycast. - - - void FireWeaponOwner(PlayerCommand cmd, BoltEntity entity) { - if(entity.IsOwner) { - using(BoltPhysicsHits hits = BoltNetwork.RaycastAll(new Ray(entity.transform.position, cmd.Input.targetPos), - cmd.ServerFrame))0 { - - if(hit.count > 0) { - var hit = hits.GetHit(0); - var targetEntity = hit.body.GetComponent<BoltEntity>(); - - if(targetEntity.StateIs<ILivingEntity>()) { - targetEntity.GetState<ILivingEntity>().HP -= activeWeapon.damage; - } - } - } - } - } - - - - - - Implementing the IDisposable interface to allow "using" syntax. - - - *Example:* Implementing the Disponse() method allows BoltPhysicsHits to be in a "using" block. - - - void DoRaycast(Ray ray) { - using(BoltPhysicsHits hits = BoltNetwork.RaycastAll(ray)) { - // the hits variable will be automatically disposed at the end of this block - } - } - - - - - - Includes a new hit information in the list of Hits. - - BoltHitboxBody of the entity that received the hit - BoltHitbox where the entity received the hit - Hit distance - - - - Describes a hit to a BoltHitbox on a BoltHitboxBody - - - *Example:* Logging the details of a BoltPhysicsHit object. - - - void FireWeaponOwner(PlayerCommand cmd, BoltEntity entity) { - if(entity.IsOwner) { - using(BoltPhysicsHits hits = BoltNetwork.RaycastAll(new Ray(entity.transform.position, cmd.Input.targetPos), - cmd.ServerFrame))0 { - - if(hit.count > 0) { - BoltPhysicsHit hit = hits.GetHit(0); - Debug.Log(string.Format("[HIT] Target={0}, Distance={1}, HitArea={2}", hit.body.gameObject.name, hit.distance, hit.hitbox.hitboxType); - } - } - } - } - - - - - - The distance away from the origin of the ray - - - - - Which hitbox was hit - - - - - The body which was hit - - - - - Base class for monobehaviours that can be accessed as a singleton. The singleton is instantiated from the resources folder and should have the same name as the class type. - - The name of the type and name of the prefab inside resources folder - - *Example:* Using as a base class for PlayerCamera script. - - - public class PlayerCamera : BoltSingletonPrefab<PlayerCamera> { - Transform _target; - - public new Camera camera { - get { return _camera; } - } - } - - - - - - Returns the singleton instance of this type - - - *Example:* Using the player camera singleton - - - public override void ControlOfEntityGained(BoltEntity entity { - PlayerCamera.instance.SetTarget(entity); - } - - - - - - Create an instance of the singleton prefab - - - *Example:* Instantiate a player camera and game hud instance when the local scene is loaded. These will be cloned from - from prefabs inside a Resources folder that have the same name as the type ("PlayerCamera" and "GameHUD"). - - - public override void SceneLoadLocalDone(string map) { - if(map.Equals("Game")) { - GameHUD.Instantiate(); - PlayerCamera.Instantiate(); - } - } - - - - - - The connection to a remote endpoint - - - *Example:* Accepting an incoming connection. - - - public override void ConnectRequest(UdpEndPoint endpoint) { - BoltNetwork.Accept(endPoint); - } - - - - - - Returns true if the remote computer on the other end of this connection is loading a map currently, otherwise false - - - *Example:* Removing a preloaded player entity from the game if they disconnect while loading. - - - public override void Disconnected(BoltConnection connection) { - if(connection.isLoadingMap) { - PlayerEntityList.instance.RemoveFor(connection); - } - } - - - - - - The estimated frame of the simulation running at the other end of this connection - - - *Example:* Calculating the average frame difference of the client and server for all clients. - - - float EstimateFrameDiff() { - int count - float avg; - - foreach(BoltConnection client in BoltNetwork.clients) { - count++; - avg += BoltNetwork.serverFrame - client.remoteFrame; - } - avg = avg / count; - return avg; - } - - - - - - The ConnectToken contains the token sent by the client when connecting to a game server. - When you call BoltNetwork.Connect, BoltMatchmaking.JoinSession or BoltMatchmaking.JoinRandomSession with a Token, - it can be accessed via this property - - - - - The DisconnectToken contains the token used when a Connection is shutdown, either by the remote client or by the - game server. - When calling BoltConnection.Disconnect with a Token, it can be accessed via this property. - - - - - A data token that was passed by the server when accepting the connection - - - *Example:* Using the AcceptToken to store connection settings. - - - public override void Disconnected(BoltConnection connection, IProtocolToken token) { - ConnectionSettings connSettings = (ConnectionSettings)token; - - StartCoroutine(RemoveIfTimeout(connection, connSettings.maxTimeout)); - } - - - - - - The round-trip time on the network - - - *Example:* Displaying the network ping when in debug mode. - - - void OnGUI() { - if(BoltNetwork.isConnected && BoltNetwork.isClient) { - GUILayout.Label("Ping:" + BoltNetwork.server.PingNetwork; - } - } - - - - - - The dejitter delay in number of frames - - - *Example:* Showing the dejitter delay frames and ping. - - - void OnGUI() { - if(BoltNetwork.isConnected && BoltNetwork.isClient) { - GUILayout.Label("Ping:" + BoltNetwork.server.pingNetwork; - GUILayout.Label("Dejitter Delay:" + BoltNetwork.server.DejitterFrames; - } - } - - - - - - The round-trip time across the network, including processing delays and acks - - - *Example:* Showing the difference between ping and aliased ping. Aliased ping will always be larger. - - - void OnGUI() { - if(BoltNetwork.isConnected && BoltNetwork.isClient) { - GUILayout.Label("Ping:" + BoltNetwork.server.PingNetwork; - GUILayout.Label("Ping (Aliased):" + BoltNetwork.server.PingAliased; - } - } - - - - - - How many bits per second we are receiving in - - - *Example:* Showing the ping and data flow in and out. - - - void OnGUI() { - if(BoltNetwork.isConnected && BoltNetwork.isClient) { - GUILayout.Label("Ping:" + BoltNetwork.server.PingNetwork; - GUILayout.Label("Bandwidth Out:" + BoltNetwork.server.BitsPerSecondOut); - GUILayout.Label("Bandwidth In:" + BoltNetwork.server.BitsPerSecondIn); - } - } - - - - - - How many bits per second we are sending out - - - *Example:* Showing the ping and data flow in and out. - - - void OnGUI() { - if(BoltNetwork.isConnected && BoltNetwork.isClient) { - GUILayout.Label("Ping:" + BoltNetwork.server.pingNetwork; - GUILayout.Label("Bandwidth Out:" + BoltNetwork.server.bitsPerSecondIn); - GUILayout.Label("Bandwidth In:" + BoltNetwork.server.bitsPerSecondOut); - } - } - - - - - - How many packets were received by this connection - - - - - How many packets were sent to this connection - - - - - How many packets were registered as lost packets - - - - - For the host this will be the ID of the client, an on the client it will show the ID of the client - - - *Example:* Getting a connection Id - - - uint getID() - { - if (BoltNetwork.isClient) - { - //my Id - return BoltNetwork.server.ConnectionId; - } - else - { - //Id of first client - return BoltNetwork.clients.First().ConnectionId; - } - } - - - - - - Remote end point of this connection - - - *Example:* Logging the address of new connections - - - public override void Connected(BoltConnection connection) { - ServerLog.Write(string.Format("[{0}:{1}] New Connection", connection.remoteEndPoint.Address, connection.remoteEndPoint.Port); - } - - - - - - User assignable object which lets you pair arbitrary data with the connection - - - *Example:* Using a reference to the player entity in the UserData property. - - - public override void Disconnected(BoltConnection connection) { - BoltNetwork.Destroy((BoltEntity)connection.UserData); - } - - - - - - Send a binary stream of data to this connection - - The channel to send on - The binary data - - *Example:* Sending the binary data of a custom icon texture to the server using a static reference - to the "PlayerIcon" channel that was created inside a Channels class. - - - void SendCustomIcon(Texture2D myCustomIcon) { - byte[] data = myCustomIcon.EncodeToPNG(); - - BoltNetwork.server.StreamBytes(Channels.PlayerIcon, data); - } - - - - - - Set the max amount of data allowed per second - - The rate in bytes / sec - - *Example:* Configuring the initial stream bandwidth of new connections to 20 kb/s. - - - public override void Connected(BoltConnection connection) { - connection.SetStreamBandwidth(1024 * 20); - } - - - - - - Sends the data. - - Data. - - - - Receives the data. - - true, if data was received, false otherwise. - Data. - - - - Disconnect this connection - - - *Example:* Terminating all connections. - - - void DisconnectAll() { - foreach(var connection in BoltNetwork.connections) { - connection.Disconnect(); - } - } - - - - - - Disconnect this connection with custom data - - A data token - Specify the disconnect reason to shutdown this connection - - *Example:* Terminating all connections with a custom error message. - - - void DisconnectAll(int errorCode, string errorMessage) { - ServerMessage msg = new ServerMessage(errorCode, errorMessage); - - foreach(var connection in BoltNetwork.connections) { - connection.Disconnect(errorMessage); - } - } - - - - - - Reference comparison between two connections - - The object to compare - - bool Compare(BoltConnection A, BoltConnection B) { - return A.Equals(B); - } - - - - - A hash code for this connection - - - - - The string representation of this connection - - - *Example:* Logging the address of new connections using the string representation. - - - public override void Connected(BoltConnection connection) { - ServerLog.instance.Write("New Connection:" + connection.ToString()); - } - - - - - - The Runtime Settings and Confugration for the current Bolt simulation - - - *Example:* Using the settings instance to get a copy of the server config. - - BoltConfig GetServerConfig() { - return BoltRuntimeSettings.instance.GetConfigCopy(); - } - - - - - A singleton static instance of the runtime settings - - - *Example:* Using the runtime settings to create a button mapping to show the bolt console - - void ConfigureDefault(GameButton button) { - if(button = GameButton.ShowConsole) { - buttonMap.Add(button, BoltRuntimeSettings.instance.consoleToggleKey); - } - } - - - - - The number of clients to start when launching a debug mode server - - - - - The default debug start port - - - - - Describe how the Debug Start will build the Standalone instances - - - - - The scene to load after initializing bolt - - - - - Whether to play as a server or not - - - - - Whether to show debug info or not - - - - - Whether to show debug info or not - - - - - Editor mode when running using Debug Start - - - - - The keycode that will toggle visibility of the bolt console - - - - - Whether the bolt console is initially visible or not - - - - - Warning Level when building the Debug Start standalone clients - - - - - Flag to signal if Warning of Manual Scoping should be hidden - - - - - Show Help Hints on Bolt Entities - - - - - Serialize project as Text or Binary - - @deprecated - - - - Photon Application ID - - - - - Enable NAT Punchthrough - - - - - Photon Region List - - - - - Photon Region Code List - - - - - Current Selected Photon Region - - - - - Bolt Entity Prefabs Instantiation Mode - - - - - Entity Behaviour Query Option - - - - - Entity PriorityCalculator Query Option - - - - - Entity ReplicationFilter Query Option - - - - - A2S Server Port - - - - - Enable A2S Server - - - - - Timeout for Photon Sessions Creation - - - - - Timeout to Join a Photon Session - - - - - Enable the Client Connection metrics - - - - - Enable Bolt integration with Source Providers, such as Perforce - - - - - Get a memberwise copy of the current bolt config - - A bolt config - - *Example:* Conditionally writing to the Unity console depending on the log target of the current config. - - - void WriteExtra(string message) { - BoltConfig config = BoltRuntimeSettings.instance.GetConfigCopy(); - - if(config.logTargets == BoltConfigLogTargets.Unity) { - Debug.Log(message); - } - } - - - - - - Utility base class for some common functionality inside of Bolt - - - - - Don't query anything. - - - - - Query for a single component - - - - - Query for all components on this entity - - - - - Query for all components on this entity and children. - - - - - Use global options - - - - - Dont query anything - - - - - Query for a single component - - - - - Query for all components on this entity - - - - - Query for all components on this entity and children. - - - - - Modifier for bolt entity settings before it's attached - - - *Example:* Attaching an entity with custom settings - - - if (BoltNetwork.isServer) { - BoltEntity entity = gameObject.AddComponent<BoltEntity>(); - - using (var mod = entity.ModifySettings()) { - mod.persistThroughSceneLoads = true; - mod.allowInstantiateOnClient = false; - mod.clientPredicted = false; - mod.prefabId = prefabId; - mod.updateRate = 1; - mod.sceneId = Photon.Bolt.UniqueId.None; - mod.serializerId = state; - } - - BoltNetwork.Attach(entity.gameObject); - } - - - - - - The prefab identifier - - - - - A unique identifier present on scene entities - - - - - A unique identifier of this entity state serializer - - - - - The network update rate for this entity - - - - - The network update rate for this entity - - - - - Enable or disable client prediction on the entity - - - - - Enable or disable instantiation of the entity by clients - - - - - Whether the entity is persistence between scenes - - - - - True if bolt should automatically attach the entity during instantiation - - - - - True if this entity is always owned by the server - - - - - A Game Entity within the Bolt simulation. - - - *Example:* Instantiating and taking control of a new BoltEntity that will replicate to all connected clients. - - - public void InstantiateEntity() { - BoltEntity entity = BoltNetwork.Instantiate(BoltPrefabs.Player, RandomSpawn(), Quaternion.identity); - - entity.TakeControl(); - } - - - - - - The prefabId used to instantiate this entity - - - *Example:* Cloning an entity with ```prefabId```. - - - BoltEntity Replicate(BoltEntity entity) { - return Instantiate(entity.PrefabId, entity.transform.position, entity.transform.rotation); - } - - - - - - If this entity was created on another computer, contains the connection we received this entity from, otherwise null - - - *Example:* Using ```source``` to determine if an entity was originally instantiated on a remote host. - - - bool IsRemoteEntity(BoltEntity entity) { - return entity.source != null; - } - - - - - - The unique id of this entity - - - - - Whether the entity can be paused / frozen - - - *Example:* Pausing all entities that can be frozen. - - - void Pause() { - foreach(BoltEntity entity in BoltNetwork.entities) { - if(entity.CanFreeze) { - entity.Freeze(true); - } - } - } - - - - - - If this entity is controlled by a remote connection it contains that connection, otherwise null - - - *Example:* Disconnecting a client when they run out of lives. - - - void OnDeath(BoltEntity entity) { - if(entity.GetState%ltILivingEntity>().lives == 0) { - entity.Controller.Disconnect(new ServerMessage("Game Over", "Zero Lives Remaining")); - } - } - - - - - - If this entity is attached to Bolt or not - - - *Example:* Checking if an entity is still attached before trying to modify the state. This can occur if entities are - destroyed immediately upon death. - - void DealDamage(BoltEntity entity, AttackData atkData) { - if(entity.IsAttached) { - entity.GetState<ILivingEntity>().hp -= atkData.damage; - } - } - - - - - If this entity is currently paused - - - *Example:* Unpausing all frozen entities. - - - void Unpause() { - foreach(BoltEntity entity in BoltNetwork.entities) { - if(entity.isFrozen) { - entity.Freeze(false); - } - } - } - - - - - - This is a scene object placed in the scene in the Unity editor - - - *Example:* Configuring the state of initial buildings and minions during startup. - - - public override void BoltStartDone() { - foreach(BoltEntity entity in BoltNetwork.entities) { - if(entity.IsSceneObject) { - if(entity.StateIs<IStructure>()) { - StructureFactory.Configure(entity); - } - else if(entity.StateIs<IMinion>()) { - MinionFactory.Configure(entity); - } - } - } - } - - - - - - Did the local computer create this entity or not? - - - *Example:* Implementing an authoritative weapon firing method. - - - void FireWeapon(PlayerCommand cmd) { - if (activeWeapon.fireFrame + activeWeapon.refireRate <= BoltNetwork.serverFrame) { - activeWeapon.fireFrame = BoltNetwork.serverFrame; - - state.Fire(); - - if (entity.IsOwner) { - activeWeapon.OnOwner(cmd, entity); - } - } - } - - - - - - Do we have control of this entity? - - - *Example:* Implementing a method to turn controlled entities green on the minimap. - - - public void AddKnownEntity(BoltEntity entity) { - _minimap.AddNewEntity(entity.NetworkId, entity); - - if(entity.HasControl) { - _minimap.entities[entity.NetworkId].color = Color.Green; - } - } - - - - - - Do we have control of this entity and are we using client side prediction - - - - - Should this entity persist between scene loads - - - *Example:* Pausing all persistent entities before changing scenes - - - public override void SceneLoadLocalBegin(string map) { - foreach(BoltEntity entity in BoltNetwork.entities) { - if(entity.PersistsOnSceneLoad) { - entity.Freeze(true); - } - } - } - - - - - - Gets a value indicating whether this has parent. - - true if has parent; otherwise, false. - - - - Gets a value indicating whether this has its input queue full. - - true if is input queue full; otherwise, false. - - - - Creates an object which lets you modify the internal settings of an entity before it is attached to Bolt. - - The object used to modify entity settings - - - - Sets the scope of all currently active connections for this entity. Only usable if Scope Mode has been set to Manual. - - If this entity should be in scope or not - Force the scope value, used in the case you want to remove from the scope an entity the connection has control - - *Example:* A method which renders an entity invisible to all active client connections. - - - public void Disappear(BoltEntity entity) { - entity.SetScopeAll(false); - } - - - - - - Sets the scope for the connection passed in for this entity. Only usable if Scope Mode has been set to Manual. - - The connection being scoped - If this entity should be in scope or not - Force the scope value, used in the case you want to remove from the scope an entity the connection has control - - *Example:* A coroutine that renders a player invisible to enemies for a given time in seconds. - - - IEnumerator Stealth(BoltEntity entity, float stealthInterval) { - int team = entity.GetState<IPlayerState>().team; - - foreach(BoltEntity adjEntity in BoltNetwork.entities) { - if(adjEntity == entity) continue; - - if(!adjEntity.StateIs%ltIPlayerState%gt()) continue; - - int adjTeam = adjEntity.GetState<IPlayerState>().team; - if(team != adjTeam) { - entity.SetScope(adjEntity.Controller, false); - } - } - - yield return new WaitForSeconds(stealthInterval); - - entity.SetScopeAll(true); - } - - - - - - - Sets the parent of this entity - - The parent of this entity - - *Example:* Instantiating a vehicle and taking control of it. - - - public void SpawnPlayerVehicle(BoltEntity playerEntity) { - var car = BoltNetwork.Instantiate(BoltPrefabs.Vehicle, playerEntity.transform.position, playerEntity.transform.rotation); - - car.AssignContro(playerEntity.Controller); - playerEntity.RevokeControl(); - playerEntity.SetParent(car); - } - - - - - - Takes local control of this entity - - - *Example:* Spawning a server-side player entity. - - - void SpawnServerPlayer() { - var entity = Instantiate(BoltPrefabs.Player); - - entity.TakeControl(); - } - - - - - - Takes local control of this entity - - A data token of max size 512 bytes - - *Example:* Spawning a server-side player entity and initializing it with a local hotkey configuration. - - - HotkeyConfig hotkeys; - - void SpawnServerPlayer() { - var entity = Instantiate(BoltPrefabs.Player); - - entity.TakeControl(hotkeys); - } - - - - - - Releases local control of this entity - - - *Example:* Releasing control of an entity when it's not needed anymore. - - - public override void DropWeapon() { - if (entity.IsOwner && entity.HasControl) - { - entity.ReleaseControl(); - } - } - - - - - - Releases local control of this entity - - A data token of max size 512 bytes - - *Example:* Releasing control of an entity when it's not needed anymore. - - - public override void DropWeapon() { - if (entity.IsOwner && entity.HasControl) - { - DropEvent evt = new DropEvent(); - evt.EvtCode = DropEventCode.DROP_BY_HIT; - - entity.ReleaseControl(evt); - } - } - - - - - - Assigns control of this entity to a connection - - The connection to assign control to - - *Example:* Instantiating and assigning control of an entity to a newly connected player. - - - public override void Connected(BoltConnection connection) { - var playerEntity = BoltNetwork.Instantiate(BoltPrefabs.Player, RandomSpawn(), Quaternion.Identity); - - playerEntity.AssignControl(connection); - } - - - - - - Assigns control of this entity to a connection - - The connection to assign control to - A data token of max size 512 bytes - - *Example:* Instantiating and assigning control of an entity to a newly connected player. - - - public override void Connected(BoltConnection connection, IProtocolToken token) { - var playerEntity = BoltNetwork.Instantiate(BoltPrefabs.Player, RandomSpawn(), Quaternion.Identity); - - var fingerprint = ((UserInfo)token).fingerprint; - PlayerLoadout loadout; - - if(playerDatabase.Contains(fingerprint, out loadout)) { - playerEntity.AssignControl(connection, loadout); - } - else { - playerEntity.AssignControl(connection, new BeginnerLoadout()); - } - } - - - - - - Revokes control of this entity from a connection - - - *Example:* A server-side stun routine that completely revokes control for the length of stun interval. - - - IEnumerator Stun(BoltEntity entity, float stunInterval) { - var controller = entity.Controller; - entity.RevokeControl(); - entity.GetState<ILivingEntity>().stunned = true; - - return new WaitForSeconds(stunInterval); - - entity.AssignControl(controller); - entity.GetState<ILivingEntity>().stunned = false; - } - - - - - - Revokes control of this entity from a connection - - A data token of max size 512 bytes - - *Example:* A server-side stun routine that completely revokes control for the length of stun interval. - - - IEnumerator Stun(BoltEntity entity, float stunInterval) { - var controller = entity.Controller; - CombatEventData evtData = new CombatEventData(); - evtData.stunInterval = stunInterval; - - entity.RevokeControl(evtData); - entity.GetState<ILivingEntity>().stunned = true; - - return new WaitForSeconds(stunInterval); - - entity.AssignControl(controller); - entity.GetState<ILivingEntity>().stunned = false; - } - - - - - - Checks if this entity is being controlled by the connection - - The connection to check - - - - Queue an input data on this entity for execution. This is called on a client which is - controlling a proxied entity. The data will be sent to the server for authoritative execution - - The input data to queue - Used to force the inclusion of this input, by discarding any other values if the Input Queue is full - - *Example:* A ```SimulateController()``` loop that queues WASD-style movement input. - - - bool forward; - bool backward; - bool left; - bool right; - - public override void SimulateController() { - IPlayerCommandInput input = PlayerCommand.Create(); - - PollKeys(); - - input.forward = forward; - input.backward = backward; - input.left = left; - input.right = right; - - entity.QueueInput(input); - } - - - - - - Set this entity as idle on the supplied connection, this means that the connection - will not receive update state for this entity as long as it's idle. - - The connection to idle the entity on - If this should be idle or not - - - - Freeze or unfreeze an entity - - True if entity should freeze and false to unfreeze - - *Example:* Pausing all entities. - - - void Pause() { - foreach(BoltEntity entity in BoltNetwork.entities) { - if(entity.CanFreeze) { - entity.Freeze(true); - } - } - } - - - - - - Add an event listener to this entity. - - The behaviour to invoke event callbacks on - - - - Add a event callback to this entity. - - - - - Remove an event listern from this entity - - The behaviour to remove - - - - Remove a event callback to this entity. - - - - - Get the state if this entity - - The type of state to get - The state - - *Example:* Modifying the state of an entity to change its name. - - - public void RenameEntity(BoltEntity entity, string name) { - entity.GetState<IPlayerState>().name = name; - } - - - - - - A null safe way to look for a specific type of state on an entity - - The state type to search for - Entity to search - - *Example:* Pausing all player entities using ```TryFindState()```. - - - public void FreezeAllPlayers() { - foreach(BoltEntity entity in BoltNetwork.entities) { - IPlayerState state; - - if(entity.TryGetState<IPlayerState>(out state)) { - entity.Freeze(true); - state.pausedByServer = true; - } - } - } - - - - - - Checks which type of state this entity has - - The type of state to check for - True if this entity has a state of type TState otherwise false - - *Example:* Discarding attack requests that do not target living entities. - - - public override void FireOnOwner(BoltEntity entity, BoltEntity target, AttackData attack) { - if(entity.IsOwner) { - if(!target.StateIs<ILivingEntity>()) { - return; - } - - target.GetState<ILivingEntity>().health -= attack.damage; - } - } - - - - - - Checks which type of state this entity has - - The type of state to check for - True if this entity has a state of type TState otherwise false - - *Example:* Discarding attack requests that do not target living entities. - - - public override void FireOnOwner(BoltEntity entity, BoltEntity target, AttackData attack) { - if(entity.IsOwner) { - if(!target.StateIs(typeof(ILivingEntity))) { - return; - } - - target.GetState<ILivingEntity>().health -= attack.damage; - } - } - - - - - - String representation of the entity - - - *Example:* Logging new entities to the debug log. - - - public override void EntityAttached(BoltEntity entity) { - Debug.Log("Entity Attached: " + entity.ToString()); - } - - - - - - Destroy this entity after a given delay - - The time interval to delay - - *Example:* A death routine that makes state changes and initiates a destruction with configurable delay. - - - void OnDeath(BoltEntity entity) { - var state = entity.GetState<ILivingEntity>(); - - state.alive = false; - state.DeathTrigger(); - - entity.DestroyDelayed(ServerConfig.DESTRUCT_DELAY); - } - - - - - - Whether a NAT port mapping is open or closed - - - - - This class is responsible to initialize the Photon Cloud system - in order to always mantain the player connected to the cloud services - and take care of the CCU count. - - - - - Adds the room property. - - true, if room property was added, false otherwise. - Propety Key. - Property Value. - If set to true show this property on the Lobby too, - so the client can see the properties before entering the room. - - - - Removes the room property. - - true, if room property was removed, false otherwise. - Property Key. - - - - Generic Bolt exception. - - - - - Thrown if a debug assert fails somewhere in the code - - - - - Bolt package overflow exception. - - - - - Fail automatically with the specified message. - - Message. - - - - Test if both A and B are not null and are the same, or raise a exception otherwise. - - The A component. - The B component. - Error message. - - - - Raises the Generic Exception Type if the condition is not False, passing the extraInfo object. - - Condition to test as False. - Extra info passed to the BoltException instance. - A derivative type. - - - - Raises the Generic Exception Type if the condition is not True, passing the extraInfo object. - - Condition to test as True. - Extra info passed to the BoltException instance. - A derivative type. - - - - Use this Attribute on classes that implmement IProtocolToken in order to ignore them - on the Prototol Token Registry - - - - - Protocol Token Registry contains a list of all IProtocolTokens in the project - and it's consulted to register all Tokens when Bolt is starting up. - This can be used to grant that tokens will be properly registered, in the same order, on all peers - - - - - Stores the information about the IProtocolTokens types - Both a simple name, to be shown at the listing and logs - and a full assembly name, used to load the type from the Assemblies. - - - - - Returns the instance for the current BoltProtocolTokenRegistry - - - - - Internal reference to the BoltProtocolTokenRegistry - - - - - List of IProtocolToken types based on the TokenRegistry struct - - - - - NetworkValue describes one set of values that can be networked - - - - - Interval between publish count information - - - - - Remote Server - - - - - Sends the report count to the Server - - - - - - Create the HTTP request and send JSON data to remote server - - Server URL. - App identifier. - License key. - Total players in the Game. - - - - Utility class used to start Bolt as Server or Client. - - - - - Starts Bolt as a Single Player game - - Custom Bolt configuration - - - - Starts Bolt as Server. - - Port where the Server will try to bind - - - - Starts Bolt as Server. - - Custom Bolt configuration - Default Scene loaded by Bolt when the initialization is complete - - - - Starts Bolt as Server. - - Custom EndPoint where Bolt will try to bind - Default Scene loaded by Bolt when the initialization is complete - - - - Starts Bolt as Server. - - Custom EndPoint where Bolt will try to bind - Custom Bolt configuration - Default Scene loaded by Bolt when the initialization is complete - - - - Starts Bolt as Client. - - Port where the Server will try to bind - - - - Starts Bolt as Client. - - Custom Bolt configuration - - - - Starts Bolt as Client. - - Custom EndPoint where Bolt will try to bind - Custom Bolt configuration - - - - Utility function to initialize Bolt with the specified modes, endpoint, config and scene. - - Bolt mode. - Custom EndPoint where Bolt will try to bind - Custom Bolt configuration - Default Scene loaded by Bolt when the initialization is complete - - - - Shutdown this Bolt instance. - - - - - Set a custom UDP platform. Use this method only to set custom properties - to your desired platform. By default, there is no need to change - the platform, this is handled internally by Bolt. - - Custom UdpPlatform - - This example show how to set a custom PhotonPlatform: - - BoltLauncher.SetUdpPlatform(new PhotonPlatform(new PhotonPlatformConfig - { - AppId = "your-app-id", - RegionMaster = "your-region", - UsePunchThrough = true, // set to false, to disable PunchThrough - MaxConnections = 32 - })); - - - - - - Gets the current session this peer is connected. - - The current session. - - - - Expose custom metadata information about the current platform and connection if a remove server. - The information retrieved by this call depends on the current active platform and the current - internal status of it. - - - - - Creates a Session using the current running Platform. - - Session identifier. This value will be public available and - can be used by other players to join this specific session. - User custom data. This Token can be used to pass custom data to other players - and/or to configure custom properties of the session. More information look at . - - Target Scene to be loaded after the session creation procedure starts. - IProtocolToken that is passed on the SceneLoad callbacks. - - *Example:* Creating a session with some custom properties. - - - void SetupSession(string map, int gameType) - { - if (BoltNetwork.IsServer) - { - string matchName = Guid.NewGuid().ToString(); - - PhotonRoomProperties props = new PhotonRoomProperties(); - props["m"] = map; - props["t"] = gameType; - - BoltMatchmaking.CreateSession( - sessionID: matchName, - sceneToLoad: map, - token: props - ); - } - } - - - - - - Updates the current session configuration. The local peer need to be the Server in order to call this method. - - Settings Token. This can be any or - a to setup a Photon Session. - - - - Joins a Session by name. - - Session name that you want to enter - Connection Token - - *Example*: Joining a session using the Session identifier. - - - void Join(string sessionID) - { - if (BoltNetwork.IsClient) - { - var token = new TokenTest(); - BoltMatchmaking.JoinSession(sessionID, token); - } - } - - - - - - Joins a Session using a UdpSession as reference. - - UdpSession that you want to enter - Connection Token - - *Example*: Joining a session using a UdpSession. - - - public override void SessionListUpdated(Map<Guid, UdpSession> sessionList) - { - foreach (var session in sessionList) - { - UdpSession udpSession = session.Value as UdpSession; - var token = new TestToken(); - BoltMatchmaking.JoinSession(udpSession, token); - } - } - - - - - - Joins a Session in a random fashion. When not using the , the client - will try to enter in any available room. - - - - *Example*: Joining a Random Session when Bolt is ready. - - - public override void BoltStartDone() - { - if (BoltNetwork.IsClient) - { - var token = new TestToken(); - BoltMatchmaking.JoinRandomSession(token); - } - } - - - - - - Joins a Session in a random fashion. In order to filter the rooms the player can join, - you can make use of the class and pass custom parameters. - - Session filter parameters - Join Token - - *Example*: - - - public void Join(string map, int gameType) - { - if (BoltNetwork.IsClient) - { - var token = new TestToken(); - - UdpSessionFilter filter = new UdpSessionFilter(); - - filter.FillMode = UdpSessionFillMode.Random; - filter["m"] = map; - filter["t"] = gameType; - - BoltMatchmaking.JoinRandomSession(filter, token); - } - } - - - - - - Internal method to configure a new game session. - This will follow to the UdpPlatform the necessary information to create a session - - Session Unique ID - Protocol Token used to create the Session - Scene to be loaded when the Session is ready - Protocol Token sent with the Scene as meta data - - - diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.xml.meta b/Assets/Photon/PhotonBolt/assemblies/bolt.xml.meta deleted file mode 100644 index f83c1e0..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/bolt.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 00fe4738ae96f47a69dd2d7f6ed7e72c -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor.meta b/Assets/Photon/PhotonBolt/assemblies/editor.meta deleted file mode 100644 index 0dcab16..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: ea916a94ba5be9149ba835510d143bcd -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll deleted file mode 100644 index 82a81f4..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.meta b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.meta deleted file mode 100644 index 87517da..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: c9ce3cf1a9500c6488063c419636cb54 -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - platformData: - Any: - enabled: 1 - settings: {} - Editor: - enabled: 0 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - Win: - enabled: 1 - settings: - CPU: AnyCPU - Win64: - enabled: 1 - settings: - CPU: AnyCPU - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.release b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.release deleted file mode 100644 index 146b539..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.release and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.release.meta b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.release.meta deleted file mode 100644 index a85602e..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.dll.release.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f49d71e36051be64e800e6707939c12f -timeCreated: 1502965833 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.xml b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.xml deleted file mode 100644 index 1c7f23b..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.xml +++ /dev/null @@ -1,1045 +0,0 @@ - - - - bolt.compiler - - - - - Enum for Axis Selection - - - - All Axis - - - XY Axis - - - ZX Axis - - - YZ Axis - - - X Axis - - - Y Axis - - - Z Axis - - - Disabled for all Axis - - - - Enum for the Replication Mode - - - - - Enum to select which velocity used to extrapolate the position of the transform - - - - - Enum to select the Smoothing Algorithm - - - - - Enum to select the Transform Space of positioning - - - - - Enum to select the Rotation mode of Quaternions inside a Transform - - - - - Enum to select the Property Mecanim mode when synchonizing properties - - - - - Enum to select the mode where the Animation properties would be read and written - - - - - Uses the Animator methods to read and write values from the Animator controller - - - - - Uses Bolt property values from state to update the Mecanim properties - - - - - Enum to select the String encoding - - - - - Asset Folder - - - - - Mark this Asset Folder as Deleted - - - - - Name of Folder - - - - - If it's expanded or not - - - - - List of Folders - - - - - List of Assets - - - - - GUID of Folder - - - - - List of Children objects into this Folder - - - - - All assets inside this folder, including on subfolders - - - - - Class responsible by generating code when Bolt is compiled - - - - - List of states - - - - - List of Objects - - - - - List of Events - - - - - List of Commands - - - - - Run the Code Compiler in order to generate custom types based on the project definition - - Project definition - Output file where the project will be created - - - - Search in the Filters list for a Filter with the argument index - - Index to search - FilterDefinition reference - - - - Find a State based on the GUID - - GUID used to search the State - StateDecorator reference - - - - Find a Object Struct based on the GUID - - GUID used to search the Object - ObjectDecorator reference - - - - Check if the current project contains the State with the GUID - - GUID used to search for the State - True if there is State witht his GUID, false otherwise - - - - Declare a new Interface inside the main Namespace used for the Bolt compilation - - Interface Name - List of inherit interfaces - CodeTypeDeclaration reference of the new Interface - - - - Declare a new Struct inside the main Namespace used for the Bolt compilation - - Struct name - CodeTypeDeclaration reference of the new Object Struct - - - - Declare a new Class Type inside the main Namespace used for the Bolt compilation - - Class name - CodeTypeDeclaration reference of the new Class - - - - Decorator for a Object on the Command Definition - - - - - Create a new Command Object Decorator based on the Object Definition - - Object Definition reference - - - - Signal if should Emit as an Interface - - - - - Name of Base interface for this Asset Decorator - - - - - Defines the base class for an Asset Meta class - - - - - Defines the base class for an Asset - - - - - Decorator for Commands - - - - - Base Command Factory Interface - - - - - Base Class for all Commands - - - - - Define if a change on the property should be signaled - - - - - List of properties for this Command - - - - - Create a new Command Decorator based on the Command Definition - - Command Definition reference - - - - Defines a Event Decorator of a Event Definition - - - - - Factory Interface Name - - - - - Defines the base class for an Asset - - - - - Signal if changed property should be notified - - - - - List of properties for this Asset - - - - - Listener Interface Name - - - - - Create a new Event Decorator based on a Event Definition - - Event Definition reference - - - - Defines a Property Decorator, base for all property generators - - - - - Offset in Storage - - - - - Offset in the Objects - - - - - Offset in the Properties - - - - - Reference to Property Decorator - - - - - Reference to the Asset Decorator - - - - - Reference to the Property Definition - - - - - Member Atributes - - - - - C# Type that represents this property - - - - - How many objects are required for this Property - - - - - How many storage spaces are required for this Property - - - - - How many properties are required for this Property - - - - - Return the full Property Type name used to construct the code - - - - - Creates an code Emitter for a particular property type - - PropertyCodeEmitter reference - - - - Fill the PropertyDefinition with information from the Decorators - - PropertyDefinition list to be filled - Asset decorator that will contain the new PropertyDecorator - PropertyDecorator list already filled with custom data from the AssetDecorator - - - - Fill a PropertyDecorator with custom references from a PropertyDefinition and AssetDecorator - - PropertyDefinition used as base for to create the new PropertyDecorator - AssetDecorator that will hold the new PropertyDecorator - PropertyDecorator reference setup for use - - - - Base type for especilized PropertyDecorators - - PropertyType used for the particular PropertyDecorator - - - - Reference to the Type that this PropertyDecorator holds - - - - - Defines an State decorator, used to build State classes - - - - - Signal if this state has a parent State - - - - - Return the Factory Interface Type - - - - - Return the State base class - - - - - Signal if should emit as an interface - - - - - Signal if the Modified code should be emitted - - - - - Name of Base interface for this Asset Decorator - - - - - List of Parent Interfaces for this State - - - - - List of Properties from this State - - - - - Parent State reference - - - - - List of Parents for this State - - - - - Creates a new State Decorator based on a State Definition - - State Definition to crete the State Decorator - - - - Base class to define all Asset Types on Bolt - - - - - ID of the TYpe - - - - - Total number of Storage space used by the Asset - - - - - Total number of Objects on the Asset - - - - - Total number of Properties on the Asset - - - - - Reference to Code Generator - - - - - Reference to the Asset Definition - - - - - GUID for the Asset Decorator - - - - - Name of the Asset Decorator - - - - - Name of the base Meta Class for this Asset Decorator - - - - - Name of Base interface for this Asset Decorator - - - - - List of Parent interfaces - - - - - Defines the base class for an Asset - - - - - Defines the base class for an Asset Meta class - - - - - Defines the name of the Interface of this Asset - - - - - Signal if the Modified code should be emitted - - - - - Signal if should Emit code as Interface - - - - - Signal if changed property should be notified - - - - - Factory Interface Name - - - - - List of properties for this Asset - - - - - Asset Decorator designed for a particular Asset Definition - - - - - - Asset Definition Reference - - - - - Defines a Object Decorator for a Object Definition - - - - - Factory Interface Name - - - - - List of properties for this Asset - - - - - Signal if the Modified code should be emitted - - - - - List of Object Decorator dependencies - - - - - Create a new Object Decorator based on an Object Definition - - - - - - Represents a block o code generated by the Bolt compiler - - - - - Gets all the statements of this block - - The stmts. - - - - Add the specified expression to the statements - - Expression. - - - - Add the specified expression to the statements - - Statement. - - - - Initializes a new instance of the class. - - Collection of statements. - Prefix. - - - - Initializes a new instance of the class - without a prefix - - Collection of statements. - - - - Creates a temporary var name - - The variable. - - - - Create All the Post methods on the Events implmementations - You can use them to send and eventy more easily - - Event Type Declaration - - - - - Base class for the Propery Emitters, that are used to build code for each Property type - on the final generated code. - - - - - Define the offsets of this property on the Storage - - - - - Offset in Storage - - - - - Offset in the Objects - - - - - Offset in the Properties - - - - - Reference to Property Decorator - - - - - Referenece to Decorator Generator - - - - - Build the Storage Field Name - - - - - Defines the Class Serialzer Name - - - - - Enable Setter for the Property - - - - - Enable if the modification should be verified - - - - - Add specific settings to the property code based on the property type - This can be the compression settings or similar, for example - - - - - - - Defines as Named Asset - - - - - Retrieve the Asset Name - - String with the Asset Name - - - - Base class for all Property definition - - - - - Mark property as nudged - - - - - Mark property as deleted - - - - - If this property is element of an array - - - - - Adjust property in the list - - - - - Reference the root Project - - - - - Name of the Property - - - - - Mark if property is enabled - - - - - Makr if property should be replicated - - - - - Mark if property is expanded or not - - - - - Mark if property should be replicated to everyone - - - - - Signal the replication mode of this property - - - - - Some comments of the property - - - - - Set the property priority - - - - - Set the Property Type - - - - - Reference to Property Settings - - - - - Flag mask of the filters used on this property - - - - - Retrieve the Property Settings as a PropertyStateSettings - - - - - Retrieve the Property Settings as a EventAssetSettings - - - - - Retrieve the Property Settings as a CommandAssetSettings - - - - - Setup the Property when created - - - - - Axis definition Offset - - - - - Axis offset for X axis - - - - - Axis offset for Y axis - - - - - Axis offset for Z axis - - - - - Asset Definition Sort Order - - - - - Manual Mode - - - - - Sort by Name - - - - - Sort by priority - - - - - Asset definition describes all properties of an Bolt Asset - - - - - Mark this Definition as Deleted - - - - - Reference to Project where this Asset is defined - - - - - Name of the Asset - - - - - GUID of Asset - - - - - Custom comment for the Asset - - - - - Flag to enable the Asset - - - - - List of Groups this Asset belongs to - - - - - Sort Order of this Asset - - - - - List of Type this Asset allows - - - - - Serializes BoltProject to file. - - true, if the reference was serialized, false otherwise. - BoltProject reference. - Path to destination file. - - - - Deserializes a BoltProject from a file. - - true, if the BoltProject was deserialized, false otherwise. - BoltProject output. - Path to JSON file. - Thrown when the JSON file was not found at path - - - - Represents the Asset collection of all networked data on the current game project - - - - - Collection of Assets on this particular project - - - - - Current active group - - - - - List of filters applied to the assets - - - - - List of Defined groups - - - - - List of State Assets - - - - - List of Structs (Object) Assets - - - - - List of Event Assets - - - - - List of Command Assets - - - - - List of enabled Filters - - - - - If this Project is using Filters - - - - - Initializes the internal Asset list - - - - - Finds a state asset by its guid. - - The state or null if not found. - GUID of the State. - - - - Gets the inheritance tree of a State - - The inheritance tree. - State to check the inheritance tree - - - - Gets the inheritance tree of a State and save to the list - - State to check the inheritance tree - Result list of states. - - - - Convert a Project into a reference of BoltProject - - Base project used for the conversion - A reference a new BoltProject - - - - Run a deep copy on the fields of the BoltProject - - A new reference of the BoltProject with all fields cloned - - - diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.xml.meta b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.xml.meta deleted file mode 100644 index aade6b8..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.compiler.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 361104ebd4fa34a06a3e4b12cbd530d9 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll deleted file mode 100644 index d9defad..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.meta b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.meta deleted file mode 100644 index dbcbf77..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: cdd3c9c3ca3992149985d685a1f61e80 -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - platformData: - Any: - enabled: 1 - settings: {} - Editor: - enabled: 0 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - Win: - enabled: 1 - settings: - CPU: AnyCPU - Win64: - enabled: 1 - settings: - CPU: AnyCPU - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.release b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.release deleted file mode 100644 index ff0de51..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.release and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.release.meta b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.release.meta deleted file mode 100644 index 1d2d604..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.dll.release.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 104286524a62e5343a74f9e852b11214 -timeCreated: 1502965833 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.xml b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.xml deleted file mode 100644 index e79c12d..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - bolt.editor - - - - - Search and update the list of Protocol Tokens in the ProtocolTokenRegistry - - - - - Loads all Assemblies on the project a search for Protocol Token implementations - that fulfill the requirements described on the method - - List of BoltProtocolTokenRegistry.TokenRegistry with all found tokens - - - - Returns a reference for a Assembly based on it's name - - Assembly Name - Reference to an Assembly or null if not found - - - - Remove all Temporary files from the Bolt Compilation - - - - - Custom inspector for BoltEntity component - - - - - Draw the basic information about the Bolt Entity - - Target Bolt Entity - - - - Draw the dropdown box to select the Entity state - - Target Entity to change the state type - - - - Draw Entity properties at runtime - - Target Entity - - - - Save the current Entity - - Entity to be saved - - - - Show a extra text alongside the property drawer - - Message to be shown - - - - Custom editor for BoltProtocolTokenRegistry - It shows a list of all IProtocolTokens found on the project - and show a button to update the list of Tokens - - - - - Update the Protocol Token list - - - - - This class will setup the BoltLog class using the current configuration - on the Bolt Settings. This will keep the logs appearing in Editor Mode, - but will totally disabled if the user prefers. - - - - - Used to checkout files from a Source Code Provider, like Perforce when enabled - (link) - The main behavior is enabled only if it's enabled in the Bolt Settings () - - - - - Checkout all files specified on the paths list - If the Source Provider was properly configured, this method will checkout the file and set it as writable - - List of file paths to checkout - - - - Update the internal prefab database - - - - - Run the Bolt Compiler to generate the Dynamic data - - - - - List all Bolt Entities from the Scene and assing new Scene IDs for each one - - - - - Invoke the action in the main Thread by Enqueuing it for - execution on the Editor Update method - - - - - - Utility to Move Files - - Source file path - Destination file path - If the destination will be deleted before the move - - - - Setup "BOLT_CLOUD" constant as a Compiler flag on the current Build Target - - - - - Assing a new Scene ID to a Bolt Entity component - - Entity to assing a new Scene ID - - - - Enable a Compiler constant on the Player Settings - - Build target where to enable the flag - Flag to enable - - - - Disable a Compiler constant on the Player Settings - - Build target where to disable the flag - Flag to disable - - - diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.xml.meta b/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.xml.meta deleted file mode 100644 index 27069f9..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/bolt.editor.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2a700d8832fcb4db0b178f38c9f0a578 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.dll b/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.dll deleted file mode 100644 index a50bb36..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.dll.meta b/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.dll.meta deleted file mode 100644 index 5973771..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.dll.meta +++ /dev/null @@ -1,33 +0,0 @@ -fileFormatVersion: 2 -guid: 06714bfac45eb04499b97307938f1ff6 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 0 - settings: {} - - first: - Editor: Editor - second: - enabled: 1 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.xml b/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.xml deleted file mode 100644 index a3478c4..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.xml +++ /dev/null @@ -1,3657 +0,0 @@ - - - - protobuf-net - - - - - Provides support for common .NET types that do not have a direct representation - in protobuf, using the definitions from bcl.proto - - - - - Creates a new instance of the specified type, bypassing the constructor. - - The type to create - The new instance - If the platform does not support constructor-skipping - - - - The default value for dates that are following google.protobuf.Timestamp semantics - - - - - Writes a TimeSpan to a protobuf stream using protobuf-net's own representation, bcl.TimeSpan - - - - - Parses a TimeSpan from a protobuf stream using protobuf-net's own representation, bcl.TimeSpan - - - - - Parses a TimeSpan from a protobuf stream using the standardized format, google.protobuf.Duration - - - - - Writes a TimeSpan to a protobuf stream using the standardized format, google.protobuf.Duration - - - - - Parses a DateTime from a protobuf stream using the standardized format, google.protobuf.Timestamp - - - - - Writes a DateTime to a protobuf stream using the standardized format, google.protobuf.Timestamp - - - - - Parses a DateTime from a protobuf stream - - - - - Writes a DateTime to a protobuf stream, excluding the Kind - - - - - Writes a DateTime to a protobuf stream, including the Kind - - - - - Parses a decimal from a protobuf stream - - - - - Writes a decimal to a protobuf stream - - - - - Writes a Guid to a protobuf stream - - - - - Parses a Guid from a protobuf stream - - - - - Optional behaviours that introduce .NET-specific functionality - - - - - No special behaviour - - - - - Enables full object-tracking/full-graph support. - - - - - Embeds the type information into the stream, allowing usage with types not known in advance. - - - - - If false, the constructor for the type is bypassed during deserialization, meaning any field initializers - or other initialization code is skipped. - - - - - Should the object index be reserved, rather than creating an object promptly - - - - - Reads an *implementation specific* bundled .NET object, including (as options) type-metadata, identity/re-use, etc. - - - - - Writes an *implementation specific* bundled .NET object, including (as options) type-metadata, identity/re-use, etc. - - - - - Provides a simple buffer-based implementation of an extension object. - - - - - https://docs.microsoft.com/en-us/dotnet/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element - - - - Specifies a method on the root-contract in an hierarchy to be invoked before serialization. - - - Specifies a method on the root-contract in an hierarchy to be invoked after serialization. - - - Specifies a method on the root-contract in an hierarchy to be invoked before deserialization. - - - Specifies a method on the root-contract in an hierarchy to be invoked after deserialization. - - - - Pushes a null reference onto the stack. Note that this should only - be used to return a null (or set a variable to null); for null-tests - use BranchIfTrue / BranchIfFalse. - - - - - Creates a new "using" block (equivalent) around a variable; - the variable must exist, and note that (unlike in C#) it is - the variables *final* value that gets disposed. If you need - *original* disposal, copy your variable first. - - It is the callers responsibility to ensure that the variable's - scope fully-encapsulates the "using"; if not, the variable - may be re-used (and thus re-assigned) unexpectedly. - - - - - Sub-format to use when serializing/deserializing data - - - - - Uses the default encoding for the data-type. - - - - - When applied to signed integer-based data (including Decimal), this - indicates that zigzag variant encoding will be used. This means that values - with small magnitude (regardless of sign) take a small amount - of space to encode. - - - - - When applied to signed integer-based data (including Decimal), this - indicates that two's-complement variant encoding will be used. - This means that any -ve number will take 10 bytes (even for 32-bit), - so should only be used for compatibility. - - - - - When applied to signed integer-based data (including Decimal), this - indicates that a fixed amount of space will be used. - - - - - When applied to a sub-message, indicates that the value should be treated - as group-delimited. - - - - - When applied to members of types such as DateTime or TimeSpan, specifies - that the "well known" standardized representation should be use; DateTime uses Timestamp, - - - - - Represent multiple types as a union; this is used as part of OneOf - - note that it is the caller's responsbility to only read/write the value as the same type - - - The value typed as Object - - - Indicates whether the specified discriminator is assigned - - - Create a new discriminated union value - - - Reset a value if the specified discriminator is assigned - - - The discriminator value - - - Represent multiple types as a union; this is used as part of OneOf - - note that it is the caller's responsbility to only read/write the value as the same type - - - The value typed as Int64 - - - The value typed as UInt64 - - - The value typed as Int32 - - - The value typed as UInt32 - - - The value typed as Boolean - - - The value typed as Single - - - The value typed as Double - - - The value typed as DateTime - - - The value typed as TimeSpan - - - Indicates whether the specified discriminator is assigned - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Reset a value if the specified discriminator is assigned - - - The discriminator value - - - Represent multiple types as a union; this is used as part of OneOf - - note that it is the caller's responsbility to only read/write the value as the same type - - - The value typed as Int64 - - - The value typed as UInt64 - - - The value typed as Int32 - - - The value typed as UInt32 - - - The value typed as Boolean - - - The value typed as Single - - - The value typed as Double - - - The value typed as DateTime - - - The value typed as TimeSpan - - - The value typed as Guid - - - The value typed as Object - - - Indicates whether the specified discriminator is assigned - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Reset a value if the specified discriminator is assigned - - - The discriminator value - - - Represent multiple types as a union; this is used as part of OneOf - - note that it is the caller's responsbility to only read/write the value as the same type - - - The value typed as Int64 - - - The value typed as UInt64 - - - The value typed as Int32 - - - The value typed as UInt32 - - - The value typed as Boolean - - - The value typed as Single - - - The value typed as Double - - - The value typed as DateTime - - - The value typed as TimeSpan - - - The value typed as Guid - - - Indicates whether the specified discriminator is assigned - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Reset a value if the specified discriminator is assigned - - - The discriminator value - - - Represent multiple types as a union; this is used as part of OneOf - - note that it is the caller's responsbility to only read/write the value as the same type - - - The value typed as Int64 - - - The value typed as UInt64 - - - The value typed as Int32 - - - The value typed as UInt32 - - - The value typed as Boolean - - - The value typed as Single - - - The value typed as Double - - - The value typed as DateTime - - - The value typed as TimeSpan - - - The value typed as Object - - - Indicates whether the specified discriminator is assigned - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Reset a value if the specified discriminator is assigned - - - The discriminator value - - - Represent multiple types as a union; this is used as part of OneOf - - note that it is the caller's responsbility to only read/write the value as the same type - - - The value typed as Int32 - - - The value typed as UInt32 - - - The value typed as Boolean - - - The value typed as Single - - - Indicates whether the specified discriminator is assigned - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Reset a value if the specified discriminator is assigned - - - The discriminator value - - - Represent multiple types as a union; this is used as part of OneOf - - note that it is the caller's responsbility to only read/write the value as the same type - - - The value typed as Int32 - - - The value typed as UInt32 - - - The value typed as Boolean - - - The value typed as Single - - - The value typed as Object - - - Indicates whether the specified discriminator is assigned - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Create a new discriminated union value - - - Reset a value if the specified discriminator is assigned - - - The discriminator value - - - - Simple base class for supporting unexpected fields allowing - for loss-less round-tips/merge, even if the data is not understod. - The additional fields are (by default) stored in-memory in a buffer. - - As an example of an alternative implementation, you might - choose to use the file system (temporary files) as the back-end, tracking - only the paths [such an object would ideally be IDisposable and use - a finalizer to ensure that the files are removed]. - - - - - Retrieves the extension object for the current - instance, optionally creating it if it does not already exist. - - Should a new extension object be - created if it does not already exist? - The extension object if it exists (or was created), or null - if the extension object does not exist or is not available. - The createIfMissing argument is false during serialization, - and true during deserialization upon encountering unexpected fields. - - - - Provides a simple, default implementation for extension support, - optionally creating it if it does not already exist. Designed to be called by - classes implementing . - - Should a new extension object be - created if it does not already exist? - The extension field to check (and possibly update). - The extension object if it exists (or was created), or null - if the extension object does not exist or is not available. - The createIfMissing argument is false during serialization, - and true during deserialization upon encountering unexpected fields. - - - - Appends the value as an additional (unexpected) data-field for the instance. - Note that for non-repeated sub-objects, this equates to a merge operation; - for repeated sub-objects this adds a new instance to the set; for simple - values the new value supercedes the old value. - - Note that appending a value does not remove the old value from - the stream; avoid repeatedly appending values for the same field. - The type of the value to append. - The extensible object to append the value to. - The field identifier; the tag should not be defined as a known data-field for the instance. - The value to append. - - - - Appends the value as an additional (unexpected) data-field for the instance. - Note that for non-repeated sub-objects, this equates to a merge operation; - for repeated sub-objects this adds a new instance to the set; for simple - values the new value supercedes the old value. - - Note that appending a value does not remove the old value from - the stream; avoid repeatedly appending values for the same field. - The data-type of the field. - The data-format to use when encoding the value. - The extensible object to append the value to. - The field identifier; the tag should not be defined as a known data-field for the instance. - The value to append. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - The value returned is the composed value after merging any duplicated content; if the - value is "repeated" (a list), then use GetValues instead. - - The data-type of the field. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - The effective value of the field, or the default value if not found. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - The value returned is the composed value after merging any duplicated content; if the - value is "repeated" (a list), then use GetValues instead. - - The data-type of the field. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - The data-format to use when decoding the value. - The effective value of the field, or the default value if not found. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - The value returned (in "value") is the composed value after merging any duplicated content; - if the value is "repeated" (a list), then use GetValues instead. - - The data-type of the field. - The effective value of the field, or the default value if not found. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - True if data for the field was present, false otherwise. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - The value returned (in "value") is the composed value after merging any duplicated content; - if the value is "repeated" (a list), then use GetValues instead. - - The data-type of the field. - The effective value of the field, or the default value if not found. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - The data-format to use when decoding the value. - True if data for the field was present, false otherwise. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - The value returned (in "value") is the composed value after merging any duplicated content; - if the value is "repeated" (a list), then use GetValues instead. - - The data-type of the field. - The effective value of the field, or the default value if not found. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - The data-format to use when decoding the value. - Allow tags that are present as part of the definition; for example, to query unknown enum values. - True if data for the field was present, false otherwise. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - Each occurrence of the field is yielded separately, making this usage suitable for "repeated" - (list) fields. - - The extended data is processed lazily as the enumerator is iterated. - The data-type of the field. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - An enumerator that yields each occurrence of the field. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - Each occurrence of the field is yielded separately, making this usage suitable for "repeated" - (list) fields. - - The extended data is processed lazily as the enumerator is iterated. - The data-type of the field. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - The data-format to use when decoding the value. - An enumerator that yields each occurrence of the field. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - The value returned (in "value") is the composed value after merging any duplicated content; - if the value is "repeated" (a list), then use GetValues instead. - - The data-type of the field. - The model to use for configuration. - The effective value of the field, or the default value if not found. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - The data-format to use when decoding the value. - Allow tags that are present as part of the definition; for example, to query unknown enum values. - True if data for the field was present, false otherwise. - - - - Queries an extensible object for an additional (unexpected) data-field for the instance. - Each occurrence of the field is yielded separately, making this usage suitable for "repeated" - (list) fields. - - The extended data is processed lazily as the enumerator is iterated. - The model to use for configuration. - The data-type of the field. - The extensible object to obtain the value from. - The field identifier; the tag should not be defined as a known data-field for the instance. - The data-format to use when decoding the value. - An enumerator that yields each occurrence of the field. - - - - Appends the value as an additional (unexpected) data-field for the instance. - Note that for non-repeated sub-objects, this equates to a merge operation; - for repeated sub-objects this adds a new instance to the set; for simple - values the new value supercedes the old value. - - Note that appending a value does not remove the old value from - the stream; avoid repeatedly appending values for the same field. - The model to use for configuration. - The data-format to use when encoding the value. - The extensible object to append the value to. - The field identifier; the tag should not be defined as a known data-field for the instance. - The value to append. - - - - This class acts as an internal wrapper allowing us to do a dynamic - methodinfo invoke; an't put into Serializer as don't want on public - API; can't put into Serializer<T> since we need to invoke - across classes - - - - - All this does is call GetExtendedValuesTyped with the correct type for "instance"; - this ensures that we don't get issues with subclasses declaring conflicting types - - the caller must respect the fields defined for the type they pass in. - - - - - All this does is call GetExtendedValuesTyped with the correct type for "instance"; - this ensures that we don't get issues with subclasses declaring conflicting types - - the caller must respect the fields defined for the type they pass in. - - - - - Not all frameworks are created equal (fx1.1 vs fx2.0, - micro-framework, compact-framework, - silverlight, etc). This class simply wraps up a few things that would - otherwise make the real code unnecessarily messy, providing fallback - implementations if necessary. - - - - - Intended to be a direct map to regular TypeCode, but: - - with missing types - - existing on WinRT - - - - - Indicates that the implementing type has support for protocol-buffer - extensions. - - Can be implemented by deriving from Extensible. - - - - Retrieves the extension object for the current - instance, optionally creating it if it does not already exist. - - Should a new extension object be - created if it does not already exist? - The extension object if it exists (or was created), or null - if the extension object does not exist or is not available. - The createIfMissing argument is false during serialization, - and true during deserialization upon encountering unexpected fields. - - - - Provides addition capability for supporting unexpected fields during - protocol-buffer serialization/deserialization. This allows for loss-less - round-trip/merge, even when the data is not fully understood. - - - - - Requests a stream into which any unexpected fields can be persisted. - - A new stream suitable for storing data. - - - - Indicates that all unexpected fields have now been stored. The - implementing class is responsible for closing the stream. If - "commit" is not true the data may be discarded. - - The stream originally obtained by BeginAppend. - True if the append operation completed successfully. - - - - Requests a stream of the unexpected fields previously stored. - - A prepared stream of the unexpected fields. - - - - Indicates that all unexpected fields have now been read. The - implementing class is responsible for closing the stream. - - The stream originally obtained by BeginQuery. - - - - Requests the length of the raw binary stream; this is used - when serializing sub-entities to indicate the expected size. - - The length of the binary stream representing unexpected data. - - - - Provides the ability to remove all existing extension data - - - - - Remove all existing extension data - - - - - Specifies the method used to infer field tags for members of the type - under consideration. Tags are deduced using the invariant alphabetic - sequence of the members' names; this makes implicit field tags very brittle, - and susceptible to changes such as field names (normally an isolated - change). - - - - - No members are serialized implicitly; all members require a suitable - attribute such as [ProtoMember]. This is the recmomended mode for - most scenarios. - - - - - Public properties and fields are eligible for implicit serialization; - this treats the public API as a contract. Ordering beings from ImplicitFirstTag. - - - - - Public and non-public fields are eligible for implicit serialization; - this acts as a state/implementation serializer. Ordering beings from ImplicitFirstTag. - - - - - Represents the ability to deserialize values from an input of type - - - - - Deserialize a value from the input - - - - - Represents the ability to serialize values to an output of type - - - - - Serialize the provided value - - - - - Represents the ability to serialize values to an output of type - with pre-computation of the length - - - - - Measure the length of a value in advance of serialization - - - - - Serialize the previously measured value - - - - - Represents the outcome of computing the length of an object; since this may have required computing lengths - for multiple objects, some metadata is retained so that a subsequent serialize operation using - this instance can re-use the previously calculated lengths. If the object state changes between the - measure and serialize operations, the behavior is undefined. - - - - - Releases all resources associated with this value - - - - - Gets the calculated length of this serialize operation, in bytes - - - - - Represents the set of serialization callbacks to be used when serializing/deserializing a type. - - - - Called before serializing an instance - - - Called before deserializing an instance - - - Called after serializing an instance - - - Called after deserializing an instance - - - - True if any callback is set, else False - - - - - Represents a type at runtime for use with protobuf, allowing the field mappings (etc) to be defined - - - - - Get the name of the type being represented - - - - - Gets the base-type for this type - - - - - When used to compile a model, should public serialization/deserialzation methods - be included for this type? - - - - - Should this type be treated as a reference by default? - - - - - Adds a known sub-type to the inheritance model - - - - - Adds a known sub-type to the inheritance model - - - - - Indicates whether the current type has defined callbacks - - - - - Indicates whether the current type has defined subtypes - - - - - Returns the set of callbacks defined for this type - - - - - Assigns the callbacks to use during serialiation/deserialization. - - The method (or null) called before serialization begins. - The method (or null) called when serialization is complete. - The method (or null) called before deserialization begins (or when a new instance is created during deserialization). - The method (or null) called when deserialization is complete. - The set of callbacks. - - - - Assigns the callbacks to use during serialiation/deserialization. - - The name of the method (or null) called before serialization begins. - The name of the method (or null) called when serialization is complete. - The name of the method (or null) called before deserialization begins (or when a new instance is created during deserialization). - The name of the method (or null) called when deserialization is complete. - The set of callbacks. - - - - Gets or sets the name of this contract. - - - - - Designate a factory-method to use to create instances of this type - - - - - Designate a factory-method to use to create instances of this type - - - - - Throws an exception if the type has been made immutable - - - - - The runtime type that the meta-type represents - - - - - Adds a member (by name) to the MetaType - - - - - Adds a member (by name) to the MetaType, returning the ValueMember rather than the fluent API. - This is otherwise identical to Add. - - - - - Gets or sets whether the type should use a parameterless constructor (the default), - or whether the type should skip the constructor completely. This option is not supported - on compact-framework. - - - - - The concrete type to create when a new instance of this type is needed; this may be useful when dealing - with dynamic proxies, or with interface-based APIs - - - - - Adds a member (by name) to the MetaType - - - - - Performs serialization of this type via a surrogate; all - other serialization options are ignored and handled - by the surrogate's configuration. - - - - - Adds a set of members (by name) to the MetaType - - - - - Adds a member (by name) to the MetaType - - - - - Adds a member (by name) to the MetaType, including an itemType and defaultType for representing lists - - - - - Adds a member (by name) to the MetaType, including an itemType and defaultType for representing lists, returning the ValueMember rather than the fluent API. - This is otherwise identical to Add. - - - - - Returns the ValueMember that matchs a given field number, or null if not found - - - - - Returns the ValueMember that matchs a given member (property/field), or null if not found - - - - - Returns the ValueMember instances associated with this type - - - - - Returns the SubType instances associated with this type - - - - - Compiles the serializer for this type; this is *not* a full - standalone compile, but can significantly boost performance - while allowing additional types to be added. - - An in-place compile can access non-public types / members - - - - Gets or sets a value indicating that an enum should be treated directly as an int/short/etc, rather - than enforcing .proto enum rules. This is useful *in particul* for [Flags] enums. - - - - - Gets or sets a value indicating that this type should NOT be treated as a list, even if it has - familiar list-like characteristics (enumerable, add, etc) - - - - - Indicates whether this type should always be treated as a "group" (rather than a string-prefixed sub-message) - - - - - Apply a shift to all fields (and sub-types) on this type - - The change in field number to apply - The resultant field numbers must still all be considered valid - - - - Indiate the variant of the protobuf .proto DSL syntax to use - - - - - https://developers.google.com/protocol-buffers/docs/proto - - - - - https://developers.google.com/protocol-buffers/docs/proto3 - - - - - Provides protobuf serialization support for a number of types that can be defined at runtime - - - - - Global default that - enables/disables automatic tag generation based on the existing name / order - of the defined members. See - for usage and important warning / explanation. - You must set the global default before attempting to serialize/deserialize any - impacted type. - - - - - Global default that determines whether types are considered serializable - if they have [DataContract] / [XmlType]. With this enabled, ONLY - types marked as [ProtoContract] are added automatically. - - - - - Global switch that enables or disables the implicit - handling of "zero defaults"; meanning: if no other default is specified, - it assumes bools always default to false, integers to zero, etc. - - If this is disabled, no such assumptions are made and only *explicit* - default values are processed. This is enabled by default to - preserve similar logic to v1. - - - - - Global switch that determines whether types with a .ToString() and a Parse(string) - should be serialized as strings. - - - - - Global switch that determines whether DateTime serialization should include the Kind of the date/time. - - - - - Global switch that determines whether a single instance of the same string should be used during deserialization. - - Note this does not use the global .NET string interner - - - - Should the Kind be included on date/time values? - - - - - The default model, used to support ProtoBuf.Serializer - - - - - Returns a sequence of the Type instances that can be - processed by this model. - - - - - Suggest a .proto definition for the given type - - The type to generate a .proto definition for, or null to generate a .proto that represents the entire model - The .proto definition as a string - The .proto syntax to use - - - - Creates a new runtime model, to which the caller - can add support for a range of types. A model - can be used "as is", or can be compiled for - optimal performance. - - not used currently; this is for compatibility with v3 - - - - Obtains the MetaType associated with a given Type for the current model, - allowing additional configuration. - - - - - Adds support for an additional type in this model, optionally - applying inbuilt patterns. If the type is already known to the - model, the existing type is returned **without** applying - any additional behaviour. - - Inbuilt patterns include: - [ProtoContract]/[ProtoMember(n)] - [DataContract]/[DataMember(Order=n)] - [XmlType]/[XmlElement(Order=n)] - [On{Des|S}erializ{ing|ed}] - ShouldSerialize*/*Specified - - The type to be supported - Whether to apply the inbuilt configuration patterns (via attributes etc), or - just add the type with no additional configuration (the type must then be manually configured). - The MetaType representing this type, allowing - further configuration. - - - - Should serializers be compiled on demand? It may be useful - to disable this for debugging purposes. - - - - - Should support for unexpected types be added automatically? - If false, an exception is thrown when unexpected types - are encountered. - - - - - Verifies that the model is still open to changes; if not, an exception is thrown - - - - - Prevents further changes to this model - - - - - Provides the key that represents a given type in the current model. - - - - - Writes a protocol-buffer representation of the given instance to the supplied stream. - - Represents the type (including inheritance) to consider. - The existing instance to be serialized (cannot be null). - The destination stream to write to. - - - - Applies a protocol-buffer stream to an existing instance (which may be null). - - Represents the type (including inheritance) to consider. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Compiles the serializers individually; this is *not* a full - standalone compile, but can significantly boost performance - while allowing additional types to be added. - - An in-place compile can access non-public types / members - - - - Fully compiles the current model into a static-compiled model instance - - A full compilation is restricted to accessing public types / members - An instance of the newly created compiled type-model - - - - Represents configuration options for compiling a model to - a standalone assembly. - - - - - Import framework options from an existing type - - - - - The TargetFrameworkAttribute FrameworkName value to burn into the generated assembly - - - - - The TargetFrameworkAttribute FrameworkDisplayName value to burn into the generated assembly - - - - - The name of the TypeModel class to create - - - - - The path for the new dll - - - - - The runtime version for the generated assembly - - - - - The runtime version for the generated assembly - - - - - The acecssibility of the generated serializer - - - - - Type accessibility - - - - - Available to all callers - - - - - Available to all callers in the same assembly, or assemblies specified via [InternalsVisibleTo(...)] - - - - - Fully compiles the current model into a static-compiled serialization dll - (the serialization dll still requires protobuf-net for support services). - - A full compilation is restricted to accessing public types / members - The name of the TypeModel class to create - The path for the new dll - An instance of the newly created compiled type-model - - - - Fully compiles the current model into a static-compiled serialization dll - (the serialization dll still requires protobuf-net for support services). - - A full compilation is restricted to accessing public types / members - An instance of the newly created compiled type-model - - - - The amount of time to wait if there are concurrent metadata access operations - - - - - If a lock-contention is detected, this event signals the *owner* of the lock responsible for the blockage, indicating - what caused the problem; this is only raised if the lock-owning code successfully completes. - - - - - Designate a factory-method to use to create instances of any type; note that this only affect types seen by the serializer *after* setting the factory. - - - - - Raised before a type is auto-configured; this allows the auto-configuration to be electively suppressed - - This callback should be fast and not involve complex external calls, as it may block the model - - - - Raised after a type is auto-configured; this allows additional external customizations - - This callback should be fast and not involve complex external calls, as it may block the model - - - - Contains the stack-trace of the owning code when a lock-contention scenario is detected - - - - - The stack-trace of the code that owned the lock when a lock-contention scenario occurred - - - - - Event-type that is raised when a lock-contention scenario is detected - - - - - Represents an inherited type in a type hierarchy. - - - - - The field-number that is used to encapsulate the data (as a nested - message) for the derived dype. - - - - - The sub-type to be considered. - - - - - Creates a new SubType instance. - - The field-number that is used to encapsulate the data (as a nested - message) for the derived dype. - The sub-type to be considered. - Specific encoding style to use; in particular, Grouped can be used to avoid buffering, but is not the default. - - - - Event data associated with new types being added to a model - - - - - Whether or not to apply the default mapping behavior - - - - - The configuration of the type being added - - - - - The type that was added to the model - - - - - The model that is being changed - - - - - Event arguments needed to perform type-formatting functions; this could be resolving a Type to a string suitable for serialization, or could - be requesting a Type from a string. If no changes are made, a default implementation will be used (from the assembly-qualified names). - - - - - The type involved in this map; if this is initially null, a Type is expected to be provided for the string in FormattedName. - - - - - The formatted-name involved in this map; if this is initially null, a formatted-name is expected from the type in Type. - - - - - Delegate type used to perform type-formatting functions; the sender originates as the type-model. - - - - - Provides protobuf serialization support for a number of types - - - - - Should the Kind be included on date/time values? - - - - - Resolve a System.Type to the compiler-specific type - - - - - Resolve a System.Type to the compiler-specific type - - - - - This is the more "complete" version of Serialize, which handles single instances of mapped types. - The value is written as a complete field, including field-header and (for sub-objects) a - length-prefix - In addition to that, this provides support for: - - basic values; individual int / string / Guid / etc - - IEnumerable sequences of any type handled by TrySerializeAuxiliaryType - - - - - - Writes a protocol-buffer representation of the given instance to the supplied stream. - - The existing instance to be serialized (cannot be null). - The destination stream to write to. - - - - Writes a protocol-buffer representation of the given instance to the supplied stream. - - The existing instance to be serialized (cannot be null). - The destination stream to write to. - Additional information about this serialization operation. - - - - Writes a protocol-buffer representation of the given instance to the supplied writer. - - The existing instance to be serialized (cannot be null). - The destination writer to write to. - - - - Applies a protocol-buffer stream to an existing instance (or null), using length-prefixed - data - useful with network IO. - - The type being merged. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - How to encode the length prefix. - The tag used as a prefix to each record (only used with base-128 style prefixes). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Applies a protocol-buffer stream to an existing instance (or null), using length-prefixed - data - useful with network IO. - - The type being merged. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - How to encode the length prefix. - The tag used as a prefix to each record (only used with base-128 style prefixes). - Used to resolve types on a per-field basis. - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Applies a protocol-buffer stream to an existing instance (or null), using length-prefixed - data - useful with network IO. - - The type being merged. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - How to encode the length prefix. - The tag used as a prefix to each record (only used with base-128 style prefixes). - Used to resolve types on a per-field basis. - Returns the number of bytes consumed by this operation (includes length-prefix overheads and any skipped data). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Applies a protocol-buffer stream to an existing instance (or null), using length-prefixed - data - useful with network IO. - - The type being merged. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - How to encode the length prefix. - The tag used as a prefix to each record (only used with base-128 style prefixes). - Used to resolve types on a per-field basis. - Returns the number of bytes consumed by this operation (includes length-prefix overheads and any skipped data). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Reads a sequence of consecutive length-prefixed items from a stream, using - either base-128 or fixed-length prefixes. Base-128 prefixes with a tag - are directly comparable to serializing multiple items in succession - (use the tag to emulate the implicit behavior - when serializing a list/array). When a tag is - specified, any records with different tags are silently omitted. The - tag is ignored. The tag is ignores for fixed-length prefixes. - - The binary stream containing the serialized records. - The prefix style used in the data. - The tag of records to return (if non-positive, then no tag is - expected and all records are returned). - On a field-by-field basis, the type of object to deserialize (can be null if "type" is specified). - The type of object to deserialize (can be null if "resolver" is specified). - The sequence of deserialized objects. - - - - Reads a sequence of consecutive length-prefixed items from a stream, using - either base-128 or fixed-length prefixes. Base-128 prefixes with a tag - are directly comparable to serializing multiple items in succession - (use the tag to emulate the implicit behavior - when serializing a list/array). When a tag is - specified, any records with different tags are silently omitted. The - tag is ignored. The tag is ignores for fixed-length prefixes. - - The binary stream containing the serialized records. - The prefix style used in the data. - The tag of records to return (if non-positive, then no tag is - expected and all records are returned). - On a field-by-field basis, the type of object to deserialize (can be null if "type" is specified). - The type of object to deserialize (can be null if "resolver" is specified). - The sequence of deserialized objects. - Additional information about this serialization operation. - - - - Reads a sequence of consecutive length-prefixed items from a stream, using - either base-128 or fixed-length prefixes. Base-128 prefixes with a tag - are directly comparable to serializing multiple items in succession - (use the tag to emulate the implicit behavior - when serializing a list/array). When a tag is - specified, any records with different tags are silently omitted. The - tag is ignored. The tag is ignores for fixed-length prefixes. - - The type of object to deserialize. - The binary stream containing the serialized records. - The prefix style used in the data. - The tag of records to return (if non-positive, then no tag is - expected and all records are returned). - The sequence of deserialized objects. - - - - Reads a sequence of consecutive length-prefixed items from a stream, using - either base-128 or fixed-length prefixes. Base-128 prefixes with a tag - are directly comparable to serializing multiple items in succession - (use the tag to emulate the implicit behavior - when serializing a list/array). When a tag is - specified, any records with different tags are silently omitted. The - tag is ignored. The tag is ignores for fixed-length prefixes. - - The type of object to deserialize. - The binary stream containing the serialized records. - The prefix style used in the data. - The tag of records to return (if non-positive, then no tag is - expected and all records are returned). - The sequence of deserialized objects. - Additional information about this serialization operation. - - - - Writes a protocol-buffer representation of the given instance to the supplied stream, - with a length-prefix. This is useful for socket programming, - as DeserializeWithLengthPrefix can be used to read the single object back - from an ongoing stream. - - The type being serialized. - The existing instance to be serialized (cannot be null). - How to encode the length prefix. - The destination stream to write to. - The tag used as a prefix to each record (only used with base-128 style prefixes). - - - - Writes a protocol-buffer representation of the given instance to the supplied stream, - with a length-prefix. This is useful for socket programming, - as DeserializeWithLengthPrefix can be used to read the single object back - from an ongoing stream. - - The type being serialized. - The existing instance to be serialized (cannot be null). - How to encode the length prefix. - The destination stream to write to. - The tag used as a prefix to each record (only used with base-128 style prefixes). - Additional information about this serialization operation. - - - - Applies a protocol-buffer stream to an existing instance (which may be null). - - The type (including inheritance) to consider. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Applies a protocol-buffer stream to an existing instance (which may be null). - - The type (including inheritance) to consider. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - Additional information about this serialization operation. - - - - Applies a protocol-buffer stream to an existing instance (which may be null). - - The type (including inheritance) to consider. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The number of bytes to consume. - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Applies a protocol-buffer stream to an existing instance (which may be null). - - The type (including inheritance) to consider. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The number of bytes to consume. - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Applies a protocol-buffer stream to an existing instance (which may be null). - - The type (including inheritance) to consider. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The number of bytes to consume (or -1 to read to the end of the stream). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - Additional information about this serialization operation. - - - - Applies a protocol-buffer stream to an existing instance (which may be null). - - The type (including inheritance) to consider. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The number of bytes to consume (or -1 to read to the end of the stream). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - Additional information about this serialization operation. - - - - Applies a protocol-buffer reader to an existing instance (which may be null). - - The type (including inheritance) to consider. - The existing instance to be modified (can be null). - The reader to apply to the instance (cannot be null). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - This is the more "complete" version of Deserialize, which handles single instances of mapped types. - The value is read as a complete field, including field-header and (for sub-objects) a - length-prefix..kmc - - In addition to that, this provides support for: - - basic values; individual int / string / Guid / etc - - IList sets of any type handled by TryDeserializeAuxiliaryType - - - - - Creates a new runtime model, to which the caller - can add support for a range of types. A model - can be used "as is", or can be compiled for - optimal performance. - - - - - Applies common proxy scenarios, resolving the actual type to consider - - - - - Indicates whether the supplied type is explicitly modelled by the model - - - - - Provides the key that represents a given type in the current model. - The type is also normalized for proxies at the same time. - - - - - Advertise that a type's key can have changed - - - - - Provides the key that represents a given type in the current model. - - - - - Writes a protocol-buffer representation of the given instance to the supplied stream. - - Represents the type (including inheritance) to consider. - The existing instance to be serialized (cannot be null). - The destination stream to write to. - - - - Applies a protocol-buffer stream to an existing instance (which may be null). - - Represents the type (including inheritance) to consider. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Indicates the type of callback to be used - - - - - Invoked before an object is serialized - - - - - Invoked after an object is serialized - - - - - Invoked before an object is deserialized (or when a new instance is created) - - - - - Invoked after an object is deserialized - - - - - Create a deep clone of the supplied instance; any sub-items are also cloned. - - - - - Indicates that while an inheritance tree exists, the exact type encountered was not - specified in that hierarchy and cannot be processed. - - - - - Indicates that the given type was not expected, and cannot be processed. - - - - - Indicates that the given type cannot be constructed; it may still be possible to - deserialize into existing instances. - - - - - Returns true if the type supplied is either a recognised contract type, - or a *list* of a recognised contract type. - - Note that primitives always return false, even though the engine - will, if forced, try to serialize such - True if this type is recognised as a serializable entity, else false - - - - Returns true if the type supplied is a basic type with inbuilt handling, - a recognised contract type, or a *list* of a basic / contract type. - - - - - Returns true if the type supplied is a basic type with inbuilt handling, - or a *list* of a basic type with inbuilt handling - - - - - Suggest a .proto definition for the given type - - The type to generate a .proto definition for, or null to generate a .proto that represents the entire model - The .proto definition as a string - - - - Suggest a .proto definition for the given type - - The type to generate a .proto definition for, or null to generate a .proto that represents the entire model - The .proto definition as a string - The .proto syntax to use for the operation - - - - Used to provide custom services for writing and parsing type names when using dynamic types. Both parsing and formatting - are provided on a single API as it is essential that both are mapped identically at all times. - - - - - Creates a new IFormatter that uses protocol-buffer [de]serialization. - - A new IFormatter to be used during [de]serialization. - The type of object to be [de]deserialized by the formatter. - - - - Represents a member (property/field) that is mapped to a protobuf field - - - - - The number that identifies this member in a protobuf stream - - - - - Gets the member (field/property) which this member relates to. - - - - - Gets the backing member (field/property) which this member relates to - - - - - Within a list / array / etc, the type of object for each item in the list (especially useful with ArrayList) - - - - - The underlying type of the member - - - - - For abstract types (IList etc), the type of concrete object to create (if required) - - - - - The type the defines the member - - - - - The default value of the item (members with this value will not be serialized) - - - - - Creates a new ValueMember instance - - - - - Creates a new ValueMember instance - - - - - Specifies the rules used to process the field; this is used to determine the most appropriate - wite-type, but also to describe subtypes within that wire-type (such as SignedVariant) - - - - - Indicates whether this field should follow strict encoding rules; this means (for example) that if a "fixed32" - is encountered when "variant" is defined, then it will fail (throw an exception) when parsing. Note that - when serializing the defined type is always used. - - - - - Indicates whether this field should use packed encoding (which can save lots of space for repeated primitive values). - This option only applies to list/array data of primitive types (int, double, etc). - - - - - Indicates whether this field should *repace* existing values (the default is false, meaning *append*). - This option only applies to list/array data. - - - - - Indicates whether this field is mandatory. - - - - - Enables full object-tracking/full-graph support. - - - - - Embeds the type information into the stream, allowing usage with types not known in advance. - - - - - Indicates that the member should be treated as a protobuf Map - - - - - Specifies the data-format that should be used for the key, when IsMap is enabled - - - - - Specifies the data-format that should be used for the value, when IsMap is enabled - - - - - Specifies methods for working with optional data members. - - Provides a method (null for none) to query whether this member should - be serialized; it must be of the form "bool {Method}()". The member is only serialized if the - method returns true. - Provides a method (null for none) to indicate that a member was - deserialized; it must be of the form "void {Method}(bool)", and will be called with "true" - when data is found. - - - - Gets the logical name for this member in the schema (this is not critical for binary serialization, but may be used - when inferring a schema). - - - - - Should lists have extended support for null values? Note this makes the serialization less efficient. - - - - - Specifies the type of prefix that should be applied to messages. - - - - - No length prefix is applied to the data; the data is terminated only be the end of the stream. - - - - - A base-128 ("varint", the default prefix format in protobuf) length prefix is applied to the data (efficient for short messages). - - - - - A fixed-length (little-endian) length prefix is applied to the data (useful for compatibility). - - - - - A fixed-length (big-endian) length prefix is applied to the data (useful for compatibility). - - - - - Indicates that a type is defined for protocol-buffer serialization. - - - - - Gets or sets the defined name of the type. - - - - - Gets or sets the fist offset to use with implicit field tags; - only uesd if ImplicitFields is set. - - - - - If specified, alternative contract markers (such as markers for XmlSerailizer or DataContractSerializer) are ignored. - - - - - If specified, do NOT treat this type as a list, even if it looks like one. - - - - - Gets or sets the mechanism used to automatically infer field tags - for members. This option should be used in advanced scenarios only. - Please review the important notes against the ImplicitFields enumeration. - - - - - Enables/disables automatic tag generation based on the existing name / order - of the defined members. This option is not used for members marked - with ProtoMemberAttribute, as intended to provide compatibility with - WCF serialization. WARNING: when adding new fields you must take - care to increase the Order for new elements, otherwise data corruption - may occur. - - If not explicitly specified, the default is assumed from Serializer.GlobalOptions.InferTagFromName. - - - - Has a InferTagFromName value been explicitly set? if not, the default from the type-model is assumed. - - - - - Specifies an offset to apply to [DataMember(Order=...)] markers; - this is useful when working with mex-generated classes that have - a different origin (usually 1 vs 0) than the original data-contract. - - This value is added to the Order of each member. - - - - - If true, the constructor for the type is bypassed during deserialization, meaning any field initializers - or other initialization code is skipped. - - - - - Should this type be treated as a reference by default? Please also see the implications of this, - as recorded on ProtoMemberAttribute.AsReference - - - - - Indicates whether this type should always be treated as a "group" (rather than a string-prefixed sub-message) - - - - - Applies only to enums (not to DTO classes themselves); gets or sets a value indicating that an enum should be treated directly as an int/short/etc, rather - than enforcing .proto enum rules. This is useful *in particul* for [Flags] enums. - - - - - Allows to define a surrogate type used for serialization/deserialization purpose. - - - - - Has a EnumPassthru value been explicitly set? - - - - - Indicates that a static member should be considered the same as though - were an implicit / explicit conversion operator; in particular, this - is useful for conversions that operator syntax does not allow, such as - to/from interface types. - - - - - Used to define protocol-buffer specific behavior for - enumerated values. - - - - - Gets or sets the specific value to use for this enum during serialization. - - - - - Indicates whether this instance has a customised value mapping - - true if a specific value is set - - - - Gets or sets the defined name of the enum, as used in .proto - (this name is not used during serialization). - - - - - Indicates an error during serialization/deserialization of a proto stream. - - - - Creates a new ProtoException instance. - - - Creates a new ProtoException instance. - - - Creates a new ProtoException instance. - - - Creates a new ProtoException instance. - - - - Indicates that a member should be excluded from serialization; this - is only normally used when using implict fields. - - - - - Indicates that a member should be excluded from serialization; this - is only normally used when using implict fields. This allows - ProtoIgnoreAttribute usage - even for partial classes where the individual members are not - under direct control. - - - - - Creates a new ProtoPartialIgnoreAttribute instance. - - Specifies the member to be ignored. - - - - The name of the member to be ignored. - - - - - Indicates the known-types to support for an individual - message. This serializes each level in the hierarchy as - a nested message to retain wire-compatibility with - other protocol-buffer implementations. - - - - - Creates a new instance of the ProtoIncludeAttribute. - - The unique index (within the type) that will identify this data. - The additional type to serialize/deserialize. - - - - Creates a new instance of the ProtoIncludeAttribute. - - The unique index (within the type) that will identify this data. - The additional type to serialize/deserialize. - - - - Gets the unique index (within the type) that will identify this data. - - - - - Gets the additional type to serialize/deserialize. - - - - - Gets the additional type to serialize/deserialize. - - - - - Specifies whether the inherited sype's sub-message should be - written with a length-prefix (default), or with group markers. - - - - - Controls the formatting of elements in a dictionary, and indicates that - "map" rules should be used: duplicates *replace* earlier values, rather - than throwing an exception - - - - - Describes the data-format used to store the key - - - - - Describes the data-format used to store the value - - - - - Disables "map" handling; dictionaries will use ".Add(key,value)" instead of "[key] = value", - which means duplicate keys will cause an exception (instead of retaining the final value); if - a proto schema is emitted, it will be produced using "repeated" instead of "map" - - - - - Declares a member to be used in protocol-buffer serialization, using - the given Tag. A DataFormat may be used to optimise the serialization - format (for instance, using zigzag encoding for negative numbers, or - fixed-length encoding for large values. - - - - - Compare with another ProtoMemberAttribute for sorting purposes - - - - - Compare with another ProtoMemberAttribute for sorting purposes - - - - - Creates a new ProtoMemberAttribute instance. - - Specifies the unique tag used to identify this member within the type. - - - - Gets or sets the original name defined in the .proto; not used - during serialization. - - - - - Gets or sets the data-format to be used when encoding this value. - - - - - Gets the unique tag used to identify this member within the type. - - - - - Gets or sets a value indicating whether this member is mandatory. - - - - - Gets a value indicating whether this member is packed. - This option only applies to list/array data of primitive types (int, double, etc). - - - - - Indicates whether this field should *repace* existing values (the default is false, meaning *append*). - This option only applies to list/array data. - - - - - Enables full object-tracking/full-graph support. - - - - - Embeds the type information into the stream, allowing usage with types not known in advance. - - - - - Gets or sets a value indicating whether this member is packed (lists/arrays). - - - - - Additional (optional) settings that control serialization of members - - - - - Default; no additional options - - - - - Indicates that repeated elements should use packed (length-prefixed) encoding - - - - - Indicates that the given item is required - - - - - Enables full object-tracking/full-graph support - - - - - Embeds the type information into the stream, allowing usage with types not known in advance - - - - - Indicates whether this field should *repace* existing values (the default is false, meaning *append*). - This option only applies to list/array data. - - - - - Determines whether the types AsReferenceDefault value is used, or whether this member's AsReference should be used - - - - - Declares a member to be used in protocol-buffer serialization, using - the given Tag and MemberName. This allows ProtoMemberAttribute usage - even for partial classes where the individual members are not - under direct control. - A DataFormat may be used to optimise the serialization - format (for instance, using zigzag encoding for negative numbers, or - fixed-length encoding for large values. - - - - - Creates a new ProtoMemberAttribute instance. - - Specifies the unique tag used to identify this member within the type. - Specifies the member to be serialized. - - - - The name of the member to be serialized. - - - - - A stateful reader, used to read a protobuf stream. Typical usage would be (sequentially) to call - ReadFieldHeader and (after matching the field) an appropriate Read* method. - - - - - Gets the number of the field being processed. - - - - - Indicates the underlying proto serialization format on the wire. - - - - - Creates a new reader against a stream - - The source stream - The model to use for serialization; this can be null, but this will impair the ability to deserialize sub-objects - Additional context about this serialization operation - - - - Gets / sets a flag indicating whether strings should be checked for repetition; if - true, any repeated UTF-8 byte sequence will result in the same String instance, rather - than a second instance of the same string. Enabled by default. Note that this uses - a custom interner - the system-wide string interner is not used. - - - - - Creates a new reader against a stream - - The source stream - The model to use for serialization; this can be null, but this will impair the ability to deserialize sub-objects - Additional context about this serialization operation - The number of bytes to read, or -1 to read until the end of the stream - - - - Creates a new reader against a stream - - The source stream - The model to use for serialization; this can be null, but this will impair the ability to deserialize sub-objects - Additional context about this serialization operation - The number of bytes to read, or -1 to read until the end of the stream - - - - Addition information about this deserialization operation. - - - - - Releases resources used by the reader, but importantly does not Dispose the - underlying stream; in many typical use-cases the stream is used for different - processes, so it is assumed that the consumer will Dispose their stream separately. - - - - - Reads an unsigned 32-bit integer from the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Returns the position of the current reader (note that this is not necessarily the same as the position - in the underlying stream, if multiple readers are used on the same stream) - - - - - Returns the position of the current reader (note that this is not necessarily the same as the position - in the underlying stream, if multiple readers are used on the same stream) - - - - - Reads a signed 16-bit integer from the stream: Variant, Fixed32, Fixed64, SignedVariant - - - - - Reads an unsigned 16-bit integer from the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Reads an unsigned 8-bit integer from the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Reads a signed 8-bit integer from the stream; supported wire-types: Variant, Fixed32, Fixed64, SignedVariant - - - - - Reads a signed 32-bit integer from the stream; supported wire-types: Variant, Fixed32, Fixed64, SignedVariant - - - - - Reads a signed 64-bit integer from the stream; supported wire-types: Variant, Fixed32, Fixed64, SignedVariant - - - - - Reads a string from the stream (using UTF8); supported wire-types: String - - - - - Throws an exception indication that the given value cannot be mapped to an enum. - - - - - Reads a double-precision number from the stream; supported wire-types: Fixed32, Fixed64 - - - - - Reads (merges) a sub-message from the stream, internally calling StartSubItem and EndSubItem, and (in between) - parsing the message in accordance with the model associated with the reader - - - - - Makes the end of consuming a nested message in the stream; the stream must be either at the correct EndGroup - marker, or all fields of the sub-message must have been consumed (in either case, this means ReadFieldHeader - should return zero) - - - - - Begins consuming a nested message in the stream; supported wire-types: StartGroup, String - - The token returned must be help and used when callining EndSubItem - - - - Reads a field header from the stream, setting the wire-type and retuning the field number. If no - more fields are available, then 0 is returned. This methods respects sub-messages. - - - - - Looks ahead to see whether the next field in the stream is what we expect - (typically; what we've just finished reading - for example ot read successive list items) - - - - - Get the TypeModel associated with this reader - - - - - Compares the streams current wire-type to the hinted wire-type, updating the reader if necessary; for example, - a Variant may be updated to SignedVariant. If the hinted wire-type is unrelated then no change is made. - - - - - Verifies that the stream's current wire-type is as expected, or a specialized sub-type (for example, - SignedVariant) - in which case the current wire-type is updated. Otherwise an exception is thrown. - - - - - Discards the data for the current field. - - - - - Reads an unsigned 64-bit integer from the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Reads a single-precision number from the stream; supported wire-types: Fixed32, Fixed64 - - - - - Reads a boolean value from the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - - Reads a byte-sequence from the stream, appending them to an existing byte-sequence (which can be null); supported wire-types: String - - - - - Reads the length-prefix of a message from a stream without buffering additional data, allowing a fixed-length - reader to be created. - - - - - Reads a little-endian encoded integer. An exception is thrown if the data is not all available. - - - - - Reads a big-endian encoded integer. An exception is thrown if the data is not all available. - - - - - Reads a varint encoded integer. An exception is thrown if the data is not all available. - - - - - Reads a string (of a given lenth, in bytes) directly from the source into a pre-existing buffer. An exception is thrown if the data is not all available. - - - - - Reads a given number of bytes directly from the source. An exception is thrown if the data is not all available. - - - - - Reads a string (of a given lenth, in bytes) directly from the source. An exception is thrown if the data is not all available. - - - - - Reads the length-prefix of a message from a stream without buffering additional data, allowing a fixed-length - reader to be created. - - - - - Reads the length-prefix of a message from a stream without buffering additional data, allowing a fixed-length - reader to be created. - - - - The number of bytes consumed; 0 if no data available - - - - Copies the current field into the instance as extension data - - - - - Indicates whether the reader still has data remaining in the current sub-item, - additionally setting the wire-type for the next field if there is more data. - This is used when decoding packed data. - - - - - Utility method, not intended for public use; this helps maintain the root object is complex scenarios - - - - - Reads a Type from the stream, using the model's DynamicTypeFormatting if appropriate; supported wire-types: String - - - - - Merge two objects using the details from the current reader; this is used to change the type - of objects when an inheritance relationship is discovered later than usual during deserilazation. - - - - - Creates a new reader against a stream - - The source stream - The model to use for serialization; this can be null, but this will impair the ability to deserialize sub-objects - Additional context about this serialization operation - The number of bytes to read, or -1 to read until the end of the stream - - - - Represents an output stream for writing protobuf data. - - Why is the API backwards (static methods with writer arguments)? - See: http://marcgravell.blogspot.com/2010/03/last-will-be-first-and-first-will-be.html - - - - - Write an encapsulated sub-object, using the supplied unique key (reprasenting a type). - - The object to write. - The key that uniquely identifies the type within the model. - The destination. - - - - Write an encapsulated sub-object, using the supplied unique key (reprasenting a type) - but the - caller is asserting that this relationship is non-recursive; no recursion check will be - performed. - - The object to write. - The key that uniquely identifies the type within the model. - The destination. - - - - Writes a field-header, indicating the format of the next data we plan to write. - - - - - Writes a byte-array to the stream; supported wire-types: String - - - - - Writes a byte-array to the stream; supported wire-types: String - - - - - Indicates the start of a nested record. - - The instance to write. - The destination. - A token representing the state of the stream; this token is given to EndSubItem. - - - - Indicates the end of a nested record. - - The token obtained from StartubItem. - The destination. - - - - Creates a new writer against a stream - - The destination stream - The model to use for serialization; this can be null, but this will impair the ability to serialize sub-objects - Additional context about this serialization operation - - - - Creates a new writer against a stream - - The destination stream - The model to use for serialization; this can be null, but this will impair the ability to serialize sub-objects - Additional context about this serialization operation - - - - Addition information about this serialization operation. - - - - - Flushes data to the underlying stream, and releases any resources. The underlying stream is *not* disposed - by this operation. - - - - - Get the TypeModel associated with this writer - - - - - Writes any buffered data (if possible) to the underlying stream. - - The writer to flush - It is not always possible to fully flush, since some sequences - may require values to be back-filled into the byte-stream. - - - - Writes an unsigned 32-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Writes a string to the stream; supported wire-types: String - - - - - Writes an unsigned 64-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Writes a signed 64-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64, SignedVariant - - - - - Writes an unsigned 16-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Writes a signed 16-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64, SignedVariant - - - - - Writes an unsigned 16-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Writes an unsigned 8-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Writes a signed 8-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64, SignedVariant - - - - - Writes a signed 32-bit integer to the stream; supported wire-types: Variant, Fixed32, Fixed64, SignedVariant - - - - - Writes a double-precision number to the stream; supported wire-types: Fixed32, Fixed64 - - - - - Writes a single-precision number to the stream; supported wire-types: Fixed32, Fixed64 - - - - - Throws an exception indicating that the given enum cannot be mapped to a serialized value. - - - - - Writes a boolean to the stream; supported wire-types: Variant, Fixed32, Fixed64 - - - - - Copies any extension data stored for the instance to the underlying stream - - - - - Used for packed encoding; indicates that the next field should be skipped rather than - a field header written. Note that the field number must match, else an exception is thrown - when the attempt is made to write the (incorrect) field. The wire-type is taken from the - subsequent call to WriteFieldHeader. Only primitive types can be packed. - - - - - Used for packed encoding; explicitly reset the packed field marker; this is not required - if using StartSubItem/EndSubItem - - - - - Used for packed encoding; writes the length prefix using fixed sizes rather than using - buffering. Only valid for fixed-32 and fixed-64 encoding. - - - - - Specifies a known root object to use during reference-tracked serialization - - - - - Writes a Type to the stream, using the model's DynamicTypeFormatting if appropriate; supported wire-types: String - - - - - Additional information about a serialization operation - - - - - Gets or sets a user-defined object containing additional information about this serialization/deserialization operation. - - - - - A default SerializationContext, with minimal information. - - - - - Gets or sets the source or destination of the transmitted data. - - - - - Convert a SerializationContext to a StreamingContext - - - - - Convert a StreamingContext to a SerializationContext - - - - - Provides protocol-buffer serialization capability for concrete, attributed types. This - is a *default* model, but custom serializer models are also supported. - - - Protocol-buffer serialization is a compact binary format, designed to take - advantage of sparse data and knowledge of specific data types; it is also - extensible, allowing a type to be deserialized / merged even if some data is - not recognised. - - - - - Suggest a .proto definition for the given type - - The type to generate a .proto definition for - The .proto definition as a string - - - - Suggest a .proto definition for the given type - - The type to generate a .proto definition for - The .proto definition as a string - - - - Create a deep clone of the supplied instance; any sub-items are also cloned. - - - - - Applies a protocol-buffer stream to an existing instance. - - The type being merged. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Creates a new instance from a protocol-buffer stream - - The type to be created. - The binary stream to apply to the new instance (cannot be null). - A new, initialized instance. - - - - Creates a new instance from a protocol-buffer stream - - The type to be created. - The binary stream to apply to the new instance (cannot be null). - A new, initialized instance. - - - - Writes a protocol-buffer representation of the given instance to the supplied stream. - - The existing instance to be serialized (cannot be null). - The destination stream to write to. - - - - Serializes a given instance and deserializes it as a different type; - this can be used to translate between wire-compatible objects (where - two .NET types represent the same data), or to promote/demote a type - through an inheritance hierarchy. - - No assumption of compatibility is made between the types. - The type of the object being copied. - The type of the new object to be created. - The existing instance to use as a template. - A new instane of type TNewType, with the data from TOldType. - - - - Writes a protocol-buffer representation of the given instance to the supplied SerializationInfo. - - The type being serialized. - The existing instance to be serialized (cannot be null). - The destination SerializationInfo to write to. - - - - Writes a protocol-buffer representation of the given instance to the supplied SerializationInfo. - - The type being serialized. - The existing instance to be serialized (cannot be null). - The destination SerializationInfo to write to. - Additional information about this serialization operation. - - - - Writes a protocol-buffer representation of the given instance to the supplied XmlWriter. - - The type being serialized. - The existing instance to be serialized (cannot be null). - The destination XmlWriter to write to. - - - - Applies a protocol-buffer from an XmlReader to an existing instance. - - The type being merged. - The existing instance to be modified (cannot be null). - The XmlReader containing the data to apply to the instance (cannot be null). - - - - Applies a protocol-buffer from a SerializationInfo to an existing instance. - - The type being merged. - The existing instance to be modified (cannot be null). - The SerializationInfo containing the data to apply to the instance (cannot be null). - - - - Applies a protocol-buffer from a SerializationInfo to an existing instance. - - The type being merged. - The existing instance to be modified (cannot be null). - The SerializationInfo containing the data to apply to the instance (cannot be null). - Additional information about this serialization operation. - - - - Precompiles the serializer for a given type. - - - - - Creates a new IFormatter that uses protocol-buffer [de]serialization. - - The type of object to be [de]deserialized by the formatter. - A new IFormatter to be used during [de]serialization. - - - - Reads a sequence of consecutive length-prefixed items from a stream, using - either base-128 or fixed-length prefixes. Base-128 prefixes with a tag - are directly comparable to serializing multiple items in succession - (use the tag to emulate the implicit behavior - when serializing a list/array). When a tag is - specified, any records with different tags are silently omitted. The - tag is ignored. The tag is ignored for fixed-length prefixes. - - The type of object to deserialize. - The binary stream containing the serialized records. - The prefix style used in the data. - The tag of records to return (if non-positive, then no tag is - expected and all records are returned). - The sequence of deserialized objects. - - - - Creates a new instance from a protocol-buffer stream that has a length-prefix - on data (to assist with network IO). - - The type to be created. - The binary stream to apply to the new instance (cannot be null). - How to encode the length prefix. - A new, initialized instance. - - - - Creates a new instance from a protocol-buffer stream that has a length-prefix - on data (to assist with network IO). - - The type to be created. - The binary stream to apply to the new instance (cannot be null). - How to encode the length prefix. - The expected tag of the item (only used with base-128 prefix style). - A new, initialized instance. - - - - Applies a protocol-buffer stream to an existing instance, using length-prefixed - data - useful with network IO. - - The type being merged. - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - How to encode the length prefix. - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Writes a protocol-buffer representation of the given instance to the supplied stream, - with a length-prefix. This is useful for socket programming, - as DeserializeWithLengthPrefix/MergeWithLengthPrefix can be used to read the single object back - from an ongoing stream. - - The type being serialized. - The existing instance to be serialized (cannot be null). - How to encode the length prefix. - The destination stream to write to. - - - - Writes a protocol-buffer representation of the given instance to the supplied stream, - with a length-prefix. This is useful for socket programming, - as DeserializeWithLengthPrefix/MergeWithLengthPrefix can be used to read the single object back - from an ongoing stream. - - The type being serialized. - The existing instance to be serialized (cannot be null). - How to encode the length prefix. - The destination stream to write to. - The tag used as a prefix to each record (only used with base-128 style prefixes). - - - Indicates the number of bytes expected for the next message. - The stream containing the data to investigate for a length. - The algorithm used to encode the length. - The length of the message, if it could be identified. - True if a length could be obtained, false otherwise. - - - Indicates the number of bytes expected for the next message. - The buffer containing the data to investigate for a length. - The offset of the first byte to read from the buffer. - The number of bytes to read from the buffer. - The algorithm used to encode the length. - The length of the message, if it could be identified. - True if a length could be obtained, false otherwise. - - - - The field number that is used as a default when serializing/deserializing a list of objects. - The data is treated as repeated message with field number 1. - - - - - Provides non-generic access to the default serializer. - - - - - Create a deep clone of the supplied instance; any sub-items are also cloned. - - - - - Writes a protocol-buffer representation of the given instance to the supplied stream. - - The existing instance to be serialized (cannot be null). - The destination stream to write to. - - - - Creates a new instance from a protocol-buffer stream - - The type to be created. - The binary stream to apply to the new instance (cannot be null). - A new, initialized instance. - - - Applies a protocol-buffer stream to an existing instance. - The existing instance to be modified (cannot be null). - The binary stream to apply to the instance (cannot be null). - The updated instance - - - - Writes a protocol-buffer representation of the given instance to the supplied stream, - with a length-prefix. This is useful for socket programming, - as DeserializeWithLengthPrefix/MergeWithLengthPrefix can be used to read the single object back - from an ongoing stream. - - The existing instance to be serialized (cannot be null). - How to encode the length prefix. - The destination stream to write to. - The tag used as a prefix to each record (only used with base-128 style prefixes). - - - - Applies a protocol-buffer stream to an existing instance (or null), using length-prefixed - data - useful with network IO. - - The existing instance to be modified (can be null). - The binary stream to apply to the instance (cannot be null). - How to encode the length prefix. - Used to resolve types on a per-field basis. - The updated instance; this may be different to the instance argument if - either the original instance was null, or the stream defines a known sub-type of the - original instance. - - - - Indicates whether the supplied type is explicitly modelled by the model - - - - - Precompiles the serializer for a given type. - - - - - Global switches that change the behavior of protobuf-net - - - - - - - - - - Maps a field-number to a type - - - - - Releases any internal buffers that have been reserved for efficiency; this does not affect any serialization - operations; simply: it can be used (optionally) to release the buffers for garbage collection (at the expense - of having to re-allocate a new buffer for the next operation, rather than re-use prior buffers). - - - - - The type that this serializer is intended to work for. - - - - - Perform the steps necessary to serialize this data. - - The value to be serialized. - The writer entity that is accumulating the output data. - - - - Perform the steps necessary to deserialize this data. - - The current value, if appropriate. - The reader providing the input data. - The updated / replacement value. - - - - Indicates whether a Read operation replaces the existing value, or - extends the value. If false, the "value" parameter to Read is - discarded, and should be passed in as null. - - - - - Now all Read operations return a value (although most do); if false no - value should be expected. - - - - Emit the IL necessary to perform the given actions - to serialize this data. - - Details and utilities for the method being generated. - The source of the data to work against; - If the value is only needed once, then LoadValue is sufficient. If - the value is needed multiple times, then note that a "null" - means "the top of the stack", in which case you should create your - own copy - GetLocalWithValue. - - - - Emit the IL necessary to perform the given actions to deserialize this data. - - Details and utilities for the method being generated. - For nested values, the instance holding the values; note - that this is not always provided - a null means not supplied. Since this is always - a variable or argument, it is not necessary to consume this value. - - - - Uses protocol buffer serialization on the specified operation; note that this - must be enabled on both the client and server. - - - - - Configuration element to swap out DatatContractSerilaizer with the XmlProtoSerializer for a given endpoint. - - - - - - Creates a new ProtoBehaviorExtension instance. - - - - - Gets the type of behavior. - - - - - Creates a behavior extension based on the current configuration settings. - - The behavior extension. - - - - Behavior to swap out DatatContractSerilaizer with the XmlProtoSerializer for a given endpoint. - - Add the following to the server and client app.config in the system.serviceModel section: - - - - - - - - - - - - - - Configure your endpoints to have a behaviorConfiguration as follows: - - - - - - - - - - - - - Describes a WCF operation behaviour that can perform protobuf serialization - - - - - Create a new ProtoOperationBehavior instance - - - - - The type-model that should be used with this behaviour - - - - - Creates a protobuf serializer if possible (falling back to the default WCF serializer) - - - - - An xml object serializer that can embed protobuf data in a base-64 hunk (looking like a byte[]) - - - - - Attempt to create a new serializer for the given model and type - - A new serializer instance if the type is recognised by the model; null otherwise - - - - Creates a new serializer for the given model and type - - - - - Ends an object in the output - - - - - Begins an object in the output - - - - - Writes the body of an object in the output - - - - - Indicates whether this is the start of an object we are prepared to handle - - - - - Reads the body of an object - - - - - Used to hold particulars relating to nested objects. This is opaque to the caller - simply - give back the token you are given at the end of an object. - - - - - Indicates the encoding used to represent an individual value in a protobuf stream - - - - - Represents an error condition - - - - - Base-128 variant-length encoding - - - - - Fixed-length 8-byte encoding - - - - - Length-variant-prefixed encoding - - - - - Indicates the start of a group - - - - - Indicates the end of a group - - - - - Fixed-length 4-byte encoding - 10 - - - - This is not a formal wire-type in the "protocol buffers" spec, but - denotes a variant integer that should be interpreted using - zig-zag semantics (so -ve numbers aren't a significant overhead) - - - - diff --git a/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.xml.meta b/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.xml.meta deleted file mode 100644 index a593ed9..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/editor/protobuf-net.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0f7d08dded2c86f43afac5c3c1752f98 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit.meta deleted file mode 100644 index d63904b..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 847e9ae05b39b164d90d62e41ff3b01b -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.dll b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.dll deleted file mode 100644 index ee7dc9c..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.dll.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.dll.meta deleted file mode 100644 index cc329a0..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.dll.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: cc48c91df94abd146a0dd69a318061b1 -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - platformData: - Any: - enabled: 1 - settings: {} - Editor: - enabled: 0 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - Win: - enabled: 1 - settings: - CPU: AnyCPU - Win64: - enabled: 1 - settings: - CPU: AnyCPU - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.xml b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.xml deleted file mode 100644 index 0da2c14..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.xml +++ /dev/null @@ -1,1174 +0,0 @@ - - - - udpkit.common - - - - - Blit manages byte arrays, to read and write data. - - - - - Pack the bool. - - true, if bool was packed, false otherwise. - Bytes array to write to. - Offset inside the byte array. - Bool value to set. - - - - Read bool from the byte array. - - Byte array. - Offset inside the byte array. - The bool - - - - Pack a Byte. - - Bytes array to write to. - Offset inside the byte array. - Byte value to set - - - - Read byte from the byte array - - Byte array. - Offset inside the byte array. - The byte - - - - Get the byte array prefix size - - Byte array - Prefix size - - - - Pack the prefix to the byte array - - Byte array to write - Offset inside the byte array. - Prefix byte array - - - - Read the prefix from the byte array - - Byte array. - Offset inside the byte array. - The prefix data array - - - - Pack byte array - - Byte array. - Offset inside the byte array. - Byte array to pack - Byte array size - - - - Read byte array - - Byte array. - Offset inside the byte array. - Target byte array to be filled. - Target byte array size. - - - - Pack byte array - - Byte array. - Offset inside the byte array. - Byte array to pack - Offset inside the from byte array - From byte array size - - - - Read byte array - - Byte array. - Offset inside the byte array. - Target byte array to insert the data - Offset in the target byte array - Target byte array size - - - - Pack a ushort value into the byte array - - Byte array to insert the data - Offset on the byte array - Value to be inserted - - - - Read a ushort from the byte array - - Byte array to read the data - Offset on the byte array - ushort value - - - - Pack a int32 value into the byte array - - Byte array to insert the data - Offset on the byte array - Value to be inserted - - - - Read a int32 from the byte array - - Byte array to read the data - Offset on the byte array - int32 value - - - - Pack a uint32 value into the byte array - - Byte array to insert the data - Offset on the byte array - Value to be inserted - - - - Pack a uint32 value into the byte array - - Byte array to insert the data - Offset on the byte array - Value to be inserted - Total number of bytes from the uint32 value to insert into the byte array - - - - Read a uint32 from the byte array - - Byte array to read the data - Offset on the byte array - uint32 value - - - - Read a int32 from the byte array - - Byte array to read the data - Offset on the byte array - Total number of bytes from the uint32 value to read from the byte array - uint32 value - - - - Pack a float value into the byte array - - Byte array to insert the data - Offset on the byte array - Value to be inserted - - - - Read a float from the byte array - - Byte array to read the data - Offset on the byte array - float value - - - - Pack a uint64 value into the byte array - - Byte array to insert the data - Offset on the byte array - Value to be inserted - - - - Read a uint64 from the byte array - - Byte array to read the data - Offset on the byte array - uint64 value - - - - Return the total number of bytes needed to encode a string - - Target string - Total number of bytes - - - - Pack string into the byte array - - Byte array to insert the data - Offset on the byte array - Value to be inserted - - - - Read a string from the byte array - - Byte array to read the data - Offset on the byte array - string value or null if not found - - - - Read a EndPoint from the byte array - - Byte array to read the data - Offset on the byte array - EndPoint object - - - - Pack EndPoint into the byte array - - Byte array to insert the data - Offset on the byte array - EndPoint object to insert into the byte array - - - - Pack GUID into the byte array - - Byte array to insert the data - Offset on the byte array - Value to be inserted - - - - Read a GUID from the byte array - - Byte array to read the data - Offset on the byte array - GUID object - - - - UPD EndPoint represents an network endpoint - - - - - Native representation of a UdpEndPoint - Used when it's necessary to exchange data between managed and unmanaged code - - - - - Native representation of the IPV4 - - - - - EndPoint Port - - - - - Convert the internal properties into a Managed version of UdpEndPoint - - - - - UdpEndPoint comparer - - - - - Represents Any IPv4 Address - - - - - Represents Any IPv6 Address - - - - - EndPoint Port - - - - - EndPoint ID - - - - - Flag signaling if this EndPoint represents a IPv6 - - - - - EndPoint IPv4 Address - - - - - EndPoint IPv6 Address - - - - - Flag signaling if this EndPoint is a WAN Address - - - - - Flag signaling if this EndPoint is a LAN Address - - - - - Convert this EndPoint from managed to unmanaged - - - - - Build a new UdpEndPoint using a IPv4 Address and Port - - IPv4 Address - Port - - - - Build a new UdpEndPoint using a IPv6 Address and Port - - IPv6 Address - Port - - - - Build a new UdpEndPoint using a ID - - EndPoint ID - - - - Build a new UdpEndPoint using a ID - - EndPoint ID - - - - Compare UdpEndPoints - - Other EndPoint to compare - Order between EndPoints - - - - Test if the other EndPoint is Equals to this one - - Other EndPoint - True if equals, false otherwise - - - - Generates a HashCode based on the EndPoint data - - HashCode for the EndPoint - - - - Test if the other object is equals to this one - - Other object to compare - True if equals, false otherwise - - - - Convert the EndPoint to a string format - - Formatted string - - - - Try to parse Address:Port information to a UdpEndPoint instance - - EndPoint description, accepts IPv4 and IPv6 values - New instance of UdpEndPoint built using the parameter - - - - Test if EndPoints are Equals - - First EndPoint - Second EndPoint - True if equal, false otherwise - - - - Test if EndPoints are NOT Equals - - First EndPoint - Second EndPoint - True if NOT equal, false otherwise - - - - AND Operator between EndPoints - - First EndPoint - Second EndPoint - Result of AND Operator - - - - Represents a custom UdpException - - - - - Represents a IPv4 Address - - - - - UdpIPv4Address comparer - - - - - Static instance of the Comparer - - - - - Represent a IPv4 Any Address 0.0.0.0 - - - - - Represents the localhost IPv4 127.0.0.1 - - - - - Represents the broadcast IPv4 255.255.255.255 - - - - - Stores that 32bit representation address of this IPv4 - - - - const string ip = "82.39.106.191"; // original IP - var ipBytes = IPAddress.Parse(ip).GetAddressBytes(); // get byte array - var ipLong = BitConverter.ToUInt32(ipBytes, 0); // convert to 32bit representation - - - - - - Stores the 1th 8bit of this address - - - - - Stores the 2th 8bit of this address - - - - - Stores the 3th 8bit of this address - - - - - Stores the 4th 8bit of this address - - - - - Build a UdpIPv4Address based on the 32bit address representation - - IPv4 into a 32bit format - - - - Build a UdpIPv4Address based on the 64bit long address in network order - - Address to be used build the UdpIPv4Address - - - - Build a UdpIPv4Address based on each byte that represents a part of the full IP - - 1th part of the IP - 2th part of the IP - 3th part of the IP - 4th part of the IP - - - - Signal if this IP represents a Any IP - - - - - Signal if this IP represents a Localhost IP - - - - - Signal if this IP represents a Broadcast IP - - - - - Signal if this IP represents a Private IP - - - - - Signal if this IP presents a WAN IP - - - - - Parse a string into a UdpIPv4Address - - String address to be parsed - UdpIPv4Address reference based on the IP - It will throw FormatException if the address in the string is not propertly formatted - - - - Represents a IPv6 Address - - - - - UdpIPv6Address Comparer - - - - - Comparer instance - - - - - Represents the IPv6 Any address - - - - - Stores the IPv6 Mask with 16 bytes - - - - - Represents the IPv6 Localhost address - - - - - Represents the 1th 64bits of the IPv6 Address in long format - - - - - Represents the 2th 64bits of the IPv6 Address in long format - - - - - Signal if this is Any address, with all address positions as 0 - - - - - Signal if this is a Localhost address - - - - - Signal if this is a broadcast address, always false - - - - - Signal if this is a WAN address - - - - - Signal if this is a private IPv6 - - - - - Get the full bytes that makes this IPv6 address - - - - - Build a new UdpIPv6Addressbased on the byte array passed as argument - - Byte array with values to build the IPv6 address - - - - Build a UdpIPv6Address based on the packet values representation - - 1th part of the address - 2th part of the address - - - - Check if two UdpIPv6Address are equal - - Other UdpIPv6Address to check - True if equal, false otherwise - - - - Compare two UdpIPv6Address - - Other UdpIPv6Address to compare - 1 if this IPv6 is greater, -1 otherwise, 0 if equal - - - - Build the hash code of this UdpIPv6Address - - int that represents the Hash code for this address - - - - Check if a object is equals to this UdpIPv6Address - - Object to compare - True if equal, false otherwise - - - - Check if this UdpIPv6Address is equal to another UdpIPv6Address - - UdpIPv6Address to compare - the UdpIPv6Address counterpart to compare - True if equal, false otherwise - - - - Check if this UdpIPv6Address is NOT equal to another UdpIPv6Address - - UdpIPv6Address to compare - the UdpIPv6Address counterpart to compare - True if not equal, false otherwise - - - - Parse a String IP into a UdpIPv6Address - - String formatted IP address to be parsed - UdpIPv6Address built based on the IP string - Will throw ArgumentException if it's not a valid IP address - - - - Apply a AND operator between all bits for both UdpIPv6Address - - UdpIPv6Address 1 to merge - UdpIPv6Address 2 to merge - A new UdpIPv6Address that results of the AND operation between the pair of UdpIPv6Address - - - - IPv6 ToString - - - - - Clone this instance. - - The clone. - - - - Returns a that represents the current . - - A that represents the current . - - - - UDP session source. - - - - - LAN Source - - - - - Photon Service Source - - - - - None of the other source - - - - - Udp Session Error Enum - - - - - OK - - - - - A game with same ID already exists - - - - - The game server is full - - - - - The game server is closed - - - - - The game with the ID was not found - - - - - Generic error - - - - - Base class for a UDPKit session. - This class represents a session that can be used as starting point for a connection when Direct IP - connection is not available. - - - - - Gets the session identifier. - - - - - Gets the session source. - - - - - Gets the WAN end point of this Session. - - - - - Gets the LAN end point of this Session. - - - - - Arbitrary Object that can be set on the session. It's used to save the Session Token. - Same as , but in byte array form. - - - - - Arbitrary Object that can be set on the session. It's used to save the Session Token. - - - - - Gets the max connections allowed on this session. - - - - - Gets the current total of connections. - - The connections current. - - - - Gets the host name that is publishing this session. - - - - - Gets a value indicating whether this is dedicated server. - - true if is dedicated server; otherwise, false. - - - - Gets a value indicating whether this has WAN Address. - - true if has wan; otherwise, false. - - - - Gets a value indicating whether this has lan. - - true if has lan; otherwise, false. - - - - Clone this instance. - - The clone. - - - - UDPKit session Implementation. - This class represents a session that can be used as starting point for a connection when Direct IP - connection is not available. - - - - - Build a new UdpSession based on the Host ID string - - Host ID, just an string that identify the source of the session - UdpSession reference - - - - Gets the session identifier. - - - - - Gets the session source. - - - - - Gets the WAN end point of this Session. - - - - - Gets the LAN end point of this Session. - - - - - Gets the max connections allowed on this session. - - - - - Gets the current total of connections. - - The connections current. - - - - Gets the host name that is publishing this session. - - - - - Gets a value indicating whether this is dedicated server. - - true if is dedicated server; otherwise, false. - - - - Gets a value indicating whether this has WAN Address. - - true if has wan; otherwise, false. - - - - Gets a value indicating whether this has lan. - - true if has lan; otherwise, false. - - - - Arbitrary Object that can be set on the session. It's used to save the Session Token. - Same as , but in byte array form. - - - - - Arbitrary Object that can be set on the session. It's used to save the Session Token. - - - - - Clone this instance using - - The clone. - - - - UDP steam identifier. - - - - - The Steam identifier. - - - - - Initializes a new instance of the struct. - - Identifier. - - - - Represents a Singleton instance, just for Utility - - - - - - Instance lock - - - - - Public instance reference - - - - - Determines how the Sessions are filled with new players - when the peer joins the session in a random fashion - - - - - Fills up rooms (oldest first) to get players together as fast as possible. Default. - - - - - Distributes players across available rooms sequentially but takes filter into account. Without filter, rooms get players evenly distributed. - - - - - Joins a (fully) random room. Expected properties must match but aside from this, any available room might be selected. - - - - - Used to filter only specific sessions that agree with the desired parameters when joining a session in a random fashion. - - - - - Configure the fill mode used to join a session. - Default is . - - - - - UdpSession filter constructor - - - - - Adds a filter parameter. - - true, if the parameter was added, false otherwise. - Parameter Key. - Parameter Value. - - - - Removes a filter parameter. - - true, if the parameter was removed, false otherwise. - Parameter Key. - - - - Index operator to read and write values. - - Parameter Key - Parameter Value, if exists - - - - Get a Enumerator reference based on the internal Filter dictionary - - Dictionary.Enumerator reference - - - - String representation of the SessionFilter - - String representation - - - - Test if the object passed as argument is a valid Type to be used as filter parameter - - Value to be tested - true if is a valid Type, false otherwise - - - - Set of IPAddress extension methods - - - - - Extract the Broadcast address from an IP based on the sub-net mask - - Base Address - Subnet Mark - Broadcast address of the network - - - - Get the base IP address based on the Subnet mask - - IP address to verify - Subnet mask - Base IP - - - - Check if two IP seems to be on the same subnet based on the sub-net mask - - Base address to check - Target address to check - Subnet mask used for the check - True if both IPs seems to be on the same subnet - - - - Check if two IP seems to be on the same subnet based on all major classes of Submask - - Base address to check - Target address to check - True if both IPs seems to be on the same subnet in at least one case - - - - Check if a IPAdress describes a private IP - - IPAdress to check - True if it is private, false otherwise - - - - Converts a IPAddress into the long representation of the internal IP - - IPAddress to be converted - long representation of the IPAddress - - - - Convert a Long value into a IPAddress - - Value to convert - IPAddres Result - - - - Class to store and represents IP Submasks - - - - - Represents a Class A subnet - - - - - Represents a Class B subnet - - - - - Represents a Class C subnet - - - - - Create a Submask based on the number of bits for the HOST - - Number of bit of the host part - IPAddress that represents the network mask - - - - Create a Subnet mask based on the number of bits for the MASK - - Number of bit of the sub net mask - IPAddress that represents the network mask - - - - Create a subnet mask based on the number of hosts that need to be available - - Number of host in the subnet - IPAddress that represents the network mask - - - - UdpEndPoint conversion methods - - Using those methods you can convert UdpEndPoint between and classes - - - - - Convert to - - EndPoint to be converted - UdpEndPoint - - - - Convert to - - IPEndPoint to be converted - UdpEndPoint - - - - Convert to - - UdpEndPoint to be converted - IPEndPoint - - - - Convert to - - IPAddress to be converted - UdpIPv4Address - - - diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.xml.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.xml.meta deleted file mode 100644 index ca72306..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.common.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 977268033c4bb4371b7729b87f50e59e -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.dll b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.dll deleted file mode 100644 index ed1558a..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.dll.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.dll.meta deleted file mode 100644 index ec3d4b2..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.dll.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: 6549728e80c23504ea8ddde050838a0e -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - platformData: - Any: - enabled: 1 - settings: {} - Editor: - enabled: 0 - settings: - CPU: AnyCPU - DefaultValueInitialized: true - OS: AnyOS - Linux: - enabled: 1 - settings: - CPU: x86 - Linux64: - enabled: 1 - settings: - CPU: x86_64 - LinuxUniversal: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel: - enabled: 1 - settings: - CPU: AnyCPU - OSXIntel64: - enabled: 1 - settings: - CPU: AnyCPU - OSXUniversal: - enabled: 1 - settings: - CPU: AnyCPU - Win: - enabled: 1 - settings: - CPU: AnyCPU - Win64: - enabled: 1 - settings: - CPU: AnyCPU - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.dll b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.dll deleted file mode 100644 index 2418b60..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.dll.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.dll.meta deleted file mode 100644 index b92abac..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.dll.meta +++ /dev/null @@ -1,25 +0,0 @@ -fileFormatVersion: 2 -guid: f39795e1ea9c99042af770090ccf0402 -timeCreated: 1490779183 -licenseType: Store -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - Any: - enabled: 1 - settings: {} - Editor: - enabled: 0 - settings: - DefaultValueInitialized: true - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.xml b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.xml deleted file mode 100644 index b765629..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - udpkit.platform.dotnet - - - - - DotNetPlatform responsible for connecting peers directly based on the public IP - - - - - DotNetPlatform constructor - - - - diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.xml.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.xml.meta deleted file mode 100644 index abdbac0..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.dotnet.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: cdeeb9e5429884839b1294297a769b67 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.null.dll b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.null.dll deleted file mode 100644 index cfe1c45..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.null.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.null.dll.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.null.dll.meta deleted file mode 100644 index fdead6b..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.null.dll.meta +++ /dev/null @@ -1,25 +0,0 @@ -fileFormatVersion: 2 -guid: 972ba5ba902387a4ab0dd9efb145360e -timeCreated: 1490779182 -licenseType: Store -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - Any: - enabled: 1 - settings: {} - Editor: - enabled: 0 - settings: - DefaultValueInitialized: true - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.dll b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.dll deleted file mode 100644 index 762a5b2..0000000 Binary files a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.dll and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.dll.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.dll.meta deleted file mode 100644 index d5c0e06..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.dll.meta +++ /dev/null @@ -1,25 +0,0 @@ -fileFormatVersion: 2 -guid: 5434a88f259186745b9c173853dd4225 -timeCreated: 1490779181 -licenseType: Store -PluginImporter: - serializedVersion: 1 - iconMap: {} - executionOrder: {} - isPreloaded: 0 - isOverridable: 0 - platformData: - Any: - enabled: 1 - settings: {} - Editor: - enabled: 0 - settings: - DefaultValueInitialized: true - WindowsStoreApps: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.xml b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.xml deleted file mode 100644 index a843566..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.xml +++ /dev/null @@ -1,369 +0,0 @@ - - - - udpkit.platform.photon - - - - - Platform used to connect with the Photon Cloud - - - - - Reference to a Configuration struct used to setup the PhotonPlatform - - - - - Constructor for PhotonPlatform based on a PhotonPlatformConfig - - PhotonPlatformConfig reference used to configure the instance - - - - This class will act as a controller and bridge to the underlayng layer of Photon Realtime, - receiving/sending/treating messages using the Photon services. - - - - - Creates the Photon Poller instance. This will populate the internal instance with one of: - (i) If there is no instances of PhotonPoller in the scene, it will create a new one. - (ii) If there is only 1 instance of PhotonPoller in the scene, it will use this as the main instance. - (iii) If there is more then 1 instance in the scene, it will destroy copies but one, and use it as the main instance. - - - - void CreatePollerExample() - { - PhotonPoller.CreatePoller(new PhotonPlatformConfig().InitDefaults(), true); - } - - - Reference to Photon Platform - Configuration used to setup the PhotonPoller instance. - If set to true will destroy the current main instance, in order to create a new one. - - - - Starts the LoadBalancingClient. - - End point. - Callback that will be invoked at the end of the operation - - - - Register a Type that fully implements PhotonPoller to be used as the main instance. - - An External Type that extends PhotonPoller. - - - - Creates a new PhotonPoller instance based on the External Type. - - Photon poller variable to be populated. - - - - Pushes out all queued messages on the list and send through Photon services - using as Event code. - - - - - Setup host info based on a - - true, if host info was set, false otherwise. - Session information. - Callback result that will be invoked at the end of the operation - - - - This is a wrapper around the Photon Rooms used to expose the same API as the UdpSession - - - - - Builds a Photon Session with only it's identifier name. This can be useful if you want to connect - to a specific session using the name of the room. - - An session with only it's name. - Room name. - - - - Dictionary like structure that stores all properties of the room - - - - - Signal if this session is open or not - - - - - Signal if this session is visible or not - - - - - Signal if this session is hosted by a dedicated server - - - - - Signal the source of this Session, in this case always - - - - - Signal if this game session is published by a Server with NAT Punch enabled - - - - - The current connection status - - - - - Represents a Photon Region on the Cloud Service - - - - - List of available regions - - - - - Map of the Regions Enum and the PhotonRegion struct, that holds meta data from the Regions - - - - - Region CODE - - - - - Region Full Name - - - - - City where the data center os located - - - - - Region ENUM value - - - - - Get a Region info based on the region code as string - - Region Code - PhotonRegion reference if exists - It will throw an Exception if no Region was found with the Code - - - - Get a Region metadata based on the Region enum - - Region enum to look for - PhotonRegion reference - - - - Build a string representation of the Region - - String describing the Region - - - - This class will act as the Corroutine manager from Unity and will run and control corroutines. - - - - - Gets the current Master client of the current Room. - - The master client ID if the client in inside a Room, -1 otherwise. - - - - Retry Join lobby ? - true = yes - false = no - null = wait to leave the room - - - - - A thread which runs independent from the Update() calls. - Keeps connections online while loading or in background. - - - - - - Internal class to encapsulate the network i/o functionality for the realtime libary. - - - - - Build a new custom Socket UDP - - Base Peer used for communication - - - - Dispose the UDP Socket - - - - - Dispose implementation - - - - - Start the connection with the Cloud service - - - - - - Disconnect from the Cloud service - - True if all went fine when disconnecting - - - used by PhotonPeer* - - - - Receive data - - - - Endless loop, run in Receive Thread. - - - - Photon Platform configuration class. - It holds the main configuration settings to setup the PhotonPlatform - - - - - Photon Application ID - - - - - Custom Authentication Credentials - - - - - Region to Connect to. See - - - - - Set to true, to enable the Punch Through behavior. - - - - - Selects the Connection Protocol used by the internal LoadBalancingClient when exchanging data with Photon Cloud - - - - - Selects the Serializaion Protocol used by the internal LoadBalancingClient when exchanging data with Photon Cloud - - - - - This suppresses the STUN process and forces the usage of the configured IPEndPoint as the external endpoint - used to punch to this peer. This is mainly focused when you are running a GameServer on a dedicated cloud service - - - - - Gets or sets the room creation timeout in seconds. - Min 10 sec, max 60 sec. - - The room creation timeout. - - - - Gets or sets the room join timeout in seconds. - Min 10 sec, max 60 sec. - - The room join timeout. - - - - Gets the max number of connections acceptable in the room. - - - - - Set a custom STUN Server to be used on the punch process. - Must be described as "DNS-resolvable-name:port", for example: "stun.l.google.com:19302" - - - - - Amount of time the background connection with the Photon Servers will be maintained until - timeout and stop sending acknowledge messages. - - - - - Current Running platform - - - - - Total Connection Request Attempts - - - - - Total Connection LAN Request Attempts - - - - - PhotonPlatformConfig constructor. - It will also initilize the configuration using the default settings - - - - - Initialize the Photon Configuration with the values from Bolt Settings - - The defaults. - - - - Save a Region as the Best Region on the Bolt Settings - - Region to save. - - - - Valids an String as containing a AppID - - true, if app identifier was valid, false otherwise. - Value. - - - diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.xml.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.xml.meta deleted file mode 100644 index e123fd9..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.platform.photon.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 466b35d91223b459f8cc968917525534 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.xml b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.xml deleted file mode 100644 index 90b8ac2..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.xml +++ /dev/null @@ -1,1756 +0,0 @@ - - - - udpkit - - - - - Represents a simple Object Pool manager - - - - - - Internal Object Pool - - - - - Check if the Pool has any Pooled Object - - True if there is any object to be reused on the pool - - - - Object Pool Constructor - - - - - Returns an instance to the Object Pool - - Object to the returned to Pool - - - - Returns a valid reference from the Pool. - If there is a old object on the Pool, returns it, if not, create a new one. - - Reference from the Object Pool - - - - Responsible to create and validate Hashs - - - - - Size of SHA256 Key in bytes - - - - - Hasher reference - - - - - Temporary array used to check the hash - - - - - Hash Secret - - - - - Return the hasher reference or create one if not created yet - - - - - Create a new Hash Packet Validator based on a Secret string - - Base64 encoded secret - - - - Create and append a Hash based on the data passed as argument - - Data array to create the hash - Length of the data array - Length of data array after append hash - - - - Validate the included hash on the data array passed as argument - - Data array to verify hash - Length of the data array - True if the data was not tempered and the hash match, false otherwise - - - - Get the length of the data without the hash data - - Data array to check - Length of the data array - Length of data array without the hash part - - - - Check if the buffer contains the same verified hash - - Data array to test the hash - Verified hash used to check - True if the buffer contains the same hash and is valid, false otherwise - - - - Generates a 32 bytes random key that can be used as Hash secret - - Byte Array with 32 random bytes - - - - Responsible for keep track of unique IDs for each UdpEndPoint connection - - - - - Registry of UdpEndPoint and ID of received data - - - - - Registry of UdpEndPoint and ID of sent data - - - - - Byte Converter reference - - - - - Size in Bytes of the Unique ID - - - - - Construct a new PacketIdValidator - - - - - Prefix an unique ID based on the into a data array - - UdpEndPoint used to keep the unique ID - Data array to include the ID - Length of the data array - Length of data array after include the unique ID - - - - Validate an packet based on the included unique ID and - - UdpEndPoint used to check the unique ID - Data array to check ID - Length of data array with ID - Length of data array without the unique ID - - - - Prefix the passed ID into the buffer - - ID to be prefixed - Buffer array to prefix the array - Length of the buffer data array - - - - Clear all registered IDs - - - - - Remove the registry from one specific UdpEndPoint - - EndPoint to remove the info - - - - Responsible for encrypting and decrypting data buffers - - TODO Implement the usage of a new IV and Salt for each encrypted package - - - - Internal decryptor created based on the Key and IV received as argument - - - - - Internal encryptor created based on the Key and IV received as argument - - - - - Internal AES Implementation reference - - - - - Internal encryptor reference - - - - - Internal decryptor reference - - - - - AES Key - - - - - AES Initialization Vector (IV) - - - - - Builds the SocketDataEncryption instance - - Initialization Vector - AES Key - - - - Encrypt data in place and return it's length. Doing this to avoid allocating unnecessary data. - - The data to encrypt - Length of the data to encrypt - Length after encryption - - - - Encrypt data and return a new byte array. - - The data to encrypt - Length of the data to encrypt - Byte array with data encrypted - - - - Decrypt the data and copy it in the data array passed. - - Data to decrypt - Length of the data to decrypt - Length of the data decrypted - - - - Decrypt the data and return a new buffer array. - - Data to decrypt - Length of the data to decrypt - Byte array with data decrypted - - - - Transform the data array based on the received - as argument. The resulting data is set on the same received buffer. - - Data array to be processed - Data array length - Crypto transform reference - Buffer used as temporary memory for to process - Length of data array after the transformation - - - - Transform the data array based on the received - as argument. The resulting data is returned as a new buffer. - - Data array to be processed - Data array length - Crypto transform reference - New buffer with the result of the transformation - - - - Build a new AES Implementation - - Concrete implementation of an AES Algorithm - - - - Generate a Random KEY to be used with an AES Algorithm - - Byte array with a Random Key - - - - Generate a Random IV to be used with an AES Algorithm - - Byte array with a Random IV - - - - Interface for classes that manage the encryption/decryption of byte arrays - - - - - Decrypt the data and copy it in the data array passed. - - Data to decrypt - Length of the data to decrypt - Length of the data decrypted - - - - Decrypt the data and return a new buffer array. - - Data to decrypt - Length of the data to decrypt - Byte array with data decrypted - - - - Encrypt data in place and return it's length. Doing this to avoid allocating unnecessary data. - - The data to encrypt - Length of the data to encrypt - Length after encryption - - - - Encrypt data and return a new byte array. - - The data to encrypt - Length of the data to encrypt - Byte array with data encrypted - - - - Interface for classes that manage the hashing of byte arrays - - - - - Create and append a Hash based on the data passed as argument - - Data array to create the hash - Length of the data array - Length of data array after append hash - - - - Validate the included hash on the data array passed as argument - - Data array to verify hash - Length of the data array - True if the data was not tempered and the hash match, false otherwise - - - - Get the length of the data without the hash data - - Data array to check - Length of the data array - Length of data array without the hash part - - - - Interface for classes to validate a package via an unique ID - - - - - Prefix an unique ID based on the into a data array - - UdpEndPoint used to keep the unique ID - Data array to include the ID - Length of the data array - Length of data array after include the unique ID - - - - Validate an packet based on the included unique ID and - - UdpEndPoint used to check the unique ID - Data array to check ID - Length of data array with ID - Length of data array without the unique ID - - - - Removes any reference of a particular UdpEndPoint - This can be useful when the remote endpoint disconnects - - UdpEndPoint to remove the internal references - - - - Responsible for managing all Encryption steps used on UdpKit - - - - - Signals that the Encryption system was properly setup - - - - - AES IV - - - - - AES Key - - - - - Hash Secret - - - - - Buffer encryption reference - - - - - Hasher reference - - - - - ID Validator reference - - - - - Initialize the Encryption system generating all necessary keys - - You can later access the keys, in order to exchange with a remote connection, by looking at the right members: - , and - - - - - Initialize the Encryption system with all necessary keys - - AES Initilization Vector - AES Key - Hash Key - - - - Reset all encryption variables - - - - - Encrypt a packet for a specific EndPoint - - Target EndPoint for this packet - Data buffer array - Length of the buffer array - Total length of byte array after encryption - - - - Decrypt a packet from an specific EndPoint - - Remote EndPoint - Data buffer array - Length of the buffer array - Total length of byte array after decryption - - - - Clears any references for a particular UdpEndPoint - - Target UdpEndPoint to - - - - Convert Plain String into a Base64 encoded string - - Plain Text to encode - Custom Encoding - Base64 encoded string - - - - Convert a Base64 encoded string into a Plain String - - Base64 string to decode - Custom Encoding - Plain String - - - - Generates a new Random AES Key - - Random AES Key - - - - Generates a new Random AES Initialization Vector - - Random AES Initialization Vector - - - - Generates a new Random Hash Secret key - - Random Hash Secret key - - - - LAN endpoint of this socket - - - - - WAN endpoint of this socket - - - - - The current state of the socket - - - - - The current mode of the socket - - - - - PeerId of this socket - - - - - The precision time (in ms) of the underlying socket platform - - - - - Current packet pool for this socket - - - - - A user-assignable object - - - - - Start this socket - - The endpoint to bind to - - - - - - Close this socket - - - - - Invoked when the application is about the Quit - - - - - Connect to remote endpoint - - The endpoint to connect to - - - - - Cancel ongoing attempt to connect to endpoint - - The endpoint to cancel connect attempt to - Signal if the cancel should be - - - - Accept a connection - - Accept the connection signaled by this UdpEndPoint - Arbitrary object that can store data on the Connection - Accept Token - - - - Refuse a connection request from a remote endpoint - - Refuse the connection signaled by this UdpEndPoint - Refuse Token - - - - A list of all currently available sessions - - - - - Poll socket for any events - - The current event on this socket - True if a new event is available, False otherwise - - - - This method runs asynchonously in order to update the network state. - It process any pending data on the internal socket and build the event streams - - - - - Represents the block of data received from a StreamChannel - - - - - Data received - - - - - Channel from where the peer received the data - - - - - Creates a new UdpChannelStreammer - - Connection to where this streammer will send data - Stream Channel used to send data to the connection - - - - Enqueue a new block of data to be sent on the Reliable Stream Pipe - - Byte array to be sent - - - - Remove incomming and outgoing streams - - - - - Mark a block of data as lost on the Stream Operation - - Stream Operation to perform the change - Block ID to mark as lost - - - - Mark a block of data as delivered on the Stream Operation - - Stream Operation to perform the change - Block ID to mark as delivered - - - - Try to send data from any pending Stream Channel - - True if it was able to send ONE block of data, false otherwise - - - - Treats a data buffer array with content for a Stream Operation - - Data buffer - Number of bytes received - Offset from where to start the data - - - - Initialize the Stream Operation with the CRC value - - Stream Operation to be initialized - CRC value - - - - Sends a block of data from the Stream Operation to the target Connection - - Stream Operation to get the block of data - Block identification to be sent - True if the block was sent, false otherwise - - - - Treats an incomming buffer in order to be aggregated into the local Stream Operation - - Stream Operation to where the data should be inserted - Data received - Number of bytes received - Current offset from where to start to read the data - - - - Signal that a new Stream has started - - Stream Operation used to extract data - - - - Signal that a Stream has been received - - Stream Operation used to extract data - - - - Signal that a Stream has been aborted - - Stream Operation used to extract data - - - - Signal that a Stream had some progress - - Stream Operation used to extract data - - - - A user-assignable object - - - - - The round-trip time of the network layer, excluding processing delays and ack time - - - - - The total round-trip time, including processing delays and ack - - - - - If this connection is a client - - - - - IF this connections a server - - - - - If we are connected - - - - - The remote end point - - - - - How much of the current outgoing packet window is waiting for acks - - - - - Send an object on this connection - - The object to send - - - - Disconnect this connection forcefully with the specified token and disconnectReason. - - Arbitrary Token sent within the disconnect event. - Disconnect reason. By default it just points to - - - - Event to change the Stream Bandwidth - - Byte rate to send data - - - - Enqueue a new block of data to be sent on the desired streaming channel - - Channel identifier to where send the data - Data array to send - - - - Changes the Stream Bandwidth - - Calculates the interval in which data will be sent: - - The interval is calculated into interval of milliseconds - 1000ms = 1s - byteRate is the desired bandwidth, 20kbp/s (1024 * 20) for example - The max package size from the configs, 4096 for example - - ex: 20 kb/s - 1000 / ((1024 * 20) / 4096) = 200ms - send data every 200ms - - Byte rate to send data. The rate in bytes / sec - - - - Clear all existent streams - - - - - Progress any pending outgoing data stream based on the the Data Rate previously configured - - Current timestamp - - - - Enqueue a new Stream Operation for transmission. - How the data will be sent depends on which channel it is been sent. - If it's on an Unreliable channel, this will be a one-try send, if it's on a Reliable stream, the operation will - be queued on a Channel Streamer to be sent properly. - - Channel identifier to where send the data - Stream Operation that contains the data to be sent - - - - Treats a new block of data that was received on the Unreliable Stream Pipe - - Data buffer received - Total number of bytes received - - - - Treats a new block of data that was received on the Reliable Stream Pipe - The byte array will be processed to find the responsible channel to receive and store the data - - Data buffer received on the stream pipe - Total number of bytes received - - - - Signal to a Stream Channel that a block was lost - - Data block that was lost - - - - Signal to a Stream Channel that a block was delivered - - Data block delivered - - - - Try to send any pending outgoing stream of data - The streams are sorted by priority before being sent - - - - - Describes Stream channel - - - - - Channel Name - - - - - Stream channel configuration - - - - - Signal if this Channel is Unreliable - - - - - Singal if this Channel is Reliable - - - - - Enable IPv6 Support, default: false - - - - - The default network ping for new connections, default: 0.1f (seconds) - - - - - The default aliased ping for new connections, default: 0.15f (seconds) - - - - - If we allow serialization to overflow MTU of the connection, default: false - - - - - The timeout until we should make a new connect request, default: 1000 (milliseconds) - - - - - How many attempts we should make to connect before failing, default: 5 - - - - - How many attempts we should make to connect before failing, default: 5 - - - - - How long before we time-out a connection we have not heard anything from, default: 5000 (ms) - - - - - How long we should wait to send a ping packet to the remote end if we - have not sent anything recently, default: 100 (ms) - - - - - How many packets we can receive before we force an ack packet to be sent, default: 8 - - - - - How many connections we allow, default: 64 - - - - - If we allow incomming connections, default: true - - - - - IF we automatically accept incomming connections if we have slots free, default: true - - - - - If we allow clients which are connecting to a server to implicitly accept the connection - if we get a non-rejected and non-accepted packet from the server, meaning the accept packet - was lost, default: true - - - - - How many % of the packets we should drop to simulate packet loss, default: 0. Only used in DEBUG builds. - - - - - Min ping we should simulate, default: 0 (ms). Only used in DEBUG builds. - - - - - Max ping we should simulate, default: 0 (ms). Only used in DEBUG builds. - - - - - Custom noise function for use in packet loss simulation, default: null - - - - - Reason why a connection got disconnected - - - - - Unknown reason (should never happen) - - - - - Remote end timed out (connection was lost) - - - - - Internal socket error (corrupted sequence numbers, send window overflowed, etc.) - - - - - Normal disconnect triggered by user code - - - - - The peer failed to authenticate on any step - - - - - The max connection limit with the cloud service was reached - - - - - Timeout with the Photon Cloud connection or any Cloud operation - - - - - Unkown connection type, represents an invalid connection (should never happen) - - - - - Represents a connection that has direct connectivity with the other end - - - - - Represents a connection that makes use of a relay to maintain the connectivity with the other end - - - - - TheadManager class acts as a Thread Pool implementation. - It manages an internal list of Workers responsible for running of the main thread any Action passed to them - The threads are created at request and only when necessary. - - - - - Collection of available Workers of the ThreadManager. - All Tasks are created at runtime and reused if possible - - - - - ThreadManager constructor. - - Initializes the private list of Workers (Threads) - - - - - Invoke the Abort method on all registered Tasks and clear them from the internal list. - - - - - Return a summary of the current state of the internal Tasks, how many were created and the total number of running tasks. - - - - - - Runs the Action on an available Task. - - The action that should run on a separate Thread - - - - Searches in the internal Task list for an available worker that was initialized but it is not running any action - at the moment. If the list is empty or all Tasks are busy, a new Task is created and added to the list of workers. - - An initialized and free Task that can be used to run an Action - - - - Task is a wrapper class around a Thread and acts as a Worker manager. - It's possible to initialize the Task and give works (Action) using the run method to be executed - by the internal Thread. - This wrapper will keep the Thread running until aborted (gracefully using Abort, or abruptly using ForceAbort) - - - - - Returns if there is an action being executed by the Task - - - - - Unique identifier of this Task - - - - - Private managed Thread - - - - - Private semaphore to coordinate the execution of the internal Thread - - - - - Action being executed by the Thread - - - - - Thread locker used to sync the access to the internal Action - - - - - Flag to signal to the Thread if it should continue to work or should Abort gracefully. - - - - - Task constructor. - - Initializes all main fields, including the managed Thread as a background thread. - This implies that the Task will not block the main thread of exiting the application. - - - - - Updates the action the must be executed by the Thread. - - Action to be executed - - - - Aborts gracefully the internal Thread. - This signals the thread that it should stop working, but the shutdown is not immediate. - - - - - Force Abort the internal Thread. - This causes the Thread to be aborted using - - - - - Private action manager. - This is the main body of the internal Thread, and it waits until an action need to be executed. - - - - - Signal if this package is writable - - - - - A user-assignable object - - - - - Total length in bits of the internal buffer - - - - - Current position within the internal buffer - - - - - Signal if this Packet is full. If its current is equals - to its total - - - - - Signal if the packet is overflowing. If its current is greater than - its total - - - - - Buffer that will contain all Packet data - - - - - Signal if this Packet is Pooled or not - - - - - Buffer that will contain all Packet data - - - - - UdpPacket Pool reference, used when disposing of it's usage, returning it to the pool - - - - - Current position within the internal buffer - - - - - Total length in bits of the internal buffer - - - - - Check if the Packet has 1 bit available for write - - True if you can write 1 bit, false otherwise - - - - Check if the Packet has 1 bit available for read - - True if you can read 1 bit, false otherwise - - - - Check if the Packet has N bit available for write - - Number of bits available to write - True if you can write N bit, false otherwise - - - - Check if the Packet has N bit available for read - - Number of bits available to read - True if you can read N bit, false otherwise - - - - Get a copy of the internal buffer - - Copy of data buffer - - - - Write a bool to the buffer - - Bool to be written - The bool value written - - - - Read a bool from the buffer - - Bool value from the buffer - - - - Write a byte into the buffer - - Byte value to write - Number of bits to use when writing - - - - Read a byte from the buffer - - Number of bits to use when reading - Byte value - - - - Write a byte into the buffer - - Byte to be written - - - - Read a byte from the buffer - - Byte read - - - - Write a ushort into the buffer - - UShort to be written - Number of bits to use when writing - - - - Read a ushort from the buffer - - Number of bits to use when reading - UShort value - - - - Write a ushort into the buffer - - UShort to be written - - - - Read a ushort from the buffer - - UShort value - - - - Write a short into the buffer - - Short value to be written - Number of bits to use when writing - - - - Read a short from the buffer - - Number of bits to use when reading - Short value - - - - Write a short into the buffer - - Short value to be written - - - - Read a short from the buffer - - Short value - - - - Serialize a uint into the buffer if the Packet is in Write mode, or read from the buffer otherwise - - UInt value to be written or read - Number of bits to use when writing or reading - - - - Serialize a int into the buffer if the Packet is in Write mode, or read from the buffer otherwise - - Int value to be written or read - Number of bits to use when writing or reading - - - - Write a uint into the buffer - - UInt value to be written - Number of bits to use when writing - - - - Read a uint from the buffer - - Number of bits to use when reading - UInt value - - - - Write a uint into the buffer - - UInt value to be written - - - - Read a uint from the buffer - - UInt value - - - - Write an int value - - Value to be written - Number of bits to write - Number of bits to shift - - - - Read an int value - - Number of bits to read - Number of bits to shift - Int value - - - - Write a int into the buffer - - Int value to be written - Number of bits to use when writing - - - - Read a int from the buffer - - Number of bits to use when reading - Int value - - - - Write a int into the buffer - - UInt value to be written - - - - Read a int from the buffer - - Int value - - - - Write a ulong into the buffer - - ULong value to be written - Number of bits to use when writing - - - - Read a ulong from the buffer - - Number of bits to use when reading - ULong value - - - - Write a ulong into the buffer - - ULong value to be written - - - - Read a ulong from the buffer - - ULong value - - - - Write a long into the buffer - - Long value to be written - Number of bits to use when writing - - - - Read a long from the buffer - - Number of bits to use when reading - Long value - - - - Write a long into the buffer - - Long value to be written - - - - Read a long from the buffer - - Long value - - - - Write a float into the buffer - - Float value to be written - - - - Read a float from the buffer - - Float value - - - - Write a double into the buffer - - Double value to be written - - - - Read a double from the buffer - - Double value - - - - Write a byte array into the buffer - - Byte array to be written - - - - Write a byte array into the buffer - - Byte array to be written - Number of elements to be written - - - - Write a byte array into the buffer - - Byte array to be written - Offset from the beginning of the array - Number of elements to be written - - - - Read byte array from the buffer - - Number of elements to read - Byte array extracted from the buffer - - - - Populate byte array with data from the internal buffer - - Byte array to be filled with data - - - - Populate byte array with data from the internal buffer - - Byte array to be filled with data - Number of element to be read - - - - Populate byte array with data from the internal buffer - - Byte array to be filled with data - Offset from the beginning of the array - Number of element to be read - - - - Write a byte array into the buffer with a prefix to delimit its size - - Byte array to be written - - - - Write a byte array into the buffer with a prefix to delimit its size - - Byte array to be written - Max length of the array - - - - Read a byte array with prefix - - Byte array extracted from the buffer - - - - Write a string into the buffer - - String value to be written - String encoding - - - - Write a string into the buffer - - String value to be written - String encoding - Max length of the string to be written - - - - Write a string into the buffer using UTF8 as Encoding - - String value to be written - - - - Read string from the buffer - - String encoding - String value - - - - Read string from the buffer - - String value - - - - Write a GUID into the buffer - - GUID to be written - - - - Read a GUID from the buffer - - GUID value - - - - Serialize an UdpEndPoint into the buffer - - EndPoint to be written - - - - Read an UdpEndPoint from the buffer - - UdpEndPoint value - - - - Write value into the buffer using the position and number of bits to be written - - Buffer where the value will be written - Position where to write the byte value - Number of bits used to write the byte - Byte value to be written - - - - Dispose this UdpPacket and return it to the Pool - - - - - String version of UdpPacket - - String value - - - - Write a byte value into internal buffer - - Byte value to be written - Number of bits used to write the byte - - - - Read a byte value from the internal buffer - - Number of bits used to read the byte - Byte value - - - - Number of Bytes to define the Message type - - - - - Number of Bytes to define the Ping value on the Messages - - - - - ID of the UdpPipe - - - - - Signal if the Pipe should update the calculated Ping of the connection - - - - - Timeout of the Pipe - - - - - Size of the buffer for sending and receiving data on the Pipe - - - - - Max size of the packet sent by the Pipe - - - - - Number of bytes used to acknowledge packet - - - - - Number of bytes used to store the sequence number - - - - - Number of bits to store the sequence number - - - - - Number of bits to store the acknowledge number - - - - - Total number of bytes of the Packet header - - - - - Total number of bits of the Packet header - - - - - Calculates the next sequence number based on the previous one - - Base sequence number - Next valid sequence number - - - - Calculates the distance between two sequence numbers - - Starting sequence number - Ending sequence number - Distance between sequence numbers - - - - Implements a 32-bit CRC hash algorithm compatible with Zip etc. - - - Crc32 should only be used for backward compatibility with older file formats - and algorithms. It is not secure enough for new applications. - If you need to call multiple times for the same data either use the HashAlgorithm - interface or remember that the result of one Compute call needs to be ~ (XOR) before - being passed in as the seed for the next Compute call. - - - - diff --git a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.xml.meta b/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.xml.meta deleted file mode 100644 index 8b9a7b7..0000000 --- a/Assets/Photon/PhotonBolt/assemblies/udpkit/udpkit.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 734bc4dbb6fac4f6a812df0a21d514e3 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/bolt_sdk.txt b/Assets/Photon/PhotonBolt/bolt_sdk.txt deleted file mode 100644 index dc35ba2..0000000 --- a/Assets/Photon/PhotonBolt/bolt_sdk.txt +++ /dev/null @@ -1 +0,0 @@ -<-- PLEASE, DO NOT TOUCH THIS FILE --> \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/bolt_sdk.txt.meta b/Assets/Photon/PhotonBolt/bolt_sdk.txt.meta deleted file mode 100644 index c68dd7b..0000000 --- a/Assets/Photon/PhotonBolt/bolt_sdk.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7771833c49f1a4f7baca6c34e3094319 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor.meta b/Assets/Photon/PhotonBolt/editor.meta deleted file mode 100644 index 892bd32..0000000 --- a/Assets/Photon/PhotonBolt/editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4cea002a4fa9f462fadbe7ae28eed207 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources.meta b/Assets/Photon/PhotonBolt/editor/resources.meta deleted file mode 100644 index 3e4d231..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 54c89a32f2b7e446d8304af59f5f5f4c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/BoltLogo.png b/Assets/Photon/PhotonBolt/editor/resources/BoltLogo.png deleted file mode 100644 index c3886a8..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/BoltLogo.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/BoltLogo.png.meta b/Assets/Photon/PhotonBolt/editor/resources/BoltLogo.png.meta deleted file mode 100644 index 3687381..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/BoltLogo.png.meta +++ /dev/null @@ -1,68 +0,0 @@ -fileFormatVersion: 2 -guid: fc90a1049da15834c9169448f4dd72cf -timeCreated: 1490777303 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 1 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 5 - maxTextureSize: 256 - 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: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 256 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/PhotonCloudIcon.png b/Assets/Photon/PhotonBolt/editor/resources/PhotonCloudIcon.png deleted file mode 100644 index fdb13c4..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/PhotonCloudIcon.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/PhotonCloudIcon.png.meta b/Assets/Photon/PhotonBolt/editor/resources/PhotonCloudIcon.png.meta deleted file mode 100644 index da045a9..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/PhotonCloudIcon.png.meta +++ /dev/null @@ -1,108 +0,0 @@ -fileFormatVersion: 2 -guid: 5310803b00d0e47b1b3f505199b620f2 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 6 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: 1 - wrapV: 1 - wrapW: 1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 256 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone - maxTextureSize: 256 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Android - maxTextureSize: 256 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds.meta b/Assets/Photon/PhotonBolt/editor/resources/backgrounds.meta deleted file mode 100644 index 247e382..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/backgrounds.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 7aa7ef31ade252245a27f742ef8b720a -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/ATTRIBUTION.txt b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/ATTRIBUTION.txt deleted file mode 100644 index 7dde20c..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/ATTRIBUTION.txt +++ /dev/null @@ -1 +0,0 @@ -Background images are based on http://ui-cloud.com/3d-layered-button/ made by Rodrigo Parra \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/ATTRIBUTION.txt.meta b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/ATTRIBUTION.txt.meta deleted file mode 100644 index 5c37222..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/ATTRIBUTION.txt.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 113d772019d2a824ab27877f55ce12ec -TextScriptImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark.png b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark.png deleted file mode 100644 index 7cb6b87..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark.png.meta b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark.png.meta deleted file mode 100644 index ab6cb5d..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark.png.meta +++ /dev/null @@ -1,68 +0,0 @@ -fileFormatVersion: 2 -guid: bfc8b7ab33b8ba34ba91cd19d68fed27 -timeCreated: 1490777311 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - fadeOut: 0 - borderMipMap: 0 - 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: 5 - maxTextureSize: 1024 - 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: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 1024 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark_hover.png b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark_hover.png deleted file mode 100644 index 5946251..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark_hover.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark_hover.png.meta b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark_hover.png.meta deleted file mode 100644 index cafa6ad..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/dark_hover.png.meta +++ /dev/null @@ -1,68 +0,0 @@ -fileFormatVersion: 2 -guid: 19df1d0d950c1254192d76b21cd92983 -timeCreated: 1490777311 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - fadeOut: 0 - borderMipMap: 0 - 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: 5 - maxTextureSize: 1024 - 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: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 1024 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light.png b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light.png deleted file mode 100644 index faa4010..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light.png.meta b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light.png.meta deleted file mode 100644 index 81ad1b2..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light.png.meta +++ /dev/null @@ -1,68 +0,0 @@ -fileFormatVersion: 2 -guid: b498df2dc4afb914baed76f472e3b919 -timeCreated: 1490777311 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - fadeOut: 0 - borderMipMap: 0 - 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: 5 - maxTextureSize: 1024 - 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: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 1024 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light_hover.png b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light_hover.png deleted file mode 100644 index 4231fee..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light_hover.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light_hover.png.meta b/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light_hover.png.meta deleted file mode 100644 index 5fbe81c..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/backgrounds/light_hover.png.meta +++ /dev/null @@ -1,68 +0,0 @@ -fileFormatVersion: 2 -guid: cd21a711fd7e46640be900041a310c27 -timeCreated: 1490777312 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - fadeOut: 0 - borderMipMap: 0 - 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: 5 - maxTextureSize: 1024 - 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: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 1024 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons.meta b/Assets/Photon/PhotonBolt/editor/resources/icons.meta deleted file mode 100644 index 4c8dd68..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 31669352373523147a69722c2fb9544b -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/ATTRIBUTION.txt b/Assets/Photon/PhotonBolt/editor/resources/icons/ATTRIBUTION.txt deleted file mode 100644 index d04c5cb..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/ATTRIBUTION.txt +++ /dev/null @@ -1,2 +0,0 @@ -Icons by Yusuke Kamiyamane (http://p.yusukekamiyamane.com/). Licensed under a Creative Commons Attribution 3.0 License. -Icons by Fat Cow Hosting (http://www.fatcow.com/free-icons). Licensed under a Creative Commons Attribution 3.0 License. \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/ATTRIBUTION.txt.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/ATTRIBUTION.txt.meta deleted file mode 100644 index 05c6b1c..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/ATTRIBUTION.txt.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 0e67f113800d67842a98c0de4f7e18ac -TextScriptImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_application_lightning.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_application_lightning.png deleted file mode 100644 index 6414e06..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_application_lightning.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_application_lightning.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_application_lightning.png.meta deleted file mode 100644 index f94dea8..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_application_lightning.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: fbdd77e23c6e7491290cf1ceff99d323 -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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_arrow_down.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_down.png deleted file mode 100644 index bd140b7..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_down.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_down.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_down.png.meta deleted file mode 100644 index e6a2e17..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_down.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 3c4b4acee515bb3479c96f509fe1f6cc -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_arrow_right.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_right.png deleted file mode 100644 index 2ebd254..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_right.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_right.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_right.png.meta deleted file mode 100644 index 1f5e506..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_right.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 161b4d230ed08564daad7d09083c6538 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_arrow_up.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_up.png deleted file mode 100644 index 7f6162e..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_up.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_up.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_up.png.meta deleted file mode 100644 index 3b96b89..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_arrow_up.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: d87dd3beca62fcf458ce65158ad8fec2 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_brick_edit.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_brick_edit.png deleted file mode 100644 index a14b00a..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_brick_edit.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_brick_edit.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_brick_edit.png.meta deleted file mode 100644 index 9a86c04..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_brick_edit.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 7e35d582a6767485091d8b4d5db34c5e -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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_bubble.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_bubble.png deleted file mode 100644 index 358d9aa..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_bubble.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_bubble.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_bubble.png.meta deleted file mode 100644 index d340ea6..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_bubble.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 0c7f28a242364f0458ed5114aa541b97 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_command.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_command.png deleted file mode 100644 index baa14b5..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_command.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_command.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_command.png.meta deleted file mode 100644 index 0a3a96b..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_command.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 166a2e10025e17146bffafa20205c077 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_compile.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile.png deleted file mode 100644 index 8013020..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile.png.meta deleted file mode 100644 index f4446c0..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: eb980f3940e89714a8af3748ec3e4a5c -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_compile_assembly.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly.png deleted file mode 100644 index 6a5fa25..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly.png.meta deleted file mode 100644 index 8f1dede..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 6c44b77a81ec33f449ed6289a925dc47 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_compile_assembly_run.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly_run.png deleted file mode 100644 index 9df0939..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly_run.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly_run.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly_run.png.meta deleted file mode 100644 index d1a0b37..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_compile_assembly_run.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 92d411b293fba42c5b52ac617d9d5a70 -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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_computer.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_computer.png deleted file mode 100644 index d07d5fd..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_computer.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_computer.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_computer.png.meta deleted file mode 100644 index 9d4af5a..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_computer.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 8b2e40ca92b9e45bd8ab38e43c05969f -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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_connection.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_connection.png deleted file mode 100644 index 24ca737..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_connection.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_connection.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_connection.png.meta deleted file mode 100644 index edc31b6..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_connection.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 6ca70d8abcc781f488c54a0ed9455a45 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_controller.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller.png deleted file mode 100644 index 88a5545..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller.png.meta deleted file mode 100644 index ae4ccbd..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: c2694bc8bf2e64b45b8de294bf91ba76 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_controller_only.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_only.png deleted file mode 100644 index ec9ea08..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_only.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_only.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_only.png.meta deleted file mode 100644 index b4c2b0a..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_only.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: b86659b819360f944acb165f0464ac3c -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_controller_plus.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_plus.png deleted file mode 100644 index b098c94..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_plus.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_plus.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_plus.png.meta deleted file mode 100644 index 08a3c9d..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_plus.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: bc805cfca89b5954f8003c58ad90f963 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_controller_single.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_single.png deleted file mode 100644 index fd281bb..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_single.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_single.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_single.png.meta deleted file mode 100644 index 3a51547..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_controller_single.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 3fc8ffe214eaa4c06b41c61d68cc6c50 -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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_debugplay.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_debugplay.png deleted file mode 100644 index c7299fd..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_debugplay.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_debugplay.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_debugplay.png.meta deleted file mode 100644 index bbf5728..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_debugplay.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 0fa46567be031894893605b4f46eba47 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_devicetype.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_devicetype.png deleted file mode 100644 index 752968b..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_devicetype.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_devicetype.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_devicetype.png.meta deleted file mode 100644 index 2950888..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_devicetype.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: cd3b01487a4edd34ba27f159cf498292 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_download.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_download.png deleted file mode 100644 index 1920b1b..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_download.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_download.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_download.png.meta deleted file mode 100644 index 8f22ecb..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_download.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 5e005d7ea84015f42998262a01f6033d -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_event.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_event.png deleted file mode 100644 index 475a714..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_event.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_event.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_event.png.meta deleted file mode 100644 index 7aebd25..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_event.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 0d430e2b64f276a4e8b92ba115a40230 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_group.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_group.png deleted file mode 100644 index afd18bd..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_group.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_group.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_group.png.meta deleted file mode 100644 index 6fc1c25..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_group.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: e49db1c5d167eb141b526e5a425ce4b4 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_input.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_input.png deleted file mode 100644 index 7714d47..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_input.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_input.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_input.png.meta deleted file mode 100644 index b92f445..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_input.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: db441fcbd1a095b45b51e77fca15dadd -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: -3 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_ipaddress.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ipaddress.png deleted file mode 100644 index 1706c17..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ipaddress.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ipaddress.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ipaddress.png.meta deleted file mode 100644 index bd22de4..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ipaddress.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 53bf4912ae5d86841bf021b7c4b8fb7b -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_masterserver.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_masterserver.png deleted file mode 100644 index 497cbe1..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_masterserver.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_masterserver.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_masterserver.png.meta deleted file mode 100644 index 50762bf..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_masterserver.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: c15ab68cd7d4d5a4c84d0991a44b616f -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_minus.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus.png deleted file mode 100644 index 2a4574c..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus.png.meta deleted file mode 100644 index abfe4ea..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 84354f1dab644fe4a8296aeaa957499f -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_minus_small.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus_small.png deleted file mode 100644 index 7a0e8f3..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus_small.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus_small.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus_small.png.meta deleted file mode 100644 index 5089dec..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_minus_small.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: ccf4fd28342f7f84faa90b11020a3ef6 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_name.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_name.png deleted file mode 100644 index f1a100a..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_name.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_name.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_name.png.meta deleted file mode 100644 index 086bc18..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_name.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 44e09c2b23445cc4faa9cb3643a98912 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_nat.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_nat.png deleted file mode 100644 index 8bf5b68..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_nat.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_nat.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_nat.png.meta deleted file mode 100644 index db9d6fb..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_nat.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 3004fdfd7b380d24ea1d41e6b0cd824f -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_owner_only.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_owner_only.png deleted file mode 100644 index 571c16d..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_owner_only.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_owner_only.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_owner_only.png.meta deleted file mode 100644 index 551fd90..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_owner_only.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 185e3c8a9b7b092409f4719a9eda9d4a -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_ping.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping.png deleted file mode 100644 index 8c56791..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping.png.meta deleted file mode 100644 index 5c943e7..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 3ab8af6f28d8c354fbf8be402705b50b -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_ping_sim.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping_sim.png deleted file mode 100644 index a4b1112..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping_sim.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping_sim.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping_sim.png.meta deleted file mode 100644 index b203fcd..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_ping_sim.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 44f6709a886a87b44aaefe962240eb4d -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_plus.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_plus.png deleted file mode 100644 index 22b72da..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_plus.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_plus.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_plus.png.meta deleted file mode 100644 index 9807d7d..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_plus.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 9a01ab0f45d13264da6ca9c9ec720d99 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: -3 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_position.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_position.png deleted file mode 100644 index 6e13dd3..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_position.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_position.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_position.png.meta deleted file mode 100644 index 4450c72..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_position.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: d74f9d3d83e3eab41a4e148e1c0e525f -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_refresh.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_refresh.png deleted file mode 100644 index d72696a..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_refresh.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_refresh.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_refresh.png.meta deleted file mode 100644 index 9b7bac7..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_refresh.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 4bc574f7937c4d34ba73aaf859020176 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_replication.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_replication.png deleted file mode 100644 index 6764ea3..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_replication.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_replication.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_replication.png.meta deleted file mode 100644 index 3fcd963..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_replication.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: d6bf1d8b84458174b908acc15ee69ad5 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_rotation.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_rotation.png deleted file mode 100644 index 9a470f7..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_rotation.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_rotation.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_rotation.png.meta deleted file mode 100644 index ac21815..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_rotation.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 358a845f37ebf5e4898647c7c6db4d71 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_save.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_save.png deleted file mode 100644 index 6178478..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_save.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_save.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_save.png.meta deleted file mode 100644 index a227fe9..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_save.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 836117d75f888d84f86879d363179ac2 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_scenes.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_scenes.png deleted file mode 100644 index efb0b88..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_scenes.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_scenes.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_scenes.png.meta deleted file mode 100644 index dac82ac..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_scenes.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: da39664b00aaba94f9d072486a6b98a1 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_server.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_server.png deleted file mode 100644 index ee0c771..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_server.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_server.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_server.png.meta deleted file mode 100644 index 1613a6e..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_server.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: a8eae4b01de4e904ebc6882bfe97d89e -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_settings.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_settings.png deleted file mode 100644 index efc599d..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_settings.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_settings.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_settings.png.meta deleted file mode 100644 index 3637fce..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_settings.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: ee400fcaeb078e74690829590e541fee -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_state.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state.png deleted file mode 100644 index df2b899..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state.png.meta deleted file mode 100644 index 600112c..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 79a653d17c0339c4ebe7ee2cc59dd7d5 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_state2.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state2.png deleted file mode 100644 index 4bc0a33..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state2.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state2.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state2.png.meta deleted file mode 100644 index 19c24de..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_state2.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: d8d4d9a81f468a94081f2bb98a61d8e5 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_struct.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_struct.png deleted file mode 100644 index 3761f8f..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_struct.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_struct.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_struct.png.meta deleted file mode 100644 index 2ff4167..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_struct.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 0795a0ae526a57e4abaa2b329245f85d -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons/mc_upload.png b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_upload.png deleted file mode 100644 index 93589e4..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_upload.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_upload.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons/mc_upload.png.meta deleted file mode 100644 index d4b2540..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons/mc_upload.png.meta +++ /dev/null @@ -1,106 +0,0 @@ -fileFormatVersion: 2 -guid: 469247da248c92b4385668e611ea2ebc -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 1 - 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: 5 - maxTextureSize: 32 - 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: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: iPhone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - 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/PhotonBolt/editor/resources/icons_welcome.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome.meta deleted file mode 100644 index ae3631a..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: e5668a209dbc6e24a9fe3cc3633bd50b -folderAsset: yes -timeCreated: 1500450079 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/ATTRIBUTION.txt b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/ATTRIBUTION.txt deleted file mode 100644 index 55acb02..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/ATTRIBUTION.txt +++ /dev/null @@ -1 +0,0 @@ -Icons by Fat Cow Hosting (http://www.fatcow.com/free-icons). Licensed under a Creative Commons Attribution 3.0 License. \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/ATTRIBUTION.txt.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/ATTRIBUTION.txt.meta deleted file mode 100644 index 87545b4..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/ATTRIBUTION.txt.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 28883dc040320bb4ea69a449132b35d7 -TextScriptImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bugtracker.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bugtracker.png deleted file mode 100644 index 563c364..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bugtracker.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bugtracker.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bugtracker.png.meta deleted file mode 100644 index 96ba74c..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bugtracker.png.meta +++ /dev/null @@ -1,84 +0,0 @@ -fileFormatVersion: 2 -guid: 1d949f6bc5812234bb28b6bd51e902f5 -timeCreated: 1500450410 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - 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: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 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 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - - buildTarget: Standalone - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - - buildTarget: Android - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_black.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_black.png deleted file mode 100644 index d448caa..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_black.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_black.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_black.png.meta deleted file mode 100644 index ee8941f..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_black.png.meta +++ /dev/null @@ -1,108 +0,0 @@ -fileFormatVersion: 2 -guid: ca583a4b5a2b2452c80aa11e55f19346 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 6 - 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: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: 1 - mipBias: -100 - 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 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_down.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_down.png deleted file mode 100644 index 060af25..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_down.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_down.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_down.png.meta deleted file mode 100644 index 0d3cb0b..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_down.png.meta +++ /dev/null @@ -1,86 +0,0 @@ -fileFormatVersion: 2 -guid: 06632fbfd33334c72a288bdbdf2922ea -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 6 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_green.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_green.png deleted file mode 100644 index f74a914..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_green.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_green.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_green.png.meta deleted file mode 100644 index f2e6b51..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/bullet_green.png.meta +++ /dev/null @@ -1,108 +0,0 @@ -fileFormatVersion: 2 -guid: e12890dcb5a25439e8a36389cf70fce1 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 6 - 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: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: 1 - mipBias: -100 - 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 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/comments.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/comments.png deleted file mode 100644 index 61ae64b..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/comments.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/comments.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/comments.png.meta deleted file mode 100644 index 9044c3f..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/comments.png.meta +++ /dev/null @@ -1,76 +0,0 @@ -fileFormatVersion: 2 -guid: 0d548c93fd2fd490db38298610780b39 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 4 - 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 - 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: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/community.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/community.png deleted file mode 100644 index e67fe63..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/community.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/community.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/community.png.meta deleted file mode 100644 index d902027..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/community.png.meta +++ /dev/null @@ -1,84 +0,0 @@ -fileFormatVersion: 2 -guid: fd7da1b41e02e2546a5b59597cbbedfd -timeCreated: 1500450532 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - 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: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 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 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - - buildTarget: Standalone - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - - buildTarget: Android - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/documentation.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/documentation.png deleted file mode 100644 index 1086fbe..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/documentation.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/documentation.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/documentation.png.meta deleted file mode 100644 index ee7ed0d..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/documentation.png.meta +++ /dev/null @@ -1,84 +0,0 @@ -fileFormatVersion: 2 -guid: 7d6ce7da11bf9aa4f98abcc9eb237a08 -timeCreated: 1500450305 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - 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: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 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 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - - buildTarget: Standalone - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - - buildTarget: Android - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/information.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/information.png deleted file mode 100644 index 93c67f2..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/information.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/information.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/information.png.meta deleted file mode 100644 index 3cbe4b6..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/information.png.meta +++ /dev/null @@ -1,108 +0,0 @@ -fileFormatVersion: 2 -guid: fe64035b49c4e4a078ee42b857ae1519 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 6 - 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: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: 1 - mipBias: -100 - 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 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/install_icon.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/install_icon.png deleted file mode 100644 index b9be9d9..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/install_icon.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/install_icon.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/install_icon.png.meta deleted file mode 100644 index f84d3e7..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/install_icon.png.meta +++ /dev/null @@ -1,108 +0,0 @@ -fileFormatVersion: 2 -guid: a316ffa1f41934b4899718d2dda85989 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 6 - 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: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: 1 - mipBias: -100 - 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 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Android - maxTextureSize: 32 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/samples.png b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/samples.png deleted file mode 100644 index 669b150..0000000 Binary files a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/samples.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/samples.png.meta b/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/samples.png.meta deleted file mode 100644 index 0d5975b..0000000 --- a/Assets/Photon/PhotonBolt/editor/resources/icons_welcome/samples.png.meta +++ /dev/null @@ -1,84 +0,0 @@ -fileFormatVersion: 2 -guid: d2b478a89610eb748a4b0b8040f43a01 -timeCreated: 1500450669 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 0 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - 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: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 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 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - - buildTarget: Standalone - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - - buildTarget: Android - maxTextureSize: 32 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/scripts.meta b/Assets/Photon/PhotonBolt/editor/scripts.meta deleted file mode 100644 index 6c25d74..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7ad635e5a535c4d9e837a2ea13e0b953 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/scripts/AccountService.cs b/Assets/Photon/PhotonBolt/editor/scripts/AccountService.cs deleted file mode 100644 index 639e432..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/AccountService.cs +++ /dev/null @@ -1,320 +0,0 @@ -using UnityEditor; -using UnityEngine.Networking; -using System.Text.RegularExpressions; -#if UNITY_EDITOR -using System; -using UnityEngine; -using System.Collections.Generic; - -namespace Photon.Bolt.Utils -{ - /// - /// Creates a instance of the Account Service to register Photon Cloud accounts. - /// - public class AccountService - { - private const string ServiceUrl = "https://partner.photonengine.com/api/Unity/User/RegisterEx"; - - private readonly Dictionary requestHeaders = new Dictionary - { - {"Content-Type", "application/json"}, - {"x-functions-key", "VQ920wVUieLHT9c3v1ZCbytaLXpXbktUztKb3iYLCdiRKjUagcl6eg=="} - }; - - /// - /// Attempts to create a Photon Cloud Account asynchronously. - /// 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. - public bool RegisterByEmail(string email, string serviceTypes, Action callback = null, - Action errorCallback = null) - { - if (IsValidEmail(email) == false) - { - Debug.LogErrorFormat("Email \"{0}\" is not valid", email); - return false; - } - - if (string.IsNullOrEmpty(serviceTypes)) - { - Debug.LogError("serviceTypes string is null or empty"); - return false; - } - - var req = new AccountServiceRequest(); - req.Email = email; - req.ServiceTypes = serviceTypes; - return RegisterByEmail(req, callback, errorCallback); - } - - public bool RegisterByEmail(string email, List serviceTypes, - Action callback = null, Action errorCallback = null) - { - if (serviceTypes == null || serviceTypes.Count == 0) - { - Debug.LogError("serviceTypes list is null or empty"); - return false; - } - - return RegisterByEmail(email, GetServiceTypesFromList(serviceTypes), callback, errorCallback); - } - - public bool RegisterByEmail(AccountServiceRequest request, Action callback = null, - Action errorCallback = null) - { - if (request == null) - { - Debug.LogError("Registration request is null"); - return false; - } - - StartCoroutine( - HttpPost(GetUrlWithQueryStringEscaped(request), - requestHeaders, - null, - s => - { - if (string.IsNullOrEmpty(s)) - { - if (errorCallback != null) - { - errorCallback( - "Server's response was empty. Please register through account website during this service interruption."); - } - } - else - { - var ase = 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 => - { - if (errorCallback != null) - { - errorCallback(e); - } - }) - ); - return true; - } - - private static string GetUrlWithQueryStringEscaped(AccountServiceRequest request) - { - var email = UnityWebRequest.EscapeURL(request.Email); - var st = UnityWebRequest.EscapeURL(request.ServiceTypes); - return string.Format("{0}?email={1}&st={2}", ServiceUrl, email, st); - } - - /// - /// Reads the Json response and applies it to local properties. - /// - /// - private AccountServiceResponse ParseResult(string result) - { - try - { - var 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) - { - var parts = result.Split(new[] { "\"ApplicationIds\":{" }, - StringSplitOptions.RemoveEmptyEntries); - parts = parts[1].Split('}'); - var applicationIds = parts[0]; - if (!string.IsNullOrEmpty(applicationIds)) - { - parts = applicationIds.Split(new[] { ',', '"', ':' }, StringSplitOptions.RemoveEmptyEntries); - res.ApplicationIds = new Dictionary(parts.Length / 2); - for (var 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; - } - } - - private static string GetServiceTypesFromList(List appTypes) - { - if (appTypes != null) - { - var serviceTypes = string.Empty; - if (appTypes.Count > 0) - { - serviceTypes = ((int)appTypes[0]).ToString(); - for (var i = 1; i < appTypes.Count; i++) - { - var appType = (int)appTypes[i]; - serviceTypes = string.Format("{0},{1}", serviceTypes, appType); - } - } - - return serviceTypes; - } - - return null; - } - - // 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; - } - - //https://forum.unity.com/threads/using-unitywebrequest-in-editor-tools.397466/#post-4485181 - private 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; - } - - private static System.Collections.IEnumerator HttpPost(string url, Dictionary headers, - byte[] payload, Action successCallback, Action errorCallback) - { - using (var 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_2017_1_OR_NEWER - if (w.isNetworkError || w.isHttpError) -#else - if (w.isError) -#endif - { - if (errorCallback != null) - { - errorCallback(w.error); - } - } - else - { - if (successCallback != null) - { - successCallback(w.downloadHandler.text); - } - } - } - } - } - - [Serializable] - public class AccountServiceResponse - { - public int ReturnCode; - public string Message; - - public Dictionary - ApplicationIds; // Unity's JsonUtility does not support deserializing Dictionary - } - - [Serializable] - public class AccountServiceRequest - { - public string Email; - public string ServiceTypes; - } - - public class AccountServiceReturnCodes - { - public static int Success = 0; - public static int EmailAlreadyRegistered = 8; - public static int InvalidParameters = 12; - - public static readonly Dictionary ReturnCodes = new Dictionary() - { - {Success, "Success"}, - {EmailAlreadyRegistered, "Email Already Registered"}, - {InvalidParameters, "Invalid Parameters"} - }; - } - - public enum ServiceTypes - { - Realtime = 0, - Turnbased = 1, - Chat = 2, - Voice = 3, - TrueSync = 4, - Pun = 5, - Thunder = 6, - Bolt = 20 - } -} - -#endif diff --git a/Assets/Photon/PhotonBolt/editor/scripts/AccountService.cs.meta b/Assets/Photon/PhotonBolt/editor/scripts/AccountService.cs.meta deleted file mode 100644 index bbc5d6d..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/AccountService.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: f389ba8b7f6d4d8c932040f168738b6c -timeCreated: 1566476584 \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/editor/scripts/BoltExecutionOrderManager.cs b/Assets/Photon/PhotonBolt/editor/scripts/BoltExecutionOrderManager.cs deleted file mode 100644 index 4b48e9e..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/BoltExecutionOrderManager.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using Photon.Bolt.Utils; -using UnityEditor; - -namespace Photon.Bolt.Editor -{ - [InitializeOnLoad] - public static class BoltExecutionOrderManager - { - static BoltExecutionOrderManager() - { - Dictionary monoScripts = new Dictionary(); - - foreach (MonoScript monoScript in MonoImporter.GetAllRuntimeMonoScripts()) - { - try - { - switch (monoScript.name) - { - case "BoltPoll": - SetExecutionOrder(monoScript, -10000); - break; - - case "BoltSend": - SetExecutionOrder(monoScript, +10000); - break; - - case "BoltEntity": - SetExecutionOrder(monoScript, -2500); - break; - - default: - if (monoScripts.ContainsKey(monoScript.name)) - { - monoScripts[monoScript.name] = monoScript; - } - else - { - monoScripts.Add(monoScript.name, monoScript); - } - break; - } - } - catch { } - } - - try - { - foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) - { - foreach (var type in asm.GetTypes()) - { - if (monoScripts.ContainsKey(type.Name)) - { - try - { - foreach (BoltExecutionOrderAttribute attribute in type.GetCustomAttributes(typeof(BoltExecutionOrderAttribute), false)) - { - SetExecutionOrder(monoScripts[type.Name], attribute.executionOrder); - } - } - catch (Exception exn) - { - BoltLog.Exception(exn); - } - } - } - } - } - catch (Exception) - { - } - } - - static void SetExecutionOrder(MonoScript script, Int32 executionOrder) - { - if (MonoImporter.GetExecutionOrder(script) != executionOrder) - { - MonoImporter.SetExecutionOrder(script, executionOrder); - } - } - } -} diff --git a/Assets/Photon/PhotonBolt/editor/scripts/BoltExecutionOrderManager.cs.meta b/Assets/Photon/PhotonBolt/editor/scripts/BoltExecutionOrderManager.cs.meta deleted file mode 100644 index 06b9e63..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/BoltExecutionOrderManager.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a8c20add84e3c5f4c9fca5f61675ba33 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Photon/PhotonBolt/editor/scripts/BoltUtils.cs b/Assets/Photon/PhotonBolt/editor/scripts/BoltUtils.cs deleted file mode 100644 index 38bef78..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/BoltUtils.cs +++ /dev/null @@ -1,239 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Photon.Bolt.Editor.Utils; -using UnityEditor; -using UnityEngine; - -namespace Photon.Bolt.Utils -{ - public static class MenuUtililies - { - private const string DLL_SUFIX_DEBUG = ".debug"; - private const string DLL_SUFIX_RELEASE = ".release"; - - // ======= PUBLIC METHODS ===================================================================================== - - [MenuItem("Photon Bolt/Utils/Find Missing Scripts", priority = 125)] - public static void FindMissingScriptsMenu() - { - BoltLog.Info("Searching for Missing Scripts"); - if (FindMissingComponents() == 0) - { - BoltLog.Info("Not found any prefab with missing scripts"); - } - } - - [MenuItem("Photon Bolt/Utils/Remove Missing Scripts", priority = 126)] - public static void RemoveMissingScriptMenu() - { - BoltLog.Info("Removing Missing Scripts"); - - RemoveMissingScripts(); - } - - [MenuItem("Photon Bolt/Utils/Change DLL Mode", priority = 127)] - public static void ChangeDllModeMenu() - { - var current = BoltNetwork.IsDebugMode ? "Debug" : "Release"; - var target = !BoltNetwork.IsDebugMode ? "Debug" : "Release"; - - var msg = string.Format("Bolt is in {0} mode, want to change to {1}?", current, target); - - if (EditorUtility.DisplayDialog("Change Bolt DLL Mode", msg, "Yes", "Cancel")) - { - if (ChangeDllMode()) - { - Debug.LogFormat("Bolt Mode swiched to {0}.", target); - } - else - { - Debug.LogError("Error while swithing Bolt Mode, changes were reverted."); - } - } - } - - public static bool ChangeDllMode() - { - return SwitchDebugReleaseMode(BoltNetwork.IsDebugMode); - } - - // ======= PRIVATE METHODS ===================================================================================== - - public static int FindMissingComponents() - { - var missingScriptsCount = 0; - var components = new List(); - - var folders = new string[] { "Assets" }; - var iter = AssetDatabase.FindAssets("t:Prefab", folders).GetEnumerator(); - - while (iter.MoveNext()) - { - var guid = (string)iter.Current; - var path = AssetDatabase.GUIDToAssetPath(guid); - var go = AssetDatabase.LoadAssetAtPath(path); - - go.GetComponentsInChildren(true, components); - for (var j = 0; j < components.Count; ++j) - { - if (components[j] == null) - { - ++missingScriptsCount; - BoltLog.Error("Missing script: " + path); - } - } - components.Clear(); - } - - if (missingScriptsCount != 0) - { - BoltLog.Info("Found {0} Missing Scripts", missingScriptsCount); - } - - return missingScriptsCount; - } - - public static void RemoveMissingScripts() - { - var folders = new string[] { "Assets" }; - var iter = AssetDatabase.FindAssets("t:Prefab", folders).GetEnumerator(); - - while (iter.MoveNext()) - { - var guid = (string)iter.Current; - var path = AssetDatabase.GUIDToAssetPath(guid); - var go = AssetDatabase.LoadAssetAtPath(path); - - var result = RemoveFromGO(go); - - if (result > 0) - { - BoltLog.Info("Removed scripts from {0}", path); - } - } - } - - private static int RemoveFromGO(GameObject go) - { - var result = GameObjectUtility.RemoveMonoBehavioursWithMissingScript(go); - - for (int i = 0; i < go.transform.childCount; i++) - { - var child = go.transform.GetChild(i); - result += RemoveFromGO(child.gameObject); - } - - return result; - } - - private static bool SwitchDebugReleaseMode(bool debug) - { - var from = debug ? DLL_SUFIX_DEBUG : DLL_SUFIX_RELEASE; - var to = debug ? DLL_SUFIX_RELEASE : DLL_SUFIX_DEBUG; - - var paths = new string[] - { - BoltPathUtility.BoltDllPath, - BoltPathUtility.BoltCompilerDLLPath, - BoltPathUtility.BoltEditorDLLPath - }; - - var abort = false; - var backup = ""; - - foreach (var path in paths) - { - if (abort == true) { break; } - - try - { - backup = FileUtils.BackupFile(path); - FileUtils.ExchangeFile(path, from, to); - } - catch (IOException ex) - { - Debug.LogError("Aborting..."); - Debug.LogException(ex); - abort = true; - - try - { - FileUtils.BackupFile(path, true); - } - catch (Exception ex2) - { - Debug.LogException(ex2); - } - } - finally - { - try - { - FileUtils.DeleteFile(backup); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - - backup = ""; - } - } - - if (abort == false) - { - AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); - } - - return abort == false; - } - - private class FileUtils - { - public static void ExchangeFile(string basePath, string fromSuffix, string toSuffix) - { - MoveFile(basePath, basePath + fromSuffix); - MoveFile(basePath + toSuffix, basePath); - } - - public static void MoveFile(string from, string to) - { - if (File.Exists(to)) { return; } - - if (from.EndsWith(DLL_SUFIX_DEBUG) || from.EndsWith(DLL_SUFIX_RELEASE)) - { - DeleteFile(string.Format("{0}.meta", from)); - } - - Debug.LogFormat("Moving file from {0} to {1}", from, to); - File.Move(from, to); - } - - public static string BackupFile(string path, bool restore = false) - { - var backup = string.Format("{0}.backup", path); - - if (restore) - { - Debug.LogFormat("Restore backup from file {0}", backup); - File.Copy(backup, path, true); - } - else - { - Debug.LogFormat("Creating backup from file {0}", path); - File.Copy(path, backup, true); - } - - return backup; - } - - public static void DeleteFile(string path) - { - if (string.IsNullOrEmpty(path) || File.Exists(path) == false) { return; } - Debug.LogFormat("Removing file {0}", path); - File.Delete(path); - } - } - } -} diff --git a/Assets/Photon/PhotonBolt/editor/scripts/BoltUtils.cs.meta b/Assets/Photon/PhotonBolt/editor/scripts/BoltUtils.cs.meta deleted file mode 100644 index b7f6c7b..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/BoltUtils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0fe2b6616d69849c4b98779f7a902d56 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindow.cs b/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindow.cs deleted file mode 100644 index 6b8922c..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindow.cs +++ /dev/null @@ -1,1066 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using Photon.Bolt.Editor.Utils; -using Photon.Bolt.Utils; -using UnityEditor; -using UnityEngine; -using EditorUtility = UnityEditor.EditorUtility; - -namespace Photon.Bolt.Editor -{ - using Event = UnityEngine.Event; - - [InitializeOnLoad] - public partial class BoltWizardWindow : EditorWindow - { - BoltSetupStage currentStage = BoltSetupStage.Intro; - static Stopwatch watch = new Stopwatch(); - - static Boolean? Ready; - static Single? FirstCall; - private static volatile bool requestingAppId = false; - - static bool RunCompiler; - - static String FirstStartupKey - { - get { return "$Bolt$First$Startup$Wizard/" + BoltNetwork.Version; } - } - - static Vector2 WindowSize; - static Vector2 WindowPosition; - - static string AppIdOrEmail = ""; - - [NonSerialized] Func beforeNextCallback; - - [NonSerialized] Dictionary packageInfo; - - [NonSerialized] int ButtonWidth; - - [NonSerialized] int NavMenuWidth; - - [NonSerialized] string ReleaseHistoryHeader; - [NonSerialized] List ReleaseHistoryTextAdded; - [NonSerialized] List ReleaseHistoryTextChanged; - [NonSerialized] List ReleaseHistoryTextFixed; - [NonSerialized] List ReleaseHistoryTextRemoved; - - // GUI - - [NonSerialized] Texture2D introIcon; - - [NonSerialized] Texture2D releaseIcon; - - [NonSerialized] Texture2D photonCloudIcon; - - [NonSerialized] Texture2D boltIcon; - - [NonSerialized] Texture2D activeIcon; - - [NonSerialized] Texture2D inactiveIcon; - - [NonSerialized] Texture2D bugtrackerIcon; - - [NonSerialized] GUIContent bugtrackerHeader; - - [NonSerialized] GUIContent bugtrackerText; - - [NonSerialized] Texture2D discordIcon; - - [NonSerialized] GUIContent discordHeader; - - [NonSerialized] GUIContent discordText; - - [NonSerialized] Texture2D documentationIcon; - - [NonSerialized] GUIContent documentationHeader; - - [NonSerialized] GUIContent documentationText; - - [NonSerialized] Texture2D reviewIcon; - - [NonSerialized] GUIContent reviewHeader; - - [NonSerialized] GUIContent reviewText; - - [NonSerialized] Texture2D samplesIcon; - - [NonSerialized] GUIStyle iconSection; - - [NonSerialized] GUIStyle stepStyle; - - [NonSerialized] GUIStyle headerStyle; - - [NonSerialized] GUIStyle headerLabel; - - [NonSerialized] GUIStyle headerLargeLabel; - - [NonSerialized] GUIStyle textLabel; - - [NonSerialized] GUIStyle centerInputText; - - [NonSerialized] GUIStyle minimalButton; - - [NonSerialized] GUIStyle simpleButton; - - [NonSerialized] GUIStyle introStyle; - - [NonSerialized] Vector2 scrollPosition; - - static BoltWizardWindow() - { - EditorApplication.update -= ShowWizardWindow; - EditorApplication.update += ShowWizardWindow; - - WindowPosition = new Vector2(100, 100); - } - - static void ShowWizardWindow() - { - if (FirstCall.HasValue == false) - { - FirstCall = Time.realtimeSinceStartup; - return; - } - - if ((Time.realtimeSinceStartup - FirstCall.Value) > 1) - { - if (!EditorPrefs.GetBool(FirstStartupKey, false)) - { - Open(); - } - - EditorApplication.update -= ShowWizardWindow; - } - } - - [MenuItem("Photon Bolt/Wizard", priority = 100)] - public static void Open() - { - if (Application.isPlaying) - { - return; - } - - BoltWizardWindow window = GetWindow(true, BoltWizardText.WINDOW_TITLE, true); - window.position = new Rect(WindowPosition, WindowSize); - window.Show(); - - watch.Start(); - } - - static void ReOpen() - { - if (Ready.HasValue && Ready.Value == false) - { - Open(); - } - - EditorApplication.update -= ReOpen; - } - - void OnEnable() - { - WindowSize = new Vector2(600, 600); - - minSize = WindowSize; - - NavMenuWidth = 210; - ButtonWidth = 120; - - Ready = false; - - beforeNextCallback = null; - - // Pre-load Release History - PrepareReleaseHistoryText(); - } - - void OnDestroy() - { - if (!EditorPrefs.GetBool(FirstStartupKey, false)) - { - if (!EditorUtility.DisplayDialog(BoltWizardText.CLOSE_MSG_TITLE, - BoltWizardText.CLOSE_MSG_QUESTION, "Yes", "Back")) - { - EditorApplication.update += ReOpen; - } - } - - Ready = false; - } - - void InitContent() - { - if (Ready.HasValue && Ready.Value) - { - return; - } - - introIcon = Resources.Load("icons_welcome/information"); - releaseIcon = Resources.Load("icons_welcome/documentation"); - photonCloudIcon = Resources.Load("PhotonCloudIcon"); - - boltIcon = Resources.Load("BoltIcon"); - - activeIcon = Resources.Load("icons_welcome/bullet_green"); - inactiveIcon = Resources.Load("icons_welcome/bullet_black"); - - Texture2D texture = new Texture2D(1, 1); - texture.SetPixel(0, 0, Color.gray); - texture.Apply(); - - Color headerTextColor = EditorGUIUtility.isProSkin - ? new Color(0xf2 / 255f, 0xad / 255f, 0f) - : new Color(30 / 255f, 99 / 255f, 183 / 255f); - Color commonTextColor = EditorGUIUtility.isProSkin ? Color.white : Color.black; - - introStyle = new GUIStyle(EditorStyles.helpBox) - { - fontSize = 15, - padding = new RectOffset(10, 10, 10, 10), - normal = - { - textColor = commonTextColor - } - }; - - stepStyle = new GUIStyle(EditorStyles.helpBox) - { - padding = new RectOffset(10, 10, 10, 10), - margin = new RectOffset(0, 0, 5, 0), - normal = - { - textColor = commonTextColor - } - }; - - headerLabel = new GUIStyle(EditorStyles.boldLabel) - { - padding = new RectOffset(10, 0, 0, 0), - margin = new RectOffset(), - normal = - { - textColor = commonTextColor - } - }; - - headerStyle = new GUIStyle(EditorStyles.boldLabel) - { - fontSize = 14, - margin = new RectOffset(), - padding = new RectOffset(10, 0, 0, 0), - normal = - { - textColor = commonTextColor - } - }; - - headerLargeLabel = new GUIStyle(EditorStyles.boldLabel) - { - padding = new RectOffset(10, 0, 0, 0), - margin = new RectOffset(), - fontSize = 18, - normal = - { - textColor = headerTextColor - } - }; - - textLabel = new GUIStyle() - { - wordWrap = true, - margin = new RectOffset(), - padding = new RectOffset(10, 0, 0, 0), - normal = - { - textColor = commonTextColor - } - }; - - centerInputText = new GUIStyle(GUI.skin.textField) - { - alignment = TextAnchor.MiddleCenter, - fontSize = 12, - fixedHeight = 26 - }; - - minimalButton = new GUIStyle(EditorStyles.miniButton) - { - fixedWidth = 130 - }; - - simpleButton = new GUIStyle(GUI.skin.button) - { - fontSize = 12, - padding = new RectOffset(10, 10, 10, 10) - }; - - iconSection = new GUIStyle - { - margin = new RectOffset(0, 0, 0, 0) - }; - - discordIcon = Resources.Load("icons_welcome/community"); - discordText = new GUIContent(BoltWizardText.DISCORD_TEXT); - discordHeader = new GUIContent(BoltWizardText.DISCORD_HEADER); - - bugtrackerIcon = Resources.Load("icons_welcome/bugtracker"); - bugtrackerText = new GUIContent(BoltWizardText.BUGTRACKER_TEXT); - bugtrackerHeader = new GUIContent(BoltWizardText.BUGTRACKER_HEADER); - - documentationIcon = Resources.Load("icons_welcome/documentation"); - documentationText = new GUIContent(BoltWizardText.DOCUMENTATION_TEXT); - documentationHeader = new GUIContent(BoltWizardText.DOCUMENTATION_HEADER); - - reviewIcon = Resources.Load("icons_welcome/comments"); - reviewText = new GUIContent(BoltWizardText.REVIEW_TEXT); - reviewHeader = new GUIContent(BoltWizardText.REVIEW_HEADER); - - samplesIcon = Resources.Load("icons_welcome/samples"); - - // Package List - - packageInfo = new Dictionary - { - { - BoltInstalls.Core, - new BoltPackage() - { - name = "bolt_install", - title = "Core Package", - description = "Install core bolt package", - installTest = MainPackageInstalled, - packageFlags = PackageFlags.RunInitialSetup - } - }, - - // { - // BoltInstalls.Mobile, - // new BoltPackage() - // { - // name = "bolt_mobile_plugins", - // title = "Mobile Plugins", - // installTest = MobilePackageInstalled, - // description = "Install iOS / Android socket plugins" - // } - // }, - - { - BoltInstalls.XB1, - new BoltPackage() - { - name = "bolt_xb1", - title = "XBox One", - installTest = XB1PackageInstalled, - description = "Install XB1 support" - } - }, - - { - BoltInstalls.PS4, - new BoltPackage() - { - name = "bolt_ps4", - title = "Playstation 4", - installTest = PS4PackageInstalled, - description = "Install PS4 support" - } - }, - - { - BoltInstalls.Samples, - new BoltPackage() - { - name = "bolt_samples", - title = "Samples", - description = "Install bolt samples", - installTest = SamplesPackageInstalled, - packageFlags = PackageFlags.WarnForProjectOverwrite - } - } - }; - - // App ID - if (string.IsNullOrEmpty(BoltRuntimeSettings.instance.photonAppId)) - { - AppIdOrEmail = ""; - } - else if (IsAppId(BoltRuntimeSettings.instance.photonAppId)) - { - AppIdOrEmail = BoltRuntimeSettings.instance.photonAppId; - } - - Ready = true; - RunCompiler = false; - } - - void OnGUI() - { - try - { - InitContent(); - - WindowPosition = position.position; - - EditorGUILayout.BeginVertical(); - DrawHeader(); - - // Content - EditorGUILayout.BeginHorizontal(); - - // Nav menu - EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.MaxWidth(NavMenuWidth), - GUILayout.MinWidth(NavMenuWidth)); - DrawNavMenu(); - EditorGUILayout.EndVertical(); - - // Main Content - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - DrawContent(); - EditorGUILayout.EndVertical(); - - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.EndVertical(); - - if (GUI.changed) - { - Save(); - } - } - catch (Exception) - { - // ignored - } - } - - private void DrawContent() - { - switch (currentStage) - { - case BoltSetupStage.Intro: - DrawIntro(); - break; - case BoltSetupStage.ReleaseHistory: - DrawReleaseHistory(); - break; - case BoltSetupStage.Photon: - DrawSetupPhoton(); - break; - case BoltSetupStage.Bolt: - DrawSetupBolt(); - break; - case BoltSetupStage.Support: - DrawSupport(); - break; - } - - GUILayout.FlexibleSpace(); - DrawFooter(); - } - - private void DrawIntro() - { - GUILayout.BeginVertical(); - GUILayout.Label(BoltWizardText.WIZARD_INTRO, introStyle); - - if (GUILayout.Button("Visit Getting Started Documentation", simpleButton)) - { - OpenURL("https://doc.photonengine.com/en-us/bolt/")(); - } - - if (GUILayout.Button("Leave a review", simpleButton)) - { - OpenURL("https://assetstore.unity.com/packages/tools/network/photon-bolt-free-127156")(); - } - - GUILayout.EndVertical(); - } - - private void DrawSetupBolt() - { - DrawInputWithLabel("Bolt Setup", () => - { - GUILayout.BeginVertical(); - GUILayout.Space(5); - GUILayout.Label(BoltWizardText.PACKAGES, textLabel); - GUILayout.EndVertical(); - }, false); - GUILayout.Space(15); - - DrawInstallOption(BoltInstalls.Core); - - EditorGUI.BeginDisabledGroup(!IsInstalled(BoltInstalls.Core)); - - // SAMPLES - DrawInstallOption(BoltInstalls.Samples); - - scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); - - // // MOBILE - // DrawInstallOption(BoltInstalls.Mobile); - - // XB1 - DrawInstallOption(BoltInstalls.XB1); - - // PS4 - DrawInstallOption(BoltInstalls.PS4); - - EditorGUILayout.EndScrollView(); - - EditorGUI.EndDisabledGroup(); - - // Action - - if (beforeNextCallback == null) - { - beforeNextCallback = () => - { - if (!IsInstalled(BoltInstalls.Core)) - { - ShowNotification(new GUIContent("You must install at least the Bolt Core package.")); - return false; - } - - return true; - }; - } - } - - private void DrawReleaseHistory() - { - DrawInputWithLabel(string.Format("Version Changelog: {0}", ReleaseHistoryHeader), () => - { - GUILayout.BeginVertical(); - GUILayout.Space(5); - - scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUIStyle.none, GUILayout.ExpandHeight(true), - GUILayout.ExpandWidth(true)); - - DrawReleaseHistoryItem("Added:", ReleaseHistoryTextAdded); - DrawReleaseHistoryItem("Changed:", ReleaseHistoryTextChanged); - DrawReleaseHistoryItem("Fixed:", ReleaseHistoryTextFixed); - DrawReleaseHistoryItem("Removed:", ReleaseHistoryTextRemoved); - - GUILayout.EndScrollView(); - - GUILayout.EndVertical(); - }, false, labelSize: 300); - } - - private void DrawReleaseHistoryItem(string label, List items) - { - if (items != null && items.Count > 0) - { - DrawInputWithLabel(label, () => - { - GUILayout.BeginVertical(); - GUILayout.Space(5); - - foreach (var text in items) - { - GUILayout.Label(string.Format("- {0}.", text), textLabel); - } - - GUILayout.EndVertical(); - }, false, true, 200); - } - } - - private void DrawSetupPhoton() - { - DrawInputWithLabel("Photon Cloud Setup", () => - { - GUILayout.BeginVertical(); - GUILayout.Space(5); - GUILayout.Label(BoltWizardText.PHOTON, textLabel); - GUILayout.EndVertical(); - - GUILayout.BeginHorizontal(); - GUILayout.Label(BoltWizardText.PHOTON_DASH, textLabel); - if (GUILayout.Button("Visit Dashboard", minimalButton)) - { - OpenURL("https://dashboard.photonengine.com/")(); - } - - GUILayout.EndHorizontal(); - }, false); - GUILayout.Space(15); - - BoltRuntimeSettings settings = BoltRuntimeSettings.instance; - - DrawInputWithLabel("Photon Bolt App ID or Email", () => - { - GUILayout.BeginVertical(); - - AppIdOrEmail = EditorGUILayout.TextField(AppIdOrEmail, centerInputText); - - GUILayout.EndVertical(); - }, false, true, 300); - - DrawInputWithLabel("Region", - () => - { - settings.photonCloudRegionIndex = EditorGUILayout.Popup(settings.photonCloudRegionIndex, - BoltRuntimeSettings.photonCloudRegions); - }, true, true); - - DrawInputWithLabel("NAT Punchthrough Enabled", - () => { settings.photonUsePunch = Toggle(settings.photonUsePunch); }, true, true); - - // Action - - if (beforeNextCallback == null) - { - beforeNextCallback = () => - { - if (requestingAppId) - { - BoltLog.Info("Please, wait until your request for a new AppID finishes."); - return false; - } - - if (AccountService.IsValidEmail(AppIdOrEmail)) - { - try - { - EditorUtility.DisplayProgressBar(BoltWizardText.CONNECTION_TITLE, - BoltWizardText.CONNECTION_INFO, 0.5f); - BoltLog.Info("Starting request"); - - requestingAppId = new AccountService().RegisterByEmail( - AppIdOrEmail, - new List() { ServiceTypes.Bolt }, - (response) => - { - if (response.ReturnCode == AccountServiceReturnCodes.Success) - { - var appKey = response.ApplicationIds[((int)ServiceTypes.Bolt).ToString()]; - - settings.photonAppId = appKey; - AppIdOrEmail = appKey; - - BoltLog.Info("You new App ID: {0}", AppIdOrEmail); - } - else - { - BoltLog.Warn( - "It was not possible to process your request, please go to the Photon Cloud Dashboard."); - BoltLog.Warn("Return Code: {0}", - AccountServiceReturnCodes.ReturnCodes[response.ReturnCode]); - } - - requestingAppId = false; - EditorUtility.ClearProgressBar(); - }, (err) => - { - BoltLog.Error(err); - - requestingAppId = false; - EditorUtility.ClearProgressBar(); - }); - - if (requestingAppId) - { - BoltLog.Info("Requesting your new App ID"); - } - else - { - BoltLog.Warn( - "It was not possible to process your request, please go to the Photon Cloud Dashboard."); - EditorUtility.ClearProgressBar(); - } - } - catch (Exception ex) - { - EditorUtility.DisplayDialog("Error", ex.Message, "ok"); - } - } - else if (IsAppId(AppIdOrEmail)) - { - settings.photonAppId = AppIdOrEmail; - return true; - } - else - { - ShowNotification(new GUIContent("Please specify a valid Photon Bolt App ID or Email.")); - } - - return false; - }; - } - } - - private void DrawSupport() - { - DrawInputWithLabel("Bolt Support", () => - { - GUILayout.BeginVertical(); - GUILayout.Space(5); - GUILayout.Label(BoltWizardText.SUPPORT, textLabel); - GUILayout.EndVertical(); - }, false); - GUILayout.Space(15); - - DrawStepOption(discordIcon, discordHeader, discordText, - callback: OpenURL("https://discord.gg/0ya6ZpOvnShSCtbb")); - DrawStepOption(bugtrackerIcon, bugtrackerHeader, bugtrackerText, - callback: OpenURL("https://github.com/BoltEngine/Bolt-Tracker")); - DrawStepOption(documentationIcon, documentationHeader, documentationText, - callback: OpenURL("https://doc.photonengine.com/en-us/bolt/current/setup/overview")); - DrawStepOption(reviewIcon, reviewHeader, reviewText, - callback: OpenURL("https://assetstore.unity.com/packages/tools/network/photon-bolt-free-127156")); - - // Action - - if (beforeNextCallback == null) - { - beforeNextCallback = () => - { - RunCompiler = EditorUtility.DisplayDialog(BoltWizardText.FINISH_TITLE, BoltWizardText.FINISH_QUESTION, - "Yes", "No"); - return true; - }; - } - } - - private void DrawNavMenu() - { - GUILayout.Space(5); - DrawMenuHeader("Installation Steps"); - GUILayout.Space(10); - - DrawStepOption(introIcon, new GUIContent("Bolt Wizard Intro"), - active: currentStage == - BoltSetupStage.Intro); - - DrawStepOption(releaseIcon, new GUIContent("Release History"), - active: currentStage == - BoltSetupStage.ReleaseHistory); - - DrawStepOption(photonCloudIcon, new GUIContent("Photon Cloud"), - active: currentStage == - BoltSetupStage.Photon); - - DrawStepOption(boltIcon, new GUIContent("Bolt"), - active: currentStage == - BoltSetupStage.Bolt); - - DrawStepOption(discordIcon, new GUIContent("Support"), - active: currentStage == - BoltSetupStage.Support); - - GUILayout.FlexibleSpace(); - GUILayout.Label(BoltNetwork.CurrentVersion, textLabel); - GUILayout.Space(5); - } - - void DrawHeader() - { - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - GUILayout.Label(Resources.Load("BoltLogo"), GUILayout.Width(200), GUILayout.Height(109)); - GUILayout.FlexibleSpace(); - GUILayout.EndHorizontal(); - } - - void DrawFooter() - { - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - - EditorGUI.BeginDisabledGroup((int)currentStage == 1); - -#if !BOLT_CLOUD - if (currentStage == BoltSetupStage.Photon) - { - if (GUILayout.Button("Skip", GUILayout.Width(ButtonWidth))) - { - NextStep(); - beforeNextCallback = null; - } - } -#endif - - if (GUILayout.Button("Back", GUILayout.Width(ButtonWidth))) - { - beforeNextCallback = null; - BackStep(); - } - - EditorGUI.EndDisabledGroup(); - - var nextLabel = "Next"; - - switch (currentStage) - { - case BoltSetupStage.Photon: - nextLabel = AccountService.IsValidEmail(AppIdOrEmail) ? "Register by Email" : nextLabel; - break; - case BoltSetupStage.Support: - nextLabel = "Done"; - break; - default: - nextLabel = "Next"; - break; - } - - if (GUILayout.Button(nextLabel, GUILayout.Width(ButtonWidth))) - { - if (beforeNextCallback == null || beforeNextCallback()) - { - if (currentStage == BoltSetupStage.Support) - { - EditorPrefs.SetBool(FirstStartupKey, true); - Close(); - - if (RunCompiler) - { - BoltMenuItems.RunCompiler(); - } - } - - NextStep(); - beforeNextCallback = null; - } - } - - GUILayout.Space(5); - GUILayout.EndHorizontal(); - GUILayout.Space(5); - } - - // Utils - - private void Save() - { - if (watch.ElapsedMilliseconds > 5000) - { - watch.Reset(); - watch.Start(); - - EditorUtility.SetDirty(BoltRuntimeSettings.instance); - AssetDatabase.SaveAssets(); - } - } - - void DrawMenuHeader(String text) - { - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - - GUILayout.Label(text, headerLargeLabel); - - GUILayout.FlexibleSpace(); - GUILayout.EndHorizontal(); - } - - void DrawInputWithLabel(String label, Action gui, bool horizontal = true, bool box = false, int labelSize = 220) - { - GUILayout.Space(10); - - if (horizontal) - { - if (box) - { - GUILayout.BeginHorizontal(stepStyle); - } - else - { - GUILayout.BeginHorizontal(); - } - } - else - { - if (box) - { - GUILayout.BeginVertical(stepStyle); - } - else - { - GUILayout.BeginVertical(); - } - } - - GUILayout.Label(label, headerStyle, GUILayout.Width(labelSize)); - //GUILayout.Space(5); - - gui(); - - GUILayout.Space(5); - - if (horizontal) - { - GUILayout.EndHorizontal(); - } - else - { - GUILayout.EndVertical(); - } - } - - void DrawInstallOption(BoltInstalls install) - { - BoltPackage package = packageInfo[install]; - - Action action = () => - { - if (package.installTest()) - { - ShowNotification(new GUIContent("Package already installed")); - return; - } - - Install(package); - }; - - bool packageExists = PackageExists(package.name); - - Action ignoredAction; - if (packageExists == true) - { - ignoredAction = () => { ShowNotification(new GUIContent("One of the dependencies is missing")); }; - } - else - { - if (install == BoltInstalls.Core) - { - ignoredAction = () => - { - ShowNotification(new GUIContent("Bolt Core is no longer required. You are ready to go.")); - }; - } - else - { - ignoredAction = () => - { - ShowNotification(new GUIContent("Please contact us at developer@photonengine.com")); - }; - } - - EditorGUI.BeginDisabledGroup(true); - } - - DrawStepOption(samplesIcon, new GUIContent(package.title), new GUIContent(package.description), - package.installTest(), action, ignoredAction); - - if (packageExists == false) - { - EditorGUI.EndDisabledGroup(); - } - } - - void DrawStepOption(Texture2D icon, GUIContent header, GUIContent description = null, bool? active = null, - Action callback = null, Action ignoredCallback = null) - { - GUILayout.BeginHorizontal(stepStyle); - - if (icon != null) - { - GUILayout.Label(icon, iconSection, GUILayout.Width(32), GUILayout.Height(32)); - } - - var height = icon != null ? 32 : 16; - - GUILayout.BeginVertical(GUILayout.MinHeight(height)); - GUILayout.FlexibleSpace(); - - GUILayout.Label(header, headerLabel, GUILayout.MinWidth(120)); - - if (description != null) - { - GUILayout.Label(description, textLabel); - } - - GUILayout.FlexibleSpace(); - GUILayout.EndVertical(); - - if (active == true) - { - GUILayout.Label(activeIcon, iconSection, GUILayout.Width(height), GUILayout.Height(height)); - } - else if (active == false) - { - GUILayout.Label(inactiveIcon, iconSection, GUILayout.Width(height), GUILayout.Height(height)); - } - - GUILayout.EndHorizontal(); - - if (callback != null) - { - var rect = GUILayoutUtility.GetLastRect(); - EditorGUIUtility.AddCursorRect(rect, MouseCursor.Link); - - if (rect.Contains(Event.current.mousePosition)) - { - if (Event.current.type == EventType.MouseDown) - { - callback(); - GUIUtility.ExitGUI(); - } - else if (Event.current.type == EventType.Ignore && Event.current.rawType == EventType.MouseDown) - { - if (ignoredCallback != null) - { - ignoredCallback(); - } - } - } - } - } - - void NextStep() - { - currentStage += (int)currentStage < Enum.GetValues(typeof(BoltSetupStage)).Length ? 1 : 0; - } - - void BackStep() - { - currentStage -= (int)currentStage > 1 ? 1 : 0; - } - - bool IsInstalled(params BoltInstalls[] installs) - { - foreach (var pack in installs) - { - if (!packageInfo[pack].installTest()) - { - return false; - } - } - - return true; - } - - void Install(BoltPackage package) - { - string packageName = package.name; - PackageFlags flags = package.packageFlags; - - if ((flags & PackageFlags.WarnForProjectOverwrite) == PackageFlags.WarnForProjectOverwrite) - { - if (ProjectExists()) - { - if (EditorUtility.DisplayDialog("Warning", - "Importing this package will overwrite the existing bolt project file that contains all your states, events, etc. Are you sure?", - "Yes", "No") == false) - { - return; - } - } - } - - if ((flags & PackageFlags.RunInitialSetup) == PackageFlags.RunInitialSetup) - { - InitialSetup(); - } - - AssetDatabase.ImportPackage(PackagePath(packageName), false); - - currentStage = BoltSetupStage.Bolt; - } - } -} diff --git a/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindow.cs.meta b/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindow.cs.meta deleted file mode 100644 index 2688dc5..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 86f39661c19dd43898a4b7fb37536825 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindowUtils.cs b/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindowUtils.cs deleted file mode 100644 index d2b917d..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindowUtils.cs +++ /dev/null @@ -1,244 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.RegularExpressions; -using Photon.Bolt.Editor.Utils; -using UnityEditor; -using UnityEngine; - -namespace Photon.Bolt.Editor -{ - public partial class BoltWizardWindow - { - [Flags] - enum PackageFlags - { - WarnForProjectOverwrite = 1 << 1, - RunInitialSetup = 1 << 2 - } - - class BoltWizardText - { - internal static readonly string WINDOW_TITLE = "Bolt Wizard"; - internal static readonly string SUPPORT = "You can contact the Bolt Team or Photon Services using one of the following links. You can also go to Bolt Documentation in order to get started with Photon Bolt."; - internal static readonly string PACKAGES = "Here you will be able to select all packages you want to use into your project. Packages marked green are already installed. \nClick to install."; - internal static readonly string PHOTON = "In this step, you will configure your Photon Cloud credentials in order to use our servers for matchmaking, relay and much more. Please fill all fields with your desired configuration."; - internal static readonly string PHOTON_DASH = "Go to Dashboard to create your App ID: "; - - internal static readonly string CONNECTION_TITLE = "Connecting"; - internal static readonly string CONNECTION_INFO = "Connecting to the account service..."; - - internal static readonly string FINISH_TITLE = "Bolt Setup Complete"; - internal static readonly string FINISH_QUESTION = "In order to finish the setup, Bolt needs to compile all Assets, do you want to proceed? If you opt to not compile now, you can run it on \"Bolt/Compile Assembly\"."; - - internal static readonly string CLOSE_MSG_TITLE = "Incomplete Installation"; - internal static readonly string CLOSE_MSG_QUESTION = "Are you sure you want to exit the Wizard?"; - internal static readonly string DISCORD_TEXT = "Join the Bolt Discord Community."; - internal static readonly string DISCORD_HEADER = "Community"; - internal static readonly string BUGTRACKER_TEXT = "Open bugtracker on github."; - internal static readonly string BUGTRACKER_HEADER = "Bug Tracker"; - internal static readonly string DOCUMENTATION_TEXT = "Open the documentation."; - internal static readonly string DOCUMENTATION_HEADER = "Documentation"; - internal static readonly string REVIEW_TEXT = "Please, let others know what you think about Bolt."; - internal static readonly string REVIEW_HEADER = "Leave a review"; - internal static readonly string SAMPLES_TEXT = "Import the samples package."; - internal static readonly string SAMPLES_HEADER = "Samples"; - internal static readonly string WIZARD_INTRO = - @"Hello! Welcome to Bolt Wizard! - -We are glad that you decided to use our products and services. Here at Photon, we work hard to make your multiplayer game easier to build and much more fun to play. - -This is a simple step by step configuration that you can follow and in just a few minutes you will be ready to use Bolt in all its power. If you have any doubt, please to our Getting Started page. - -Please, feel free to click on the Next button, and get started."; - } - - class BoltPackage - { - public string name; - public string title; - public string description; - public Func installTest; - public PackageFlags packageFlags = default(PackageFlags); - } - - enum BoltSetupStage - { - Intro = 1, - ReleaseHistory = 2, - Photon = 3, - Bolt = 4, - Support = 5 - } - - [Flags] - enum BoltInstalls - { - Core = 1 << 0, - Mobile = 1 << 1, - Samples = 1 << 3, - XB1 = 1 << 4, - PS4 = 1 << 5 - } - - String PackagePath(String packageName) - { - return Path.Combine(BoltPathUtility.PackagesPath, packageName + ".unitypackage"); - } - - Boolean PackageExists(String packageName) - { - return File.Exists(PackagePath(packageName)); - } - - Boolean ProjectExists() - { - return File.Exists(BoltPathUtility.ProjectPath); - } - - Boolean MainPackageInstalled() - { - string SETTINGS_PATH = Path.Combine(BoltPathUtility.ResourcesPath, "BoltRuntimeSettings.asset"); - string PREFABDB_PATH = Path.Combine(BoltPathUtility.ResourcesPath, "BoltPrefabDatabase.asset"); - - return File.Exists(SETTINGS_PATH) && File.Exists(PREFABDB_PATH); - } - - Boolean SamplesPackageInstalled() - { - return Directory.Exists("Assets/samples"); - } - - Boolean XB1PackageInstalled() - { - return File.Exists("Assets/Plugins/XB1.dll"); - } - - Boolean PS4PackageInstalled() - { - return File.Exists("Assets/Plugins/PS4.dll"); - } - - Boolean MobilePackageInstalled() - { - return Directory.Exists("Assets/Plugins/iOS") && Directory.Exists("Assets/Plugins/Android"); - } - - Action OpenURL(String url, params System.Object[] args) - { - return () => - { - if (args.Length > 0) - { - url = String.Format(url, args); - } - - Application.OpenURL(url); - }; - } - - void InitialSetup() - { - string SETTINGS_PATH = Path.Combine(BoltPathUtility.ResourcesPath, "BoltRuntimeSettings.asset"); - string PREFABDB_PATH = Path.Combine(BoltPathUtility.ResourcesPath, "BoltPrefabDatabase.asset"); - - if (!AssetDatabase.LoadAssetAtPath(SETTINGS_PATH, typeof(BoltRuntimeSettings))) - { - BoltRuntimeSettings settings = CreateInstance(); - - AssetDatabase.CreateAsset(settings, SETTINGS_PATH); - AssetDatabase.ImportAsset(SETTINGS_PATH, ImportAssetOptions.Default); - } - - if (!AssetDatabase.LoadAssetAtPath(PREFABDB_PATH, typeof(PrefabDatabase))) - { - AssetDatabase.CreateAsset(CreateInstance(), PREFABDB_PATH); - AssetDatabase.ImportAsset(PREFABDB_PATH, ImportAssetOptions.Default); - } - - BoltMenuItems.RunCompiler(); - } - - static bool IsAppId(string val) - { - try - { -#pragma warning disable RECS0026 // Possible unassigned object created by 'new' - new Guid(val); -#pragma warning restore RECS0026 // Possible unassigned object created by 'new' - } - catch - { - return false; - } - return true; - } - - private void PrepareReleaseHistoryText() - { - var text = (TextAsset)AssetDatabase.LoadAssetAtPath(Path.Combine(BoltPathUtility.BasePath, "release_history.txt"), typeof(TextAsset)); - var baseText = text.text; - - var regexVersion = new Regex(@"^(\d+\.?)+", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Multiline); - var regexAdded = new Regex(@"\b(Added:)(.*)\b", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Multiline); - var regexChanged = new Regex(@"\b(Changed:)(.*)\b", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Multiline); - var regexFixed = new Regex(@"\b(Fixed:)(.*)\b", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Multiline); - var regexRemoved = new Regex(@"\b(Removed:)(.*)\b", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Multiline); - - var matches = regexVersion.Matches(baseText); - - if (matches.Count > 0) - { - var currentVersionMatch = matches[0]; - var lastVersionMatch = currentVersionMatch.NextMatch(); - - if (currentVersionMatch.Success && lastVersionMatch.Success) - { - var header = currentVersionMatch.Value.Trim(); - var mainText = baseText.Substring(currentVersionMatch.Index + currentVersionMatch.Length, - lastVersionMatch.Index - lastVersionMatch.Length - 1).Trim(); - - var resultAdded = regexAdded.Matches(mainText); - var resultChanged = regexChanged.Matches(mainText); - var resultFixed = regexFixed.Matches(mainText); - var resultRemoved = regexRemoved.Matches(mainText); - - Func> itemProcessor = (match) => - { - var resultList = new List(); - for (var index = 0; index < match.Count; index++) - { - var result = match[index]; - resultList.Add(result.Groups[2].Value.Trim()); - } - return resultList; - }; - - ReleaseHistoryHeader = header; - ReleaseHistoryTextAdded = itemProcessor(resultAdded); - ReleaseHistoryTextChanged = itemProcessor(resultChanged); - ReleaseHistoryTextFixed = itemProcessor(resultFixed); - ReleaseHistoryTextRemoved = itemProcessor(resultRemoved); - } - } - else - { - ReleaseHistoryHeader = "Please look the file release_history.txt"; - ReleaseHistoryTextAdded = new List(); - ReleaseHistoryTextChanged = new List(); - ReleaseHistoryTextFixed = new List(); - ReleaseHistoryTextRemoved = new List(); - } - } - - public static bool Toggle(bool value) - { - var toggle = new GUIStyle("Toggle") - { - margin = new RectOffset(), - padding = new RectOffset() - }; - return EditorGUILayout.Toggle(value, toggle, GUILayout.Width(15)); - } - } -} diff --git a/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindowUtils.cs.meta b/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindowUtils.cs.meta deleted file mode 100644 index d688551..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/BoltWizardWindowUtils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: daaca6b7038434b8db861ebc9d3e3439 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/editor/scripts/PhotonBolt-Editor.asmdef b/Assets/Photon/PhotonBolt/editor/scripts/PhotonBolt-Editor.asmdef deleted file mode 100644 index 838d68c..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/PhotonBolt-Editor.asmdef +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "PhotonBolt-Editor", - "references": [ - "PhotonBolt" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [] -} \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/editor/scripts/PhotonBolt-Editor.asmdef.meta b/Assets/Photon/PhotonBolt/editor/scripts/PhotonBolt-Editor.asmdef.meta deleted file mode 100644 index aa5ed1f..0000000 --- a/Assets/Photon/PhotonBolt/editor/scripts/PhotonBolt-Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7449fe6f335b6447c93841d5609046d9 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/license.txt b/Assets/Photon/PhotonBolt/license.txt deleted file mode 100644 index 218dad0..0000000 --- a/Assets/Photon/PhotonBolt/license.txt +++ /dev/null @@ -1,2 +0,0 @@ -Current license terms are available here: -https://dashboard.photonengine.com/en-US/account/terms diff --git a/Assets/Photon/PhotonBolt/license.txt.meta b/Assets/Photon/PhotonBolt/license.txt.meta deleted file mode 100644 index 2aa2c92..0000000 --- a/Assets/Photon/PhotonBolt/license.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c9a44e1a75db62440b687ba95ca81cad -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/link.xml b/Assets/Photon/PhotonBolt/link.xml deleted file mode 100644 index a191902..0000000 --- a/Assets/Photon/PhotonBolt/link.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Assets/Photon/PhotonBolt/link.xml.meta b/Assets/Photon/PhotonBolt/link.xml.meta deleted file mode 100644 index 5ea5f1e..0000000 --- a/Assets/Photon/PhotonBolt/link.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f97b90c7a63da44eeb7213e6c19479f8 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/packages.meta b/Assets/Photon/PhotonBolt/packages.meta deleted file mode 100644 index 65385cc..0000000 --- a/Assets/Photon/PhotonBolt/packages.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 6cb52fd8ce0cf0040835065c40d4a178 -folderAsset: yes -timeCreated: 1500461493 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/packages/bolt_packages.txt b/Assets/Photon/PhotonBolt/packages/bolt_packages.txt deleted file mode 100644 index e69de29..0000000 diff --git a/Assets/Photon/PhotonBolt/packages/bolt_packages.txt.meta b/Assets/Photon/PhotonBolt/packages/bolt_packages.txt.meta deleted file mode 100644 index 08eb9c0..0000000 --- a/Assets/Photon/PhotonBolt/packages/bolt_packages.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6bbd4ce1c30321848821de7989802e7c -timeCreated: 1500463474 -licenseType: Store -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/packages/bolt_samples.unitypackage b/Assets/Photon/PhotonBolt/packages/bolt_samples.unitypackage deleted file mode 100644 index e3eddea..0000000 Binary files a/Assets/Photon/PhotonBolt/packages/bolt_samples.unitypackage and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/packages/bolt_samples.unitypackage.meta b/Assets/Photon/PhotonBolt/packages/bolt_samples.unitypackage.meta deleted file mode 100644 index 945dfb1..0000000 --- a/Assets/Photon/PhotonBolt/packages/bolt_samples.unitypackage.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 596534d41beef4393b9ccea707223c21 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/project.json b/Assets/Photon/PhotonBolt/project.json deleted file mode 100644 index fafd82c..0000000 --- a/Assets/Photon/PhotonBolt/project.json +++ /dev/null @@ -1,3085 +0,0 @@ -{ - "$type": "Photon.Bolt.Compiler.Assets.BoltProject, bolt.compiler", - "Filters": [], - "Assets": [ - { - "$type": "Photon.Bolt.Compiler.StateDefinition, bolt.compiler", - "Properties": [ - { - "Name": "CurrentZone", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "IsSpace", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "CurrentTransition", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeObject, bolt.compiler", - "StructGuid": "b039d403-d16b-4af0-a44f-fc5eb7d3b496" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Player", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Units", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "PathQueue", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "CurrentBattle", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "HeroUnit", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "SubFormations", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "FormationName", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "FormationNumber", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "MovementTargetFormation", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "MovementOriginFormation", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "IsEmbarked", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ParentFormation", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Morale", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "StartingMorale", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "MovementState", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ActionCooldown", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ActionCooldownMax", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "FleetRestingPoint", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeVector, bolt.compiler", - "Selection": 10, - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "PacketMaxBits": 512, - "PacketMaxProperties": 16, - "InitialPositionCompression": { - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "InitialRotationCompression": { - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "Name": "FormationState", - "Guid": "d7ecbbfb-2aa4-41e6-b745-72f55b565b31", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.ObjectDefinition, bolt.compiler", - "Properties": [ - { - "Name": "OriginZone", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "TargetZone", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "TransitionLength", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "IsCurved", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "Name": "Transition", - "Guid": "b039d403-d16b-4af0-a44f-fc5eb7d3b496", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.StateDefinition, bolt.compiler", - "Properties": [ - { - "Name": "ConnectionId", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "PlayerName", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "IsHost", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "FactionIndex", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "PlayerId", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "IsAI", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Credits", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "KnownPlanetsList", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "VisiblePlanetsList", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "PacketMaxBits": 512, - "PacketMaxProperties": 16, - "InitialPositionCompression": { - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "InitialRotationCompression": { - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "Name": "PlayerState", - "Guid": "59871d26-b925-463a-99f3-d6305974e7c3", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Player", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Zone", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "UnitClass", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "EntitySenders": 3, - "Name": "BuildUnitEvent", - "Guid": "af658d8e-8e09-41b0-9369-695c45b8adc4", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Formation", - "Enabled": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "TargetZone", - "Enabled": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "PathQueue", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "TargetFormation", - "Enabled": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "EntitySenders": 3, - "Name": "MoveFormationEvent", - "Guid": "5eb47a15-1996-4e6d-870e-133d42b3f7c9", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.StateDefinition, bolt.compiler", - "Properties": [ - { - "Name": "UnitClass", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Formation", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Hitpoints", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Shields", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "RevealState", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "BattleState", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ActionCooldown", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ActionCooldownMax", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Inventory", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Equipment", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "FlankTarget", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Morale", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Supplies", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Fuel", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Food", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ShieldsCooldown", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "PacketMaxBits": 512, - "PacketMaxProperties": 16, - "InitialPositionCompression": { - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "InitialRotationCompression": { - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "Name": "UnitState", - "Guid": "a3b5f966-83ae-4493-ac8f-90de2095ea63", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.StateDefinition, bolt.compiler", - "Properties": [ - { - "Name": "ProductionQueue", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeArray, bolt.compiler", - "ElementCount": 10, - "ElementType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeObject, bolt.compiler", - "StructGuid": "1cc5b915-f4e9-46d4-bae3-de6b38d6dd82" - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "ParentGuid": "593f7749-42a7-44fa-b61f-4bec598bae21", - "PacketMaxBits": 512, - "PacketMaxProperties": 16, - "InitialPositionCompression": { - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "InitialRotationCompression": { - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "Name": "FactoryState", - "Guid": "5b40b0d7-d27b-4407-968a-c0f4c722eb67", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Factory", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "UnitClass", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Player", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "IsUpgrade", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "EntitySenders": 3, - "Name": "AddProductionEvent", - "Guid": "51b6b927-fab0-4fb2-81b2-67005bd9cb43", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.ObjectDefinition, bolt.compiler", - "Properties": [ - { - "Name": "UnitClass", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "TimeProduced", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Player", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "IsUpgrade", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "Name": "QueueEntry", - "Guid": "1cc5b915-f4e9-46d4-bae3-de6b38d6dd82", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.StateDefinition, bolt.compiler", - "Properties": [ - { - "Name": "FormationList", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Zone", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "BattleName", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Flanks", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeArray, bolt.compiler", - "ElementCount": 10, - "ElementType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "FlankCount", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "IsOver", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "VictorID", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "PreparingCooldown", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "PacketMaxBits": 512, - "PacketMaxProperties": 16, - "InitialPositionCompression": { - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "InitialRotationCompression": { - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "Name": "BattleState", - "Guid": "4b486c12-bb55-4fb6-88f3-1a16218c67cf", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Attacker", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Target", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Action", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "EntitySenders": 3, - "Name": "AddBattleLogEvent", - "Guid": "7c2a7f70-ed97-4ff2-9a1b-dfcd08fe6c1e", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.StateDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Battle", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "FlankId", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "MaxUnitCount", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Player", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Units", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeArray, bolt.compiler", - "ElementCount": 30, - "ElementType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "OpposingFlank", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "DeathCooldowns", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeArray, bolt.compiler", - "ElementCount": 30, - "ElementType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "PacketMaxBits": 512, - "PacketMaxProperties": 16, - "InitialPositionCompression": { - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "InitialRotationCompression": { - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "Name": "BattleFlankState", - "Guid": "b15bfd78-d5db-4d5f-b238-6a1404090291", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Unit", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Flank", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "FlankIndex", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "EntitySenders": 3, - "Name": "MoveUnitToFlankEvent", - "Guid": "77ef4859-2899-4c6c-85b6-176c93b60157", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Unit", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "EntitySenders": 3, - "Name": "MoveUnitToReserveEvent", - "Guid": "0903b28c-f966-427e-b2f4-d1a6652803f0", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Attacker", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "IsDead", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "GlancingHit", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "WeaponType", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "IsDemoralized", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "ShieldDamage", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "ShieldBroken", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "EntitySenders": 1, - "GlobalSenders": 3, - "Name": "UnitDamageAnimEvent", - "Guid": "2d424fdd-d4e2-4994-a90e-f34e2ccc10d8", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.StateDefinition, bolt.compiler", - "Properties": [ - { - "Name": "StorageCapacity", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ControllingPlayerId", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Inventory", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ItemProductionCooldown", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ZoneID", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Planet", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Level", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "DistrictType", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "DistrictName", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "RelativePosition", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeVector, bolt.compiler", - "Selection": 14, - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ConnectedDistricts", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Upgrades", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "CaptureCooldown", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "PacketMaxBits": 512, - "PacketMaxProperties": 16, - "InitialPositionCompression": { - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "InitialRotationCompression": { - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "Name": "DistrictState", - "Guid": "593f7749-42a7-44fa-b61f-4bec598bae21", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Formation", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Unit", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "Name": "AssignLeaderEvent", - "Guid": "19182fa7-e061-484b-8714-d5ddbdb8014b", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "EntityCount", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "Name": "ServerConfigEvent", - "Guid": "ee9e2713-bc29-4605-a500-6a6be50ae09c", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Unit", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "BattleFlank", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "Name": "StartShellingEvent", - "Guid": "638aa073-9e70-43be-90f7-9d9289e23216", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Unit", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "Name": "StopShellingEvent", - "Guid": "cf584f1e-f3a6-4ce9-86ce-876612d52d97", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [], - "EntitySenders": 1, - "GlobalSenders": 3, - "Name": "FormationDemoralizedAnimEvent", - "Guid": "4f198445-9cbe-4d63-ad64-be9598b44eb1", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "ItemName", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "ItemAmount", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Origin", - "Enabled": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Target", - "Enabled": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "Name": "MoveItemEvent", - "Guid": "b6635e37-b7e3-4c6e-92d8-62cf65ff9f67", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.StateDefinition, bolt.compiler", - "Properties": [ - { - "Name": "PlanetName", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeString, bolt.compiler", - "MaxLength": 1 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "SpaceZoneID", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "AttackZoneID", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "Districts", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "ConnectedPlanets", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "PlanetPrefab", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "PrefabRotation", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeQuaternion, bolt.compiler", - "Selection": 14, - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - }, - { - "Name": "PrefabScale", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeFloat, bolt.compiler", - "Compression": { - "MinValue": -2048, - "MaxValue": 2048, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 2048.0, - "BitsRequired": 19 - } - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyStateSettings, bolt.compiler", - "ExtrapolationErrorTolerance": 0.25, - "_ExtrapolationCorrectionFrames": 6, - "ExtrapolationMaxFrames": 9, - "SnapMagnitude": 10.0 - } - } - ], - "PacketMaxBits": 512, - "PacketMaxProperties": 16, - "InitialPositionCompression": { - "Compression": [ - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - }, - { - "MinValue": -1024, - "MaxValue": 1024, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1024.0, - "BitsRequired": 18 - } - ] - }, - "InitialRotationCompression": { - "EulerCompression": [ - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - }, - { - "MaxValue": 360, - "Accuracy": 1.0, - "Pack": 1.0, - "Read": 1.0, - "BitsRequired": 9 - } - ], - "QuaternionCompression": { - "MinValue": -1, - "MaxValue": 1, - "Accuracy": 0.01, - "Pack": 100.0, - "Read": 0.01, - "Shift": 1.0, - "BitsRequired": 8 - } - }, - "Name": "PlanetState", - "Guid": "24a9f35a-88f4-4200-8b54-5af945d76586", - "Groups": [] - }, - { - "$type": "Photon.Bolt.Compiler.EventDefinition, bolt.compiler", - "Properties": [ - { - "Name": "Target", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeEntity, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "Hit", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeBool, bolt.compiler" - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - }, - { - "Name": "WeaponType", - "Enabled": true, - "Expanded": true, - "ReplicationMode": 1, - "Priority": 1, - "PropertyType": { - "$type": "Photon.Bolt.Compiler.PropertyTypeInteger, bolt.compiler", - "MaxValue": 255 - }, - "AssetSettings": { - "$type": "Photon.Bolt.Compiler.PropertyEventSettings, bolt.compiler" - } - } - ], - "EntitySenders": 1, - "GlobalSenders": 3, - "Name": "UnitAttackingEvent", - "Guid": "8f9fe35b-31da-48c6-a2ea-29f3392e1395", - "Groups": [] - } - ], - "ActiveGroup": "Everything" -} \ No newline at end of file diff --git a/Assets/Photon/PhotonBolt/project.json.meta b/Assets/Photon/PhotonBolt/project.json.meta deleted file mode 100644 index 19318fc..0000000 --- a/Assets/Photon/PhotonBolt/project.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: a89ef70a1599d45d395d604e109f5550 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/release_history.txt b/Assets/Photon/PhotonBolt/release_history.txt deleted file mode 100644 index 5e85da0..0000000 --- a/Assets/Photon/PhotonBolt/release_history.txt +++ /dev/null @@ -1,624 +0,0 @@ -1.3.2 - -Added: IExtraConnectionStats interface to get access to Packets/BoltConnection. -Added: UdpConnectionDisconnectReason.CloudTimeout to signal when the peer was disconnected by a Timeout with the Photon Cloud - -Changed: Rework IPv6 Support. -Changed: Disable Auto-Generate Light on Debug Start Scene. -Changed: Force Asset Refresh after Bolt Compile. -Changed: Shutdown Bolt after a Bolt Start has failed. -Changed: Realtime SDK to version v4.1.6.14. - -Fixed: Bolt Scenes window does not save active Scene when switching scenes. -Fixed: Edit Bolt Prefabs in Unity 2021+. -Fixed: Transform View Rotation Anti Aliasing. -Fixed: Force External EndPoint. -Fixed: Fail Startup only if NAT Punch is enabled. -Fixed: Refresh STUN at every startup. -Fixed: Shutdown after a short Internet loss. -Fixed: Float params casting to wrong values. - -1.3.1 - -Added: Option to use a custom STUN Server when setting up the Photon Platform. -Added: Turkey Region to Region List. - -Changed: Stream Package Size restricted to 1200 bytes in order to avoid package fragmentation. Defaults to 1024 bytes. -Changed: Soft disconnect when data packages contain serialization errors. Bolt will only disconnect peers with a high number of accumulated errors. -Changed: Assembly Loading system. Bolt will now skip most irrelevant assemblies when looking for GlobalEventListeners. -Changed: Realtime SDK to version v4.1.6.6. - -Fixed: Bolt Default Settings. -Fixed: Random disconnects when using Commands Delta Compression. -Fixed: Multi-Join Room Request errors. -Fixed: Memory leak when using Instant Commands. -Fixed: Memory allocated by unsent events after Bolt shutdown. -Fixed: Delay to disconnect Relayed clients. -Fixed: Disconnect timeout if PhotonPlatform is initialized mid-gameplay. -Fixed: Loading Unknown Assemblies causing exceptions. -Fixed: Update Session firing the callback with old data. -Fixed: Relay Fallback not working properly. -Fixed: STUN Servers Resolution. -Fixed: Starting Bolt from a Shutdown callback does not work. -Fixed: Session Update callback firing with old data. -Fixed: Fallback to Relay connections. - -1.3.0 - -Added: Cache for incoming/outcoming EndPoints, in order to reduce memory allocation when sending/receiving data from the internal sockets. -Added: Cache for Assemblies in the project for quick loading GlobalEventListener after a restart. -Added: New property in the Bolt Settings to control the Stream Package Size. -Added: Object pooling for data blocks used by the Stream System, in order to reduce memory allocations. -Added: BoltNetwork.FindConnection to retrieve a Connection reference based on the Connection ID. Works only if the peer contains the Connection on the internal list. - -Changed: Complete refactor of Bolt namespaces [breaking change]. -Changed: Minimal supported Unity version is now 2019.4 LTS. -Changed: Realtime SDK to version v4.1.5.4. -Changed: Major refactoring on NAT Punch System. -Changed: Bolt SDK now targets .NET Framework 4.6.2, meaning that your Unity project must support this target (.NET 4.x or .NET Standard 2.0). -Changed: Refactor in the Stream System to reduced memory allocations. -Changed: Entity Proxy creation request behavior. Instead of a request on every package, now it waits for a confirmation or a lost package to re-send the request. -Changed: Auto registration of PhotonRoomProperties Protocol Token. -Changed: Exception will be raised if two or more Prefabs share the same name. -Changed: Review Prefab Database Loading Async Process, Prefabs can be loaded asynchronously before starting Bolt. - -Fixed: NullReference Exception when passing an invalid Session reference to Matchmaking Join. -Fixed: NullReference when Shutdown Bolt in SinglePlayer mode. -Fixed: IndexException if more than 32 hitboxes (max) are registered on a single entity. -Fixed: Using specific IPv4 passed as an argument when starting Bolt, instead of using the one from the first valid network adapter. -Fixed: Invalid Operation check when creating or joining a session. -Fixed: Exception in Log System when running Bolt in non-English systems. - -Removed: Obsolete methods from GlobalEventListener. -Removed: Outdated plugins from the SDK package. - -1.2.14 - -Added: Help links to Bolt Settings window. -Added: New ProtocolToken Type (PooledProtocolToken) that makes use of a new pooling system just for Tokens. The Pooling system works with Commands and Events for now. -Added: New ProtocolToken Registry. This will scan the project looking for Protocol Token implementations and register automatically when Bolt starts. -Added: Explicit log message when the peer receives an unknown ProtocolToken ID. -Added: Option to show BoltHitboxBody snapshot history for debugging purposes. - -Changed: Project JSON file is now saved only with the indented formatting. This helps when merging the file using a Source Control Version System. -Changed: Boolean properties optimization to speed up lookup and modifications. Can have an impact if the network layout makes extensive use of booleans. -Changed: Bolt Physics Pooling System for BoltPhysicsHit, grating better memory management. -Changed: Refresh BoltHitbox Component UI. -Changed: Photon Realtime version to v4.1.4.4. - -Fixed: High memory allocation when running Bolt Physics checks, mainly on raycasts against spheres. -Fixed: High memory allocation when creating Commands. Updated pooling system. -Fixed: Memory allocation by the Bolt GUI elements. -Fixed: Events Pooling System. Before only received events were pooled, now local raised events are also pooled. -Fixed: Internal UdpEndPoint fields order, fixing issues with the endpoint serialization representation in native format. -Fixed: Delay to shutdown client when the game server shutdown. Now, when the client detects the server is leaving the session, it will shutdown too. -Fixed: Instant Commands. Now instant commands will execute all previous command on the queue before running, keeping the consistency on the insertion order. -Fixed: PS4 Serialization methods for native translation of EndPoints. -Fixed: Reliable Stream receiver order. This prevents the receiving peer to discard packets of not fully completed streams. -Fixed: NullReferenceException when disposing of data packets. -Fixed: Return Error code instead of OK when joining a session and the action expires due timeout. - -1.2.13 - -Added: Fallback connection protocol. If the peer is not able to connect via UDP, it will switch to a TCP connection with the Photon Cloud. -Added: Packet Encryption system. -Added: Optional Scene IProtocolToken argument when creating a new Session using the BoltMatchmaking API. -Added: Support for Gameye Session Hosting. -Added: New Events API. -Added: New metadata field to the matchmaking API with information about the current connected Lobby, like the number of players and number of rooms. - -Changed: BoltEntity property of the search algorithm for IPriorityCalculator and IReplicationFilter. Now it's set to NONE by default, as most of the time, those implementations are not used. -Changed: When you start Bolt, and there are GlobalListenners for the current scene, they will be loaded and receive events, which includes 'SceneLoadLocalDone', for example. -Changed: Bolt Debug Start window. Now it's possible to select the build type (Development and/or with Scripts Only), and a small UI refresh. -Changed: GlobalListenner 'SessionCreated' to 'SessionCreatedOrUpdated'. -Changed: Included a warning when running Bolt without a valid AppID. -Changed: Reverted GlobalEventListener checks on Scene load. Now it's using again a Regex check to load or unload the Script automatically. -Changed: Included warning if Bolt Packet Size is set above 1200 bytes, as this is the max size recommended. - -Fixed: Shutdown procedure when the Server disconnects from a Relayed Connection. Now the client shutdown itself when it detects the server leaving the room. -Fixed: EnableLANBroadcast issue when shutdown and restart, the client tries to connect to an old LAN Server. -Fixed: Double library initialization in the PlayFab Sample. -Fixed: Unable to restart Bolt from the BoltShutdownBegin callback. -Fixed: Support to the Unity New Input System when using the Bolt Debug logs. -Fixed: PS4 Connection instability when running more than 1 console per network. -Fixed: Exception when checking Single Player mode with Bolt not started. -Fixed: High CPU usage when displaying Array property values from BoltEntities. Now the UI counts with a dropdown system and is lighter. -Fixed: Difference between the Lag Compensated frame running on Client and on Server. -Fixed: Debug Start does not load Scene when running as Client on Unity Editor. -Fixed: Bolt does not Compile in Release Mode. -Fixed: Changing state properties from inside another property callback can be missed and never be synchronized. -Fixed: NullReference on BoltEntity Inspector Drawer when dealing with String properties. -Fixed: SceneLoadRemoteDone callback Token that was passing the wrong token. -Fixed: SceneLoadLocalDone callback order of execution and not firing. Now the callback will fire after the BoltStartDone on all loaded GlobalEventListeners for the currently loaded scene. -Fixed: BoltNetwork.RemoveGlobalEventCallback does not remove previously registered callback. -Fixed: DebugStart not starting as Server and not connecting to Game Server as Client. - -Removed: Zeuz support. -Removed: BoltNetwork.Connect(UdpSession, IProtocolToken), use instead BoltMatchmaking.Join(UdpSession, ...) - -1.2.12 - -Added: Option to pass an IProtocolToken when connecting to a "localhost" Game Server. This is useful when using the "Debug Start" utility to pass a token when connecting. -Added: "StreamDataStarted" callback to Reliable Stream System. The callback fires when a new data stream started to be received. -Added: "StreamDataProgress" callback to Reliable Stream System. The callback fires when a new piece of data from an incoming stream has been received. -Added: "StreamDataAborted" callback to Reliable Stream System. The callback fires when an incoming stream of data has been aborted. This can happen because the remote peer was disconnected or the hash check fails. -Added: Button in the "Debug Start" to run the Build in Single Player mode. -Added: Support for Custom Authentication. Now you will be able to pass Authentication Values before starting Bolt, and then check the credentials of your players using your own auth service. -Added: Photon Platform metadata now includes more properties: "UserId", "Nickname" and "Data". All information is related to the Custom Authentication support. -Added: "BoltStartFailed" callback with a "UdpConnectionDisconnectReason" as argument, signaling the fail reason. This callback will replace the normal callback without the argument on future versions. -Added: "SessionConnectFailed" callback with a "UdpSessionError" to signal errors when trying to join a new Game Session. This callback will replace the normal callback without the argument on future versions. -Added: "SessionCreationFailed" callback with a "UdpSessionError" to signal errors when trying to create a new Game Session. This callback will replace the normal callback without the argument on future versions. - -Changed: Deprecated "BoltShutdownBegin" callback without "UdpConnectionDisconnectReason" as argument. -Changed: Deprecated "SceneLoad" callbacks without "IProtocolToken" as an argument. This change aims to follow the Bolt pattern of using callbacks with the "IProtocolToken". -Changed: Update version of Photon Realtime to 4.1.3.0. -Changed: Package Overflow check. It warns the user when trying to package a ProtocolToken that exceeds the maximum package size. -Changed: Warning when Photon Application ID is not set. -Changed: Update Console integrations with the latest Bolt SDK. -Changed: Photon Platform metadata key for the current Region: from "region" to "Region". The lowercase version still exists but will be removed on future versions. -Changed: Debug Scene visuals. - -Fixed: Debug Scene issue of Obsolete component in Camera. -Fixed: Timeout connection in the background. The application will continue to ping the Game Server in the background, maintaining the connection. -Fixed: Data Stream in Reliable Mode. The major issue was a Memory Leak after finishing the transmission. -Fixed: Source Provider MissingMethodException that may occur on some versions of the Unity Editor. -Fixed: Bolt Compiler does not work in Release Mode. -Fixed: Bolt cannot be started if invoking ShutdownImmediate before BoltStartDone. - -Removed: Overload BoltNetwork.Connect(udpSession, userJoinToken). You should use the method from the BoltMatchmaking API in order to join a Game Session (BoltMatchmaking.JoinSession(udpSession, userJoinToken)). - -1.2.11 - -Added: GlobalEventListener callback documentation. -Added: Support for PlayFab Servers 2.0 (Thunderhead). -Added: Support for Source Control Systems like Perforce. -Added: Option to force the External/Public binding endpoint of the Game Server. Useful when running a Headless server on restricted network infrastructure. -Added: New Thread Pool manager, responsible for the creation and usage of Threads inside the SDK. It guarantees an on-demand initialization, recycling, and destruction of Threads, optimizing processing power and memory consumption. - -Changed: Optimizations to the Punchthrough process. Bolt will check if both peers seem to be on the same sub-network, if not, it will skip local/private endpoints. -Changed: Update Photon Realtime version to 4.1.2.19. -Changed: By default, the A2S Service will be off. -Changed: Start Session Creation timeout only after the Creation Request was sent. Before it started right at the beginning of the Session Creation behavior. -Changed: Reliable Data Stream API deprecated. The streaming system is not working properly when running in RELIABLE mode and is deprecated until fixed. The UNRELIABLE mode still works fine. -Changed: UdpKit namespaces to follow the official naming convention. Most of the namespaces were named in lowercase, now are all in PascalCase, as described on the MS Documentation. Major changes: "UdpKit.platform" to "UdpKit.Platform", "UdpKit.platform.photon" to "UdpKit.Platform.Photon". -Changed: All UdpKit Platforms (DotNet, Photon, XboxOne, PS4, Null) were moved to "UdpKit.Platform" namespace. -Changed: Bolt now finishes the startup only after the current Platform signals it has completed all async operations. This solves desynchronizations between foreground and background setup on the Platforms. - -Fixed: NullReferenceException when trying to access the CurrentAsyncOperation with the "Auto Scene Load" disabled. -Fixed: NullReferenceException on the Photon integration when stopping Bolt while it stills connecting the Best Region. -Fixed: Null-check in BoltCore.BeginShutdown when trying to Destroy an Entity already detached. -Fixed: BoltNetwork.ServerFrame performance. This property is cached internally now leading to better performance when using it. -Fixed: Photon Platform metadata, like Region, is set only when valid. Any invalid value will be removed from the metadata dictionary. -Fixed: False error logged when running as SinglePlayer and ShutdownImmediate is invoked. -Fixed: Create "Development Builds" when using Bolt Scene window to Debug builds. -Fixed: Unable to load new scenes after a mid-load disconnection. Now any in-progress scene loading info is cleared on shutdown. - -1.2.10 - -Added: Public API for Connection Packet count metrics: Sent, Received and Lost. -Added: BoltConnection has now a "ConnectionType" field, that signals when the connection is Direct or Relayed. -Added: New API call to force sync scenes between client and server (BoltNetwork.LoadSceneSync()). Useful if the "Auto Scene Load" is disabled. -Added: Search Path feature to Bolt Assets. Now you can select the desired locations where Bolt will search for Entity Prefabs. -Added: Sample "A2S Protocol Service". -Added: Sample "Area Of Interest". -Added: UDP Platforms can expose custom meta data about it's internal state (BoltMatchmaking.CurrentMetadata). PhotonPlatform exposes the current connected Photon Region. - -Changed: Normalization of UdpKit project namespace. Now all related projects reside inside the "UdpKit" namespace. -Changed: On Release Mode, Shutdown and Start exceptions are now warnings messages. -Changed: "Disable Auto Scene Load" removed from Bolt Settings Window, but still available through code. Use the "disableAutoSceneLoading" property on the BoltRuntime settings. -Changed: Review Photon Lobby Sample. - -Fixed: When switching control over an entity (using AssignControl) several times causes an entity freeze with a full input queue. Now, it will only execute for different connection other than the current one. -Fixed: Manually removing from scope an entity from its controller succeeds on the server and causes the client to error. By default, the scope can only be set to other connections different from the controller. -Fixed: Current Session/Room Player count. -Fixed: High CPU usage when running a Headless server with NAT PunchThrough disabled. -Fixed: UdpPlatform double initialization. Starting Bolt multiple times will not cause a duplicated instantiation of the active Platform. -Fixed: Compile error (unable to build User data) after switching to Release Mode. Related to old Debugging Symbols of the "bolt.user.dll" file. -Fixed: Warnings messages created by reference conflicts with compiled user data. Specifically warning "CS0436". - -Removed: All API marked as obsolete since Photon Bolt 1.2.8. - -1.2.9 - -Added: Extended Entity API. -Added: New callback SessionConnected(UdpSession, IProtocolToken) to Bolt.GlobalEventListener. -Added: New "BoltMatchmaking" utility class. - -Changed: Bolt folder hierarchy to maintain the consistency among the Photon projects. -Changed: Bolt physics classes to Bolt.LagCompensation namespace. -Changed: Improved Session List update procedure. Now the callback "SessionListUpdated" is invoked when the session info changes, instead of on interval. -Changed: Updated Photon Realtime version to 4.1.2.17. - -Fixed: Support to Assembly Definitions. Photon Bolt also has its own assembly definition now. -Fixed: Issues when including Photon Bolt and Photon Voice in the same project. -Fixed: Restarting the server from a different scene, future clients won't change to correct scene. -Fixed: Join Lobby is only allowed when on a certain state. -Fixed: Logs reveal app-id when debugging. -Fixed: "Bolt.RaycastAll" hit.distance is incorrect when Transform of object scaled. -Fixed: IP Discovery. Filter out non-private IPs when running the PunchThrough procedure. -Fixed: "PhotonRoomProperties" custom properties. Only signed numeric and string types are supported. -Fixed: "ThreadAbortException" when Starting Bolt using IL2CPP and .NET 4.0. -Fixed: NAT PunchThrough enabled/disabled mismatch. -Fixed: State callback doesn't fire when using an "Entity" as property type. -Fixed: Compiling Bolt with deleted scenes in Build Settings throws an exception. -Fixed: Switch Bolt to Debug or Release mode throws an exception. -Fixed: Child GameObject Transform not in sync until first update. -Fixed: "BoltShutdownBegin" with wrong UdpConnectionDisconnectReason. - -1.2.8 - -Added: Option to Join a room by name, instead of using only the Photon Session. Now you will be able to create a "PhotonSession" passing the room name you want to join and connect to it as usual. -Added: Option to disable the A2S Service on Bolt Pro. - -Changed: Dynamic Region List. When you use the "Best Region" feature, you can select the available regions using the White List configuration on the Photon Cloud Dashboard. If you are using a China AppID, only the China region will be available. -Changed: Skip button on Photon Cloud configuration inside the Bolt Wizard window for Bolt Pro version. -Changed: Public API Naming of BoltEntity. Several methods and functions were refactored to agree with the C# Coding Guidelines. The old symbols are still present, but with an obsolete marking and will be removed in a future version. -Changed: "SessionListUpdated" callback is not called when running as Bolt Server. -Changed: "SessionListUpdated" is always called, even if there is not session available. - -Fixed: JoinRoomTimeout issue. After the specified timeout, if the peer is not able to connect/join a room, the "SessionConnectFailed" callback will be raised. -Fixed: Bolt Wizard window menu item disappear when Updating Bolt if there are any errors on the scripts. -Fixed: No callback when the client attempts to connect to a full server or to a closed room. When the target room is full, you will receive a "SessionConnectFailed" callback. -Fixed: Wrong callback called when the max CCU limit is reached. When this occurs, the peer will receive a "BoltShutdownBegin" with the "UdpConnectionDisconnectReason.MaxCCUReached" as "disconnectReason". -Fixed: Wrong callback called when the connection is refused. When the server refuses the connection, the "ConnectRefused" callback will be raised. -Fixed: Server authoritative movement in Bolt hackable. It was added the option "Enable Frame Limit" to all commands, that limit the queue/execution to only one command per frame (on client and server). -Fixed: "SessionListUpdated" not called anymore after connection attempt is refused. -Fixed: Issues with "InvalidRegion" after latest update of Photon Realtime. -Fixed: Latency simulation only works from client to server. Now it works as expected on both ends of the connection. -Fixed: No callback when the client attempts to connect to a recent shutdown server. When you attempt to connect to a nonexistent session, the "SessionConnectFailed" will be invoked. -Fixed: "SetParent" bug reset position back to the old position before parented. We recommend using the Transform Space as "Local". -Fixed: Smoothing/interpolation issues on state properties. Solved for "Array of Floats", "Array of Quaternions", Quaternion, "Array of Vectors". - -Removed: Old project.bytes and backup files. - -1.2.7 - -Changed: The client will be shutdown when is not possible to establish a connection with a Photon Master Server when using Photon integration. -Fixed: Room Update Rate settings. The minimum update rate is 500ms. -Fixed: BoltRuntimeSettings asset creation issue when importing Bolt using the Wizard Window. -Fixed: Clear SessionList after Shutdown. Now, when the peer is shutdown, the session list will be cleaned. - -1.2.6 -Added: "Leave Review" button on the Wizard Window. -Added: Bolt now has a new default serialization method. All Bolt Assets will be serialized into JSON format, removing the need for XML or binary formats. -Added: Add new Binary channel to BoltConnection. Look at the new StreamingData Sample (https://github.com/BoltEngine/Bolt-Sample/tree/master/StreamingData) to see how to use it. -Added: New "GlobalEventListener.ShutdownBegin" with an extra parameter describing the Shutdown reason. -Added: New Bolt Setting to disable remote scene autoloading. By default, when the Bolt Host changes scenes, all clients will load the same scene, now you can disable this behavior. -Changed: Prompt developers to run the Bolt Compile Assembly after finishing the Wizard, this prevents errors when importing the samples package. -Changed: Bolt Menu Items are now merged. The access point to Bolt Settings, Assets and other windows are now inside a "Bolt" menu on the top-level of the toolbar. -Changed: When using a "PhotonRoomProperties" to setup the Photon Room, it is now by default "Open" and "Visible". Before it was "Closed" and "Invisible". -Changed: Bolt now has support to IPv6. -Changed: Updated internal Photon Realtime to vesion 4.1.1.21. -Changed: Removed hardcoded paths when creating new assets on Bolt, and uses relative paths instead. -Fixed: Exception (KeyNotFoundException) when creating and raising events after Bolt was shutdown. Now, if it's not possible to create a particular Event (by using it's Factory), the "Create()" method will return "null". -Fixed: Update the Animator properties every update has bad performance. Now the update process is performed only on the value changes. -Fixed: Removing all Bolt Logging from settings doesn't work. Removed the check that forces at least one logger. -Fixed: Issues with Bolt and the new Prefab System on Unity 2018.3.x. -Fixed: Exception when compiling Bolt with a State Asset with a missing parent. Now, if a State has a parent and this is deleted, the child State will be updated properly to an empty parent GUID. -Fixed: Issue when trying to register the same IProtocolToken when reloading a scene. Now the registration of the same Token is just ignored, without raising an exception. -Fixed: Server frame will reset on shutdown - -1.2.5 -Fixed: Connect Token null on the host when using Accept Mode Manual. -Fixed: Issues with Bolt IDs when using Unity 2018.3 with the new Prefabs Workflow. -Fixed: DLLs naming collisions. - -1.2.4 -Added: Command can now be marked as Instant. This forces immediate execution of all its inputs upon reaching server. -Added: Optional Enable Frame Limit for command. This allows to queue only one input per command per frame, preventing speed hacks. -Added: Delta Compression for command inputs and results. -Added: Link to license terms -Changed: Public API Naming. Several methods and functions were refactored to agree with the C# Coding Guidelines. The old symbols are still present, but with a obsolete marking and will be removed in a future version. -Changed: Semantic versioning (1.2.4 instead of 1.2.0.4) -Fixed: Exception in Debug Start -Fixed: Initial position issue -Fixed: Samples are now compatible with both Unity 2017 and 2018 -Fixed: Bolt Wizard shows current App ID correctly -Fixed: Exception in A2SManager when restarting Bolt server -Fixed: Issue on UI when running Client using BoltInit -Fixed: Failed Punch not fallback to Relay connection -Removed: Custom Hosted (OnPremise Photon Server) is no longer supported - -1.2.0.3 -Added: Property names are now generated into BoltAssets class -Added: Support to create new AppIds directly from Wizard Window using just an email -Added: Best Region support when connecting to Photon Cloud -Added: Single player sample script -Added: Getting Started Sample -Added: Exposed Photon Room timeout settings (create and join) - -Fixed: Update Photon session info (token or properties) after room creation -Fixed: Single Player mode -Fixed: MaxConnection session property always 0 -Fixed: Use BoltLog in all debug messages - -Changed: Steam sample are now available only on the Bolt Samples repository - -1.2.0.2 -Fixed: BoltLauncher selecting the wrong UdpPlatform on Bolt initialization -Fixed: Bolt Wizard window popup on Play Mode -Fixed: Bolt naming and version labels -Fixed: Text coloring on Bolt Wizard window when using Unity Pro -Fixed: Bolt Single player -Fixed: Bolt Builds for Android -Fixed: Bolt Debug Start -Fixed: BoltInit script and MainMenu scene - -Added: Support to China region when connecting to Photon Cloud -Added: Headless Server sample - -1.2.0.1 -Fixed: .NET 4.x issue when dealing with Bolt Assets - -1.2.0.0 -Fixed: Issues with IL2CPP using .NET 4.0. -Fixed: LanBroadcast using PhotonPlatform. -Fixed: General refactoring on Photon services to improve reliability and performance. -Fixed: Maintain connection with Photon cloud even when the game is paused. -Fixed: Support mobile platforms: Android and iOS. -Fixed: MaxConnection when using PhotonPlatform to use the general Bolt Settings. - -Changed: Incorporation of all Photon related code to internal DLLs. -Changed: Exposed session type when listing all available sessions from Bolt. - -Added: New Wizard window with basic steps to get Bolt running. -Added: Bolt setting for enabling Client Metrics. - -1.1.0.10 -Fixed: Assembly load errors with various thirdparty non-bolt dlls. - -1.1.0.9 -Fixed: Some non-Bolt .DLL files would be confused with Bolt .DLL files causing errors. - -1.1.0.8 -Fixed: Fixed issue with registering a bolt shutdown callback after BoltStartFailed occured. -Fixed: NullReferenceException that would happen when sending an event to a specific connection if that connection was disconnected. -Fixed: Bolt will now check for duplicate asset name during compilation and log an error if duplicates were detected. -Fixed: Steam Lobby sample. - -Added: Exposed BoltConnection.DisconnectReason so user code can inspect the reason a connection was disconnected. - -Changed: If an exception is thrown by internal code during event dispatch it's now logged which event caused the exception to make it easier to track down. -Changed: Exception for missing to register a protocol token and then trying to use it now also shows when Bolt runs in release mode. - -1.1.0.7 -Fixed: Latency Simulation. -Fixed: Scene async load. -Fixed: Sample game "Level1" scene. - -Added: Exposed connection stats from Bolt Connection by type (States, Events and Commands). - -1.1.0.6 -Fixed: Debug start for Unity 2018 -Fixed: Exception when LoadBalancingClient is destroyed while joining and Bolt is shutdown. -Fixed: Inactive GameObject with Animators attached were showing warnings messages about calling of animator functions. -Fixed: BoltStartFailed callback doesn't working. -Fixed: Some Property types do not display correct arrow for expanded/collapsed properties. -Fixed: SetServerInfo() throws a NullReferenceException when called inside BoltStartDone() callback. -Fixed: SetHostInfo being called but BoltNetwork.SessionList stays at 0. -Fixed: Error on macOS when using Experimental Scripting Runtime Version (.Net 4.6 Equivalent) and NAT punchthrough enabled. -Fixed: Building for macOS targets are invalid while attempting to test server/clients using DebugStart. - -Added: Exposed the current progress of async scene loading in currentAsyncOperation -Added: Lobby Manager example to be used with Photon platform. It's possible to create, list and join rooms. -Added: Missing Regions for Photon Cloud. -Added: Scroll panel for Bolt Welcome Window. This is useful when dealing with small screens. - -Changed: Updated API naming related to the use of "Host" and "Server" names. All references that uses "Host" were replaced with a "Server" version. - -Removed: RegisterShutdownDoneCallback (dead code that never did anything) - -1.1.0.5 -Fixed: Old DLL files from internal udpkit library replaced to latest version. -Fixed: Removed hardcoded configuration from Photon Cloud integration with Bolt for PunchThrough. - -1.1.0.4 -Changed: Implemented IEquatable<> for structs to avoid boxing costs and memory allocations, specifically when in Dictionaries -Fixed: Per tick memory allocation in FreezeProxies with a cached List <> -Changed: IBoltListNode to IBoltListNode, removed the implementation from BoltObject, implemented it on everything that needed it and removed casts in the lists that are no longer needed -Added: Options for querying IEntityBehaviour, IReplicationFilter, and IPriorityFilter as global options as well as allowing per-prefab overrides -Changed: Reversed the QueryComponentOptions to have global options that can be overridden by prefabs on a per-prefab basis. This is cleaner. - -1.1.0.3 -Added: New PunchThrough code using the Photon Servers as relay. This removes the need of Zeus. -Removed: Zeus support and settings. - -1.1.0.2 -Fixed: Quaternion smoothing fix and version update. -Fixed: Update Xcode project for proper bitcode support and recompile all iOS libraries. -Fixed: Wrong ip address conversion. -Fixed: Issues with Samples - -1.1.0.1 -Fixed: Removed JS files to keep compliance with Unity 2017.2 - -1.1.0.0 -Added: New "Welcome" experience and installer. -Added: BoltNetwork.SetNetworkSimulation method to change the loss/ping simulation localy on one device. - -Fixed: Issue with events sometimes being re-used too early. -Fixed: Issue with smoothing of quaternion properties -Fixed: Header text for inspectors should now be readable in the Unity light skin. -Fixed: Console being toggled on any key when "None" was selected as the toggle key. -Fixed: Issue with the float number formating in the Bolt compiler on Unity 2017 under certain cultures causing compilation errors. - -Changed: "Instantiate Mode" setting has been revamped, you can now -select between "Per Refab", "Server Only" and "Everyone". - -1.0.0.6 -Fixed: 2017.1 compatibility -Added: State.SetTeleport -Changed: Samples moved into separate package within main package - -1.0.0.5 -Fixed: Photon Cloud reliablity and improvements -Added: Server Monitor sample - -1.0.0.4 -Fixed: Photon Cloud NativePlatform issue -Added: Photon Cloud support for tokens (see Photon Cloud doc for details) - -1.0.0.3 -Removed: Network arrays of transforms - -1.0.0.2 -Changed: Internal improvements - -1.0.0.1 -Fixed: Issue for Photon Cloud on mobile platforms -Fixed: Warnings for samples - -1.0 -Added: Included support for Photon Cloud and Photon Server -Changed: Replaced Zeus master-server settings by the new Photon settings - -Beta 0.4.4.1 -Changed: Bolt internals for relay and matchmaking -Fixed: Bolt installation will no longer delete console integrations -Fixed: State.SetTransforms (transform,null) will no longer cause an error -Added: Bolt Swarm SDK - -Beta 0.4.3.19 -Added: PositionAtFrame which returns the position of a Bolt hitbox at a given frame - -Beta 0.4.3.18 -Fixed: Issue with Bolt assets not saving -Changed: Smoothing for quarternion result smoothing temporarily disabled -Changed: Improvements for Bolt samples - -Beta 0.4.3.17 -Fixed: Event issue introduced in last release -Fixed: Hitbox issue introduced in last release -Fixed: Issue for Unity 5.4 on OSX -Fixed: Render transform -Fixed: Miscellaneous sample fixes - -Beta 0.4.3.16 -Added: New Samples (3rd person sample client and server auth, click to move server auth, rigidbody player server auth) -Changed: XLM Serialization -Changed: Miscellanious optimizations -Fixed: Issue with correction interpolation for commands pooling and initial values compression - -Beta 0.4.3.15 -Fixed: Improvements to Bolt physics for lag compensation -Fixed: Bolt will now import properly when upgrading or switching between debug and release mode -Fixed: Will no longer lose Global Illumination on Bolt scene load -Fixed: iOS improvements - -Beta 0.4.3.14 -Fixed: Entities instantiating at wrong position -Fixed: Zeus not updating lobby count when clients connect (was only on disconnect) -Fixed: Command correction interpolation for Vector3 and Quaternion, and exposed SnapMagnitude in the editor UI -Added: Smoothing for floats - -Beta 0.4.3.13 -Fixed: Bolt will no longer delete Steam integration files when installing Bolt -Fixed: Entity Events will no longer be discarded when Bolt is not under load -Fixed: Bolt log issue -Fixed: Excessive acks for steaming bytes -Fixed: State property triggers -Changed: ShutDownImmediate now works so the behvaiour is consistent with a non-immediate shutdown -Added: New Entity function: RemoveAllCallbacks -Added: New API Docs http://doc-api.photonengine.com/en/bolt/current/index.html - -Beta 0.4.3.12 -Fixed: Bolt Scenes errors due to Unity 5.3 -Fixed: UPNP Button -Fixed: Control tokens -Fixed: Help button doc links -Added: Check to make sure you have installed for the current Bolt you are using - -Beta 0.4.3.11 -Fixed: Zeus punchthough issue resolved -Changed: Removed Pro dependency for async level loading -Added: API for adding C# delegates as event callbacks - -Beta 0.4.3.10 -Fixed: IL2CPP, relevant to iOS and tvOS -Fixed: BoltInit.cs was out of date -Added: MainMenu scene with BoltInit.cs included with package - -Beta 0.4.3.9 -Fixed: Bolt will no longer call methods on disabled scripts -Fixed: Bolt will now default to the new Zeus development master server -Fixed: A couple of entity settings were missing from the new UI, they are now back -Fixed: Spelling error in the bolt settings window -Fixed: Bolt will now automatically save the current scene when you click "edit" in Bolt Scenes -Added: You can now select replication mode + mecanim mode when importing a mecanim state -Added: Added .isControllerOrOwner to BoltEntity -Removed: Removed the .mdb files - -Beta 0.4.3.8 -Changed: Improved the performance of SetDynamic and GetDynamic substantially. -Changed: Added proper error reporting to SetDynamic if property queried for does not exist. -Changed: Deprecated NetworkTransform.SetTransforms, see: IState.SetTransforms and NetworkTransform.ChangeTransforms. -Changed: Any errors thrown inside Bolt will now always be logged to unitys Debug.LogException no matter if Bolt is in debug mode or if you have 'Unity' logging enbled in Bolt. -Changed: BoltNetwork.Destroy can now be used when Bolt is not running, it will simply destroy the object normally using Unity's GameObject.Destroy. - -Added: TrySetDynamic and TryGetDynamic that does not log errors if properties dont exists, but instead return a bool true/false. -Added: Added IState.SetTransforms to replace NetworkTransform.SetTransforms, this new methods works around the issue of position snapping for entities when their position updates are delayed. -Added: NetworkTransform.ChangeTransform to replace the previous NetworkTransform.SetTransforms for changing the transform target for interpolation after it's been set once. -Added: IState.ForceTransform that lets you over-write all currently received position and rotation values of a transform completely, this is usefull for working around issue #242 when loosing control of an entity and its position will snap back, you can now force it to stay at the correct location in world until proper position updates arrive. -Added: Bolt.EntityTargets.OnlyControllerAndOwner event target. -Added: BoltEntity.isControlled property. -Added: BoltEntityExtensions which contains extensions method for IsAttached, IsOwner, IsControlled, IsSceneObject, IsFrozen and HasControl the methods properly handle the case where Bolt is not running, the entity is null or detached without throwing exceptions. - -Fixed: GitHub Issue #224 (see: IState.SetTransforms, NetworkTransform.ChangeTransform) -Fixed: GitHub Issue #243 -Fixed: GitHub Issue #259 - -Beta 0.4.3.7 - -Fixed: Issue causing servers to disconnect from Zeus after a specific interval was resolved. - -Beta 0.4.3.6 - -Added: Bolt Release build to the package. It's a unitypackage in Assets\bolt-release folder. If you want only the release build, please unpack into an empty project and then import the .unitypackage where needed. -Note: This version is just a re-packaging of 0.4.3.5 to add the Release build. No new features. - -Beta 0.4.3.5 - -Fixed: Entities getting frozen on clients after 10 seconds. -Fixed: Int compression not being applied. -Fixed: Delay on Zeus session list request after re-connecting. -Fixed: ZeusDisconnected callback not being invoked if Zeus times out. - -Beta 0.4.3.4 - -Fixed: Issue with setting Animator to null causing crashes. -Fixed: Issue with array properties not properly checking if the value actually changed before flagging a value for re-sending. -Fixed: Issue with entity inspector not showing debug values. -Fixed: Some smaller performance issues related to garbage generated in various places in code. - -Improved the performance of the initial scene object search algorithm. - -Beta 0.4.3.3 - -Fixed: Entity event unreliability issues where too many events would get discarded. -Fixed: Debug Start will now respect 64 bit windows build settings. -Fixed: Control of an entity will now be handed over properly in all circumstances. -Fixed: ‘Proxy When Frozen’ should now work properly. -Fixed: RemoveCallback will now work properly. - -Added: New settings on the Bolt Entity component called ‘Detach Parent On Disconnect’ which if enabled automatically finds nested entities and de-parents them when the parent is detached. -Added: New overloads to BoltLauncher.StartServer which takes a scene name as last parameter for a scene that will automatically loaded when server has started. -Added: New method called BoltNetwork.PreLoadPrefabDb() which can be called as soon as the game starts to limit the lag spike that happens when starting Bolt. - -Beta 0.4.3.1 - -Added: Bolt.IEntityReplicationFilter that allows you direct boolean control over if an entity should be written into a packet or not. -Added: Added the ability to pick between local and world transform replication. -Added: You can now create IProtocolToken properties on events. -Added: Added WriteBoltEntity and ReadBoltEntity extension methods for UdpPacket to easily write/read BoltEntity objects in IProtocolToken Read/Write method. -Added: Added support for Matrix4x4, Color32 and GUID properties. -Added: Two new Global callbacks exist EntityFrozen and EntityThawed for handling entities being frozen/thawed on a global level. - -Fixed: Disconnect tokens are now available on the BoltConnection object. -Fixed: ProtocolToken passed into BoltNetwork.Attached is not replaced by null by mistake anymore. -Fixed: Resolved interpolation issues for properties on Commands. -Fixed: The issues with connecting through Zeus should be solved. -Fixed: Resolved several issues in related to nesting Bolt entities during run-time and Bolt callback methods such as Attached, etc. -Fixed: BoltPhysicsHit now contains the approximate distance between the hitbox and sphere overlap origin instead of -Infinity. - -Changed: Changed the way priority is accumulated for entities to give smoother data delivery. -Changed: Changed the editor layout of the ‘Bolt Entity’ script on game objects. diff --git a/Assets/Photon/PhotonBolt/release_history.txt.meta b/Assets/Photon/PhotonBolt/release_history.txt.meta deleted file mode 100644 index d5835b0..0000000 --- a/Assets/Photon/PhotonBolt/release_history.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5222d4aaaf561574bae819bd5b422631 -timeCreated: 1441804847 -licenseType: Store -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/resources.meta b/Assets/Photon/PhotonBolt/resources.meta deleted file mode 100644 index b782325..0000000 --- a/Assets/Photon/PhotonBolt/resources.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 453424a701fae3a469e879f993474f0b -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/resources/BoltIcon.png b/Assets/Photon/PhotonBolt/resources/BoltIcon.png deleted file mode 100644 index fce4e62..0000000 Binary files a/Assets/Photon/PhotonBolt/resources/BoltIcon.png and /dev/null differ diff --git a/Assets/Photon/PhotonBolt/resources/BoltIcon.png.meta b/Assets/Photon/PhotonBolt/resources/BoltIcon.png.meta deleted file mode 100644 index 1c7506b..0000000 --- a/Assets/Photon/PhotonBolt/resources/BoltIcon.png.meta +++ /dev/null @@ -1,68 +0,0 @@ -fileFormatVersion: 2 -guid: 8d335a12b4c55af4c84405f247bc4474 -timeCreated: 1490777303 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 4 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - 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: 5 - maxTextureSize: 256 - textureSettings: - filterMode: 1 - aniso: -1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 1 - lightmap: 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 - alphaUsage: 1 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - buildTarget: DefaultTexturePlatform - maxTextureSize: 256 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset b/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset deleted file mode 100644 index bec3315..0000000 --- a/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset +++ /dev/null @@ -1,26 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: -1148507213, guid: 5b00bf8b25851d440940a40ec23344f4, type: 3} - m_Name: BoltPrefabDatabase - m_EditorClassIdentifier: - DatabaseMode: 0 - Prefabs: - - {fileID: 0} - - {fileID: 2057280478138210166, guid: 12e1714c02c111f4e9d6981ad8f8036b, type: 3} - - {fileID: 4026633161700752889, guid: 4f91d7eec3642cc4982e522a499f293f, type: 3} - - {fileID: 1519560224452675769, guid: ff49bfd3e408771468b4722c5fde646d, type: 3} - - {fileID: 1355812926097278600, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} - - {fileID: 8292977142823461082, guid: 6af4ad43e05dcb344bfd726895735387, type: 3} - - {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746, type: 3} - - {fileID: 3262827332414082260, guid: f05198a1b03fe2b4e8042a9349c41aa3, type: 3} - - {fileID: 8890686142670377634, guid: e369f02fbeb5a9046aaa40a9b89a8973, type: 3} - SearchPaths: [] diff --git a/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset.meta b/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset.meta deleted file mode 100644 index 80f36a2..0000000 --- a/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 65b0205959f4b0b49842a048846922cc -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/resources/BoltRuntimeSettings.asset b/Assets/Photon/PhotonBolt/resources/BoltRuntimeSettings.asset deleted file mode 100644 index 9b1bd60..0000000 --- a/Assets/Photon/PhotonBolt/resources/BoltRuntimeSettings.asset +++ /dev/null @@ -1,76 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &11400000 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 2106054330, guid: 5b00bf8b25851d440940a40ec23344f4, type: 3} - m_Name: BoltRuntimeSettings - m_EditorClassIdentifier: - _config: - framesPerSecond: 60 - packetSize: 1200 - packetMaxEventSize: 512 - packetStreamSize: 4096 - maxEntityPriority: 65536 - maxPropertyPriority: 2048 - scopeMode: 0 - logTargets: 3 - disableDejitterBuffer: 0 - clientSendRate: 3 - clientDejitterDelay: 6 - clientDejitterDelayMin: 3 - clientDejitterDelayMax: 9 - serverSendRate: 3 - serverDejitterDelay: 6 - serverDejitterDelayMin: 3 - serverDejitterDelayMax: 9 - serverConnectionLimit: 32 - serverConnectionAcceptMode: 1 - commandQueueSize: 60 - commandRedundancy: 6 - commandPingMultiplier: 1.25 - useNetworkSimulation: 1 - simulatedLoss: 0 - simulatedPingMean: 0 - simulatedPingJitter: 0 - simulatedRandomFunction: 0 - connectionTimeout: 10000 - connectionRequestTimeout: 500 - connectionRequestAttempts: 20 - connectionLocalRequestAttempts: 5 - disableAutoSceneLoading: 0 - EnableIPv6: 0 - debugClientCount: 1 - debugStartPort: 54321 - debugBuildMode: 1 - debugStartMapName: GalaxyMap - debugPlayAsServer: 1 - showDebugInfo: 0 - overrideTimeScale: 1 - debugEditorMode: 0 - consoleToggleKey: 9 - consoleVisibleByDefault: 0 - compilationWarnLevel: 4 - editorSkin: 4 - scopeModeHideWarningInGui: 0 - showBoltEntityHints: 0 - serializeProjectAsText: 0 - photonAppId: e44b4d31-ecbe-43ed-a111-d190991125de - photonUsePunch: 1 - photonCloudRegionIndex: 5 - instantiateMode: 2 - globalEntityBehaviourQueryOption: 3 - globalEntityPriorityCalculatorQueryOption: 3 - globalEntityReplicationFilterQueryOption: 3 - a2sServerPort: 21777 - enableA2sServer: 1 - RoomCreateTimeout: 20 - RoomJoinTimeout: 20 - enableClientMetrics: 0 - enableSourceProvider: 0 diff --git a/Assets/Photon/PhotonBolt/resources/BoltRuntimeSettings.asset.meta b/Assets/Photon/PhotonBolt/resources/BoltRuntimeSettings.asset.meta deleted file mode 100644 index 9db8011..0000000 --- a/Assets/Photon/PhotonBolt/resources/BoltRuntimeSettings.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dc43410f031439e4cab6920194ae2705 -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/scenes.meta b/Assets/Photon/PhotonBolt/scenes.meta deleted file mode 100644 index cdecd7b..0000000 --- a/Assets/Photon/PhotonBolt/scenes.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 8355abd40e442874d82032d6af7721a9 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/scenes/BoltDebugScene.unity b/Assets/Photon/PhotonBolt/scenes/BoltDebugScene.unity deleted file mode 100644 index a1ac456..0000000 --- a/Assets/Photon/PhotonBolt/scenes/BoltDebugScene.unity +++ /dev/null @@ -1,619 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &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: 1 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 0 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 1024 - m_ReflectionCompression: 2 - m_MixedBakeMode: 1 - m_BakeBackend: 0 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 500 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 500 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 2 - m_PVRDenoiserTypeDirect: 0 - m_PVRDenoiserTypeIndirect: 0 - m_PVRDenoiserTypeAO: 0 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 0 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_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.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &367979120 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 367979121} - - component: {fileID: 367979123} - - component: {fileID: 367979122} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &367979121 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 367979120} - m_LocalRotation: {x: 0, 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: 1670489437} - 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: 110, y: 0} - m_SizeDelta: {x: 200, y: 100} - m_Pivot: {x: 0, y: 1} ---- !u!114 &367979122 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 367979120} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 0.99997437, b: 0.9999913, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 36 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 42 - m_Alignment: 3 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Photon Bolt ---- !u!222 &367979123 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 367979120} - m_CullTransparentMesh: 0 ---- !u!1 &947583843 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 947583845} - - component: {fileID: 947583844} - m_Layer: 0 - m_Name: BoltDebugStart - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &947583844 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 947583843} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 7b91f0d81f03c7d4895ece8064025ce8, type: 3} - m_Name: - m_EditorClassIdentifier: ---- !u!4 &947583845 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 947583843} - m_LocalRotation: {x: 0, 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: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1233091604 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1233091608} - - component: {fileID: 1233091607} - - component: {fileID: 1233091606} - - component: {fileID: 1233091605} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1233091605 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1233091604} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 ---- !u!114 &1233091606 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1233091604} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, 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: 1 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 ---- !u!223 &1233091607 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1233091604} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!224 &1233091608 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1233091604} - 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: 1781609919} - - {fileID: 1670489437} - 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 &1609382569 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1609382570} - - component: {fileID: 1609382572} - - component: {fileID: 1609382571} - m_Layer: 5 - m_Name: Image - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1609382570 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1609382569} - m_LocalRotation: {x: -0, 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: 1670489437} - 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: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0, y: 1} ---- !u!114 &1609382571 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1609382569} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 1abf0ef6bcd6f4d33852c878c3400bc4, 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 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1609382572 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1609382569} - m_CullTransparentMesh: 0 ---- !u!1 &1648222790 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1648222792} - - component: {fileID: 1648222791} - m_Layer: 0 - m_Name: Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!20 &1648222791 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1648222790} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 2 - m_BackGroundColor: {r: 0.28627452, g: 0.38823533, b: 0.5137255, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: 0 - 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: 0 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1648222792 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1648222790} - m_LocalRotation: {x: 0, 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 &1670489436 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1670489437} - - component: {fileID: 1670489438} - m_Layer: 5 - m_Name: Panel - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1670489437 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1670489436} - m_LocalRotation: {x: 0, 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: 1609382570} - - {fileID: 367979121} - m_Father: {fileID: 1233091608} - 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: 140} - m_SizeDelta: {x: 295, y: 100} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &1670489438 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1670489436} - m_CullTransparentMesh: 0 ---- !u!1 &1781609918 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1781609919} - - component: {fileID: 1781609921} - - component: {fileID: 1781609920} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1781609919 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1781609918} - m_LocalRotation: {x: 0, 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: 1233091608} - 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: -140} - m_SizeDelta: {x: 680, y: 166.42} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1781609920 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1781609918} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 0.99997437, b: 0.9999913, a: 1} - m_RaycastTarget: 1 - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 32 - 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: 'Debug Scene - - - Your Game Scene is being loaded...' ---- !u!222 &1781609921 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1781609918} - m_CullTransparentMesh: 0 diff --git a/Assets/Photon/PhotonBolt/scenes/BoltDebugScene.unity.meta b/Assets/Photon/PhotonBolt/scenes/BoltDebugScene.unity.meta deleted file mode 100644 index 93f55fc..0000000 --- a/Assets/Photon/PhotonBolt/scenes/BoltDebugScene.unity.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 859b4a4289abd7b48a0b6081a6063f5a -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/scripts.meta b/Assets/Photon/PhotonBolt/scripts.meta deleted file mode 100644 index 2510732..0000000 --- a/Assets/Photon/PhotonBolt/scripts.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 4b40e9774fad13c40bbdbdcbde408054 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonBolt/scripts/BoltConsoleWriter.cs b/Assets/Photon/PhotonBolt/scripts/BoltConsoleWriter.cs deleted file mode 100644 index 5d2c4e6..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltConsoleWriter.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Text; -using UnityEngine; - -namespace Photon.Bolt -{ - public static class ConsoleWriter - { -#if UNITY_STANDALONE_WIN - static class PInvoke - { - public const int STD_OUTPUT_HANDLE = -11; - - [DllImport("kernel32.dll", SetLastError = true)] - public static extern bool AttachConsole(uint dwProcessId); - - [DllImport("kernel32.dll", SetLastError = true)] - public static extern bool AllocConsole(); - - [DllImport("kernel32.dll", SetLastError = true)] - public static extern bool FreeConsole(); - - [DllImport("kernel32.dll", EntryPoint = "GetStdHandle", SetLastError = true, CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)] - public static extern IntPtr GetStdHandle(int nStdHandle); - - [DllImport("kernel32.dll")] - public static extern bool SetConsoleTitle(string lpConsoleTitle); - } - - static TextWriter realOut; -#endif - - public static void Open() - { -#if UNITY_STANDALONE_WIN - if (realOut == null) - { - realOut = Console.Out; - } - - var hasConsole = PInvoke.AttachConsole(0x0ffffffff); - if (hasConsole == false) - { - PInvoke.AllocConsole(); - } - - try - { - // grab handle ptr - var outHandlePtr = PInvoke.GetStdHandle(PInvoke.STD_OUTPUT_HANDLE); - - // we can then create a filestream from this handle -#pragma warning disable 0618 - var fileStream = new FileStream(outHandlePtr, FileAccess.Write); -#pragma warning restore 0618 - - // and then create a new stream writer (using ASCII) - var stdOut = new StreamWriter(fileStream, Encoding.ASCII) - { - AutoFlush = true - }; - - // and force unity to use this - Console.SetOut(stdOut); - } - catch (Exception e) - { - Debug.Log(e); - } -#endif - } - - public static void Close() - { -#if UNITY_STANDALONE_WIN - PInvoke.FreeConsole(); - - Console.SetOut(realOut); - realOut = null; -#endif - } - } -} diff --git a/Assets/Photon/PhotonBolt/scripts/BoltConsoleWriter.cs.meta b/Assets/Photon/PhotonBolt/scripts/BoltConsoleWriter.cs.meta deleted file mode 100644 index 32e095a..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltConsoleWriter.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a93332ca3ed362843a4cd53797c30390 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Photon/PhotonBolt/scripts/BoltDebugStart.cs b/Assets/Photon/PhotonBolt/scripts/BoltDebugStart.cs deleted file mode 100644 index b2c3fe3..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltDebugStart.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System.Collections; -using Photon.Bolt.Internal; -using Photon.Bolt.Utils; -using UdpKit; -using UnityEngine; - -#if UNITY_EDITOR_OSX -using Process = System.Diagnostics.Process; -#endif - -namespace Photon.Bolt -{ - public partial class BoltDebugStart : GlobalEventListenerBase - { - void Awake() - { - Application.targetFrameRate = 60; - } - - void Start() - { -#if UNITY_EDITOR_OSX - Process p = new Process(); - p.StartInfo.FileName = "osascript"; - p.StartInfo.Arguments = - - @"-e 'tell application """ + UnityEditor.PlayerSettings.productName + @""" - activate -end tell'"; - - p.Start(); -#endif - - var settings = BoltRuntimeSettings.instance; - - var cfg = settings.GetConfigCopy(); - cfg.connectionTimeout = 60000000; - cfg.connectionRequestTimeout = 500; - cfg.connectionRequestAttempts = 1000; - - if (string.IsNullOrEmpty(settings.debugStartMapName) == false) - { - if (BoltDebugStartSettings.DebugStartIsServer) - { - BoltLog.Warn("Starting as SERVER"); - - var serverEndPoint = new UdpEndPoint(UdpIPv4Address.Localhost, (ushort)settings.debugStartPort); - - BoltLauncher.StartServer(serverEndPoint, cfg); - } - else if (BoltDebugStartSettings.DebugStartIsClient) - { - BoltLog.Warn("Starting as CLIENT"); - - var clientEndPoint = new UdpEndPoint(UdpIPv4Address.Localhost, 0); - - BoltLauncher.StartClient(clientEndPoint, cfg); - } - else if (BoltDebugStartSettings.DebugStartIsSinglePlayer) - { - BoltLog.Warn("Starting as SINGLE PLAYER"); - - BoltLauncher.StartSinglePlayer(cfg); - } - - BoltDebugStartSettings.PositionWindow(); - } - else - { - BoltLog.Error("No map found to start from"); - } - } - - public override void BoltStartFailed(UdpConnectionDisconnectReason disconnectReason) - { - BoltLog.Error("Failed to start debug mode"); - } - - public override void BoltStartDone() - { - if (BoltNetwork.IsServer || BoltNetwork.IsSinglePlayer) - { - BoltNetwork.LoadScene(BoltRuntimeSettings.instance.debugStartMapName); - } - else if (BoltNetwork.IsClient) - { - StartCoroutine(DelayClientConnect()); - } - } - - private IEnumerator DelayClientConnect() - { - for (int i = 0; i < 5; i++) - { - BoltLog.Info("Connecting in {0} seconds...", 5 - i); - yield return new WaitForSeconds(1); - } - - BoltNetwork.Connect((ushort)BoltRuntimeSettings.instance.debugStartPort); - } - } -} diff --git a/Assets/Photon/PhotonBolt/scripts/BoltDebugStart.cs.meta b/Assets/Photon/PhotonBolt/scripts/BoltDebugStart.cs.meta deleted file mode 100644 index 491d00f..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltDebugStart.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7b91f0d81f03c7d4895ece8064025ce8 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Photon/PhotonBolt/scripts/BoltDebugStartSettings.cs b/Assets/Photon/PhotonBolt/scripts/BoltDebugStartSettings.cs deleted file mode 100644 index c1fd699..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltDebugStartSettings.cs +++ /dev/null @@ -1,196 +0,0 @@ -using Photon.Bolt.Utils; - -#if UNITY_STANDALONE -using System.Runtime.InteropServices; -using System; -using System.Linq; -#endif - -namespace Photon.Bolt -{ - public class BoltDebugStartSettings - { -#if UNITY_EDITOR - public static bool DebugStartIsSinglePlayer - { - get { return BoltRuntimeSettings.instance.debugEditorMode == BoltEditorStartMode.None; } - } - - public static bool DebugStartIsServer - { - get { return BoltRuntimeSettings.instance.debugEditorMode == BoltEditorStartMode.Server; } - } - - public static bool DebugStartIsClient - { - get { return BoltRuntimeSettings.instance.debugEditorMode == BoltEditorStartMode.Client; } - } - - public static int WindowIndex - { - get { return -1; } - } -#elif UNITY_STANDALONE - public static bool DebugStartIsSinglePlayer - { - get { return false; } - } - - public static bool DebugStartIsServer - { - get { return Environment.GetCommandLineArgs().Contains("--bolt-debugstart-server"); } - } - - public static bool DebugStartIsClient - { - get { return Environment.GetCommandLineArgs().Contains("--bolt-debugstart-client"); } - } - - public static int WindowIndex - { - get - { - foreach (string arg in Environment.GetCommandLineArgs()) - { - if (arg.StartsWith("--bolt-window-index-")) - { - return int.Parse(arg.Replace("--bolt-window-index-", "")); - } - } - - return 0; - } - } -#else - public static bool DebugStartIsSinglePlayer - { - get { return false; } - } - - public static bool DebugStartIsServer - { - get { return false; } - } - - public static bool DebugStartIsClient - { - get { return false; } - } - - public static int WindowIndex - { - get { return -1; } - } -#endif - -#if UNITY_STANDALONE_WIN && !UNITY_EDITOR - static readonly object handle = new object(); - static HandleRef unityHandle = new HandleRef(); - - static class HWND - { - public static IntPtr - NoTopMost = new IntPtr(-2), - TopMost = new IntPtr(-1), - Top = new IntPtr(0), - Bottom = new IntPtr(1); - } - - static class SWP - { - public static readonly int - NOSIZE = 0x0001, - NOMOVE = 0x0002, - NOZORDER = 0x0004, - NOREDRAW = 0x0008, - NOACTIVATE = 0x0010, - DRAWFRAME = 0x0020, - FRAMECHANGED = 0x0020, - SHOWWINDOW = 0x0040, - HIDEWINDOW = 0x0080, - NOCOPYBITS = 0x0100, - NOOWNERZORDER = 0x0200, - NOREPOSITION = 0x0200, - NOSENDCHANGING = 0x0400, - DEFERERASE = 0x2000, - ASYNCWINDOWPOS = 0x4000; - } - - delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam); - - [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] - private static extern int GetWindowThreadProcessId(HandleRef handle, out int processId); - - [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] - private static extern bool EnumWindows(EnumWindowsProc callback, IntPtr extraData); - - [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] - private static extern int GetSystemMetrics(int index); - - [DllImport("user32.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags); - - static bool Window(IntPtr hWnd, IntPtr lParam) - { - int pid = -1; - int unity_pid = System.Diagnostics.Process.GetCurrentProcess().Id; - - GetWindowThreadProcessId(new HandleRef(handle, hWnd), out pid); - - if (pid == unity_pid) - { - unityHandle = new HandleRef(handle, hWnd); - return false; - } - - return true; - } - - public static void PositionWindow() - { - if (DebugStartIsClient || DebugStartIsServer) - { - EnumWindows(Window, IntPtr.Zero); - - if (unityHandle.Wrapper != null) - { - int ww = UnityEngine.Screen.width; - int wh = UnityEngine.Screen.height; - - int x = 0; - int y = 0; - int w = GetSystemMetrics(0); - int h = GetSystemMetrics(1); - - if (DebugStartIsServer) - { - x = w / 2 - (ww / 2); - y = h / 2 - (wh / 2); - - } - else - { - switch (WindowIndex % 4) - { - case 1: x = w - ww; break; - case 2: y = h - wh; break; - case 3: - x = w - ww; - y = h - wh; - break; - } - } - - SetWindowPos(unityHandle.Handle, HWND.Top, x, y, ww, wh, SWP.NOSIZE); - } - } - } -#else - public static void PositionWindow() - { - - } -#endif - } -} diff --git a/Assets/Photon/PhotonBolt/scripts/BoltDebugStartSettings.cs.meta b/Assets/Photon/PhotonBolt/scripts/BoltDebugStartSettings.cs.meta deleted file mode 100644 index 99a96af..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltDebugStartSettings.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ab389ae0c9aa024439da8ffa0449bfca -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Photon/PhotonBolt/scripts/BoltDynamicData.cs b/Assets/Photon/PhotonBolt/scripts/BoltDynamicData.cs deleted file mode 100644 index 08e520a..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltDynamicData.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using Photon.Bolt.Collections; -using Photon.Bolt.Internal; -using Photon.Bolt.Utils; -using UnityEngine; -using UnityEngine.SceneManagement; -using UnityEngine.Scripting; - -namespace Photon.Bolt -{ - [Preserve] - public static class BoltDynamicData - { - public static void Setup() - { - BoltNetworkInternal.DebugDrawer = new UnityDebugDrawer(); - -#if UNITY_PRO_LICENSE - BoltNetworkInternal.UsingUnityPro = true; -#else - BoltNetworkInternal.UsingUnityPro = false; -#endif - - BoltNetworkInternal.GetActiveSceneIndex = GetActiveSceneIndex; - BoltNetworkInternal.GetSceneName = GetSceneName; - BoltNetworkInternal.GetSceneIndex = GetSceneIndex; - BoltNetworkInternal.GetGlobalBehaviourTypes = GetGlobalBehaviourTypes; - BoltNetworkInternal.EnvironmentSetup = BoltNetworkInternal_User.EnvironmentSetup; - BoltNetworkInternal.EnvironmentReset = BoltNetworkInternal_User.EnvironmentReset; - - // Setup Unity Config - -#if ENABLE_IL2CPP - UnitySettings.IsBuildIL2CPP = true; -#elif ENABLE_MONO - UnitySettings.IsBuildMono = true; -#elif ENABLE_DOTNET - UnitySettings.IsBuildDotNet = true; -#endif - - UnitySettings.CurrentPlatform = Application.platform; - } - - private static int GetActiveSceneIndex() - { - return GetSceneIndex(SceneManager.GetActiveScene().name); - } - - private static int GetSceneIndex(string name) - { - try - { - return BoltScenes_Internal.GetSceneIndex(name); - } - catch - { - return -1; - } - } - - private static string GetSceneName(int index) - { - try - { - return BoltScenes_Internal.GetSceneName(index); - } - catch - { - return null; - } - } - - private static List> GetGlobalBehaviourTypes() - { - var globalBehaviours = new List>(); - var asmIter = BoltAssemblies.AllAssemblies; - var assemblyList = AppDomain.CurrentDomain.GetAssemblies(); - - while (asmIter.MoveNext()) - { - try - { - // Load Assembly - var asm = Array.Find(assemblyList, (assembly) => assembly.GetName().Name.Equals(asmIter.Current)); - - // Skip of not found - if (asm == null) { continue; } - - foreach (Type type in asm.GetTypes()) - { - try - { - if (typeof(MonoBehaviour).IsAssignableFrom(type)) - { - var globalAttr = type.GetCustomAttribute(false); - - if (globalAttr != null) - { - globalBehaviours.Add(new STuple(globalAttr, type)); - } - } - } - catch (Exception e2) - { - BoltLog.Warn(e2); - } - } - } - catch (Exception e) - { - BoltLog.Warn(e); - } - } - - return globalBehaviours; - } - } -} diff --git a/Assets/Photon/PhotonBolt/scripts/BoltDynamicData.cs.meta b/Assets/Photon/PhotonBolt/scripts/BoltDynamicData.cs.meta deleted file mode 100644 index d34aa15..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltDynamicData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 38902a14ca6e64922a952da690c9e09e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/scripts/BoltExecutionOrderAttribute.cs b/Assets/Photon/PhotonBolt/scripts/BoltExecutionOrderAttribute.cs deleted file mode 100644 index 91daabd..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltExecutionOrderAttribute.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; - -namespace Photon.Bolt -{ - /// - /// Sets the Unity script execution order - /// - /// - /// *Example:* Setting the execution order of a manager class using an attribute. - /// - /// ```csharp - /// [BoltExecutionOrder(-5000)] - /// public class SoundManager : MonoBehaviour - /// { - /// void Awake() { - /// ConfigureSoundSettings(); - /// } - /// } - /// ``` - /// - [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)] - public sealed class BoltExecutionOrderAttribute : Attribute - { - readonly int _executionOrder; - - public BoltExecutionOrderAttribute(int order) - { - _executionOrder = order; - } - - /// - /// The order of this script in execution (lower is earlier) - /// - public int executionOrder - { - get { return _executionOrder; } - } - } -} diff --git a/Assets/Photon/PhotonBolt/scripts/BoltExecutionOrderAttribute.cs.meta b/Assets/Photon/PhotonBolt/scripts/BoltExecutionOrderAttribute.cs.meta deleted file mode 100644 index 385ec68..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltExecutionOrderAttribute.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3114a624c0920ce47908c836b11a8188 -timeCreated: 1500295742 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonBolt/scripts/BoltUnityDebugDrawer.cs b/Assets/Photon/PhotonBolt/scripts/BoltUnityDebugDrawer.cs deleted file mode 100644 index b301adc..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltUnityDebugDrawer.cs +++ /dev/null @@ -1,137 +0,0 @@ -using UnityEngine; -using Photon.Bolt.Utils; - -#if UNITY_EDITOR -using UnityEditor; -#endif - -namespace Photon.Bolt.Internal -{ - public class UnityDebugDrawer : IDebugDrawer - { - bool isEditor; - - void IDebugDrawer.IsEditor(bool isEditor) - { - this.isEditor = isEditor; - } - - void IDebugDrawer.SelectGameObject(GameObject gameObject) - { -#if UNITY_EDITOR - if (!isEditor) - { - Selection.activeGameObject = gameObject; - } -#endif - } - - void IDebugDrawer.Indent(int level) - { -#if UNITY_EDITOR - if (isEditor) - { - EditorGUI.indentLevel = level; - return; - } -#endif - } - - void IDebugDrawer.Label(string text) - { -#if UNITY_EDITOR - if (isEditor) - { - GUILayout.Label(text); - return; - } -#endif - - DebugInfo.Label(text); - } - - void IDebugDrawer.LabelBold(string text) - { -#if UNITY_EDITOR - if (isEditor) - { - GUILayout.Label(text, EditorStyles.boldLabel); - return; - } -#endif - - DebugInfo.LabelBold(text); - } - - void IDebugDrawer.LabelField(string text, object value) - { -#if UNITY_EDITOR - if (isEditor) - { - EditorGUILayout.LabelField(text, value.ToString()); - return; - } -#endif - - DebugInfo.LabelField(text, value); - } - - void IDebugDrawer.Separator() - { -#if UNITY_EDITOR - if (isEditor) - { - EditorGUILayout.Separator(); - return; - } -#endif - - GUILayout.Space(2); - } - - void IDebugDrawer.DrawObjectArray(IDebugDrawerObjectArray root) - { -#if UNITY_EDITOR - if (isEditor) - { - var fields = root.GetChildren(); - - for (int i = 0; i < fields.Length; i++) - { - DrawObjectArrayItem(fields[i]); - } - - return; - } -#endif - } - - private void DrawObjectArrayItem(IDebugDrawerObjectArray item) - { -#if UNITY_EDITOR - var fields = item.GetChildren(); - - if (fields.Length > 0) - { - item.IsVisible = EditorGUILayout.Foldout(item.IsVisible, item.GetName(), true); - - if (item.IsVisible) - { - EditorGUI.indentLevel++; - - for (int i = 0; i < fields.Length; i++) - { - DrawObjectArrayItem(fields[i]); - } - - EditorGUI.indentLevel--; - } - } - else - { - (this as IDebugDrawer).LabelField(item.GetName(), item.GetValue()); - } -#endif - } - } -} diff --git a/Assets/Photon/PhotonBolt/scripts/BoltUnityDebugDrawer.cs.meta b/Assets/Photon/PhotonBolt/scripts/BoltUnityDebugDrawer.cs.meta deleted file mode 100644 index 34c4534..0000000 --- a/Assets/Photon/PhotonBolt/scripts/BoltUnityDebugDrawer.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e183fa616af708e4b883d4da94edba17 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: diff --git a/Assets/Photon/PhotonLibs.meta b/Assets/Photon/PhotonLibs.meta deleted file mode 100644 index 05f4c17..0000000 --- a/Assets/Photon/PhotonLibs.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ee1734b1a7bac244bb5f15ecd778b5f2 -folderAsset: yes -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/Metro.meta b/Assets/Photon/PhotonLibs/Metro.meta deleted file mode 100644 index 42ef35f..0000000 --- a/Assets/Photon/PhotonLibs/Metro.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 887ac71c799552346b6cf7654fb699cb -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll deleted file mode 100644 index 920a458..0000000 Binary files a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll and /dev/null differ diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll.meta b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll.meta deleted file mode 100644 index d34a8d1..0000000 --- a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.dll.meta +++ /dev/null @@ -1,41 +0,0 @@ -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: - 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.pdb b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pdb deleted file mode 100644 index cbd02fd..0000000 Binary files a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pdb and /dev/null differ diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pdb.meta b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pdb.meta deleted file mode 100644 index cb3ddf7..0000000 --- a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pdb.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ceaf3c270b0c23c44b43fa13cee2675b -timeCreated: 1460035811 -licenseType: Store -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri deleted file mode 100644 index 889f87b..0000000 Binary files a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri and /dev/null differ diff --git a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri.meta b/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri.meta deleted file mode 100644 index eb420ef..0000000 --- a/Assets/Photon/PhotonLibs/Metro/Photon3Unity3D.pri.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index e90ab81..0000000 Binary files a/Assets/Photon/PhotonLibs/Photon3Unity3D.dll and /dev/null differ diff --git a/Assets/Photon/PhotonLibs/Photon3Unity3D.dll.meta b/Assets/Photon/PhotonLibs/Photon3Unity3D.dll.meta deleted file mode 100644 index a720855..0000000 --- a/Assets/Photon/PhotonLibs/Photon3Unity3D.dll.meta +++ /dev/null @@ -1,38 +0,0 @@ -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.pdb b/Assets/Photon/PhotonLibs/Photon3Unity3D.pdb deleted file mode 100644 index 65ac93d..0000000 Binary files a/Assets/Photon/PhotonLibs/Photon3Unity3D.pdb and /dev/null differ diff --git a/Assets/Photon/PhotonLibs/Photon3Unity3D.pdb.meta b/Assets/Photon/PhotonLibs/Photon3Unity3D.pdb.meta deleted file mode 100644 index d58c2a1..0000000 --- a/Assets/Photon/PhotonLibs/Photon3Unity3D.pdb.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 93859f4db66a6aa4183dbad399a56e24 -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonLibs/Photon3Unity3D.xml b/Assets/Photon/PhotonLibs/Photon3Unity3D.xml deleted file mode 100644 index f85d60c..0000000 --- a/Assets/Photon/PhotonLibs/Photon3Unity3D.xml +++ /dev/null @@ -1,2767 +0,0 @@ - - - - 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 deleted file mode 100644 index 671d824..0000000 --- a/Assets/Photon/PhotonLibs/Photon3Unity3D.xml.meta +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index a02cf77..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket.meta +++ /dev/null @@ -1,5 +0,0 @@ -fileFormatVersion: 2 -guid: 2f243ce0406bd1c40a9ff5fc2d78d905 -folderAsset: yes -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs b/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs deleted file mode 100644 index d506602..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs +++ /dev/null @@ -1,433 +0,0 @@ -#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; - } - res = 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 deleted file mode 100644 index 7f04d3c..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/SocketWebTcp.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index e8a4feb..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/WebSocket.cs +++ /dev/null @@ -1,252 +0,0 @@ -#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 deleted file mode 100644 index 241c921..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/WebSocket.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index a078b8e..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/WebSocket.jslib +++ /dev/null @@ -1,117 +0,0 @@ -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 deleted file mode 100644 index e5a1c7d..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/WebSocket.jslib.meta +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index 55690fb..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.README +++ /dev/null @@ -1,5 +0,0 @@ - -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 deleted file mode 100644 index 47cc15d..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.README.meta +++ /dev/null @@ -1,4 +0,0 @@ -fileFormatVersion: 2 -guid: 3e262c2b04eaa8440987b50a91e86674 -DefaultImporter: - userData: diff --git a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll deleted file mode 100644 index c041420..0000000 Binary files a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll and /dev/null differ diff --git a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll.meta b/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll.meta deleted file mode 100644 index 099f3fc..0000000 --- a/Assets/Photon/PhotonLibs/WebSocket/websocket-sharp.dll.meta +++ /dev/null @@ -1,137 +0,0 @@ -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 deleted file mode 100644 index ab00770..0000000 --- a/Assets/Photon/PhotonLibs/changes-library.txt +++ /dev/null @@ -1,1838 +0,0 @@ - -Photon C# Client Library - Changelog -Exit Games GmbH - www.photonengine.com - forum.photonengine.com - - -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 deleted file mode 100644 index 85684b7..0000000 --- a/Assets/Photon/PhotonLibs/changes-library.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index c52d133..0000000 --- a/Assets/Photon/PhotonLibs/netstandard2.0.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index f2bb744..0000000 --- a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.deps.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "runtimeTarget": { - "name": ".NETStandard,Version=v2.0/", - "signature": "" - }, - "compilationOptions": {}, - "targets": { - ".NETStandard,Version=v2.0": {}, - ".NETStandard,Version=v2.0/": { - "Photon3Unity3D/4.1.6.14": { - "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.14": { - "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 deleted file mode 100644 index c26136a..0000000 --- a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.deps.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index a37975b..0000000 Binary files a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll and /dev/null differ diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll.meta b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll.meta deleted file mode 100644 index e507b85..0000000 --- a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.dll.meta +++ /dev/null @@ -1,165 +0,0 @@ -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.pdb b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.pdb deleted file mode 100644 index 14d5c93..0000000 Binary files a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.pdb and /dev/null differ diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.pdb.meta b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.pdb.meta deleted file mode 100644 index e8e3824..0000000 --- a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.pdb.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0f6296aca03a5574eb30b4277a2076fd -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml b/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml deleted file mode 100644 index f85d60c..0000000 --- a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml +++ /dev/null @@ -1,2767 +0,0 @@ - - - - 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 deleted file mode 100644 index b58d8aa..0000000 --- a/Assets/Photon/PhotonLibs/netstandard2.0/Photon3Unity3D.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 7015e500cd5b71244af56448dfb59804 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/PhotonRealtime.meta b/Assets/Photon/PhotonRealtime.meta deleted file mode 100644 index 5ddf0d6..0000000 --- a/Assets/Photon/PhotonRealtime.meta +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index fe27980..0000000 --- a/Assets/Photon/PhotonRealtime/Code.meta +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 9cf874d..0000000 --- a/Assets/Photon/PhotonRealtime/Code/AppSettings.cs +++ /dev/null @@ -1,198 +0,0 @@ -// ----------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index ab5e5c1..0000000 --- a/Assets/Photon/PhotonRealtime/Code/AppSettings.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index c533fa5..0000000 --- a/Assets/Photon/PhotonRealtime/Code/ConnectionHandler.cs +++ /dev/null @@ -1,199 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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(); - 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 deleted file mode 100644 index 961a59c..0000000 --- a/Assets/Photon/PhotonRealtime/Code/ConnectionHandler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index fafdb35..0000000 --- a/Assets/Photon/PhotonRealtime/Code/CustomTypesUnity.cs +++ /dev/null @@ -1,167 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index 660c3f0..0000000 --- a/Assets/Photon/PhotonRealtime/Code/CustomTypesUnity.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 3c7a531..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Extensions.cs +++ /dev/null @@ -1,269 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index 2025f00..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Extensions.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 378e920..0000000 --- a/Assets/Photon/PhotonRealtime/Code/FriendInfo.cs +++ /dev/null @@ -1,48 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index b810efc..0000000 --- a/Assets/Photon/PhotonRealtime/Code/FriendInfo.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index fdf9173..0000000 --- a/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs +++ /dev/null @@ -1,4444 +0,0 @@ -// ----------------------------------------------------------------------- -// -// 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 - } - - /// 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 find 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. No "Best Region" pinging will be done. - /// - /// If the region string does not contain a "/", this means no specific cluster is requested. - /// To support "Sharding", the region gets a "/*" postfix in this case, to select a random cluster. - /// - /// 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[ParameterCode.Token] as string; - 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] as string; - 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. - /// - 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. - /// - 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 deleted file mode 100644 index 91a2d99..0000000 --- a/Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 2c4c8d8..0000000 --- a/Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs +++ /dev/null @@ -1,2242 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index 989f399..0000000 --- a/Assets/Photon/PhotonRealtime/Code/LoadbalancingPeer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 3c873c7..0000000 --- a/Assets/Photon/PhotonRealtime/Code/PhotonPing.cs +++ /dev/null @@ -1,480 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 WWW class - using UnityEngine; - #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 WWW webRequest; - - public override bool StartPing(string address) - { - base.Init(); - - address = "https://" + address + "/photon/m/?ping&r=" + UnityEngine.Random.Range(0, 10000); - this.webRequest = new WWW(address); - 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 deleted file mode 100644 index 060b006..0000000 --- a/Assets/Photon/PhotonRealtime/Code/PhotonPing.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 70f0337..0000000 --- a/Assets/Photon/PhotonRealtime/Code/PhotonPingClasses.cs +++ /dev/null @@ -1 +0,0 @@ -// 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 deleted file mode 100644 index a60b48a..0000000 --- a/Assets/Photon/PhotonRealtime/Code/PhotonPingClasses.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index b472f01..0000000 --- a/Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef +++ /dev/null @@ -1,6 +0,0 @@ -{ - "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 deleted file mode 100644 index dff23ae..0000000 --- a/Assets/Photon/PhotonRealtime/Code/PhotonRealtime.asmdef.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 4058889..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Player.cs +++ /dev/null @@ -1,452 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index d494ca7..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Player.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 2341631..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Region.cs +++ /dev/null @@ -1,90 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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; } - - 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 deleted file mode 100644 index 49030f5..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Region.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index d3d5c61..0000000 --- a/Assets/Photon/PhotonRealtime/Code/RegionHandler.cs +++ /dev/null @@ -1,703 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 || UNITY_SWITCH -#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; - - #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. - /// - /// 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 bool IgnoreInitialAttempt = true; - 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(this.RegionPingPooled); - } - catch - { - queued = false; - } - #endif - if (!queued) - { - SupportClass.StartBackgroundCalls(this.RegionPingThreaded, 0, "RegionPing_" + this.region.Code + "_" + this.region.Cluster); - } - #endif - - - return true; - } - - // wraps RegionPingThreaded() to get the signature compatible with ThreadPool.QueueUserWorkItem - protected internal void RegionPingPooled(object context) - { - this.RegionPingThreaded(); - } - - protected internal bool RegionPingThreaded() - { - this.region.Ping = PingWhenFailed; - - float rttSum = 0.0f; - 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 an 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 = (int)sw.ElapsedMilliseconds; - this.rttResults.Add(rtt); - - if (IgnoreInitialAttempt && this.CurrentAttempt == 0) - { - // do nothing. - } - else if (this.ping.Successful && !overtime) - { - rttSum += rtt; - replyCount++; - this.region.Ping = (int)((rttSum) / replyCount); - } - - #if !NETFX_CORE - System.Threading.Thread.Sleep(10); - #endif - } - - //Debug.Log("Done: "+ this.region.Code); - this.Done = true; - this.ping.Dispose(); - - 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; - - float rttSum = 0.0f; - 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("Caught: " + e); - break; - } - - - while (!this.ping.Done()) - { - if (sw.ElapsedMilliseconds >= MaxMilliseconsPerPing) - { - overtime = true; - break; - } - - yield return new WaitForSecondsRealtime(0.05f); // keep this loop tight, to avoid adding local lag to rtt. - } - - - sw.Stop(); - int rtt = (int)sw.ElapsedMilliseconds; - this.rttResults.Add(rtt); - - - if (IgnoreInitialAttempt && this.CurrentAttempt == 0) - { - // do nothing. - } - else if (this.ping.Successful && !overtime) - { - rttSum += rtt; - replyCount++; - this.region.Ping = (int)((rttSum) / replyCount); - } - - yield return new WaitForSeconds(0.1f); - } - - - //Debug.Log("Done: "+ this.region.Code); - this.Done = true; - this.ping.Dispose(); - 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 deleted file mode 100644 index 2e90001..0000000 --- a/Assets/Photon/PhotonRealtime/Code/RegionHandler.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 5f4036f..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Room.cs +++ /dev/null @@ -1,630 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index 66ccb6c..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Room.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 6d77545..0000000 --- a/Assets/Photon/PhotonRealtime/Code/RoomInfo.cs +++ /dev/null @@ -1,274 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index a1188f0..0000000 --- a/Assets/Photon/PhotonRealtime/Code/RoomInfo.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 36fb0dd..0000000 --- a/Assets/Photon/PhotonRealtime/Code/SupportLogger.cs +++ /dev/null @@ -1,434 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index 7e8b7cc..0000000 --- a/Assets/Photon/PhotonRealtime/Code/SupportLogger.cs.meta +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 96bf0ee..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Unity.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 4d10118..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Unity/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index e3f2397..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Unity/Editor/AccountService.cs +++ /dev/null @@ -1,260 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index a070b17..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Unity/Editor/AccountService.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index ced6a0f..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Unity/Editor/PhotonEditorUtils.cs +++ /dev/null @@ -1,333 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index 90d608f..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Unity/Editor/PhotonEditorUtils.cs.meta +++ /dev/null @@ -1,8 +0,0 @@ -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 deleted file mode 100644 index 66b57eb..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Unity/PhotonAppSettings.cs +++ /dev/null @@ -1,116 +0,0 @@ -// ----------------------------------------------------------------------- -// -// -// 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 deleted file mode 100644 index 63c192e..0000000 --- a/Assets/Photon/PhotonRealtime/Code/Unity/PhotonAppSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index b0177e3..0000000 --- a/Assets/Photon/PhotonRealtime/Code/WebRpc.cs +++ /dev/null @@ -1,187 +0,0 @@ -// ---------------------------------------------------------------------------- -// -// 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 deleted file mode 100644 index 8a235c9..0000000 --- a/Assets/Photon/PhotonRealtime/Code/WebRpc.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -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 deleted file mode 100644 index 344e0c3..0000000 --- a/Assets/Photon/PhotonRealtime/Code/changes-realtime.txt +++ /dev/null @@ -1,389 +0,0 @@ - -Photon Realtime C# Client - Changelog -Exit Games GmbH - www.photonengine.com - forum.photonengine.com - - -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 deleted file mode 100644 index 4e58ca3..0000000 --- a/Assets/Photon/PhotonRealtime/Code/changes-realtime.txt.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 530dcba8d8fbbc24a8894ca925cadd8a -timeCreated: 1558358700 -licenseType: Store -TextScriptImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Photon/link.xml b/Assets/Photon/link.xml deleted file mode 100644 index 2e2baf3..0000000 --- a/Assets/Photon/link.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/Assets/Photon/link.xml.meta b/Assets/Photon/link.xml.meta deleted file mode 100644 index 6e9638f..0000000 --- a/Assets/Photon/link.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 749999acf982a374abc6a39ebc924dc0 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: