I wanted a bit more control over my UI implementations, thus I was trying to derive from Unity’s EventSystem interfaces to recreate the UI functionality. I know to recreate the Button functionality you derive from the interfaces like IPointerHandler and other interfaces.
I was wondering what interface does Toggle use behind the scenes for it’s onValueChanged event, and ToggleGroup isOn event? If I could figure those out then I know I could successfully recreate the functionality.
that sounds interesting, I bet that I can’t help that much (once tried to create custom toggle, worked to some degree… but otherwise crappy) as I’m quite noob in programming…
and if you peek to definition of Toggle from IDE:
public class Toggle : Selectable, IEventSystemHandler, IPointerClickHandler, ISubmitHandler, ICanvasElement
…and onValueChanged seems to be UnityEvent of type bool:
public Toggle.ToggleEvent onValueChanged;
public class ToggleEvent : UnityEvent
ToggleGroup
I’ve no idea about isOn
…well anyway - someone more knowledgeable can probably help more, or correct what I said!