Position a UI button on bottom left of the viewport/screen?

后端 未结 1 1666
灰色年华
灰色年华 2021-01-25 16:49

How do I place a UI Button (the new UI) so that it is always at the bottom-left on the screen/viewport? My idea was to do it in code like this:

void Awake () {
          


        
相关标签:
1条回答
  • 2021-01-25 17:08

    Instead of doing it in code, click on the UIButton in the scene or hierarchy then go into the inspector and in the top left of the transform component you will see a square, click it, hold shift and alt and then click the 'Bottom Left' square to latch it to that side of the screen.

    0 讨论(0)
提交回复
热议问题