示例#1
0
 /// <summary>
 /// Toggle between showing current sensor and hiding it
 /// </summary>
 public void ToggleHideSensor()
 {
     currentSensor.IsVisible = !currentSensor.IsVisible;
     currentSensor.SyncVisibility();
     if (currentSensor.IsVisible)
     {
         hideSensorButton.GetComponentInChildren <Text>().text = "Hide Sensor";
     }
     else
     {
         hideSensorButton.GetComponentInChildren <Text>().text = "Show Sensor";
     }
 }