I use List to store my data, but the compiler says "Index was out of range. Must be non-negative and less than the size of the collection."
how can I init the list like myvector3 = new Vector3[65];
I use
public Vector3[] myvector3;
public Quaternion[] myQuaternion;
then
myvector3 = new Vector3[65];
myQuaternion = new Quaternion[65];
is ok....
public List<GameObject> Stroeallobject;
public List<Vector3> myvector3;
public List<Quaternion> myQuaternion;
private void Start()
{
for (int i = 0; i < Stroeallobject.Count; i++)
{
myvector3[i] = Stroealljoint[i].transform.position;
myQuaternion[i] = Stroealljoint[i].transform.rotation;
}
}