You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The what: It would be great if Godot could automatically add a preprocessor define to the project for Mono. I believe Unity has done this since version 2.6.0.
The why: It's very convenient to be able to use the same source code in different places. I have built and still maintain a C# library for reading BSP files (from the Source engine, for example), and I've been able to make it work in .NET standalone projects as well as Unity by using Unity's C# preprocessor defines. I'd love to add support for Godot the same way. The project is at https://github.com/wfowler1/LibBSP
The how: It would probably be sufficient to simply add "GODOT" to the DefineConstants section of each build configuration in the CSPROJ. Then in C# code we could simply wrap Godot-specific code in #if GODOT and ENDIF.
The text was updated successfully, but these errors were encountered:
Unity uses this to allow conditional compiling of code based on the version of Unity being used. This might be an ok thing to have, but I'm more interested in compiling for the engine as a whole rather than any specific version, which is actually something Unity lacks.
The what: It would be great if Godot could automatically add a preprocessor define to the project for Mono. I believe Unity has done this since version 2.6.0.
The why: It's very convenient to be able to use the same source code in different places. I have built and still maintain a C# library for reading BSP files (from the Source engine, for example), and I've been able to make it work in .NET standalone projects as well as Unity by using Unity's C# preprocessor defines. I'd love to add support for Godot the same way. The project is at https://github.com/wfowler1/LibBSP
The how: It would probably be sufficient to simply add "GODOT" to the DefineConstants section of each build configuration in the CSPROJ. Then in C# code we could simply wrap Godot-specific code in
#if GODOT
andENDIF.
The text was updated successfully, but these errors were encountered: