PUN Classic (v1), PUN 2 and Bolt are in maintenance mode. PUN 2 will support Unity 2019 to 2022, but no new features will be added. Of course all your PUN & Bolt projects will continue to work and run with the known performance in the future. For any upcoming or new projects: please switch to Photon Fusion or Quantum.

What's new in v1.2.8

Main Changes:

For a full list of changes, check the log here.

Updated Naming API of BoltEntity

Several properties of the BoltEntity class were refactored to comply with the C# Coding Guidelines. The old symbols are still present, but with an obsolete marking and will be removed in a future version. A full list of changes:

  • sceneGuid to SceneGuid;
  • serializerGuid to SerializerGuid;
  • prefabId to PrefabId;
  • source to Source;
  • attachToken to AttachToken;
  • detachToken to DetachToken;
  • controlGainedToken to ControlGainedToken;
  • controlLostToken to ControlLostToken;
  • networkId to NetworkId;
  • canFreeze to CanFreeze;
  • controller to Controller;
  • isAttached to IsAttached;
  • isControlled to IsControlled;
  • isControllerOrOwner to IsControllerOrOwner;
  • isFrozen to IsFrozen;
  • isSceneObject to IsSceneObject;
  • isOwner to IsOwner;
  • hasControl to HasControl;
  • hasControlWithPrediction to HasControlWithPrediction;
  • persistsOnSceneLoad to PersistsOnSceneLoad;

And a new property was added, HasParent, that signal if the BoltEntity has a parent.

New Disconnect Reasons

When your peer is shutdown, it's possible to know the reason before the shutdown really happen. This is possible by the subscription of the BoltShutdownBegin callback on any of your Bolt.GlobalEventListener, as shown below:

C#

public class MyNetworkCallback : Bolt.GlobalEventListener
{
    public override void BoltShutdownBegin(Bolt.AddCallback registerDoneCallback)
    {
        // Your shutdown behavior
    }

    public override void BoltShutdownBegin(Bolt.AddCallback registerDoneCallback, UdpKit.UdpConnectionDisconnectReason disconnectReason)
    {
        // Your shutdown behavior
    }
}

As you can see, we offer two versions of BoltShutdownBegin, the later one is where you can treat the disconnect reason. Along with the already existent reasons (Unknown, Timeout, Error, Disconnected), we've added two new types:

  • UdpConnectionDisconnectReason.Authentication: that occurs when your peer was not able to authenticate with our Photon Servers. If you are using an invalid or unknown AppID for example.
  • UdpConnectionDisconnectReason.MaxCCUReached: this specific disconnect reason will show up when you've reached the max allowed Concurrent Users on the AppID used by the peer.

Namespace Changes

The following namespaces names were modified:

  • Bolt.photon to Bolt.Photon;
  • udpkit.platform.photon.photon to udpkit.platform.photon;

Dynamic Region List

Bolt is now compliant with the "Dashboard Regions Filtering" feature. When selecting the Best Region as the target region to connect, the Photon integration will test and select the region with the lowest ping available, considering only the regions selected on the dashboard for the specific AppId used by the peer (if you leave it empty, all regions will be considered). This is useful when you want to aggregate more players in fewer regions and increase the matching between hosts and clients.

Bolt Core package

On this version, we've removed the necessity of installation of the Bolt Core package. All files of this package were now incorporated into the main SDK package. When running the Bolt Wizard window you will notice the new alert:

bolt wizard - core package
Bolt Wizard - Core package.

Join Room by Name

On Bolt 1.2.8, you will be able to join a specific session/room using only its name. As shown below, you still need to pass a PhotonSession instance when connecting from a client, but now you are not limited to listen for the sessions using SessionListUpdated and pick one to join, it's possible to build a new session using a known room name.

This can be useful if you have implemented your own matchmaking setup or prefer to use other ways to signal your clients which room to enter.

C#

// ...
public override void BoltStartDone()
{
    if (BoltNetwork.IsServer)
    {
        BoltNetwork.SetServerInfo("mygame", null);
        BoltNetwork.LoadScene("<my game scene>");
    }

    if (BoltNetwork.IsClient)
    {
        BoltNetwork.Connect(PhotonSession.Build("mygame"));
    }
// ...
}

Option to Disable the A2S Service [Bolt Pro]

It was added an option to enable/disable the A2S Service on the Bolt Settings window. This service can be used the recover information about the Game Host.

bolt settings - a2s service enable/disable
Bolt Settings - A2S Service Enable/Disable.
Back to top