Search Unity

Game Build - Application.persistentDataPath - Data Files Not Included

Discussion in 'Editor & General Support' started by SF11Dude, Dec 26, 2018.

Thread Status:
Not open for further replies.
  1. SF11Dude

    SF11Dude

    Joined:
    Nov 8, 2018
    Posts:
    13
    I have a fully functional Windows x86 platform game, did the quality and player settings, etc; that plays on my PC using the exe file.

    I zipped up my game files and sent them to a friend for test/comment/etc...however the data files are not included in the build.

    I used Application.persistentDataPath and it placed the data files in the user/appdata/...folders and subfolders where they should go but they are not being included in my build for distribution.

    1) Did I miss a setting?
    2) Is Application.persistentDataPath only for Android builds?
    3) Should I use Resources.Load for PC builds?
    4) Can I copy/paste or create a directory (to include in zip file) where the game can find them?
    5) Should I use an installer to ensure all files are included?

    Sage advice would be appreciated...Thanks
     
  2. No, you did not, you missed the point: PersistentDataPath is for writing data from the game out to the disk on run-time. It's not distributed with the game.

    No. It's for all platforms, however the exact location varies on platforms.

    Depends on what you want to do exactly. In general: you should not use Resource.Load and the Resources folder.

    After the appropriate folder present, you can copy inside of it anything, if you have written code which handles it, it will be processed. This is why we do not write general file handling, user can copy-paste any file and we would read them. This is the reason it's advisable to have very specific file reader/writer.

    Depends on your audience. If you want to be sure that people can install your game easily and you need files all around the computer using an installer may be a must. If your game works if you just unzip it and hit the .exe, then don't.
     
  3. SF11Dude

    SF11Dude

    Joined:
    Nov 8, 2018
    Posts:
    13
    Is there a solution to the current situation or is the only fix to code the solution?
    (example please if that is the case)
     
  4. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Put your wannabe distributables into StreamingAssets folder instead.
     
  5. SF11Dude

    SF11Dude

    Joined:
    Nov 8, 2018
    Posts:
    13
    We know what part of class you are and it isn't the "cl" is it?
     
    r2d2meuleu likes this.
  6. SF11Dude

    SF11Dude

    Joined:
    Nov 8, 2018
    Posts:
    13
    To the wannabe moderator who deleted my reply...HOW do you "completely misunderstand" 'wannabe'?
     
  7. SF11Dude

    SF11Dude

    Joined:
    Nov 8, 2018
    Posts:
    13
    If my account gets suspended or message deleted - you "completely misunderstood" me.
     
  8. SF11Dude

    SF11Dude

    Joined:
    Nov 8, 2018
    Posts:
    13
    Get lost SMB...
     
  9. I'm not the "wannabe moderator", I'm the "wannabe, who reported your post". I reported it because you're getting personal.
    Please don't do that.
     
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I didn't delete the post, that was another moderator. Was going to ban, but will give infraction in this rare case to any contributing parties.

    The original post was deleted by another moderator. The key thing to understand here is that if you make a personal attack, no matter the reason, it is never justifiable and this means a ban.

    If a user is behaving in a manner that offends you, report the post. Don't attack the user. Ever.

    Remember, many users have problems with English language and it can lead to mistakes, and even if they did mean it, you have no right, and never will have a right, to attack someone back on these forums. To defend yourself, block the user and use report post.

    I have been lenient today, but please don't make me regret it.
     
    piersb and Joe-Censored like this.
  11. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I'm not going to be lenient. 1 week ban; any further issues like this will result in that being permanent. The post that SF11Dude decided to freak out over for no reason is not in any way insulting to anyone and should not have resulted in any personal attacks, especially against someone who was trying to help. The phrasing was somewhat odd, but it takes a huge stretch to somehow decide that it's an attack on anyone. I mean, what would the motivation be? You can look at xVergilx's post history and see he's not in the habit of doing that, and if his listed location of "Somewhere @ UA" means the Ukraine, then English isn't likely his first language.

    --Eric
     
    xVergilx and hippocoder like this.
Thread Status:
Not open for further replies.