I need in the UI.js calls a function in another script,
app._openDoor.toggle(); but be prompted to “app._openDoor.toggle is not function”.
I try to : app._openDoor.fire(‘enterCar:toggle’); and app._openDoor.on(‘enterCar:toggle’);
but can’t find the function toggle().
Development consists loads of debugging - process of finding and investigating issues and information in your code.
Please refer to this page: http://developer.playcanvas.com/en/user-manual/scripting/debugging/ that helps to get used to dev tools in your browser, that allows you to debug your code. This will help you to understand what is going on better.