What is this ghost/copy .tscn::1-file from my instanced scene that should not exist?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Becbunzen

I have a project with a main scene and some other scenes. In the main scene I instance one of the other scenes, Player. When I edit the script for Player I get two different lines in the script list:

Player.gd
Player.tscn::1

I have no idea why this happens. It only happens with this file, not the files of other scense that are instanced. I do not understand where the changes I do in the second file are saved, they are not saved to the first file. When I do changes in the lower, they are executed for the instanced version, but changes in the first are not. I have restarted, reopened, and the changes in the second file remain.

Can anyone point me to what this is, or is named? I have tried searching for info about instanced scenes but not found anything I believe is relevant.

Godot 3.2.1, working on variations of Dodge the Creeps to learn the engine.

:bust_in_silhouette: Reply From: Becbunzen

Ok, I found why. The Player.tscn::1 is a sub_resource that is saved in the .tscn file itself. Clearing the script for all places I have instanced this scene, as well as from the scene itself, and then attaching the existing .gd script file to all of them, solved the issue. More information:
https://docs.godotengine.org/en/stable/getting_started/step_by_step/resources.html

(Repied to 2yo question cause if somebody like me searches for this question)

I had similar issue - my script transformed to tscn::11 file format.
Somehow during development my Room objects reattached to this .tscn script, not the Room.gd one
I tried to reattach them manually, but after I did it, DEBUG just stopped loading.
In GODOT Discord chat replied to me:

probably something to do with Room being a godot node now (part of how
it handles occlusion, see
https://docs.godotengine.org/en/stable/classes/class_room.html) try
renaming your script to something else? or restarting Godot

Removing connected objects from world then attaching to object .gd script then renaming then reloading worked for me and I just closed this copy of tscn::11 and didnt appeared again.

aret | 2022-11-03 00:58