Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Adaptive Interface for Horizontal and Vertical view

Discussion in 'UGUI & TextMesh Pro' started by Bodkens, Aug 2, 2022.

  1. Bodkens

    Bodkens

    Joined:
    Feb 5, 2020
    Posts:
    1
    I want to make interface for my 2D Game. I am trying to make my interface look both good for Horizontal and Vertical view. For example, I want to make Horizontal interface Снимок экрана 2022-08-02 в 01.48.10.png and Vertical one Снимок экрана 2022-08-02 в 01.47.45.png look like at images. I made two separate canvases and script that switches them depends on screen orientation. But this isn't a really good solution because elements are completely separate from each other and I want, for example, attach some script to button I need to attach and setup it twice, for button in horizontal and vertical view Снимок экрана 2022-08-02 в 01.56.20.png . How can I make it smarter? Thanks a lot in advance for help!