Problem with BoltGlobalBehaviour Attribute?

Hey !
I ran into a problem when using BoltGlobalBehaviour Attribute. When I use it with BoltNetworkModes.Server and BoltNetworkModes.Client, everything works as intended.
But when I use the scene parameters, which I believe denotes , the scenes the script should be alive in, I don't even get a single Log in that script. I've double checked the spelling of the scene names. I've looked at the API Documentation, Bolt Cheat Sheet and Docs. Is this a Bug?

Usage:
[BoltGlobalBehaviour(BoltNetworkModes.Server, "Tutorial_Menu", "Tutorial") ]
where Tutorial_Menu and Tutorial are my scenes.

Best Answer

  • stanchion
    stanchion mod
    Answer ✓
    BoltGlobalBehaviour is only invoked internally for a scene when the scene is loaded by Bolt. Just starting on that scene will not trigger it.

Answers

  • stanchion
    stanchion mod
    Answer ✓
    BoltGlobalBehaviour is only invoked internally for a scene when the scene is loaded by Bolt. Just starting on that scene will not trigger it.
  • @stanchion Thank You! It would be very helpful if you added this information to the Docs.
  • Reviving this thread with a useful tip.
    Yeah, I was out of Bolt for some months and forgot some basics concepts.

    This wasn't working because I didn't Bolt -> Compile Assembly after made changes in BoltGlobalBehaviour tag.

    Problem solved.