S
S
stasersmailov2021-12-11 14:38:50
Unity
stasersmailov, 2021-12-11 14:38:50

How to edit an element on the stage through the inspector?

There is a GridNode component that has the Type and Modifier fields. How to make it so that when changing the value of these fields in the inspector, the sprite of the object on the stage changes without starting the game? How, for example, Transform and SpriteRenderer work, if you change the value in them, then they are applied immediately without starting
61b48d90492ad861376933.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
stasersmailov, 2021-12-11
@stasersmailov

Found a solution using the OnValidate() function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question