Call a function in permanent symbol from scene


Is there any way to have a function in a permanent symbol that would be called on every scene load automaticaly?
Or may that could be called from the scene onLoad function ?

Thanks a lot,

you can run a function on sceneload and that function may invoke sthg. in your persistant symbol … yes

In the Head HTML you can setup a javascript handler for the HypeSceneLoad event:

	function hypeSceneLoadCallback(hypeDocument, element, event) {
		// do something here...

	if("HYPE_eventListeners" in window === false) {
		window.HYPE_eventListeners = Array();
	window.HYPE_eventListeners.push({"type":"HypeSceneLoad", "callback":hypeSceneLoadCallback});

This will get called on every scene load.

1 Like

Thanks for your help,

@h_classen, I’d prefer not to add a new function on every scene,
so @jonathan’s tip sounds better for me.

Thanks a lot.