Changing exposed variables in the inspector doesn't have any effect in Unity 2020.1.2

Hello, I just updated a project from 2019.2.1 to Unity 2020.1.2, and started having the following problem.

In one of my scripts I have a float variable that is exposed in the inspector with [SerializeField]. I give it a default value in my Start() method, and I use it in a Debug.Log line in my OnMouseOver() method. When I run my game and then try to change this value in the inspector to test something, I can type in a new number, but it doesn’t update the debug message. However, if I move the same debug line from OnMouseOver() into my Update() method, it works fine, and changing the value in the inspector changes the debug message as expected. This problem only happens in Unity 2020.

I’ve done a few other tests, like using the variable for applying a force to the object, and simply making it public rather than using [SerializeField], and I’m pretty much sure it’s a problem with Unity 2020’s OnMouseOver() method, but I don’t know how to dig deeper and find out what’s going on.

Can you share your code?

Hello, everything is working now, and I have no idea what the difference is. The only thing I can think of is that I was editing one game object and looking at another :roll_eyes: