using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RandomBoxColor : MonoBehaviour {

	[SerializeField] ColorPreset[] _colorPresets;

	void Awake(){
		if(_colorPresets.Length > 0){
			Renderer r = GetComponent<Renderer>();
			if(r != null) r.material.color = _colorPresets[Random.Range(0, _colorPresets.Length)].BoxColor;
		}

		Destroy(this);
	}

}
