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.

asked Jun 2 in Engine by Becbunzen (156 points)

1 Answer

+1 vote

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

answered Jun 4 by Becbunzen (156 points)
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 How to use this Q&A? before posting your first questions.