Nicholas Yang (nyanginator)

1 answer · asked · Lesson: Creating a UI Health Bar · Course: C# Bootcamp for Unity

Setting anchor points

I thought anchor points are for when we resize the screen and want elements to stay in a certain position (or stretch size) relative to one other.

Whatever anchor point that I manually set as the Handle Rect of the scrollbar seems to get overridden anyway; once the Size of the scrollbar is adjusted, the Handle Rect's anchor always gets set to stretch-stretch.

I did not have to change any anchor points.

  • crew

    Anchor points are also based on the parent object. So it gets a bit more complex when you have multiple children with their own unique anchor points. Unless you're building a scroll bar manually I would just focus on the main parent anchor point for where to place it within the canvas and use the default anchor points for the children.