Serialized Image not being exposed to Inspector

[SerializeField] private Image healPowerBar;

I added the image for the power bar as a serialized field, but even though the code compiled without any errors, it was not exposed to the inspector.

1 Like

Solution:
VSCode automatically added “Microsoft.Unity.VisualStudio.Editor” to my used namespaces, which was wrong.
Had to change it to “UnityEngine.UI”

Just FYI if someone has trouble :slight_smile:

You’re not the first person this week that had VSCode automagically add that namespace. Sometimes the IDEs just think they’re helping, when they’re not. Good job finding it

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms