Page 1 of 2

Database Not Saving When Entering Play Mode

Posted: Wed Dec 27, 2023 1:43 am
by Unrighteous
Hello! I hope you're having a wonderful holiday!

I'm in no rush for an answer, so please take your time.

I'm experiencing an issue that has persisted ever since I began using the Dialogue System; the most recent additions to my database are sometimes reverted when entering play mode. I often make a few changes and quickly enter play mode afterwards. Sometimes it's just a line or two that isn't saved, but on rare occasions I can lose minutes of work.

Is there a good way to make sure that the database is always saved? I try manually saving the scene/project (not sure if that actually helps), but I often forget to do so when working quickly.

Happy holidays! Thank you.

Re: Database Not Saving When Entering Play Mode

Posted: Wed Dec 27, 2023 8:31 am
by Tony Li
Hi,

This is an intermittent problem (fortunately very rare for most users) due to an issue with the way Unity handles its newer Asset Database v2 and some inconsistencies in the API provided for custom editor windows that were originally written for Asset Database v1. I'm working on a complete rewrite of the Dialogue Editor window that will bypass the issue and also provide some performance boosts. It's not ready yet, but it's very high priority over here.

Re: Database Not Saving When Entering Play Mode

Posted: Wed Jan 17, 2024 6:12 pm
by Unrighteous
Hey, thanks for quick the reply!

Sorry, I completely forgot that I made this post despite you getting back to me on the same day haha. It's really good to hear that you're working on solution... and more. I'm looking forward to it, but no rush.

Thanks!

Re: Database Not Saving When Entering Play Mode

Posted: Wed Jan 17, 2024 7:13 pm
by Tony Li
No worries! If you're not using "DS_EditorPatch_2024-01-03.unitypackage" (available on the Extras page), I strongly recommend it. It should work around the issue in the meantime while I work on the updated editor.

Re: Database Not Saving When Entering Play Mode

Posted: Fri Feb 09, 2024 4:12 pm
by Unrighteous
Hey, sorry for not replying for so long again.

I tried downloading the patch, and I could already tell that it fixes a few things. I was getting a minor bug where upon opening unity or changing editor layouts, my currently selected conversation wouldn't show any nodes. To fix this, I just had to switch conversations, and then switch back. The patch seemed to fix this, all nodes were visible from the get-go.

However, unfortunately the patch absolutely tanks my editor FPS. Before, it was buttery smooth with 1000+ nodes on screen ("Fast Undo for Large Databases" needs to be ticked), but now I get very bad FPS even in a conversation with 1 node.

Right now, I'd rather have great FPS than a bit more functionality, so I'll be removing the patch.

Just updated to 2.2.42 and everything works great so far.

I know this patch is just a temporary measure, but please be careful when integrating the functionality into the full release. The FPS loss is a pretty big deal.

Thanks!

Re: Database Not Saving When Entering Play Mode

Posted: Fri Feb 09, 2024 6:56 pm
by Tony Li
Hi,

Did you try the patch with DS version 2.2.42? I've tested it on large conversations and don't see any slowdown.

Re: Database Not Saving When Entering Play Mode

Posted: Sat Feb 10, 2024 12:00 am
by Unrighteous
Yeah... I tested on the latest version, but I should've done more tests. I'm still stuck on Unity 2020.3.48f1, but I didn't think that would be an issue... sadly for me, it is the issue. When I tested the patch on Unity 2022.3.14f1, it worked fine (no noticeable FPS drop).

I have no idea why, but I only get bad FPS with the patch in Unity 2020. I tested the same database every time, and new empty projects for each version. The bad FPS is only in 2020 with a large database (an empty database still had fine FPS).

I completely understand if you don't want to bother with old versions, I plan on updating to a newer version after my current project anyway.

Thanks again!

Re: Database Not Saving When Entering Play Mode

Posted: Sat Feb 10, 2024 8:31 am
by Tony Li
I'll look into this. The Dialogue System does have some version-specific code, although I'm not sure it's Dialogue Editor window-related. It may just be the original issue with Asset Database v2 performance issues in Unity 2020.

Re: Database Not Saving When Entering Play Mode

Posted: Thu Feb 15, 2024 8:02 am
by Tony Li
Hi,

This intermittent issue was introduced when Unity switched to Asset Database v2. If you're using DS version 2.2.42, I believe all workarounds for it have been implemented. If you're still seeing it in 2.2.42, I'm working on a new, updated editor that should bypass the issue entirely.

Re: Database Not Saving When Entering Play Mode

Posted: Sat Feb 17, 2024 5:15 pm
by Unrighteous
They just copied a paragraph from my opening post... very strange.