-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
[C#] Change the VisualShaderNodeCustom
template to use the correct override types and signatures
#94693
Conversation
modules/mono/editor/script_templates/VisualShaderNodeCustom/basic.cs
Outdated
Show resolved
Hide resolved
modules/mono/editor/script_templates/VisualShaderNodeCustom/basic.cs
Outdated
Show resolved
Hide resolved
modules/mono/editor/script_templates/VisualShaderNodeCustom/basic.cs
Outdated
Show resolved
Hide resolved
modules/mono/editor/script_templates/VisualShaderNodeCustom/basic.cs
Outdated
Show resolved
Hide resolved
VisualShaderNodeCustom
template to use the correct override types and signatures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
You'll need to squash the commits before this PR can be merged. The contributing documentation contains information about squashing in case you need it.
Feel free to reach out in the development chat if you need help.
…rides and added the GlobalClass attribute
I've squashed the commits into one now, it should be good to go! @raulsntos |
Thanks! |
Cherry-picked for 4.3.1. |
While trying to create a custom VisualShader Node, it wouldn't show up any of the custom nodes when implemented in C# (works with GDScript), trying to create one from within the editor using the provided template created a script with compile errors.
I saw somwhere in the source that we should assume 64-bit types, so that might be why long is used instead of int, but since it's a signature / type mismatch with the base class, it won't compile.
I also added the Godot.Tool attribute, since it is required according to the docs:
"... you must use the
@tool
annotation ..."https://docs.godotengine.org/en/4.2/classes/class_visualshadernodecustom.html#description
I will also submit an issue for the problem related to the C# VisualShaderNodeCustom files not showing up / getting recognized by the editor.
(This is my first PR, so I might have missed something!)