// This is the first method the event is setup to do, the second audio part needed no script to just do a one shot effect, thanks to the event system. // You just set up the Event in the inspector for easy peasy, but the UnityEvent could also be coded the same way if needed. public void EventClick(string type) // methods have to be public void to be used by UnityEvents, they can't really return anything either, as far as I know... At least I don't know how an event will capture the return... { Action <string> callback = name => SceneController.OnSceneLoad(name); if (type == "MenuItem") { StartCoroutine(AnimationController.AnimateObject(gameObject, callback)); } }