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

Creating signal callbacks generates invalid C# code #81848

Closed
rzubek opened this issue Sep 18, 2023 · 1 comment
Closed

Creating signal callbacks generates invalid C# code #81848

rzubek opened this issue Sep 18, 2023 · 1 comment

Comments

@rzubek
Copy link

rzubek commented Sep 18, 2023

Godot version

v4.1.1.stable.mono.official [bd6af8e]

System information

Godot v4.1.1.stable.mono - Windows 10.0.22621 - Vulkan (Compatibility) - Intel(R) Iris(R) Xe Graphics (Intel Corporation; 30.0.101.3118) - 12th Gen Intel(R) Core(TM) i7-1255U (12 Threads)

Issue description

Code generation for signals generates invalid C# code.

While the generated function stub is fine, it's placed at the very end of the .cs file, outside of the class definition.

Steps to reproduce

  1. I have set up Visual Studio 2022 as the external editor, not sure if that matters.
  2. Follow the official "step by step" guide to this step: https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html#connecting-a-signal-in-the-editor - however, follow C# instructions instead of GDScript instructions.
  3. Create a new receiver method as described in the tutorial:
    image
  4. Observe that the generated code is invalid: method definition lives outside of the class definition:
    image

Expected result:
Method definition should be generated inside its respective class definition.

Minimal reproduction project

Follow the official "step by step" guide, the problem is visible in this step:
https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html#connecting-a-signal-in-the-editor

@Chaosus
Copy link
Member

Chaosus commented Sep 18, 2023

Duplicate of #18721

@Chaosus Chaosus marked this as a duplicate of #18721 Sep 18, 2023
@Chaosus Chaosus closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants