So i have this for loop and the random spawnpoints work just fine but the random color does not because every instance has the same color. Shouldnt the color change for each loop? What am i missing here…
void SpawnBooks()
{
for (int i = 1; i < bookCount; i++)
{
coverColor.color = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 0.8f);
int spawnPointIndex = Random.Range(0, spawnPoints.Length);
Instantiate(bookPrefab, spawnPoints[spawnPointIndex].position, spawnPoints[spawnPointIndex].rotation);
}
}