So, this is exactly what’s going on. I have code inside of a C# file in Unity, basically getting the spawn points I set and spawn enemies in there. So, obviously, I’d have an array for all of the spawn locations so the code can recognize where to spawn the enemies (you’d think). The array does not show up in the unity inspector. Someone help? I’m a beginner in C# so I apologize if anything is stupid.
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour
{
public GameObject spawnObject;
public GameObject[] spawnPoints;
public float timer;
public float timeBetweenSpawns;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
timer += Time.deltaTime;
if (timer > timeBetweenSpawns)
{
timer = 0;
int randomNum = Random.Range(0, 3);
Instantiate(spawnObject, spawnPoints[randomNum].transform.position, Quaternion.identity);
}
}
}```