Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Force Inspector to constantly update the display of serialized fields of a script during play mode?

Discussion in 'Editor & General Support' started by jumpingjack, Jul 25, 2022.

  1. jumpingjack

    jumpingjack

    Joined:
    Nov 27, 2013
    Posts:
    6
    This isn't a custom editor, just a script with some serialized fields.
    I use it to track current mouse position, the players position, what object is being hovered over etc. mostly for debugging.
    The problem is that although other panels like the transform etc update constantly during play mode, the serialised fields in the inspector don't. I have to hover over the panel to get hem to update and this makes the information pretty much useless.

    Is there any way to force the inspector to update the serialised field constantly?
    I tried repaint, but it's not a custom editor, and I know very little about custom editors anyway.

    I'd like to be able to move the mouse around, move the play etc, and actually see the fields showing the updates. The fields do change, but the inspector doesn't display the changes unless I hover over it.
     
  2. jumpingjack

    jumpingjack

    Joined:
    Nov 27, 2013
    Posts:
    6
    Apologies I found out what my problem was. It seems the inspector does update serialized fields, but not if, like in my case, all the fields are in a ScriptableObject