Activating the Image menu

The Image menu should not be visible until the user activates it. We can add this command to the PictureController and activate it from the toolbar. We already added the IMAGE command to the PictureController script, so all we need to do is add the button to the toolbar:

  1. Drag the ImageMenu into the Image Menu slot of the Picture Controller.
  2. In the Hierarchy, disable the ImageMenu object (uncheck the button in the upper-left of its Inspector).
  3. We can now add an Image button to the toolbar. From the Project Assets/SimpleIcons/Prefabs folder, drag the ImageButton prefab in the Hierarchy as a child of Toolbar.
  4. Set its Position X to −0.3.
  5. Add the PictureAction script component to the button.
  6. Set its Command to IMAGE.
    ..................Content has been hidden....................

    You can't read the all page of ebook, please click here login for view all page.
    Reset