Тип или пространство имен Vector3 'нельзя найти < /p>
< /blockquote>
Код: Выделить всё
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class pathmaker : MonoBehaviour {
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public int length = 10;
public int width = 10;
public int y_pos = 0;
public GameObject sphere;
private vector3[,] sphere_positions = {{}, {}};
// Start is called before the first frame update
void Start()
{
for (int x = 0; x < length; x++)
{
for (int z = 0; z < width; z++)
{
Instantiate(sphere, new Vector3(x * 6, y_pos, z * 6), Quaternion.identity);
sphere_positions[x, z] = new Vector3(x * 6, y_pos, z * 6); // this line is throwing the error
}
}
}
// Update is called once per frame
void Update()
{
}
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... rowing-a-c