sttz / trimmer

An editor, build and player configuration framework for the Unity game engine.
MIT License
104 stars 8 forks source link

Use scopes to manage editor layouts #24

Open JesseTG opened 1 year ago

JesseTG commented 1 year ago

This PR replaces EditorGUI.BeginDisabledGroup with EditorGUI.DisabledGroupScope. Ditto for a couple of similar editor layouts.

Using the scopes means that you won't have to manually match Begins and Ends, as the scopes implement IDisposable. This way, an errant exception or control-flow statement won't risk breaking the UI.