Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

"Reverse" Aspect Ratio Fitter?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Kvadratt, Apr 22, 2022.

  1. Kvadratt

    Kvadratt

    Joined:
    Mar 7, 2021
    Posts:
    8
    Hello. I want to create a horizontal bar with two buttons, where one button has fixed aspect ratio 1:1 and the other one fits all other space, like shown in images below.
    1.png => 2.png
    My only idea was to somehow use Aspect Ratio Fitter in reverse so when green button stretches in height, it shrinks in width, but I didn't find such functions. How can this be done?