call a function when toggle is on in unity code example
Example: how to use toggle in unity
using.UnityEgnigne.UI;
public class ToggleScript : MonoBehaviour
{
public Toggle toggle;
void Update()
{
if(toggle.isOn)
{
//Do stuff
}
}
}
using.UnityEgnigne.UI;
public class ToggleScript : MonoBehaviour
{
public Toggle toggle;
void Update()
{
if(toggle.isOn)
{
//Do stuff
}
}
}