-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for game window embedding on macOS #11453
Comments
The need for this is known, and there are some ideas on how to accomplish it. See comments in the original PR implementing the feature: godotengine/godot#99010 (comment) and godotengine/godot#99010 (comment). |
Since the proposal text is vague and it gets many views based on the reactions, here's a more thorough explanation. The reason embedding doesn't work on MacOS, isn't captured by screen-capturing applications, is disabled in single window mode, and often runs into window-related edge cases (like window-changing hotkeys from the system), is because it was implemented by having the game window be the parent of the editor and making it borderless. So in practice this means that it's simply a borderless window glued to the editor. Potentially all of this could be solved by re-implementing embedding by directly getting the Vulkan/Metal frame buffer from the game process (or a hidden window if that's not possible?), and displaying it over a TextureRect(?) in the Game workspace. Someone will also have to figure out how to account for Input and Audio, the latter should also preferably get emitted by the editor window so recording it would also capture the audio. (this is all just information I collected from people smarter than me, please correct this if I got anything wrong) |
I've got a working macOS game embedding on my fork It uses IOSurface with Vulkan VK_EXT_metal_objects extension I use some ipc library to handle interaction and sending games input I can work on porting the code to godot with the help of other contributors |
I wanted to try your implementation of game embedding so I compiled Godot from the master branch of your fork but for me, it's Godot 4.3 and there's no embedding. I don't know if I missed something |
Yeah, sorry for not being clear I'm using it from within the application I'm developing |
Ah okay, I see. :) On another note, since you mentioned the help of other contributors, maybe you can get in touch with @stuartcarnie and @nevyn? They mentioned they also want to look into game embedding on mac. :) |
Describe the project you are working on
I'm working on a game that needs object selection, and it's getting tiresome having to switch to the editor, hit the 2d button in the game tab, and then switch back.
Describe the problem or limitation you are having in your project
Currently, "Game embedding is not available on your OS." People use Macs to make games, which could be a problem.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Adding it would help.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
It should work like all other platforms.
If this enhancement will not be used often, can it be worked around with a few lines of script?
If this is not implemented, people can still use Cmd+Tab to switch between windows, but it will be inconvenient.
Is there a reason why this should be core and not an add-on in the asset library?
This functionality is built into the editor and can't be changed by an addon.
The text was updated successfully, but these errors were encountered: