- Home /
Toggle whether @HideInInspector takes effect.
Looking for a way to do this for variables in a class.
Answer by whydoidoit · Jun 18, 2013 at 07:20 PM
You can't without recompiling. You could put the @HideInInspector inside a #if SOMETIMES_VISIBLE and then use the Player Settings to set or unset that define. You can always view @HideInInspector fields if you switch the inspector to Debug mode.
You can always view @HideInInspector fields if you switch the inspector to Debug mode.
Is this different for JavaScript? As far as I know, marking a variable as hidden in the inspector means that it is hidden regardless of what mode the Inspector is in. That's how [HideInInspector] works in C# anyway.
Your answer
Follow this Question
Related Questions
Non-MonoBehaviour class exists in scene, constantly calling itself 2 Answers
Is there a way to dynamically check for variable change ? 2 Answers
Accessing a UnityEditor class. 1 Answer
Creating a preset class that can be assigned in the inspector 0 Answers
'FindPropertyRelative' and an instantiated class inside an instantiated class 0 Answers