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

Default C# script names do not match case, which prevents [Export] variables from appearing in the inspector #81945

Closed
Rehrok opened this issue Sep 19, 2023 · 2 comments

Comments

@Rehrok
Copy link

Rehrok commented Sep 19, 2023

Godot version

v4.2.dev5.mono.official

System information

Godot v4.2.dev5.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 Laptop GPU (NVIDIA; 31.0.15.2756) - 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 Threads)

Issue description

When you use "attach script" to a node, it auto-fills a lower-case version of the node name with the .cs suffix. For instance, when following the tutorial here [https://docs.godotengine.org/en/stable/getting_started/first_2d_game/03.coding_the_player.html)], you create a "Player" node but the default name for the c# script is "player.cs". The c# script needs to be named "Player.cs", otherwise you can't edit/see the [Export] fields.

This is a minor issue, but is very disruptive as an initial experience.

The auto-filled script name should use the correct case.

Steps to reproduce

Create a node. Click attach script. Not the case of the auto-filled script name. Observe that the [Export] variables do not work if the case is incorrect.

Minimal reproduction project

N/A

@raulsntos
Copy link
Member

Related:

Could probably be closed as duplicate of those other issues, there's also a PR that fixes them and it should make C# default to PascalCase for script file names.

@Rehrok
Copy link
Author

Rehrok commented Sep 20, 2023

Duplicate issue, with an existing PR to fix it. Thanks @raulsntos for the response.

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

3 participants