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

@export var n: Node3D breaks when changing the type of the set value in the scene editor #82944

Closed
mieldepoche opened this issue Oct 7, 2023 · 2 comments

Comments

@mieldepoche
Copy link
Contributor

Godot version

4.1.1

System information

linux

Issue description

As seen in this clip, if you change the type of the node, it invalidates the export. (printing its value in that state shows <Object#null>.

If the new node type is compatible, it should keep the value clean.
If the new node type is incompatible, it should display a warning somehow (maybe a node configuration warning?).

simplescreenrecorder-2023-10-07_08.20.47.mp4

Steps to reproduce

extends Node3D

@export var n: Node3D

func _ready() -> void:
    print(n)

fill out that variable in a scene and change the node type.

Minimal reproduction project

any

@mieldepoche mieldepoche changed the title @export n: Node3D breaks when changing the type of the set value in the scene editor @export var n: Node3D breaks when changing the type of the set value in the scene editor Oct 7, 2023
@jackwilsdon
Copy link
Contributor

jackwilsdon commented Oct 7, 2023

It looks like this is a duplicate of #78299, which should be fixed in 4.2 (#78300).

@Calinou
Copy link
Member

Calinou commented Oct 7, 2023

Thanks for the report! Consolidating in #78299, which is fixed in 4.2.dev6.

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