Search Unity

Help with 2D Tutorial

Discussion in 'Getting Started' started by Argo2014, Jun 22, 2019.

  1. Argo2014

    Argo2014

    Joined:
    Jun 20, 2019
    Posts:
    5
    Hi, pretty new to Unity just built out the John Lemon Project couple of days ago and am continuing with the Ruby's Adventure Project, I'm up to creating the UI and am trying to create a health bar with the instructions they give me https://learn.unity.com/tutorial/vi...66dbedbc2a0021b1bc7c#5c7f8528edbc2a002053b3c5 in Step 4. I've got the mask set to the proper size and the anchors stretched to where they need to be. Could be a stupid question but it looks like in the .gif picture they show clicking and dragging the pivot point, for some reason I can't replicate it. I'm running Version 2019.1.7f1 of Unity since the Unity Hub recommended ver 2019.1 for this project. I'll be greatful for any help.

    Thanks,
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    What exactly happens when you try?

    Without more to go on, my guess is that you are in the wrong tool mode. Check the mode buttons at the top-left of the Scene tab, and make sure you're in the right mode for whatever you're trying to do.
     
  3. Argo2014

    Argo2014

    Joined:
    Jun 20, 2019
    Posts:
    5
    I'm on the Rect Tool shortcut "T" when trying to click and grab the pivot circle it just grabs the object itself.

    Following the Tutorial: I've created the mask GameObject with a UI>Image Object resized the object to fit the frame, set the anchors and, by the looks of the Tutorial should be able to move the pivot point by clicking and dragging the blue circle in the middle that shows with the Rect Tool.
     
  4. Argo2014

    Argo2014

    Joined:
    Jun 20, 2019
    Posts:
    5
    Thanks for the help, think i figured it out, above the scene tab the Center/Pivot Gizmo needed to be turned to Pivot I don't think i missed the step in the Project Tutorial.
     
    shaggywg and JoeStrout like this.
  5. neovonretorch

    neovonretorch

    Joined:
    Jul 5, 2019
    Posts:
    9
    So I'm having the exact same problem as you, and I do not understand your solution. I changed the Rect Transform Anchor/Pivot "gizmo" to "stretch/stretch." Is that what you mean? But I still get no UI change when I mouseover the blue pivot circle, and if I click and drag, it moves the whole UI Image gameobject. I cannot figure out how to move that pivot point.

    EDIT: OK I found it. Next to the tool bar there are two toggle switches that say "Center" and "Local" If you click them, they switch to "Pivot" and "Global" respectively.
     
    Last edited: Jul 8, 2019
  6. pitapa

    pitapa

    Joined:
    Mar 26, 2021
    Posts:
    1
    On the upper left corner (just above hierarchy) you must have selected the "Rect Tool" (the icon with a square and a dot on each corner). Otherwise it just does not work.

    (ruby tutorial, MacBook, unity 2020.3)