Add and Delete in the Toolbar

We'll first add the Add and Delete buttons to the toolbar:

  1. From the Project Assets/SimpleIcons/Prefabs folder, drag the DeleteButton prefab to the Hierarchy as a child of Toolbar.
  2. Set its Position X to 0.15.
  3. Add the PictureAction script component to the button.
  4. Set its Command to DELETE.
  5. From the Project Assets/SimpleIcons/Prefabs folder, drag the AddButton prefab in the Hierarchy as a child of Toolbar.
  6. Set its Position X to 0.65 so it's a little off to the side.

 

  1. Add the PictureAction script component to the button.
  2. Set its Command to ADD.

The completed toolbar now looks like this:

..................Content has been hidden....................

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