About 'UI Anchors'!

In this video (objectives)…

  1. Add a button to our canvas.
  2. Add an image to our canvas.
  3. Adjust the stretch and anchor settings so that our UI assets are aligned how we want them to be even if the game is played at different aspect ratios or resolutions.

After watching (learning outcomes)… Capable of implementing UI anchor points works.

(Unique Video Reference: 3_UI_CUD)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

1 Like

Hi, how do change the view in unity from


to

thanks :grinning:

I am using 2019.3.14f1 and I have the same issue with the view. I never see the anchors like you show, just the camera. Also, when I create the Image as instructed nothing ever shows up on the scene for it. I can assign the file to it in the Inspector, but I can’t get it to show in the canvas. It is being rendered on the screen image in the center though (very small).

Unable to proceed further until I know how to fix it.

I’m using 2019.3 as well. That’s not the issue. If you select the object you want in the hierarchy and then either double click it, that object will show up in the scene view.

Or if you type ‘F’ in the scene view it should select what you want. Hope that will work for you lads.

Rect Tool is selected as well. Video at 3:49.

@lvskiprof

If you make sure your image in Assets is a 2D sprite and that the image is loaded in the Hierarchy all should work fine.

Hopefully that is clear.

Finally got back to the lesson today.

Not sure just what I was doing wrong before, but going through step-by-step it is working properly now. I had Canvas under Main Camera before and moved it out to the same level in the hierarchy and now it is working correctly. Not sure if that was the fix or not, but in case it was I wanted to let people know what I changed.

Thanks.

Mike

Privacy & Terms