Z
Z
Zefirot2021-07-15 07:52:15
Unity
Zefirot, 2021-07-15 07:52:15

Is it possible to make an adjustment acting on the prefab?

The bottom line is this - I have a prefab, the prefab has a size, and the size is set by the slider 1-5, and at startup it corresponds to certain values ​​\u200b\u200b(for example, 1 is 1,1,1 and 2 is 1.5,1.5,1.5).
After launch, of course, the prefab itself, according to the settings, takes the value that it has and is set at startup based on the value in the slider.
The question is - is it possible for the prefab to change the value that is in the slider even at the time of editing?
That is, I threw the prefab on the object, put 2 in the slider and the prefab immediately took the dimensions 1.5,1.5,1.5?
(it would be more convenient to create a scene)

And an additional question - is it possible to use such a selective menu with names instead of the [Range(1, 5)] slider?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2021-07-15
@Zefirot

Can. Look towards EditorScripts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question