Wire up the actions

When the user clicks a picture, they activate it for editing. When the user clicks the Done button, it stops editing. Let's wire this up:

  1. Add the PictureAction component to the FramedImage object in DefaultPicture.
  2. Set its Command to EDIT.
  3. Add the PictureAction component to the DoneButton object in the Toolbar.
  4. Set its Command to DONE.
  5. Add a collider which the FrameImage needs to receive events from InputManager as shown ahead:
    1. When FramedImage is selected, Add Component then Box Collider.
    2. Set the Center to (0, 0, 0.05).
    3. Set the Size to (1, 1, 0.1).
  6. Save your work and press Play. When you click the Done button, the toolbar should be deactivated and disappear. When you click the picture, the toolbar reappears. The scene with our (one-button) toolbar now looks like this:

Let's start adding some editing capability to our app.

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

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