edited June 2023 in General Support
Hi,

I was wondering if I can change the layout of the UI from vertical to horizontal. I already read the UI Layout section and don't know where to apply the horizontal format to one of my UI Prefabs. Since we discussed UI, I read the use schematics of Call Start Menu Nodes. I would like the option of New Game, Load and etc to be called after I click a button, the same system after "Press Any Button To Start". When I apply the Call Start Menu, both appear at the same time.

Thank you and I hope you have a great day.
Post edited by Evils on
  • Vertical/horizontal layout depends on where in the UI you're talking about.

    E.g. the layout of your UI box (e.g. buttons listed) are set up in your UI box prefab, e.g. using a Horizontal Layout Group or a Vertical Layout Group. The scene hierarchy context menu has multiple variants for layouts available to set up, but you can change them in your prefabs as you want.

    Or when using a UI layout (set up in UI > UI Layouts) to list multiple HUDs, notifications or whatever, they're used as the UI layout is set up. E.g. the List layout type can be filled horizontally or vertically. Or using Row or Column layout types for a similar effect, but starting a new row/column when one is filled instead of continuing to list them horitzonally/vertically.


    The Start Game node can be used to start a new game, the Save Game Menu node can be used to open the save or load menu.
    Or, if you want to call the start menu, the Call Start Menu node can be used to open it.
    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!
  • Thank you so much for your help.

    I manage to do it. I have another question, On the menu screen, how do I make "New game", "Load", "Continue" and "Exit" references for me to call?

    I want to do something like "New game" is highlighted, The music change and when "Load" is highlighted, the music change to another.

    Thank you so much for your help.
  • Hm, this can probably done using Input Schematics.
    If you add pre-placed buttons to your start game menu's UI box prefab, you can define input schematics for each button - e.g. starting a schematic when the button is selected or accepted.
    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!
  • So, instead using UI prefab, I have manually create a UI and use Input Schematics to create that I want in my earlier question?
  • I did try the input schematics as you said.

    Here is what I did;

    I duplicate the choice button prefab, rename it as Choice Button 1 put it onto the Exit Menu option prefab.

    Inside the Input Schematics, I put Change Camera Position Node, set the position, and save schematics as Input1.

    I put the Input1 schematics into Input Schematics with Input Context Only enable.

    I run the game. It didn't work. Is there anything that I miss?
  • When manually placing inputs on a UI box prefab, you need to let the UI Box component on the root of the prefab know about them. They can be added in the Input Settings via the Add Placed Input button.

    When you use the scene hierarchy context menu to add inputs to the UI box they'll automatically be registered as placed inputs.
    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!
Sign In or Register to comment.