Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
avatar image
0
Question by ibyte · Mar 17, 2010 at 11:04 PM · texture2dwwwpersist

What is the best way to persist www downloaded graphics?

While this question is probably not Unity specific ...

In my game I would like use www class to import texture2D. After they are downloaded and in use what is the suggested method to cache/persist these graphics for future use.

Is sqlite overkill?

iByte

Based on SpikeX question below I have added the following information:

My game will ship with a specific set of graphics. I want these graphics to be updateble over the web (the amount of space required would not change). When the player closes the game I don't want the new graphics to turn into dispersed electrons. I want the graphics to be reloaded into the game (locally) when it starts up again. It would be okay if the original graphics were overwritten if there was a way to do that. If not then I am assuming I need some kind of file storage file or simple blob like database to keep them in. I would hope to support any type of Unity deployment target with whatever solution was used.

Comment
Add comment · Show 1
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 qJake · Mar 17, 2010 at 11:11 PM 0
Share

"In my game I would like use www class to import texture2D."

Could you be a little more specific? Typically with games you just have an asset database that everything grabs from, and is packaged with your game. Unity also handles automatic strea$$anonymous$$g of web content using the web player if that's what you're trying to do.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Eric5h5 · Mar 18, 2010 at 12:01 AM

You can save downloaded textures with the usual System.IO functions, such as WriteAllBytes, plus the use of Application.DataPath. Note that this only works with standalones; you can't cache anything locally with webplayers, aside from 1MB of PlayerPrefs data. (Unless you get a special license from UT that allows caching in webplayers.)

Comment
Add comment · Show 2 · Share
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 bernardfrancois · May 19, 2011 at 12:29 PM 0
Share

Note that from Unity3.3 you can use Application.persistentDatapath. This works on all devices (except web); see http://www.previewlabs.com/file-io-in-unity3d/

avatar image ina · Dec 19, 2011 at 03:26 AM 0
Share

Does this also work for mobile? Or do you just save that in PlayerPrefs

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

1 Person is following this question.

avatar image

Related Questions

Image files from folder with System.IO into array converted to WWW.texture and applied to Instantiated prefab 1 Answer

www.texture memory leak 1 Answer

Any way to validate WWW.texture 5 Answers

Error Trying to Download a Image from a Local File 1 Answer

cannot set texture 0 Answers


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