godotengine / godotengine/godot

[Scripting] Remote scene tree icon issue in when Script's type mismatchs

Open
#112,467 2 comments 0 reactions 0 assignees View on GitHub
bug confirmed needs testing topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.5.1.stable.mono.official [f62fdbde1]

### System information

Godot v4.5.1.stable.mono - Windows 10 (build 19044) - Multi-window, 4 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 Ti (NVIDIA; 32.0.15.8097) - AMD Ryzen 9 7950X 16-Core Processor (32 threads) - 63.05 GiB memory

### Issue description

The Node will have an incorrect visual type in the remote scene tree if the Script's declaring type mismatches.

https://github.com/user-attachments/assets/5617576d-3040-4902-81c7-2fef38f13269

### Steps to reproduce

1. Create a new project.
2. Create a 2D scene (with a single Node2D).
3. Create a GDScript with the content of `extends Node`.
4. Attach the script to the node.
5. Run this scene, and inspect the Remote tree where the node turns into `Node` as opposed to `Node2D`.

### Minimal reproduction project (MRP)

[MrpNodeChangeType.zip](https://github.com/user-attachments/files/23391724/MrpNodeChangeType.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached MrpNodeChangeType.zip and reproduce the issue using the listed steps, then inspect the remote scene tree behavior when a Node2D has a script declaring extends Node. Done means the remote tree continues displaying the node as Node2D despite the script's mismatched declaring type.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
game-dev, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.