I want to make the Nintendo Switch custom save script compatible with ORK3 from ORK2.
I previously received a Nintendo Switch save game script for ORK 2.0, which used the using ORKFramework.XML; namespace for XML parsing. Now that I'm working with ORK 3.0, this namespace is no longer available.
Could someone please advise on how to update the code? Specifically, what should I replace the ORKFramework.XML usage with in ORK 3.0? Any pointers to updated documentation or examples would be greatly appreciated.
You need to extend from Makinom's save game file code. E.g. check the PlayerPrefsSaveGameFileHandler class from Makinom's source code that's included in ORK 3 and use it as a reference.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thank you for your previous response. Following your advice, we revised our script, and the compile errors have been resolved. However, when launching the game built with ORK on the Nintendo Switch, the game crashes with the following error:
Error: nn::fs::CreateDirectory() failed because the operation is unsupported.
It appears that the crash is caused by the save data path containing an environment variable—resulting in the path "rom:/Data/%HOMEPATH%". Although we have not yet determined whether this issue is related to ORK or the Nintendo SDK, similar cases involving "%HOMEPATH%" have been reported on Nintendo's developer forums. In those threads, several developers indicated that the problem was caused by the use of persistentdatapath in their applications.
To help us isolate the issue, could you please clarify whether there have been any specification changes in ORK3 compared to ORK2 that might cause the persistentdatapath to include this environment variable? (For reference, ORK2 has been proven to work on the Nintendo Switch, so we are particularly interested in understanding any differences in ORK3.)
At least in the last version I have this isn't set by ORK. ORK just provides the save file name, the path comes from a defined folder variable that's being mounted by Nintendo Switch API for save data file system access.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thank you for the explanation regarding the specifications. Suspecting that the issue might be related to the settings in Unity 2022, I tried upgrading to Unity 6 as a test. As a result, the application was able to launch properly on the Switch development kit. I wanted to share this as a reference.
E.g. check the PlayerPrefsSaveGameFileHandler class from Makinom's source code that's included in ORK 3 and use it as a reference.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
FS_ACCESS: { start: 35366642.026, end: 35366642.030, result: 0x0031B802, handle: 0x0000000000000000, priority: Normal, function: "CreateDirectory", path: "rom:/Data/%HOMEPATH%" }
Error: nn::fs::CreateDirectory() failed because the operation is unsupported.
It appears that the crash is caused by the save data path containing an environment variable—resulting in the path "rom:/Data/%HOMEPATH%". Although we have not yet determined whether this issue is related to ORK or the Nintendo SDK, similar cases involving "%HOMEPATH%" have been reported on Nintendo's developer forums. In those threads, several developers indicated that the problem was caused by the use of persistentdatapath in their applications.
To help us isolate the issue, could you please clarify whether there have been any specification changes in ORK3 compared to ORK2 that might cause the persistentdatapath to include this environment variable? (For reference, ORK2 has been proven to work on the Nintendo Switch, so we are particularly interested in understanding any differences in ORK3.)
Thank you for your assistance.
ORK just provides the save file name, the path comes from a defined folder variable that's being mounted by Nintendo Switch API for save data file system access.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Suspecting that the issue might be related to the settings in Unity 2022, I tried upgrading to Unity 6 as a test. As a result, the application was able to launch properly on the Switch development kit. I wanted to share this as a reference.