This document is about: REALTIME 5
SWITCH TO

Release Notes

Version 5.1.18 (12. August 2026)

  • Fixed: Internal method CallConnect() now changes the TransportProtocol before calling GetNameServerAddress(). Before this, an IP could be passed to the WebSocket as a race condition when using AuthMode AuthOnceWss.
  • Changed: MatchmakingExtensions to use UTC timestamp. The Unity Auditor was pointing out usages of DateTime.Now even if rarely used.

Version 5.1.17 (21. July 2026)

  • Added: Realtime v5 for Unity now adds a compile define to the current build target on load: PHOTON_REALTIME_5_OR_NEWER.
  • Fixed: ConnectToNameserverAndWaitForRegionsAsync() was pinging all regions twice, which delayed getting the result.

Photon Client Changes

  • Added: Compile define being added to current build profile automatically in Unity: PHOTON_REALTIME_5_OR_NEWER.
  • Changed: Log (Debug level) for resent commands. This now includes the previous sent time.
  • Improved: Built in Network Simulation performance.
  • Changed: When NetworkSimulation gets disabled, the incoming and outgoing queues are copied/snapshot to minimize duration of related locks.
  • Changed: The network simulation thread now only spins for the last few milliseconds for precise timing. For longer pauses it can sleep until new datagrams are sent / arrive. It gets released when network simulation gets disabled.
  • Changed: Network Simulation has a shortcut to send/receive datagrams immediately if there is no lag (after checking loss).
  • Internal: Renamed outgoingAcknowledgementsPool to outgoingAcknowledgementsBuffer, which is very much how it works (buffer).
  • Added: Length of available data is being verified during command initialization, improving protection against malformed incoming data.
  • Changed: Connections with Datagram Encryption now skip over corrupted incoming datagrams as expected runtime issue. Currently counted as packetLossByCrc.
  • Fixed: VerifyConnect handling, skipping over the remaining bytes for the command.

Version 5.1.16 (30. June 2026)

  • Fixed: Merging to RoomInfo.customProperties only applies key-values for valid key types (string and int for Custom Properties).

Version 5.1.15 (18. June 2026)

  • Updated: XML reference in various places to remove outdated references and naming. Extended reference in various places.
  • Added: RealtimeClient.CrcEnabled to make it more available/accessible in the client.
  • Updated: Demo Particle for Unity and .Net. Both use the same logic now. 32x32 grid default. Simplest matchmaking. Auto-move uses directions.
  • Added: Example of using Stats is now in the GameLogic, showing Snapshot and Delta.
  • Updated: Logging to avoid boxing and allocations as much as possible. Checked this with Unity's Project Auditor in 6.4. No Major/Critical issues remain.
  • Changed: EventBetter (handling callbacks) is now NonSerialized (as intended).

