Tutorial problem with Unity 5

Options
I have been trying the bolt tutorial located at: https://doc.photonengine.com/en/bolt/current/getting-started/bolt-101-getting-started . I've set it up on both win7 and win10 in Unity 5.1.2f1 with bolt engine 0.4.3.5 (DEBUG). I keep getting the same error, saying "Could not connect to master server at [EndPoint 79.99.6.135:24000]" I understand that this is the test master server. I never told it to connect to any master server, but was trying to start a server with this line of code from the tutorial: BoltLauncher.StartServer(UdpKit.UdpEndPoint.Parse("127.0.0.1:27000")); . I see in the debug that it first starts the server on 127.0.0.1, but then seems to default to trying to attach to the test master server when it fails. One message I received on the debug screen is "Could not resolve a possible LAN address by inspecting local network interfaces".

If I click the screen after it errors out trying to get to the master server, it then loads the scene properly. I just noticed this when I missed the unity editor play button to shut off the app while writing this error report. But still, there is an issue I don't understand how to overcome. What is the reason for the error and for bolt trying to phone home? I guess since I clicked the start server button a second time and there was an issue, maybe something is not loaded properly when I clicked the first time.

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65) 9/5/2015 9:17:44 AM: Connecting to [EndPoint 127.0.0.1:27000 | 9151314447111842168] (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65) 9/5/2015 9:17:44 AM: [EndPoint 127.0.0.1:27000 | 9151314447111842168] error IncorrectCommand: '' (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65) BoltException: Bolt is already running, you must call BoltLauncher.Shutdown() before starting a new instance of Bolt. at BoltCore.BeginStart (Bolt.ControlCommandStart cmd) [0x00000] in <filename unknown>:0 at Bolt.ControlCommandStart.Run () [0x00000] in <filename unknown>:0 at Bolt.ControlBehaviour.Update () [0x00000] in <filename unknown>:0 UnityEngine.Debug:Internal_LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) Bolt.ControlBehaviour:Update() (Filename: Line: -1) 9/5/2015 9:17:45 AM: Sending To [EndPoint 79.99.6.136:24000 | 5720423132876004800] (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65) 9/5/2015 9:17:45 AM: Writing: PeerConnect (Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65) 9/5/2015 9:17:48 AM: Sending To [EndPoint 79.99.6.136:24000 | 5720423132876004800]

Comments

  • The server for testing Zeus is down at the moment. You can disable autoconnect to Zeus in Bolt settings
  • dannypb
    Options
    thank you! I was never trying to connect to a zeus server though. I was trying to instance a local server. I followed the tutorial exactly as listed for this, and it's doing something strange.

    I set master server connect and disconnect to manual and it no longer tries to connect to the zeus server. That step should be added to the 101 tutorial. It still requires 2 clicks to work correctly though on both the server and the client.

    Here is what it looks like after the first click:



    Here is it after the second click:



    Any insight will be appreciated.
  • Wizzard
    Options
    I'm no expert, but it looks like you might be using the BoltInit script as well as initializing Bolt on your own.
  • dannypb
    Options
    Thanx Wizzard. I will look into this next. Its like I told Stanchion though, I just followed the 101 tutorial. I look up where the init script is. Is it called BoltInit?
  • The tutorial is a little bit outdated. In the tutorial you try to load the scene immedialetly after you started the server (if you run the tutorial in the editor you see an error message, that this isn't possible).

    To fix this you can e.g. override the BoltStartDone method in one of you GlobalEventListener scripts and load the scene there.

    The class NetworkCallbacks from the tutorial would look like this:

    [BoltGlobalBehaviour]
    public class NetworkCallbacks : Bolt.GlobalEventListener
    {
    public override void BoltStartDone()
    {
    // Call this only on the server !!!
    BoltNetwork.LoadScene("Tutorial1");
    }

    public override void SceneLoadLocalDone(string map)
    {
    var pos = new Vector3(Random.Range(-16, 16), 0, Random.Range(-16, 16));
    BoltNetwork.Instantiate(BoltPrefabs.Cube, pos, Quaternion.identity);
    }
    }

    In your Menu class you have to set a flag if you run your game as server or as client. The LoadScene-method is only allowed on the server.

    Hope this helps.
  • The tutorial included with Bolt should be up to date
  • Wizzard
    Options
    I just did the the tutorial 2 1/2 weeks ago verbatim with no issues.
  • Xeon06
    Options
    Where can someone find an up to date tutorial please? I'm running into the same issues and it's disappointing to not be able to follow the official tutorial. I looked through the files included with Bolt and find no mention of a tutorial except for links to the official documentation with the outdated tutorial.