- Home /
Variable in Inspector
Hello, is there a way to change the amount of variables based on an integer? What i mean is, if you set an integer to 2 a new box appears in the inspector and another variable there? like this:
Comment
Best Answer
Answer by MakeCodeNow · Apr 26, 2014 at 06:50 PM
Make a serializable struct that contains the projectile and the point. Then, in your component, create an Array or List of these structs. Unity will do the rest.
Your answer
![](https://koobas.hobune.stream/wayback/20220613143636im_/https://answers.unity.com/themes/thub/images/avi.jpg)