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?
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
133 People are following this question.
MonoBehaviour does not exist in the current context ?
Why isn't my script inheriting from MonoBehaviour
How can i rotate all the child objects together at the same time ?
EditorObjExporter.cs script saves outside correct folder
#if UNITY_EDITOR in .dll