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 AzzyDude24601 · Mar 10, 2017 at 07:07 AM · imageresourcesurlwww.texture

What is the correct way to store 1000's of images in a Unity project?

I have a project that is basically a kind of gallery. I have 1000s of images (probably 10k+).

The user can filter these images by picking keywords, and then when they submit, it loads a couple hundred game objects into the scene and applies each image as a texture.

My question is what is the correct way to go about this? Right now, I am putting the images in the resources folder but that seems wrong.

Storing the images online and grabbing them with the WWW object isn't really an option as the yield is too slow.

Is there a correct way to go about this?

Comment
Add comment · Show 2
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 toddisarockstar · Mar 12, 2017 at 05:37 AM 0
Share

i would use tinglers approach with texture2d.loadimage.

unfortunatly you simply cant load that much data into the users ram without crashing your user's as there PC runs out of memory.

If you put all the images locally on a hard drive folder you could get the directory lising of all of them for sorting. Then come up with a creative way to use texture2d.loadimage to load/unload only the images that need to be currently displayed displayed at the time.

if you are writing for PC reading and writing to the hard drive is easy enough.

your images could also be downloaded from a server too. as a side note ... if you don't have a server, unity can take any files directly from dropbox as well !!!

avatar image AzzyDude24601 · Mar 12, 2017 at 01:31 PM 0
Share

I do have a server but downloading 1000 images is just too slow to download for when I'm loading them for the user. I think I'll have to find a local disk solution like you said. It is exclusively for PC so at least I have that.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by tinglers · Mar 10, 2017 at 03:53 PM

You could use the texture2d.loadimage to load it directly from disk and store it there. You can also try asset bundles but you got to remember that loading hundreds of images just takes time.

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 AzzyDude24601 · Mar 10, 2017 at 04:03 PM 0
Share

I'm having trouble understanding what texture2d.loadimage does exactly and why it would be beneficial for me?

I didn't think of asset bundles. I could definitely separate the images into bundles 1000 or less. Would I then store the bundle inside the Assets folder or do I store it somewhere on my HDD and the build only works on my HDD?

avatar image tinglers AzzyDude24601 · Mar 10, 2017 at 04:19 PM 0
Share

Loadimage would be only a temp solution, Asset bundles are folders that can exist outside of a project and still be accessed real-time, so check the documentation on it

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Trouble using WWW.LoadImageIntoTexture 0 Answers

What's the best way to incorporate dynamically loaded textures into GUI controls? 1 Answer

loading different image links into a list 0 Answers

Cannot load image from URL passed as parameter 0 Answers

Integrated VideoPlayer component but for images? 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