Unity 2019 displays contiguous Headers in the wrong order

Unity 2019 displays contiguous Headers in the wrong order!

Hello @SolarianZ ,

This is because you’re applying the same headers to the same variable. If you have another variable in between headers, the order should be appearing as you want.

Also, if you want to have both texts to be applied to the same variable, you can fit the content of such text in one single Header.

If you don’t want to have both texts merged into one single header, please explain to us why in order to find another alternative :wink:

I hope this helps!

Sometimes I want to use Header as a Section Title. In this situation I have to apply two Headers to the same variable.

6253821--689526--upload_2020-8-28_18-58-35.png

6253821--689514--upload_2020-8-28_18-52-1.png

Okay, in that case, you should use the second parameter of the Header attribute: Unity - Scripting API: HeaderAttribute

You can see actually how you can use it here: Unity - Scripting API: PropertyAttribute.order

For example, in the first screenshot that you shared, it should look like:

    [Header("Header A", order = 0)]
    [Header("Header B", order = 1)]

Thank you! This realy helpful.