Custom Events
For all the events not handled natively in Surfer, we can use CustomEvents : events that we send to Surfer in order to let SUElementCanvas/SUElementsToolkit handle them.
Animator
An example of custom events can be done with the Animator.
Basically :
let's add the component
SUAnimatorBehaviourto an animator state machineselect if the behavior should run on the Animator State Enter or Exit mode
create an action
SendCustomEventand choose an event from the dropdown list
add
SUElementCanvasto whatever scene object (for UIToolkit setup aSUElementsToolkitcomponent and add a new element data) and , as event , selectMyCustomEventand then choose the event name chosen in the step above
Now , you can react to an Animator State Enter or Exit event as you wish.
LeanTouch
An example of custom events can even be LeanTouch.
Basically :
- let's add the component
LeanFingerTapto a scene object - let's add to the same object the component
SUAction: now create aSendCustomEventaction and choose an event from the dropdown list - in the public event
OnWorldof LeanFingerTap , drag the SUAction component in it and select thePlaymethod

- add
SUElementCanvasto whatever scene object (for UIToolkit setup aSUElementsToolkitcomponent and add a new element data) and , as event , selectMyCustomEventand then choose the event name chosen in the step 2
Now , you can react to a LeanTouch event as you wish.