dialogic-godot / dialogic-1

Dialogic 1.x - For Godot 3.x!
MIT License
5 stars 4 forks source link

Can't save to default slot using release build & clean slate #18

Open paperman5 opened 1 month ago

paperman5 commented 1 month ago

The problem

Describe the bug After exporting a release build of my game, deleting all files from the user:// folder, and running the game, Dialogic can't save its data to the default slot because the user://dialogic folder doesn't exist. This is due to DialogicResources.init_dialogic_files() (which creates this directory) only being called through the editor.

To Reproduce Steps to reproduce the behavior:

  1. Create some basic code that makes Dialogic save on pressing a hotkey or something
  2. Export as a release build
  3. Remove the dialogic folder from the user:// dir, wherever that is on your PC
  4. Run the exported project and notice it does not save

Expected behavior Dialogic should save properly in this situation.

Screenshots N/A

System (please complete the following information):

Solutions

I have solved the issue by manually generating the user://dialogic directory in my game manager startup script. I'm sure there's a better way to do it that can be integrated into the plugin, and I can make a PR for it but it will be a few weeks probably.