Button clicking problem (SOLVED)

i click the play button nothing happen

this is my project structure:

this is the controller script:

i followed the proxy example

There might be one or several issues :grin:

Check if you defined inputs properly and there exists input “touch”, check if addresses are correct, check if you added collection proxy component to the collection. I assume you see the gui and try to click, but then nothing happens, right? Add a simple print in on message to check if you even receive any message. You can also run in Debug and put breakpoints

Also, what is in the pointed collection? What if you change the bootstrap collection to this particular collection you want to load through gameproxy? Is anything visible and working?

If nothing of this helps, could you please share a repro?

If nothing is printed in the console and you expect something to work and there is message involved - always check if message is at first even received in on_message, print it or so :blush:


i added a print inside when the button is clicked i get nothing in the console

Please paste code as text. Reading screenshots is hard, and it’s not searchable on a forum.
Put it in between three backticks: ```

LIke so:

local test = 0
function init(self)
	msg.post(".", "acquire_input_focus")

function on_input(self, action_id, action)
	if action_id == hash("touch") and action.released then 
		if gui.pick_node(gui.get_node("button"), action.x, action.y) then -- <3>
			msg.post("controller:/proxy#loader", "load_level")
			print("button clicked")
1 Like

i solved it how can i close this question

You can edit the title and put (SOLVED) at the end.

1 Like

I’m very curious what was the issue? :grin:

it’s stupid i forgot to add the gui_script to the GUI :sweat_smile:

1 Like