Points and Score not showing in Inspector

Hi @mikee,

Welcome to our community! :slight_smile:

When assigning a script to an Inspector, the Inspector uses the default values at the top of your code to initialise the field. Then it takes control over the fields. If you change the default value in your code, the already existing component in your Inspector will not get affected by it.

Also bear in mind that Unity runs code of components active in the Hierarchy. If you manipulate values of prefabs during runtime, the game objects in the Hierarchy will not get affected by it.

I do not know what exactly you did or what your goal was but maybe this information will help you find the problem in your project. :slight_smile:


See also: