Unity Array.Length Bug/Problem?

Hello guys,

I’ve got a kinda weird problem. I created an array like this:

public float xpos = {-0.4121904f, -0.2455676f, -0.0693534f, 0.1025528f, 0.2694485f, -0.5368412f, 0.6039026f};

It should contain 7 numbers, but it appears that Unity won’t adress or count the last 2 numbers. Am I something missing or is this a bug?

How did you checked the number of element? Debug.Log(xpos.Length)?

Since the var is public, did you also modified the default array’s values in the inspector? It may be the solution.