I think custom property drawers are causing Headers before/above their respective fields to lose their indentations. In the attached screenshots, my Faction field is the one with the custom property drawer.
Not sure why everything is offset, it should work so it is most likely a bug because of the IMGUIContainer. The inspector uses VisualElements to draw the GUI (by the default), and since you probably haven’t implemented CreatePropertyGUI, Unity automatically creates an IMGUIContainer wrapper for the drawer.
Thank you for saying, @Squidcor . I was going crazy thinking I was the only one! ahehe
Thank you for your input, @MrCool92 . I’ve tried changing the code to use CreatePropertyGUI instead of OnGUI, and indeed, the issue with the preceding header is gone. My issue now is the indentation of the VisualElement, which I guess is more addressable now than it was before. And it does scratch that visual itch I’ve been having with the header ahehe
I guess it’s just kinda weird in a way that I have to relearn and use VisualElements now for CreatePropertyGUI, as opposed to just using OnGUI. Is it actually better to use VisualElements? I’d also need to update my other editor code to make them uniform ahehe
I still hope Unity addresses the previous weird interaction with the header before. Thank you nonetheless, @MrCool92 !