public void SwitchBorders() { bordersOn = !bordersOn; UserTrackerVisualization utv = FindObjectOfType <UserTrackerVisualization>(); if (utv != null) { utv.SetShaderProperties(showBackground, bordersOn); } UserTrackerVisMesh utvm = FindObjectOfType <UserTrackerVisMesh>(); if (utvm != null) { utvm.SetShaderProperties(showBackground, bordersOn); } }
public void SwitchBackground(bool bgEnabled) { showBackground = bgEnabled; //currentBGColor = (currentBGColor + 1) % backgroundColors.Length; UserTrackerVisualization utv = FindObjectOfType <UserTrackerVisualization>(); if (utv != null) { utv.SetShaderProperties(showBackground, bordersOn); } UserTrackerVisMesh utvm = FindObjectOfType <UserTrackerVisMesh>(); if (utvm != null) { utvm.SetShaderProperties(showBackground, bordersOn); } }