// ---------------------------------------------------------------------------- // // PhotonNetwork Framework for Unity - Copyright (C) 2018 Exit Games GmbH // // // Wraps up several enumerations for PUN. // // developer@exitgames.com // ---------------------------------------------------------------------------- namespace Photon.Pun { /// Which PhotonNetwork method was called to connect (which influences the regions we want pinged). /// PhotonNetwork.ConnectUsingSettings will call either ConnectToMaster, ConnectToRegion or ConnectToBest, depending on the settings. public enum ConnectMethod { NotCalled, ConnectToMaster, ConnectToRegion, ConnectToBest } /// Used to define the level of logging output created by the PUN classes. Either log errors, info (some more) or full. /// \ingroup publicApi public enum PunLogLevel { /// Show only errors. Minimal output. Note: Some might be "runtime errors" which you have to expect. ErrorsOnly, /// Logs some of the workflow, calls and results. Informational, /// Every available log call gets into the console/log. Only use for debugging. Full } /// Enum of "target" options for RPCs. These define which remote clients get your RPC call. /// \ingroup publicApi public enum RpcTarget { /// Sends the RPC to everyone else and executes it immediately on this client. Player who join later will not execute this RPC. All, /// Sends the RPC to everyone else. This client does not execute the RPC. Player who join later will not execute this RPC. Others, /// Sends the RPC to MasterClient only. Careful: The MasterClient might disconnect before it executes the RPC and that might cause dropped RPCs. MasterClient, /// Sends the RPC to everyone else and executes it immediately on this client. New players get the RPC when they join as it's buffered (until this client leaves). AllBuffered, /// Sends the RPC to everyone. This client does not execute the RPC. New players get the RPC when they join as it's buffered (until this client leaves). OthersBuffered, /// Sends the RPC to everyone (including this client) through the server. /// /// This client executes the RPC like any other when it received it from the server. /// Benefit: The server's order of sending the RPCs is the same on all clients. /// AllViaServer, /// Sends the RPC to everyone (including this client) through the server and buffers it for players joining later. /// /// This client executes the RPC like any other when it received it from the server. /// Benefit: The server's order of sending the RPCs is the same on all clients. /// AllBufferedViaServer } public enum ViewSynchronization { Off, ReliableDeltaCompressed, Unreliable, UnreliableOnChange } /// /// Options to define how Ownership Transfer is handled per PhotonView. /// /// /// This setting affects how RequestOwnership and TransferOwnership work at runtime. /// public enum OwnershipOption { /// /// Ownership is fixed. Instantiated objects stick with their creator, room objects always belong to the Master Client. /// Fixed, /// /// Ownership can be taken away from the current owner who can't object. /// Takeover, /// /// Ownership can be requested with PhotonView.RequestOwnership but the current owner has to agree to give up ownership. /// /// The current owner has to implement IPunCallbacks.OnOwnershipRequest to react to the ownership request. Request } }