public void AddRandomColor() { colorTileID = TilesManager.RandomPickColorID(); rend = GetComponent <Renderer>(); rend.enabled = true; rend.sharedMaterial = TilesManager.ColorID[colorTileID]; //Debug.Log(colorTileID); }