GothicKit / ZenKitCS

C#-bindings for ZenKit, the ZenGin asset parser.
https://zk.gothickit.dev/
MIT License
4 stars 1 forks source link

SaveGame: Loading a non-existant SaveGame folder or a non-existent World causes a sigterm on Unity #6

Closed JaXt0r closed 1 week ago

JaXt0r commented 2 weeks ago

When using the API, we might try to load the following data:

var save = new SaveGame(path);
save.Load(worldName);

We get a crash in Unity which means something is broken on ZenKit.dll side for the following two use cases:

  1. The path to the saveGame is invalid, then the SaveGame should act as normal or provide us an information like save.IsValid == false
  2. If the SaveGame is valid, then we might load worlds which aren't inside the Save itself (e.g. world.zen is there, but not oldmine.zen). <-- This can't be circumvented, as we can check if a save folder is there, but we have no information if a specific world is already saved inside it.

It would be great, if the SaveGame class can handle the following cases.

JaXt0r commented 1 week ago

Solved with latest build. Thanks.