`on_input` not being detected in collection

I’ll preface by saying that I’m brand new to Defold (as in, first heard the name 3 days ago new). I’ve been banging my head against this problem for far too long. I’ve set up a scene manager that seemed fairly straight forward - breaking each page out into their own collections and loading/unloading the collection proxies. The problem is, I’m unable to detect any input in the loaded scene.

Upon project build, main.collection loads a menu_proxy.collectionproxyand displays the GUI for my main menu. The .gui_script I’ve attached to this GUI initializes fine (tested via a print statement in the init function), it updates fine (tested via print statements in the update function), but no matter what I do, I cannot get anything to happen in the on_input function.

I’ve dug into documentation and forums but can’t seem to come up with a reason as to why. I’ve zipped the project and attached the whole thing here mainly because I’m not sure what file/structure the problem could be stemming from. Any pointers/tips/solutions would be greatly appreciated.
Outpost Zero.zip (258.0 KB)

Outpost Zero.zip (220.7 KB)
Here is the project I have applied some fixes.
I have changed the game structure and scene management logic a bit. Instead of creating many collection proxies as separate objects, you can have them all under the scene manager. And Instead of using static statements like load_menu, just used load with the needed proxy sent with the message.
With this once scene manager and the proxies have acquire input message in their init, all game objects under them should be able to detect inputs too.
Credits scene was trying to load the menu scene many times because of action.released so I changed it, it now checks if back button is pressed.
I tried to keep your logic and update with mine
I have a few tutorials covering scene management on YouTube too (Asatte Games), you can check them out if interested or want to understand the logic I applied here

2 Likes

I see, thank you so much! I’ll take a look at your tutorials as well.

1 Like