public void ToggleEvent() { StartCoroutine(IftttMakerManager.Request(isOn ? offEventName : onEventName)); isOn = !isOn; foreach (var item in ChildrenSmartHomeToggleParents) { var script = item.GetComponent <SmartHomeToggleButtonScript>(); if (script != null) { script.isOn = isOn; } } }
public void TriggerEvent(string eventName) { Debug.Log(eventName + " called."); StartCoroutine(IftttMakerManager.Request(eventName)); }