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

MRTKEditor system is overriding behaviour of [Header] attribute.

Open DaveSullivanAtWork opened this issue 9 years ago • 3 comments

The class CustomHeaderDrawer.cs overrides the behaviour of the HeaderAttribtue (unity inspector decorator). This means that if you are not using the MRTKEditor system for your inspector drawing, the header will not be displayed. This is controlled by the MRTKEditor.ShowCustomEditors static boolean value.

I don't think that changing core functionality of the unity editor system like this is a good idea and will be confusing for people when all their custom headers suddenly disappear.

I cannot see the [Header] attribute being used anywhere within the MTRK that also uses the MRTKEditor, so I suggest we change this to be a custom attribute and drawer instead of a modification of the standard unity [Header] drawing.

i.e. create a MRTKHeaderAttribute class.

Thoughts?

DaveSullivanAtWork avatar Nov 06 '17 17:11 DaveSullivanAtWork

@Railboy please be sure to address this bug with your latest MRDL PR.

StephenHodgson avatar Nov 07 '17 19:11 StephenHodgson

I'll include a fix in #1318.

I don't think that changing core functionality of the unity editor system like this is a good idea

Agreed. MRTKEditor is supposed to be a lightweight skin that offers additional information. Default editors shouldn't be disrupted.

Railboy avatar Nov 08 '17 21:11 Railboy

Fixed in #1318.

Railboy avatar Nov 09 '17 20:11 Railboy