Code isn't executing
Things to check if you have written a script but it doesn't appear to be executing any commands:
- Have you added the script to the game object?
Remember the assets panel is just a file explorer. You will need to attach a script from the assets panel to a game object in the outline panel for it to execute. In the outline panel, right click the game object and select, 'Add Component File'. Choose the script. - Does your script respond to inputs?
Remember that the script needs to accept the input focus first. Include this line of code in the init function: msg.post(".", "acquire_input_focus")