After a game session, I would like to be able to go load a UI-only scene but unfortunately a set of objects created at runtime DontDestroyOnLoad>_Makinom>UI/Sounds/Music remain in the new scene.
Is there away to prevent that?
  • No, those are ORK/Makinom's handlers for UI, sound and music that are created on initialization of the game.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Hmmm, is there a way to not load/kill ORK/Makinom all together when loading a new scene then?
  • Well, you can naturally destroy the game objects if you want, either via a schematic or a custom script (they're all child objects of the _Makinom game object, which you shouldn't destroy).

    However, that might lead to issues later. As said, those are handlers used by ORK/Makinom for various UI and audio things and should be present at all times.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited November 2022
    I was able to hide the UIs I didn't need but now I'm facing a related issue.

    1) I start my game from a sceneA containing only UI and no ORK/Makinom elements.
    2) I select a sceneB with ORK/Makinom elements, load it and play.
    3) I complete the sceneB and go back to the initial UI sceneA. At this point I don't need any ORK/Makinom elements anymore.
    4) If now I select the same exact sceneB and load it, the player doesn't spawn anymore and I still retain some elements from sceneA :(
    Post edited by ChimpLogik on
  • edited November 2022
    After few attempts I was able to make some progress on that front by adding this code at the beginning of each game session:
    ORK.Game.NewGame(true);
    and this one at the end
    ORK.Game.GameOver();
    Unfortunately when I reload the same sceneB for the second time, the player loads but its movement controllers don't work anymore and some of the enemies spawning positions are all over the place...
    Post edited by ChimpLogik on
  • Hard to say without knowing what you did to 'hide' the UIs.
    As said - these things are crucial handlers for ORK/Makinom and are automatically created and kept alive on initialization. If you mess with them, you potentially break the running game.

    I'm not sure why you need to hide or remove them in some scene like that. E.g. hiding HUDs should be handled by their display conditions.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I just hid (set Active = false) a couple of HUDs: the Player Avatar UI and Abilities Shortcuts, but that's about it.
    When I re-launch the sceneB they are both re-enabled and working as to be expected.
  • I dug around and I found that the Player Mouse Controller for some reason gets disabled on the second run of sceneB.
    If I manually re-enable it, everything works as usual. Not sure what could have caused that though.
  • edited November 2022
    Usually by a schematic that blocks controls :)
    Check if something in the scene runs that blocks the control (via a node) without unblocking it again.
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Perfect, thank you!
    I wasn't able to find what caused the control to be blocked but following your lead, I added a Spawn Schematic to unblock the controls when the player is spawned.
    That did the trick :)
Sign In or Register to comment.