Skip to content

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

Description

@Rehrok

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions