+1 vote

Hi everyone!

I don't really have enough technical insight to properly raise this as an issue on Godot's GitHub, but I've recently started experiencing a very frustrating issue and I was wondering if anyone else has experienced it.

For some reason, Godot has started forgetting that one of my key scenes (Player Actor) has a script on it, no matter how many times I save this scene, as soon as I reload the project the script is no longer attached and I need to set everything up again just for that session before it's all forgotten again on next load.

I have made absolutely sure the project and its contents are not read-only.

This problem briefly went away when I saved the scene again under a new name, but it has just reoccurred, and I suspect this will only become more aggravating should the project get any bigger.

I appreciate this could be my hardware's fault, but as it's this particular scene that keeps malfunctioning under numerous different names, I wonder if the issue is coming from elsewhere.

Has anyone else experienced this?

Godot version Godot 4 Beta 13
in Engine by (24 points)

Does this scene inherit from parent scene ? This kind of bug makes me think of some conflict between parent and inheritor.

It's based on a subclass, ActorPlayer from the parent class ActorBase but this script is applied to the scene's root node

More here!

Is it possible that some external process is interfering here (virus scanner, backup program, file sync process, ...)?

Always a possibility, but I've been working on this project for a lil' bit and it's only just started happening today!

https://github.com/godotengine/godot/issues/71610#issuecomment-1387491146

Seems this might have been a bug relating to cyclic dependency - since removing a line in a multiplayer script that preloads the Player scene it seems to have stopped, hopefully that's causation and not correlation lol

It would be quite helpful if you have put an image or a video of the issue.

I agree with ur comment

1 Answer

+2 votes

I came across this issue learning Godot (4.0.3 stable)

It was definitely a cyclic dependency issue as in the offending scene was trying to preload itself (I wanted to spawn instances of the same scene when hit). When I removed that and changed it to self.duplicate() instead the problem went away.

However I never got any error flagged by Godot (I also tried adding '--verbose' to the shortcut) and it was another learning speed bump which could be avoided if it pointed out quite clearly somewhere that I had a cyclic dependency, or perhaps in this case "Error: Scene cannot preload itself"

by (18 points)

Thanks for the explanation! I've been encountering the same issue and it was driving me bonkers, my player's script sometimes detatched itself on startup for no apparent reason. Well, turns out I had a line in the script for the player to preload itself, after deleting that line the issue seems to be resolved.

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.