- Home /
Question by
KnightRiderGuy · Sep 07, 2015 at 08:22 PM ·
uibuttontoggletoggle button
Toggle Button Question
OK I have this toggle button that I just want to use the "Sending" portion of how can I code this so it just has the two different sending options without all the sound stuff?
public void TogglePlay()
{
if(GetComponent<AudioSource>().isPlaying)
{
GetComponent<AudioSource>().Stop();
Sending.sendRedOff ();
}
else
{
GetComponent<AudioSource>().Play();
Sending.sendRed ();
}
}
Comment