Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

"Reverse" Aspect Ratio Fitter?

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

  1. Kvadratt


    Mar 7, 2021
    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?