How to declare an array of Vector 3 like that?

Hi,

How to declare a 2-dimensional array so as to obtain an array of vector 3 where N is the number of vectors?
I have at the beginning of the code:

public int N;

when the script is compiled and attached to the object, I manually enter in the script component a value of N
for example N = 5
I then get in this script component of the inspector 5 new vector fields 3 to fill in manually (i.e. 15 entries)

thanks

Hi @Kaloverian ,

Unity does not by Default support 2D arrays in Inspector. You need to create a custom property drawer to display that.

1 Like

I used this last code of this link:
https://owlcation.com/stem/Using-Single-and-Multi-Dimensional-Arrays-in-C-and-Unity3D

So,what name should I assign to the script file?