0 votes

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.

in Engine by (160 points)

1 Answer

+2 votes

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

by (160 points)

(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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.