godotengine / godotengine/godot
[Scripting] Remote scene tree icon issue in when Script's type mismatchs
- 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
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