godot
godot copied to clipboard
[Editor] Prevent `TOOLS` .Net DefineConstants being overriden by the user
Related #78513 Closes #98124
As mentioned here, the TOOLS
compiler symbol is crucial for C# editor functionality; the absence of TOOLS
can lead to data loss and editor malfunctions (all C# script exports become null
and Ineditable) without a proper error message.
This PR ensures that the TOOLS
are always included in the editor, so even if the user overrides the DefineConstants
(by accident or intentionally), the rest of the dotnet editor stays functional.
Thanks Raulsntos for suggesting the better solution.