How to show effect of Global Variable in Editor

Question: Is there a way to show the effect of a change in a property of a shader in Editor mode?
I apologize if this not the right forum, I had a hard time identifying where my issue should go best.

Example:
(this is not a real world example, just for illustrating the issue). Say I have a variable in my shader that controls the UV offset of my Main Tex. It is randomized by a simple script on the game object at runtime, so that each instanced material using that shader has a different UV offset. The effect will only be visible in Playmode, since the variable is set in the Start() method. Where would I need to set the variable if I wanted to see the randomized offset within the editor without the need for constantly working in Playmode?

6469340--726020--upload_2020-10-29_11-49-26.png

Oh lol, I just realized I don’t need to use a Global and can go with Instanced Property as well. Still, the issue stays the same, I can’t see the effect in Editormode, since it is generated at Start.

Oh. Nevermind, since I framed the question now I actually found out what to google for and found a solution:
Simply putting
[ExecuteInEditMode]
before the class solves my problem like a charm.

Thanks, internet, for being my unicorn to bounce thoughts off :slight_smile: