Interkarma / daggerfall-unity

Open source recreation of Daggerfall in the Unity engine
http://www.dfworkshop.net
MIT License
2.7k stars 327 forks source link

Fixed "PersistentDataPath" usage in Editor context #2624

Closed KABoissonneault closed 5 months ago

KABoissonneault commented 5 months ago

Fixed issue caused by #2607.

Before #2607, PersistentDataPath was lazily initialized whenever it was requested. In #2607, I made it get defined on application start. I failed to consider that PersistentDataPath was used in Editor code. Currently, if you open the editor on the latest code, it should throw a null reference exception.

This change turns it back into lazy initialization, so editor code still initializes it.