I am working on a lib for scene managment.
Now i am implementing popups. But i have problem with input.
I move from Scene1 to Scene2 then move back.
Input when i unload scene1 work. But input when scene2 is popup and scene1 not unloaded, not work.
The main difference i don’t disable and unload scene1 when move to scene2.
As i understand. I have input for go with collection proxy(input1). Then i have input for script in that collection proxy(input2). Input2 is child of input1. When i release input1 it removed frow input stack. When i return to scene1 i acquire new input(input3). Input3 know nothing about input2 right?
So if i release input for collection proxy, i lose all input inside that collection. When i need input again, i need acquire input for all child again? Right?
You shouldn’t have to acquire input focus for the game objects inside the proxy again. That’s a separate input stack that if I’m not mistaken is kept intact even though the proxy loses input.
In my experience if i release input for proxy, input for go inside that proxy also released. When i acquire that input again i need to acquare all inputs for go inside proxy again.
Working(i ask input again)
commit c6a729a77aa7fb98eafdf9f4e95114d59e70dd00
fixed input
Not working
commit 6f5dad51fd8c497e57ef69a7b4930331b2d3
add scene data heap
scenes/main_scene/controller.script - main scene
scenes/popup/popup.gui_script. - popup scene
logic for changing screen:
Jester/defold/scenes/defold_scene
Jester/defold/scenes/defold_proxy_scene
A has a collection proxy referencing a collection with a game object C
All three game objects A, B and C has script components attached
All three game objects A, B and C acquires input focus in their init() functions
A loads the collection
When input is received it either goes to A or B first. If it goes to A first the input goes in to the proxy and processes it’s internal input stack which in that case means that the order is A, C and finally B. If B is the first to get input the order is B, A and C.
If input focus is released from A the only input received is in B
If input focus is reacquired for A the input is received in A, then C and finally B. C does NOT have to acquire input focus again.