0 votes

Hi!

TLDR: When I save resources created in the inspector, it does not always save them and I need to reload the editor.

I've created a very simple dialog system for my game. I have "Dialog Timelines" that contains an array of "Dialog Events" that can themselves contain "Dialog Events". They are all resources.

Here is an example of a timeline : https://imgur.com/a/MLMOf5D

As you can see, I only have on .tres file for the timeline and every other resources is created directly in the inspector (so local to the resource if I'm right).

I have problems saving this. For example for the "choices" you can see in the second Dialog Event, it really was a pain.

I create the dialog event in the inspector, fill it in and ctrl-s to save. Then I run the game and the resource is "nil"! Then I restart the project, and the resource I just created disappeared!

So I do it again, and this time when ctrl-s to save, I notice the whole inspector collapse. And this time it works.

I try to create another resource, and I get the same problem again.

It seems like I need to restart the Editor each time I want to add a new resource inside. The whole inspector collapse each time it is saving properly. I tried creating the resources in the project and reference them in my timeline to see if there is any difference, but it's doing the same thing.

What am I doing wrong? How am I supposed to save resources inside resources?

Thank you by advance for your help.

Godot version 3.5.1.stable
in Engine by (25 points)
edited by

I would guess it is something you are doing wrong in your save code, are you saving the data to a .dat or a json file? If you could include your saving code that may help to diagnose the issue.

Thanks for the reply!

Sorry if I did not explain the problem very well.
I'm not saving the resource with my own code, I'm just trying to save it in the editor avec ctrl-s after creating it.

Please log in or register to answer this question.

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.