• Building
  • Buttons not working after export

Hey y'all. I'm having a weird problem. When I export my game to my Mac my play button does not work. The quit button is working so I don't understand what is going on. Also, when I play the game in the Godot Engine everything works fine.

Any thoughts?

Thanks :)

Does the console/terminal give any errors if you run the exported Mac version from the console/terminal?

@TwistedTwigleg said: Does the console/terminal give any errors if you run the exported Mac version from the console/terminal?

Forgive me if I make no sense. I just had to look up how to open an application from the terminal lol.

When I tried to open the game from the terminal it said "permission denied". Is this what you were talking about?

@Megalomaniak said: what if you run it with elevated permissions?

@TwistedTwigleg said: Does the console/terminal give any errors if you run the exported Mac version from the console/terminal?

So, it turned out I wasn't using the open command in terminal but after doing so, I was able to open the application with terminal. There were no errors or anything. It's so weird that the buttons work when in Godot but not after export :/

@AtlasBarked said:

@TwistedTwigleg said: Does the console/terminal give any errors if you run the exported Mac version from the console/terminal?

Forgive me if I make no sense. I just had to look up how to open an application from the terminal lol.

When I tried to open the game from the terminal it said "permission denied". Is this what you were talking about?

My bad, I probably explained it poorly :sweat_smile:

@AtlasBarked said:

@Megalomaniak said: what if you run it with elevated permissions?

@TwistedTwigleg said: Does the console/terminal give any errors if you run the exported Mac version from the console/terminal?

So, it turned out I wasn't using the open command in terminal but after doing so, I was able to open the application with terminal. There were no errors or anything. It's so weird that the buttons work when in Godot but not after export :/

Hmm, strange. Is it just the buttons that are not working? If so, what do the buttons do? Maybe something with what they do is causing the issue.

If the button is supposed to load a scene, something to check is making sure the file name and path uses the exact capitalization, as exported games require patches that are case sensitive, which could be causing the issue.

Check for case sensitivity issues in your project files and load()/preload()/change_scene() calls. macOS' filesystem is not case-sensitive by default in recent versions, but Godot's virtual PCK filesystem is always case-sensitive, regardless of the platform.

@TwistedTwigleg said: Hmm, strange. Is it just the buttons that are not working? If so, what do the buttons do? Maybe something with what they do is causing the issue.

If the button is supposed to load a scene, something to check is making sure the file name and path uses the exact capitalization, as exported games require patches that are case sensitive, which could be causing the issue.

Oh, I bet it has something to do with that then. The button is supposed to load my first level. This is really my first game and I have been making it as a way to learn new concepts and about the Godot Engine in general so I have not used best practices as I didn't know them. When trying to rename stuff to follow best practices it keeps making my game crash saying there are "broken dependencies" :#

I will try to fix this but I guess the whole renaming and reorganizing thing in coding is kind of a nightmare. I wasn't aware of that when I started thinking I could always just go back and easily move stuff around lol.

@Calinou said: Check for case sensitivity issues in your project files and load()/preload()/change_scene() calls. macOS' filesystem is not case-sensitive by default in recent versions, but Godot's virtual PCK filesystem is always case-sensitive, regardless of the platform.

Oh... so could it be that somehow I have something named scene and Scene for example and Godot can tell the difference but MacOS can't decide which to load so the button doesn't work at all? Sorry if I am missing the point. Still very new to all of this.

@AtlasBarked said: Oh... so could it be that somehow I have something named scene and Scene for example and Godot can tell the difference but MacOS can't decide which to load so the button doesn't work at all?

Yes, this is precisely what's happening here :)

@TwistedTwigleg said: Does the console/terminal give any errors if you run the exported Mac version from the console/terminal?

Hey! I think I finally figured out how to check what you were asking. :)

This is what my terminal says when I run the program and press the play button. SO MANY ERRORS! But I dont understand what is happening because I may have changed up the resources it is trying to load but pretty sure everything I am asking my game to load is in my project folder.

UNSUPPORTED (log once): POSSIBLE ISSUE: unit 1 GLD_TEXTURE_INDEX_2D is unloadable and bound to sampler type (Float) - using zero texture because texture unloadable Registered camera FaceTime HD Camera with id 1 position 0 at index 0

ERROR: load: No loader found for resource: res://Art/CastleDoor.png. At: core/io/resource_loader.cpp:290. ERROR: poll: res://Objects/CastleDoor.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Art/CastleDoor.png At: scene/resources/resource_format_text.cpp:440. ERROR: load: Failed to load resource 'res://Objects/CastleDoor.tscn'. At: core/io/resource_loader.cpp:212. ERROR: load: Failed loading resource: res://Objects/CastleDoor.tscn. Make sure resources have been imported by opening the project in the editor at least once. At: core/io/resource_loader.cpp:283. ERROR: poll: res://Levels/Level05.tscn:5 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Objects/CastleDoor.tscn At: scene/resources/resource_format_text.cpp:440. ERROR: load: Failed to load resource 'res://Levels/Level05.tscn'. At: core/io/resource_loader.cpp:212. ERROR: load: Failed loading resource: res://Levels/Level05.tscn. Make sure resources have been imported by opening the project in the editor at least once. At: core/io/resource_loader.cpp:283. ERROR: poll: res://Levels/Level04.tscn:10 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Levels/Level05.tscn At: scene/resources/resource_format_text.cpp:440. ERROR: load: Failed to load resource 'res://Levels/Level04.tscn'. At: core/io/resource_loader.cpp:212. ERROR: load: Failed loading resource: res://Levels/Level04.tscn. Make sure resources have been imported by opening the project in the editor at least once. At: core/io/resource_loader.cpp:283. ERROR: poll: res://Levels/Level03.tscn:4 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Levels/Level04.tscn At: scene/resources/resource_format_text.cpp:440. ERROR: load: Failed to load resource 'res://Levels/Level03.tscn'. At: core/io/resource_loader.cpp:212. ERROR: load: Failed loading resource: res://Levels/Level03.tscn. Make sure resources have been imported by opening the project in the editor at least once. At: core/io/resource_loader.cpp:283. ERROR: poll: res://Levels/Level02.tscn:4 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Levels/Level03.tscn At: scene/resources/resource_format_text.cpp:440. ERROR: load: Failed to load resource 'res://Levels/Level02.tscn'. At: core/io/resource_loader.cpp:212. ERROR: load: Failed loading resource: res://Levels/Level02.tscn. Make sure resources have been imported by opening the project in the editor at least once. At: core/io/resource_loader.cpp:283. ERROR: poll: res://Levels/level1.tscn:18 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Levels/Level02.tscn At: scene/resources/resource_format_text.cpp:440. ERROR: load: Failed to load resource 'res://Levels/level1.tscn'. At: core/io/resource_loader.cpp:212. ERROR: load: Failed loading resource: res://Levels/level1.tscn. Make sure resources have been imported by opening the project in the editor at least once. At: core/io/resource_loader.cpp:283. ERROR: emit_signal: Error calling method from signal 'button_up': 'Button(Play.gd)::on_Play_up': Method not found.. At: core/object.cpp:1257.

All those errors should be fixed, but I think this one is relevant to the button:

ERROR: emit_signal: Error calling method from signal 'button_up': 'Button(Play.gd)::_on_Play_up': Method not found..

It means that function doesn't exist or was renamed and not reattached on the signal.

@cybereality said: All those errors should be fixed, but I think this one is relevant to the button:

ERROR: emit_signal: Error calling method from signal 'button_up': 'Button(Play.gd)::_on_Play_up': Method not found..

It means that function doesn't exist or was renamed and not reattached on the signal.

Yes aha I know I should fix all of the errors :# I think what happened with most of them is that I deleted some scenes/png files that I had been using and replaced them. Now I dont know how to fix "broken dependencies" since the files are deleted already and I can't bring them back into Godot.

Also, I will check the error you highlighted but I am pretty sure that error came up after I tried to fix the problem by renaming the buttons and the signal. So I think that it might actually be the other errors that are making the next scene not load instead of the button not working because in Godot the button works fine.

Thanks for your help :)

Yes, the missing scenes could also be the problem if that is what the button is trying to load.