How do I create custom restraints in a C# script that does stuff in the live editor view (and in game) like "Horizontal Layout Group" does. I want to create some custom GUI fields, and have my own set of options, and minimized to the few variables I need, while enforcing other variables (such as forcing a ratio for a GUI component to say "10:9" or "5:3"). I know how to create the ratios, I just want to know how I can create my own variables that will modify a gui component live in editor.
↧