Hello!
I made a script to generate gameobjects with random positions an random tints.
I added “[ExecuteInEditMode]” at the beginning of the script.
And I clear generated objects before re generated them on every update.
void Update()
{
if (Application.IsPlaying(gameObject))
{
// Play logic
}
else
{
// Editor logic
ClearGrid();
CreateGrid();
}
}
My problem is that the script constantly update and I just want it update only when I modify my component parameters ( in inspector windows ).
Is it clear ans is there a way to do that?
Thanks!