Hi!
My structure contains an enum:
public enum PlayerDisposition : int
{
Good = 0,
Evil = 1,
Neutral = 2
}
Is it possible to block the selection of the “Good” option from the inspector’s level?
Greetings!
Hi!
My structure contains an enum:
public enum PlayerDisposition : int
{
Good = 0,
Evil = 1,
Neutral = 2
}
Is it possible to block the selection of the “Good” option from the inspector’s level?
Greetings!
Hey you can find solution here. This solution hide only selected field of your enum.
public enum ETeam
{
Team1 = 0,
Team2 = 1,
[InspectorName(null)]
TeamCount
}
Here the result:
So you only want evil and neutral to be selectable?
That I personally don’t know, but if you want to hide the whole thing from the inspector and don’t need the enum to be public you should just set it to private.
If you need it to be public but want to hide the whole thing anyway just put [HideInInspector] before the variable.
For Example:
public enum PlayerDisposition : int { Good = 0, Evil = 1, Neutral = 2 }
[HideInInspector]
PlayerDisposition variable;
Thank you for your answer.
I don’t want to hide the whole variable just individual options.