-
-
Notifications
You must be signed in to change notification settings - Fork 22.3k
Use 3D related nodes in editor causes runtime issue with disable_3d = true
export template
#103315
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
Comments
The best solution for this issue is to enable disable_3d for editor builds; however, this requires an experienced engine developer to implement. |
Disabling all 3D functionality in the editor would require a lot of boilerplate and bloat, I'm not sure it can be done reasonably. The expectation here is that if you compile a template with Editor Feature Profiles can help to some extent, as you can disable the 3D Editor, and Node3D. I don't think this would actually raise errors if you do use Node3D-derived nodes in your scenes added before setting the feature profile, but that should help prevent adding new ones. That doesn't restrict which nodes are available from scripts on the other hand, and addons from the asset library could still add 3D nodes. But I think it's a good first step. So my suggestion would be to document the use of feature profiles for users who want to use export templates with |
You are correct; I'm already using a |
Since |
On top of / apart from that, the GDScript parser and C# binding generator can be modified to accept the feature profile and disable extra types based on that. |
Tested versions
Current master [01545c9]
System information
Godot v4.4.rc.mono (01545c9) - Windows 10 (build 19044) - Multi-window, 4 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 Ti (NVIDIA; 32.0.15.7242) - AMD Ryzen 9 5900X 12-Core Processor (24 threads)
Issue description
As
disable_3d
won't work with editor builds, developers, must use an editor with 3d enabled (for generating C# bindings and development), leading to usability problems forGDScript
andC#
.For
GDScript
, scripts that directly reference 3D nodes or nodes' 3D related properties will cause runtime Parse Error:For
C#
, scripts that directly instantiates or loads the 3D related binding types will cause TypeInitializationException:Steps to reproduce
scons p=windows module_mono_enabled=yes compiledb=yes debug_symbols=yes
.\bin\godot.windows.editor.x86_64.mono.console.exe --headless --generate-mono-glue modules\mono\glue
python .\modules\mono\build_scripts\build_assemblies.py --godot-output-dir=.\bin
scons p=windows module_mono_enabled=yes debug_symbols=yes target=template_release arch=x86_64 disable_3d=yes
a. For GDScript, create a project with GDScript that directly references 3D types (Node3D, etc.).
b. For C#, create a project with C# script that directly or indirectly references 3D types (Node3D, Viewport, etc.).
c. Alternatively, open the MRP Project.
Minimal reproduction project (MRP)
Test2dProject.zip
The text was updated successfully, but these errors were encountered: