(Newbie) Is it possible to have an event trigger on a slider(Range)?

In the Inspector window its possible to use an slider with the Range Attribute. Like this:

[Range(1, 10)] public uint ChooseAnNumber = 1;

Now when the slider is moved, all the object needs to be destroyed. And rebuild.
I dont think its a good idea to check for changes in the Update loop.

Is there any way to use an event handler or get; set;?

1 Like

You could observe it in OnValidate() and when it changes do what you need.

2 Likes