Open Yharooer opened 1 year ago
This sounds reasonable to me. Since you have already implemented the proposal, feel free to open a PR. If you do open a PR make sure not to use the master
branch in your fork, also you may want to read CONTRIBUTING.md.
Describe the project you are working on
A 2D game written in C# with Godot .NET. The core game mechanics are written in a C# library which can be used elsewhere (eg in machine learning for training models of NPCs). I have one C# project called GameName.Core with the core mechanics. I have another C# project called GameName.Godot with the Godot implementation.
Describe the problem or limitation you are having in your project
I have the following file hierarchy:
The naming of the C# project with the Godot code is GameName.Godot. However the solution name is GameName. Godot uses the
dotnet/project/assembly_name
project setting for the name of the.csproj
and the.sln
files, however if a solution is split into multiple projects, then the solution name and project name may not be identical.If the solution name is not properly configured then we cannot open
.cs
files or debugger errors in Visual Studio from Godot.Describe the feature / enhancement and how it helps to overcome the problem or limitation
The feature would include an additional project setting
dotnet/project/solution_name
. If this is not specified, then the editor would use theassembly_name
project setting for the name of the.sln
file. If this is specified, then the editor would use thesolution_name
project setting for the name of the.sln
file.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
The project.godot file may contain:
This would open the correct
.sln
file in the file hierarchy described above. However without this implementation we are required to rename the GameName.Godot C# project or the name of the solution.This can be implemented with only a few lines of change. See: https://github.com/Yharooer/godot/commit/bf4a7ee1656006f3c75a6413921f37d0a556348c
If this enhancement will not be used often, can it be worked around with a few lines of script?
This cannot be worked around without changing the name of the solution.
Is there a reason why this should be core and not an add-on in the asset library?
This improves the Godot .NET experience out of the box and is a change in the way Godot .NET launches Visual Studio. This cannot be provided with an add-on.