[SOLVED] Confused on Defold-Input cursor not working after loading a new proxy from an old one

I have a main collection which is used to load in other collections via collection proxy with the proxy below having a game object based on the Defold-Input cursor example, and I debugged it and saw that it does initialise, however for some reason if I move my cursor around it doesn’t actually move the game object it’s attached to or clicking, I feel like there’s something I’m not understanding about Defold-Input? It works fine if I load that collection on startup.
image

This game object is in its own collection so I’m not attempting to use one cursor object for multiple collections which should negate the issue stated in Defold-input and collection proxies

1 Like

Is the cursor script getting any calls to on_input() (ie have you acquire input focus for the game object and for the game object containing the collection proxy?). Add a breakpoint to on_input() of the cursor.script and attach the debugger.

1 Like


Yea, after this then on_input is never called.

Ah I see, that was the issue. I remember reading the manual and seeing this part:

If the collection that is loaded contains collection proxy components, the collections that those refer to are not loaded automatically. You need to control the loading of these resources through scripts.

Is that why? :thinking:

I’m slightly confused on how that works, because when I load the collection proxy through main, I have a script inside of that collection that initialises spawning and input acquiring, so I should be controlling the loading of these resources through the scripts, so why would I need to acquire focus input on the game object containing the collection proxy? Thanks for your help, seriously, you’ve answered so many of my questions.

Input is ordered in a stack of game objects that have acquired input focus. Input events will go through the stack top to bottom and if a game object in the stack contains a collection proxy these will also be visited if input had been acquired. And game objects inside a collection proxy have their own stack.

Read more about this here:

Alright, thank you again. :+1:

1 Like