Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by jamisontboyd · Sep 02, 2021 at 02:50 AM · persistentdatapathlauncherzip

Application.persistentDataPath but for a Build

I'm creating a game launcher for my work and I have it to where I can download zip files from google drive, unzip the file, and then execute the game. I'm trying use UniZip and it works for the editor! It did everything I need it to, except it doesn't work when I try it on a Build. I know it's bc persistentDataPath only works for the editor and not a Build, so what does? I looked it up and I read some pages on GUID but I don't know how to access or utilize that. Does anyone have any answers?

Here's the code if anyone needs it.

 IEnumerator DownloadFile(string url, string zipname)
     {
        
         UnityWebRequest uwr = new UnityWebRequest(url, UnityWebRequest.kHttpVerbGET);
         string path = Path.Combine(Application.persistentDataPath, zipname);
         uwr.downloadHandler = new DownloadHandlerFile(path);
         yield return uwr.SendWebRequest();
         //if (uwr.Result != UnityWebRequest.Result.Success)
            // Debug.LogError(uwr.error);
         //else
             Debug.Log("File successfully downloaded and saved to " + path);
         UnzipFile(zipname);
     }
 
     void UnzipFile(string zipname)
     {
         Debug.Log("Starting Unzip Function");
         string path = Path.Combine(Application.persistentDataPath, zipname);
         string exportLocation = Application.persistentDataPath;
 
         ZipUtil.Unzip(path, exportLocation);
         Debug.Log("Finished it hopefully");
     }
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image xxmariofer · Sep 02, 2021 at 07:05 AM 0
Share

persistent data path is just a path to a directory in the device, and works on build. you need to give some extra details to understand what happens

avatar image jamisontboyd · Sep 07, 2021 at 11:05 PM 0
Share

@xxmariofer do you know what details I need to add? I've looked through all the docs I could find but I can't find anything.

avatar image xxmariofer jamisontboyd · Sep 12, 2021 at 09:12 PM 0
Share

I mean details of your issue, it returns any errors? Could you try a different device? I think I've used that same unzip library, (the class and method names are the same) and gave me issues when unzipping big zip files. Could you please tell me if the code returns any errors or what it happens?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

167 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Cant create project because of empty launch error 0 Answers

trouble loading file with www on the hololens after writing during runtime 0 Answers

(Before Launching Unity)My lancher frozes in the license activation. 1 Answer

Failed to compress IL2CPP symbol files in android build 0 Answers

My Unity 2017.4.1f1 puts me in an endless loop of trying to sign in. Anyone able to help?,My Unity 2017.4.1f1 cant sign in and put me in an endless loop. Anyone able to help? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges