// Use this for initialization void Start() { //Disable the exit _nextLvl.SetActive(false); //Get random color (not black cause the first frames of GetCamTexture are black) _etalon = new Color(Random.Range(0.01f, 1f), Random.Range(0.01f, 1f), Random.Range(0.01f, 1f)); //Apply the color to all elements _archMaterial.color = _etalon; //Initialize GetCamColors _camColor = new GetCamColors(); }
// Use OnEnable to have it done before all the Start in Drag and CheckChannel void OnEnable() { camColors = new GetCamColors(); }
void Start() { _originPos = transform.position; _camColors = GameManager.camColors; _myMaterial = GetComponent <MeshRenderer>().material; }