HideFlags not serializing, or possibly being reset?

Hey Everyone,

I’m working on a Editor Plugin that modifies various monobehaviour components of a gameObject. In the Editor window I have a button to set all the component’s hideFlags to either HideFlags.None, or HideFlags.HideInInspector. This function works just fine in Edit mode and play mode, but upon changing between the two the hideFlags are always set to HideFlags.None.

It appears as though the hideFlags aren’t being serialized for some reason, although all the other serialization for the components seems to work just fine. I really don’t want to have to have all my components use the Serialization callbacks when it shouldn’t be necessary. Does anyone know why this might be happening?

Thanks!

I have the same issue currently. Did you ever figure it out?