Hey all. I was trying to access a public enum from one of the scripts for my game. However, it wasn’t accessible from within this one particular class, for some reason.
I looked at the inspector and said script doesn’t have a checkbox for enabling/disabling the component. It also has a + under the c# icon. Can anyone explain what I’m missing here, please?
I have no idea about your enum not working part, and I’ll answer your question based on post heading…
“Help with + icon next to script in Unity inspector”
The “+” sign means your object in this picture is a prefab instance, and you have added a Ammo script/component to it in scene, and the prefab doesn’t have it.
So it tells you that this is a difference compared to prefab.
You can see the differences from GameObjects’s inspector upper right corner where is says “Overrides”
Regarding the enum. Have you made both the enum states public and the enum variable?
Also, is your enum variable using a {get; set;}? As these don’t work with unity’s inspector.
I’m not sure what the problem was with the enum. After the second time I restarted Unity and visual studio, the enum was suddenly accessible. So yeah, I’m at a loss. Might have been a bug.