Hi,
in Designer you can add script objects in the hierarchy.
Those script objects can hold the functions you hen can call from any event.
For example:
1. You create a new script object named "tests"
2. Then your function "test1" to this script object
3. To call it you then can use the script
tests.test1();
from a buttons click event.