[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.
[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.
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
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.