// Update is called once per frame void Update() { if (item.isSelected()) { item.Unselect(); if (up) { color.nextMat(); } else { color.previousMat(); } } }