PUN Classic (v1)、PUN 2 和 Bolt 處於維護模式。 PUN 2 將支援 Unity 2019 至 2022,但不會添加新功能。 當然,您所有的 PUN & Bolt 專案可以用已知性能繼續運行使用。 對於任何即將開始或新的專案:請切換到 Photon Fusion 或 Quantum。

What's new in v1.2.6

Main Changes:

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

New Binary Channel

It was added a new Binary Channel on the Bolt Connection that can be used to send any raw data you want between the peers. This can be useful when your game design requires custom data communication, where the other methods offered by Bolt are not suitable.

This communication channel has a high priority than all other internal channels, so keep in mind that sending data using it will impact the packaging of all other information (events, states, and commands). See below how to use the channel:

C#

// Send an arbitrary byte array to the target BoltConnection
void SendData(BoltConnection conn, byte[] data)
{
    conn.SendData(data);
}

// Try to receive data from the BoltConnection
// If there is no information to receive, the `conn.ReceiveData`
// will return false, and the byte array will be null
byte[] ReceiveData(BoltConnection conn)
{
    byte[] input;

    if (conn.ReceiveData(out input))
    {
        return input;
    }

    return null;
}

See a complete script using this feature here.

New JSON Project Serializer

The Bolt Project (file that stores all Bolt Assets definitions) used to be serialized into binary or XML format, now all this information will be saved in a JSON file. At first, this will not have a big impact on your project, but this change will facilitate the versioning control of your assets and will increase the readability of the data. Also, we plan to include features to import / export a set of Assets to / from your project, so it will be easy to create game Samples or share configuration between projects.

Disable Remote Scene Auto Load

It is now possible to disable the Bolt feature to auto load the scenes on remote clients when the game host change scenes. By default, every time the server loads a new scene, all clients receive a message to do the same, in order to keep the game in sync. You can change this settings on the Bolt Settings window by checking the option Disable Auto load Scene on Remotes.

Disable Auto Load Scene
Disable Auto Load Scene option.

Updated Bolt Menu

Bolt now has a unified menu on the top level of the Unity Editor. This leads to a more rapid navigation between the windows and options offered by Bolt. Instead of having to go throught the Assets and Window menus, all items are now whitin the Bolt header.

New Bolt Menu
New Bolt Menu.

IPv6 Support [Bolt Pro]

Starting from the v1.2.6 you will be able to assign an IPv6 to your peer when starting as a Game Host or Game Client. In order to use the support, you need to enable it and then, pass a valid IPv6 when calling the methods of BoltLauncher, as shown below:

C#

void StartServer(ushort serverPort)
{
    BoltConfig config = BoltRuntimeSettings.instance.GetConfigCopy();
    config.EnableIPv6 = true;

    BoltLauncher.StartServer(new UdpEndPoint(UdpIPv6Address.Any, serverPort), config);
}

void StartClient()
{
    BoltConfig config = BoltRuntimeSettings.instance.GetConfigCopy();
    config.EnableIPv6 = true;

    BoltLauncher.StartClient(UdpEndPoint.AnyIPv6, config);
}

void ConnectToServer(string serverAddress, ushort serverPort)
{
    UdpEndPoint endPoint = new UdpEndPoint(UdpIPv6Address.Parse(serverAddress), serverPort);
    BoltNetwork.Connect(endPoint);
}
Back to top