Showing static variables in the inspector

Hello!

I have a script that contains static public variables (list). The script is not attached to any of the objects. During the operation of the application, these variables change. I would like to watch the changes of these static variables in the editor inspector without stopping the application.

Is it possible to configure the display of this data in the inspector?

Is it necessary to attach the script to the object?

In general as far as I know, the Inspector only views things that are (1) selected in the game heirarchy, and (2) serializable.

You can make a small MonoBehaviour-derived script that has runtime access to your static public variables, attach that script to an object in the game, and implement a drawer to show those variables in the inspector. Or just make the script you already have which contains those things inherit from MonoBehaviour and attach it to an object in the game.

1 Like

Thank you so much for the answer! In any case, the script must be attached to the editor’s game object