Photon Unity Networking Get it. No server setup needed - runs in the Photon Cloud. No obligation due to free plan. Download from the Asset Store: http://u3d.as/2ey Overview This package implements Unity's well known networking API on top of Photon. Keeping the API simple, this gives you standalone, dedicated servers, fixes, tweaks and ongoing support. This "plugin" contains a setup wizard, the fully integrated API, Editor extensions and the client library. It's compatible with the Photon Cloud Service, so you don't even have to setup a server! Requirements Unity v4.3.4 or up. Export to Standalone, Web, Win 8 Store, Win 8 Phone with Unity Free. Unity 5 exports PUN Free to Android and iOS. Unity 4 exports to Android and iOS with the PUN+ package or "Unity Pro" licenses for mobile. iOS-64bit support requires at least Unity 4.6.3p2. Server Options Photon Cloud Service: www.photonengine.com/en/Realtime Free for 20 concurrent users. Photon Standalone server: www.photonengine.com/en-US/OnPremise/Download Free 100 concurrent users (CCU) license. Registration required. v1.61 (17. September 2015) Added: Option to use an Object Pool. Implement IPunPrefabPool and assign it to PhotonNetwork.PrefabPool. Note: GameObjects will not run Awake() and Start() but PUN will call OnPhotonInstantiate() as if the GameObject would be new. Changed: The internal state when PUN connected to the Master Server but did not yet authenticate. The server does not allow you to do requests before authenticate and the new state reflects this. This also affects connectedAndReady for that state. Removed: Obsolete variants of methods: JoinRoom(), CreateRoom(). Fixed: A bug with PhotonAnimatorView, which could cause exceptions when there was only 1 sample in a "continuous updates" message. Fixed: Docs for codeAndMessage parameters. The error code is of short type, not int. This applies to some callbacks. Usually, this requires no code adjustments. Fixed: An issue for AuthenticationValues.AuthType. If you used Object Initialization for this, some types could not be set due to a compiling issue. Now this is a property with a backup field and those work fine. Changed: PhotonHandler is no longer a IPhotonPeerListener and does not implement those callbacks. They were empty, aside from DebugReturn(). This is now implemented by NetworkingPeer (too). Updated: Photon assemblies to v184.108.40.206 with various fixes and enhancements. See release_history.txt. Added: Better description to PhotonNetwork playerList and otherPlayers. Changed: The Editor field ObservedComponentsFoldoutOpen for PhotonViews is now exclusively available in the Editor. It only stores if the Inspector should show the Observed list or fold it. Internal: The NetworkingPeer now creates the base without a Listener and then assigns itself to make sure there is one. The externalListener is no longer needed. Internal: Refactored a lot in classes NetworkingPeer and LoadBalancingPeer. The code is more like that of the LoadBalancing API now. v1.60 (30. July 2015) Added: PhotonNetwork.EnableLobbyStatistics to enable/request statistics about lobbies and .LobbyStatistics as list of lobbies (available while on the Master Server). The list of lobbies is provided as a list of TypedLobbyInfo per lobby, which wraps room- and player-count per lobby (so you can find the active ones). Added: Callback OnLobbyStatisticsUpdate(). Implement this to be notified when new lobby statistics become available (to update your UI, etc). Added: PhotonNetwork.QuickResends, which controls a new feature. For reliable messages that got lost, the first few repeats can be done quicker. This improves connection reliability and reduces gaps in case of loss. Only up to 3 resends can be quick. Read the doc! Changed: Some PhotonNetwork fields that didn't have to be public are now internal, as intended. Updated: Api reference for PhotonNetwork.playerName, .SendMonoMessageTargetType and .automaticallySyncScene. Also for enum CloudRegionCode and ServerConnection and class WebRpcResponse. Changed: PhotonNetwork.gameVersion is now a auto-property field (and no longer sets a private field). Internal: Removed NetworkingPeer.mAppVersion. Changed: Some "per project" settings are now being moved into the PhotonServerSettings file. Currently, this can be used to set: Auto-Join Lobby, Enable Lobby Stats. Feedback welcome. Changed: Order of updating internal values when joining a room. The actor list is now updated before we do callbacks. This cleans up a reference to our local "dummy" player before we do the "joined" callback. Fixed: The inspector no longer attempts to update a PhotonView "observed" field to a list while the game is running. This led to ArgumentOutOfRange exceptions (while inspecting at runtime). Changed: The ChatGui class now contains a Instance field, which you could use from other scripts. It's supposed to be a singleton and to persist across loading levels (which is why it will apply DontDestroyOnLoad() to it's GameObject). Changed: ChatGui now also disconnects when it's GameObject gets destroyed (OnDestroyed()). Fixed: ConnectUsingSettings, ConnectToBestCloudServer and ConnectToRegion will only work while the client is not connected. In doubt, use Disconnect() first. Changed: When the PhotonHandler gets destroyed, it now cleans up the background thread which usually keeps the connection. This hopefully avoids rare freezes of the Unity Editor when closing. Changed: When switching the protocol, the networkingPeer is being replaced. Now we apply the previously set disconnect timeout to the new one. Updated: To Photon Unity Assemblies v220.127.116.11. Fixed: The logical order of assigning a player number when turning on OfflineMode. The callback OnConnectedToMaster be done with PhotonPlayer.ID being -1 but when you join or create a room, the client's PhotonPlayer.ID will be 1 in the callbacks. Changed: WebGL WebSocket.jslib. The socket.onmessage is now using an arraybuffer to read messages. This should be leaner and is a workaround for infrequent long read-times in Chrome. Skipped: v1.59 of PUN (used internally) Chat API: Added: IChatClientListener.DebugReturn(). This is a breaking change, if you use the interface. 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. Release History All updates are detailed in the changelog.txt in the package. Download Asset Store Special thanks go to Leepo and Olli for their great work, feedback and support. Thanks also to Caitlyn and Team for getting this live incredibly fast Upcoming Better support for Windows Universal builds, a new setup wizard and better region selection. Known Issues When you load a new scene, all instantiated GameObjects are destroyed only locally but not on the server. Anyone who joins the room later on still creates those GOs. To work around this, PhotonNetwork.Destroy your instantiated game objects before loading a new scene. Or use: PhotonNetwork.RemoveAllInstantiatedObjects(player). Changing the group of a PhotonView is only done locally and not synced. If you Instantiate a new object in a group that wasn't subscribed first, then the local client won't create the GameObject (it is culled by Interest Group). When you use multiple scenes, the viewIDs of PhotonViews in those scenes will always start at 1. Edit the PunSceneSettingsFile in your project to enter a minimum ViewID per scene if needed. Feedback is welcome! Just reply here. This post will be edited over time with more info, updates, etc.