Answer the question
In order to leave comments, you need to log in
How to hide unnecessary fields in the editor?
I have a prefab, it has several subtypes, so to speak
[Range(1, 3)] public byte TypePrefab = 1;
[Range(0, 100)] public byte CountType1 = 10;
[Range(0, 100)] public byte CountType2 = 10;
[Range(0, 100)] public byte CountType3 = 10;
Answer the question
In order to leave comments, you need to log in
Uuuu, at the moment there are three systems for custom inspectors.
Old ancient OnGUI
Mediocre EditorGUILayout
And newfangled UIElements
The main thing is not to get confused and not create a vigorous hodgepodge of them.
https://docs.unity3d.com/Manual/editor-CustomEdito...
I have experience and the unit is a couple of hours, so I can’t say for specialized tools, but I can’t help but notice that all your counters are of the same type: you can roll them all into private, create one separate public counter, and in the method start to prescribe the assignment of the counter value depending on the selected type.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question