Open warent opened 2 months ago
There seems to be two proposals in one here:
I suggest implementing one at a time as the features can be used independently from each other. The second one is also only useful in the context of C#, not GDScript.
The engine binaries here don't actually need to be different though, only the C# libraries.
Ah, I see, that's a piece I was missing. I might be able to help implement a draft PR for this if someone can provide pointers of which parts in the code would need to be altered. I'm also unsure how architectural decisions are made. Is that something I would coordinate in the new Discord?
I'm also unsure how architectural decisions are made. Is that something I would coordinate in the new Discord?
Engine development happens on the Godot Contributors Chat. We don't use Discord for engine development discussions.
Describe the project you are working on
A C# game with a client and a dedicated server
Describe the problem or limitation you are having in your project
The dedicated server wants to have its own directives different from the client (e.g. GODOT_SERVER) to alter code at compile time. Currently, all run instances have the same builds
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Every run instance can optionally have its own build / executable
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Everything works the same as before, but the codebase intelligently detects if the user wishes to specify different build time arguments (for example: https://github.com/godotengine/godot-proposals/issues/10028), and if so, then it will instead create a unique build for every unique run instance.
Unfortuantely the changes to make this work would probably be extensive. In my mind, it would work something like the following:
buildInfo: BuildInfo
needs to start being treated as an array likebuildInfos: BuildInfo[]
private static BuildInfo[] CreateBuildInfo
, and it would need to callRunInstancesDialog::get_singleton()->get_instance_count();
to create a unique build info object for every run instance.Somewhere along the way, I think Editor::Run needs to be updated because
String exec = OS::get_singleton()->get_executable_path();
would no longer work, as there would be multiple executables.If this enhancement will not be used often, can it be worked around with a few lines of script?
For my very specific case it can be worked around using
OS.HasFeature("dedicated_server")
although it is far from ideal. There is no way to workaround generally adding custom directives and/or args per buildIs there a reason why this should be core and not an add-on in the asset library?
Core engine