Skip to content
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

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

jonatanrojderd
Copy link
Contributor

@jonatanrojderd jonatanrojderd commented Jul 24, 2024

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!)

@AThousandShips AThousandShips changed the title [C#] Changed the VisualShaderNodeCustom template to use the correct override types and signatures [C#] Change the VisualShaderNodeCustom template to use the correct override types and signatures Jul 24, 2024
Copy link
Member

@raulsntos raulsntos left a 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.

@Chaosus Chaosus added the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Aug 11, 2024
@jonatanrojderd
Copy link
Contributor Author

I've squashed the commits into one now, it should be good to go! @raulsntos

@akien-mga akien-mga merged commit 0bf8bee into godotengine:master Aug 16, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 4.3.1.

@akien-mga akien-mga removed the cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants