Hello,
i’m new to defold (and lua) and i am creating a mobile app.
I need the screen size in my main controller. Therefore i set up a custom render script and inserted
at the end of the init function.
However the on_message function of my main.script is never called.
my main.collection contains a game objection with the id “controller” which contains the main.script.
So you have attached your script component to your gameobject then when click on your script, in the properties section you will see a URL path. Yours should be “/controller#main”
ok, i copied the url “/controller#main” from the collection(yours contained a typo), but the on_message still does not get called. i have a print right at the start of it and it doesn’t appear in the console
The good tip is that you can always check empirically the current script url by simply printing msg.url() in init() - this will print out the current script’s url at the beginning