Photon Client Changes

  • Updated: Internal locking for critical sections of the de/serialization and message handling. This fixes some rare issues but it was also possible to optimize existing locking.
  • Note: Outgoing ACKs are generated at receive time, so this doesn't delay them. ACK side-effects stay on the send thread, where resends/send-window already lived.
  • Removed: EnetChannel.reliableCommandsInFlight. It was buggy (never decremented on the ACK2) and redundant with the sentReliableCommands scan.
  • Changed: Split incoming ACKs from data commands in EnetPeer. New AckQueue for incoming ACKs is drained in SendOutgoingCommands. CommandQueue executed only on dispatch.
  • Fixed: SendOutgoingCommands() to queue the Disconnect()-call in case of client timeout and to not send in Zombie state (client detected timeout but did not disconnect yet).
  • Note: Timeout teardown now completes on the dispatch thread.
  • Changed: Tcp IncomingList now stores IncomingMessages, which also keep the time of arrival.
  • Changed: Received Ping operations (WS/WSS) will now queue like anything else. The arrival time avoids local lag for the rtt.
  • Changed: Incoming list is now cleared by dequeueing each message and pooling it again (it no longer needs GC).
  • Removed: Shared buffer for TCP ping. This is now lock-free and allocation-free (writes into the pooled buffer it's about to enqueue).
  • Changed: outgoingStream: List to Queue. The blocking send no longer holds outgoingStream, so an enqueueing thread on another thread is never stalled by a slow/back-pressured send.
  • Changed: Enet command pooling. On disconnect, commands are also all returned to pools. This automatically returns and pooled payload buffers to their pool as well.
  • Changed: TCP handling of late arriving messages and network simulation.
  • Fixed: WebSocket case where full send buffers (on the socket) could cause more memory allocations, as internal buffers were not released to the pool.
  • Added: TPeer.pendingSendBuffer to temporarily store a buffer until the next send happens. Released when sending becomes possible again.
  • Fixed: DatagramEncryptedConnection bool could flip mid-datagram-assembly (causing a single "0" command to be sent).
  • Changed: Remaining size will now be checked when writing ACK2s. If there are a lot of channels (and loss) there might be more ACK2s than remaining space in a package. This keeps the remaining ACK2s for next package.
  • Fixed: (Obsolete) SentReliableCommandsCount, which was accessing Stats.UdpReliableCommandsInFlight. You want to use the Stats directly but this was simply wrong.

Version 5.1.14 (1. June 2026 - sha 81dc467)

  • Updated: Static value initialization for Unity using RuntimeInitializeOnLoadMethod in RegionHandler and Log.
  • Updated: AsyncExtensions with annotations for the Unity Analyzer to avoid misleading warnings about static values. See SuppressMessage why each is fine.
  • Updated: SystemConnectionSummary.ToString() to include an annotation of the error codes.
  • Minor: EventCode.CommandEvent from being static to const (consistent with the other codes).
  • Note: Skipping release of v5.1.13 which was used in a few preview builds.

Photon Client Changes

  • Updated: SocketUdp ignores most non-fatal UDP Socket errors.
  • Updated: SocketUdp sets it's photonSocket.SocketErrorCode for sending and receiving errors (if available).
  • Updated: SocketWebTcp handling of errors for WebSocket-sharp (non JavaScript / WebGL builds). While connected, all fatal errors are followed by OnClose. Errors while connecting are still treated as fatal (as there is no OnClose callback then).
  • Changed: PhotonClientWebSocket Send() and Disconnect() now switch SynchronizationContext when using ClientWebSocket (and return to the context after async calls).
  • Note: PhotonClientWebSocket SocketErrorCode is set to either the ws.CloseStatus or ws.State. For UDP sockets, it is the SocketException.SocketErrorCode.
  • Changed: CountDiscarded now counts reliable sequenced commands if the incoming one is older than dispatched. This is only a counter for such cases for debugging / analytics.
  • Fixed: Closing of sockets that could not be connected to (in case a host name resolves to more than one IP in SocketUdp).
  • Fixed: Potential NullReference Exception in SocketUdp.Send(), if the socket closes (so it was not a relevant error case).
  • Updated: SocketUdpAsync to avoid allocations and to also ignore socket error codes which point out temporary issues. This class is now closer to what the SocketUdp class does (which is used by default).
  • Fixed: SocketUdpAsync was shutting down the connection if a message was too large. This is not simply skipped (analog to SocketUdp).
  • Note: Skipping release of v5.1.13 which was used in preview builds.

Version 5.1.12 (01. April 2026 - rev8344)

  • Updated: EventBetterWorker instance checks for Unity 6.4 and up (using GetEntityId()). This avoids warnings for using obsolete APIs.

  • Photon Client Changes

  • Fixed: Potential divide by zero exception in TrafficStatsDelta.ToString().

Version 5.1.11 (30. March 2026 - rev8336)

  • Fixed: Lookup for SocketNativeSource used the old namespace in ConfigUnitySockets() (RealtimeClient and ChatClient).
  • Changed: SocketWebTcp now removes surplus dashes from addresses, if present. This makes sure all APIs can use the addresses properly.

Photon Client Changes

  • Fixed: SendPing() for TCP specifically (in Photon dll). This showed as ever-increasing roundtrip times for TCP, even for good connections. Ping messages were accidentally queued with updating a header, which they do not use.

Version 5.1.10 (24. February 2026 - rev8290)

  • Changed: ToProtocolAddress now removes trailing slashes from the server address to connect to (especially the Name Server address for WS/WSS). This should avoid issues with WS/WSS APIs, which do not accept two slashes where the URL query starts (address//?query).
  • Fixed: A condition in MatchmakingExtensions.ReconnectToRoomAsync().
  • Changed: RoomInfo.InternalCacheProperties() to InternalCachePropertiesRoomInfo() which is no longer virtual. Separating InternalCachePropertiesRoomInfo() from Room.InternalCacheProperties() allows calls from the constructor(s).
  • Updated: EventBetter.GetAliveTarget() with simpler checks. The method is now static.
  • Updated: Compile defines used for Switch 2.
  • Updated: AppSettings internally.
  • Added: Several null checks.
  • Changed: The internal RoomOptionBit now has a Flags attribute.
  • Changed: MatchmakingArguments are no longer Serializable (it was not planned to use them this way).

Photon Client Changes

  • Fixed: ReadInt64() in Protocol18Read.cs. It was fetching 4 bytes instead of expected 8.
  • Changed: EnetPeer.Disconnect() to change the state earlier. To create the Disconnect command (for the server), it stores the previous state and passes that into NCommand Intialize now.
  • Added: Lock for EnetPeer.SendOutgoingCommands(). Everything that accesses the datagram while it's written, will be in that lock, preventing concurrency.
  • Added: Lock for Socket.Send(). With the network simulation, it's possible that there is more than one thread sending.
  • Changed: RTT and Variance values to float to get more precise values when the connection is really stable (low variance).
  • Added: Rtt variance minimum and maximum values to tweak resending of commands. A minimal variance value prevents excessive resending of commands when there is little variance.
  • Added: PhotonSocket.LogLevel property. It wraps the access to this.peerBase.LogLevel and allows use of that in inheriting classes. (This does not modify how / where the log level is stored, it just provides access.)
  • Changed: EnetPeer.ReceiveIncomingCommands() to first write any acks / track received commands, then hand if off into the processing queue. It was possible that commands got processed on another thread (from said queue) before the acknowledgement was finally written. Leading to invalid tracking of commands (and likely a ServerTimeout).
  • Changed: EnetPeer.peerConnectionState is now a property which uses Interlocked methods for atomic updates and checks. See peerConnectionState and TryUpdateConnectionState.
  • Added: ConnectionStateValue.ConnectingHandleVerifyConnect to have a short-lived state which is used while the init request is being written and queued (avoids surplus init requests).
  • Updated: Comments for CT_VERIFYCONNECT in ExecuteCommand().
  • Fixed: EnetPeer.CreateAndEnqueueCommand() now locks the channel if a range of fragments needs to be sent. This should prevent other commands from being written to the channel concurrently (which in turn would mess with the sequence numbering), fixing a problem where the first fragment's sequence number was not matching the "first fragment" value.
  • Changed: PhotonPeer.EstablishEncryption() now passes the enqueueLock object for locking. This is the correct lock-object, as opposed to the sendOutgoingLockObject (which is for send calls done by the game logic/realtime).
  • Added: Check for payload size when initializing an NCommand from a byte-buffer coming from the network.
  • Changed: PhotonPeer.UseAck2. If ACK2 isn't compiled into the library, it can not be set and is always false. If it's compiled in, it can be set to true.
  • Note: ACK2 can only be used on recent server builds, which have the related feature flag, which is then stored in PhotonPeer.IsAck2Available.
  • Changed: The return string of VitalStatsToString() to streamline it.
  • Fixed: A minor pooling issue, which meant incoming ACK2 commands were lost instead of returning to the pool (so this allocated memory despite using the pool).
  • Removed: ITrafficRecorder.Flush() and ITrafficRecorder.Enabled. A recorder is always running while assigned to a peer and can be "flushed" there. New Traffic Recording sample code can be provided on demand.
  • Fixed: If a WS/WSS connection uses a operation Ping result as "init response" (workaround for a rare websocket problem), this now queues the OnInitResponse call to put it on the main / dispatch thread.
Back to top