Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order not respected #8

Closed
RDeluxe opened this issue Nov 16, 2017 · 7 comments
Closed

Order not respected #8

RDeluxe opened this issue Nov 16, 2017 · 7 comments

Comments

@RDeluxe
Copy link

RDeluxe commented Nov 16, 2017

Hey there

I have been having some troubles with DeComment not respecting the order.

unity_2017-11-16_19-35-56

Here is the code :

        [DeHeader("Generic skills properties", mode = DeHeaderAttribute.Mode.BottomDivider)]
        [DeComment("Launch passively, disable the button to launch in UI")]
        [DeDivider]
        public bool Passive;

If I revert them everything is fine:

unity_2017-11-16_19-39-08

        [DeDivider]
        [DeComment("Launch passively, disable the button to launch in UI")]
        [DeHeader("Generic skills properties", mode = DeHeaderAttribute.Mode.BottomDivider)]
        public bool Passive;

Note: using only DeComment and DeHeader, order is screwed too. Same thing with DeComment + DeDivider

unity_2017-11-16_19-41-17

        [DeHeader("Generic skills properties", mode = DeHeaderAttribute.Mode.BottomDivider)]
        [DeComment("Launch passively, disable the button to launch in UI")]
        public bool Passive;
@Demigiant
Copy link
Owner

That is weird :O Checking it out!

@Demigiant
Copy link
Owner

Uh, it gets weirder. Everything works perfectly here, and order is respected (though I'm testing on Unity 5.6.3). Also, I checked the code and the order is decided by Unity, which should just call GetHeight and OnGUI of those drawers in the order they're drawn, so it seems Unity is messing something up there. On what version are you?

@RDeluxe
Copy link
Author

RDeluxe commented Nov 16, 2017

Hm, using 2017.2 with .NET 4.6

@Demigiant
Copy link
Owner

In theory there is an extra order parameter on all attributes that you can use, to force the draw order:
[DeComment("dum dee dum very useful comment", order = 1)]

I'm assuming that in pre-2017 versions Unity ordered stuff correctly even if you left it to the default 0, while in 2017 order is now broken and you should set it manually :( Can you try and let me know (I don't want to make a 2017 copy of the DemiLib project just for this, if I can avoid it :P)

@Demigiant
Copy link
Owner

P.S. even so, I hope this is just a 2017.2 issue (since 2017.2 brought a lot of bugs) and it will be fixed in the next one?

@RDeluxe
Copy link
Author

RDeluxe commented Nov 16, 2017

Thanks, it's working great with the order parameter !

Let's hope it's 2017.2 !

@Demigiant
Copy link
Owner

Crossing my fingers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants