public void toggleExperiment() { if (experimentInterface == null) { return; } experimentInterface.ToggleExperiment(!experimentInterface.IsRunning); UpdateToggleButton(experimentInterface.IsRunning); }
public void toggleExperiment() { if (experimentInterface == null) { return; } experimentInterface.ToggleExperiment(!experimentInterface.IsRunning); if (ToggleBackground == null || PlayIcon == null || PauseIcon == null) { return; } ToggleBackground.sprite = experimentInterface.IsRunning ? PauseIcon : PlayIcon; }