I have a working UI system that loads the UI layout on the start of the game and then immediately goes to the main menu. I've created the same layers from the UI layout into every other layout so I can have full control over setting them invisible when I do/don't want to.
However, I've always had issues with these - switching layouts when I want the global objects to appear are always fine, but when I go to a layout and want the objects hidden, it doesn't always work. On the UI layout, I have a function that loads every single object into the correct layer, and I call this function on the start of every layout, as well (ie, Set "healthbar" to layer "UI", etc).
Am I doing something wrong?