unity ganarate ranodom color code example
Example: unity random color
using UnityEngine;public class ColorOnClick : MonoBehaviour
{
void OnMouseDown()
{
// Pick a random, saturated and not-too-dark color
GetComponent<Renderer>().material.color = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f);
}
}