Does nwjs.username always point to AppData/Local?

0 favourites
  • 3 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • It's surprisingly difficult to find a clear answer on this, so I thought I'd ask here.

    Ashley, I've been asked by my publisher to store user save data in the AppData/Local folder and am currently using nwjs.username to point to it. This works on the computers I've tested, however, I'm also a tad concerned in case there's a scenario where this might point to a folder that doesn't contain that path as, in that situation, it will fail to create the full path.

    This is what I currently have on starting a new game:

    Thanks

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • All Windows computers should be fine, tho Linux and MacOS won't have an "appdata" folder. Whether it auto-creates the folder structure or not, I'm not sure, but worst cast you can always have some events to check & create each subfolder, just to be safe.

  • yeah, I'm not too concerned about Linux and Mac atm. If we add that later I can just use platform info to pick it.

    Cheers for the answer :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)