Skip to content

Invalid node names don't trigger an error during runtime #112223

@zigg3c

Description

@zigg3c

Tested versions

Reproducible in: 4.5.1

System information

Any

Issue description

If you try to rename a node using the editor, it will popup an error when then name contains invalid characters, and will replace them with an underscore:

Image

When you do the same thing via code, it will silently replace the invalid characters with an underscore, without printing any errors:

Image

Steps to reproduce

Create a node and add the following in the script:

func _ready() -> void:
	name = "hellow.world"

Minimal reproduction project (MRP)

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