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()
{
}
}
Я попытался поместить новый Vector3 (x * 6, y_pos, z * 6) в кудрявые скобки, но он сказал мне, что мне не хватает a; .>
Тип или пространство имен Vector3 'нельзя найти < /p> < /blockquote> [code]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() {
} } [/code] Я попытался поместить новый Vector3 (x * 6, y_pos, z * 6) в кудрявые скобки, но он сказал мне, что мне не хватает a; .>