ptr->GetHideFlags () == m_RequiredHideFlags

I keep seeing:

ptr->GetHideFlags () == m_RequiredHideFlags

Does anyone know how to fix, and or why this is appearing?

It pops up like, 146 or 484 times at the start of the play test…then never appears again until the next time.

I have tried disabling everything in the scene, but it still appears.


Using unity 5.3.5f1 I solved the problem with 100% repeat-ability doing the following:

I wrote a function to be executed in OnValidate(). It cycles through every component of every GameObject and sets the hide flags to Hideflags.None.
After this, save the scene and the project and close it.

Now go to your unity project folder and delete/rename the library folder. This causes unity to rebuild it then next time you load the project.

After this it should be fixed.


GameObject[] allGameObjects = FindObjectsOfType<GameObject>();
foreach (GameObject go in allGameObjects)
    go.hideFlags = HideFlags.None;
    Component[] components = go.GetComponents(typeof(Component));
    for (int i = 0; i < components.Length; i++)
        components*.hideFlags = HideFlags.None;*

I was able to replicate the issue with 100% repeat-ability by executing this code, also in OnValidate().
Renderer renderer = gameObject.GetComponent();
if (renderer)
renderer.sharedMaterial.hideFlags = HideFlags.HideInInspector;
The intention of this was to hide the following in the inspector:
…which works… but breaks something significant.