I'm trying to make one of the children of a specific object turn red. Said child needs to be random, however I ran into this extremely annoying error (which I actually keep on running into).
private int HexagonCount;
void Start()
{
HexagonDirectory = GameObject.Find("Hexagon Directory");
for (int i = 0; i < HexagonCount; i++)
{
int randomChildId = Random.Range(0, HexagonDirectory.transform.childCount);
Transform randomChild = HexagonDirectory.transform.GetChild(randomChildId);
}
randomChild.GetComponent<Image>().color = new Color32(189, 23, 23, 0);
}```
This is my script, and on the ```int randomChildId``` line, I get an error saying "Random is an ambigous reference between UnityEngine.Random and System.Random". I couldn't find anything to fix this and I really want it to *stop* happening. Hope I can get some help.
(I used to do Unity everyday, but I just came back after a long break so I'm pretty rusty)