Page 1 of 1

Separate user data folder for development

Posted: Mon Aug 24, 2020 12:31 am
by jefetienne
Would anyone feel alright with the idea of having a separate user data folder when running the game in the Unity Editor? I currently use two "Daggerfall Unity" folders, and have to rename both of them every time I switch between playing recreationally and developing. I know this issue might affect me more because my personal work on the project frequently touches Keybinds.txt and sometimes Settings.ini, and sometimes forgetting to switch can cause issues or resetting data I didn't want to, but I think it would also be beneficial for some to separate their testing and development save games from their play games.

Re: Separate user data folder for development

Posted: Mon Aug 24, 2020 10:16 am
by Hazelnut
I have two savefile folders I switch between, but I hardly play much so it's not a big issue. Having 2 separate data folders that are used depending on context could get confusing, but I'd support a way to optionally override in editor for those who wanted to use a different data folder when in editor.

Re: Separate user data folder for development

Posted: Mon Aug 24, 2020 8:40 pm
by jefetienne
Hazelnut wrote: Mon Aug 24, 2020 10:16 am I'd support a way to optionally override in editor for those who wanted to use a different data folder when in editor.
I'm very open to that - I think that's probably the best way to go about it. The only thing is looking at the Unity Editor under "Daggerfall Tools", I don't think I see a good window for including a checkbox option for something like this. Would adding a togglable menu strip item suffice, like "Use separate user data folder [✓]"?

Re: Separate user data folder for development

Posted: Mon Aug 24, 2020 9:21 pm
by Hazelnut
Hmm, I was thinking of a config file you edit somewhere - keep it simple. Doesn't really need a GUI, but no idea what could be hijacked.

Actually, depending on other devs opinions etc, just doing it would not be an issue - I can always link one directory to the other on my filesystem.

Re: Separate user data folder for development

Posted: Mon Aug 24, 2020 9:22 pm
by Interkarma
It would have to be optional and restricted to working in Editor only (using #if UNITY_EDITOR specifically).

https://docs.unity3d.com/Manual/Platfor ... ation.html

Supporting end users is hard enough without a tick box setting multiple data environments. All that's going to happen is people will turn it on with no understanding what it is, then say the game bugged out and they lost all their saves.

If it helps you with development, I'm all for it. But it needs to be super low impact in terms of code changes, fully optional, and only be available in Editor environment.

I'd set this up to be enabled with a #define rather than via settings, and always redirect to a fixed folder e.g. "Daggerfall Unity.devenv" inside of or alongside the usual data location.

Re: Separate user data folder for development

Posted: Tue Aug 25, 2020 12:02 am
by jefetienne
I think sounds good then. I'll look into working on this.

Re: Separate user data folder for development

Posted: Tue Aug 25, 2020 1:26 am
by jefetienne

Re: Separate user data folder for development

Posted: Tue Aug 25, 2020 9:31 am
by Interkarma
That looks good, thank you. :) Will merge soon.

Re: Separate user data folder for development

Posted: Tue Aug 25, 2020 12:52 pm
by jefetienne
Great, thanks :D