Unity-SerializeReferenceExtensions icon indicating copy to clipboard operation
Unity-SerializeReferenceExtensions copied to clipboard

[IMPROVE] Foldout rect.x adjustment for Unity 2022.2 or newer

Open bulleador opened this issue 1 year ago • 0 comments

Improvement destription

SubclassSelectorDrawer, lines 60 to 64 adjust foldout rectangle horizontal position by 12 units to the left for versions 2022.2 or newer like so:

#if UNITY_2022_2_OR_NEWER
    // NOTE: Position x must be adjusted.
    // FIXME: Is there a more essential solution...?
    foldoutRect.x -= 12;
#endif

which actually makes it render almost outside of the inspector in 2022.3: obraz

Removing this adjustment makes the foldout render correctly in 2022.3.

If I find the time, I'll do a PR

bulleador avatar Sep 07 '24 13:09 bulleador