Search Unity

Button and Image management

Discussion in 'Getting Started' started by Deleted User, Jan 24, 2020.

  1. Deleted User

    Deleted User

    Guest

    Edit:
    I found looking in the UI part of the forum to be helpful. silly me.





    Hi. Quick question.

    I was going about my project and wanted different menu screens and buttons on the different menus. It's about navigating a ship, and I have different shots of the boat in different areas, with buttons to navigate around the ship.

    My first thought was to use a single scene. I had different methods that used a bunch of SetActive(true) and SetActive(false) to enable and disable the UI GameObjects.

    This meant having 8 lines of SetActive's in each method. I would turn on and off different images, remove the buttons and have what I needed on the screen at the right time. It was buggy and clunky.

    Would it be best to use separate scenes... or is there a way to manage the UI... like delegates can =+ methods onto a list of some type... so can buttons and images be added and remove when needed, with less difficult code?

    Thank you forum people!
     
    Last edited by a moderator: Jan 25, 2020