Have "BoltNetwork.SetServerInfo..." and "BoltNetwork.Connect..." been changed? (no longer work)

Options
Started a new project and imported bolt. It updated to version 1.2.12. I then imported the same generic starter Menu and NetworkCallbacks scripts to get started and now get the following errors in the menu script:

'BoltNetwork' does not contain a definition for 'SetServerInfo'
Argument 1: cannot convert from 'UdpKit.UdpSession' to 'ushort'


The relevant code is this:

public override void BoltStartDone()
{
if (BoltNetwork.IsServer)
{
BoltNetwork.SetServerInfo("Test Match", null);
BoltNetwork.LoadScene("Level2");
}
}

public override void SessionListUpdated(Map<Guid, UdpSession> sessionList)
{
foreach (var session in sessionList)
{
UdpSession photonSession = session.Value as UdpSession;

if (photonSession.Source == UdpSessionSource.Photon)
{
BoltNetwork.Connect(photonSession);
}
}
}

Did this get changed somehow? It still works fine in previous versions of bolt on several different versions of Unity. I don't see anything about this in the release notes.

Comments

  • stanchion
    Options
    "the same generic starter Menu and NetworkCallbacks scripts"
    Where are these from? None of the current samples use the old matchmaking API that has been deprecated. I will check to see if the release notes need to be amended.
  • gevarre
    Options
    It comes from this series:
    https://www.youtube.com/watch?v=Sb_k9H3bW5M&amp;list=PL8OCpfy38RwnwU9iJkV39M42mTXvqj6wt

    The only reason I'm using that is because the tutorials on your site don't actually work. they are out-of-date or just plain broken. But I'm guessing you already know that.
  • ramonmelo
    Options
    Hello @gevarre ,

    Sorry for any inconvenience.
    Thanks for using Photon Bolt.

    The video you linked is from a community dev, it's not the official documentation, and it can only be found on the "Bolt Wiki" menu. Those docs are created by other game developers that are using Photon Bolt on their own games. Here is the main page for the Bolt WIki: https://doc.photonengine.com/en-us/bolt/current/community-wiki/welcome

    We suggest that you follow our official "Getting Started" tutorial linked here, as it's working just fine and is already using the new Matchmaking API.

    Also, if you are running into issues, please take a look at the samples included on the Bolt SDK package inside the `Assets/Photon/Photon Bolt/packages/bolt_samples`. You will find the "Getting Started" and "Advanced Tutorial", among others. You can take them as a starting point.

    If you want to read more about the new Matchmaking API, we have a dedicated page about it here.
  • Roy
    Options
    According to the Release Notes, there is a mention about "BoltNetwork.Connect" and we now need to use BoltMatchmaking API in order to join a game session.
    But there's nothing about "BoltNetwork.SetServerInfo".
    In general it feels like Bolt was written and maintained by amateurs :|


    Now I've changed this:
    BoltNetwork.Connect(myUdpSession);
    
    With this:
    BoltMatchmaking.JoinSession(myUdpSession.Id.ToString(), myUdpSession.GetProtocolToken());
    

    but didn't test it yet.. I don't know if with this logic everything will still work.