Actors data not saving on application close

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
thecodehermit
Posts: 41
Joined: Mon Jul 19, 2021 11:27 am

Actors data not saving on application close

Post by thecodehermit »

Hi,

I think this is a bug. Basically when you open the actors panel and change smth there. Lets say I change the NPC avatar or name and then close and open Unity. Then the changes wont be there.
If I do the same but before I close Unity I go on the conversations tab and start moving stuff around, then the saving of the actors data catches in and actually saves. I also tried going to the scene view and doing some changes and then save and close unity. Though that doesnt always make it save the actors data.
Do I have to click on a save database button or smth every time I make a change or is this a bug ?
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Actors data not saving on application close

Post by Tony Li »

Hi,

I haven't been able to reproduce this issue. Would you please provide some additional information?

What versions of Unity and the Dialogue System are you using?

Are there any errors or warnings in the Console window?

Is the Dialogue Editor window docked or free-floating?
thecodehermit
Posts: 41
Joined: Mon Jul 19, 2021 11:27 am

Re: Actors data not saving on application close

Post by thecodehermit »

Dialogue system version: 2.2.18
Unity version: 2021.1.4f1

I noticed it yesterday after I wanted to use textmesh pro and the typewriter effect for a custom dialogue system ui. So I reimported the 2 script folders as it says in the documentation. Though the problem might have been there before and I just didnt notice it till then.

Another thing is that I have put the Dialogue Manager prefab inside another prefab. I dont really think this is the problem since I am modifying the database and not the prefab, but still..

No errors or warnings. And the dialogue window is docked. I modify the actors data and close the application and when reopening it just reverts back to the original one. I had a similar problem when working with custom edditor scripts. For some reason the changes didnt want to get in the history and be saved. My solution was to use
Undo.RecordObject();

or

PrefabUtility.RecordPrefabInstancePropertyModifications
Still though it wasnt happening till recently... Maybe I can delete the asset and import it again. I didnt really want to do it since I have made few sequence and ui modifications, but if you dont have any other idea I can try it out. Or I can use the conversation workaround and forcing it to save by moving stuff around xD
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Actors data not saving on application close

Post by Tony Li »

This may be an issue with Unity 2020/2021, or more specifically with Asset Database changes. I'll try to post a patch here by tomorrow.
thecodehermit
Posts: 41
Joined: Mon Jul 19, 2021 11:27 am

Re: Actors data not saving on application close

Post by thecodehermit »

Ah I see. Thanks, I am in no rush so dont stress too much about it :)
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Actors data not saving on application close

Post by Tony Li »

Hi,

This patch should resolve the issue:

DS_EditorPatch_2021-08-12.unitypackage

The update will also be in version 2.2.19.
thecodehermit
Posts: 41
Joined: Mon Jul 19, 2021 11:27 am

Re: Actors data not saving on application close

Post by thecodehermit »

Yup that did it. I dont even have to save Unity and the changes are still there after reopening it. Thanks yet again :D
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Actors data not saving on application close

Post by Tony Li »

Glad to help! Thanks for letting me know about the issue.
crossvid
Posts: 1
Joined: Wed Sep 22, 2021 7:38 am

Re: Actors data not saving on application close

Post by crossvid »

this problem was solved after unity released an update
Post Reply