I didn’t find anything that really answered this question
i want to make those “quiz menus” (1 to 9 ) randomly SetActive(true)
i tried this code but didnt work
public class Controller3 : MonoBehaviour
{
public GameObject[] spawnPoints;
public GameObject currentPoint;
int index;
void Start()
{
spawnPoints = GameObject.FindGameObjectsWithTag("quiz");
index = Random.Range(0, spawnPoints.Length);
}
void OnTriggerEnter(Collider other)
{
if (other.gameObject.CompareTag("point"))
{
currentPoint = spawnPoints[index];
currentPoint.SetActive(true);
}
}
}