deklare vector3 (javascript)

hi,
im new with unity and i tried to deklare a vector3 variable.
there’s an error message ‘can’t convert int[ ][ ] to vector3’.

var vector3 : Vector3[ ]=[
[0,0,0],
[0,0,1],
[0,1,1],
[1,1,1],
[1,0,0],
[0,1,0],
[1,1,0]
];

thx for all your help!

Can you tell us more about what you are trying to do?

Are you trying to make an array?

var myV3Array : Vector3[ ]; is a way to declare an array of Vector3’s.

You should be able to just declare a Vector3 with var myV3 : Vector3;

If you are trying to declare and populate an array of Vector3’s, this will work:

var myV3Array2 : Vector3[]=[
new Vector3(0,0,0),
new Vector3(0,0,1),
new Vector3(0,1,1),
new Vector3(1,1,1),
new Vector3(1,0,0),
new Vector3(0,1,0),
new Vector3(1,1,0)
];

ps: in Unity.JS I don’t think you need the “new” keyword. You must have that in C#

thank you!