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 /
avatar image
0
Question by Muhwu · Dec 28, 2014 at 02:50 PM · memorygpudevices

Device specific texture resolutions?

Unity allows me to set specific maximum width for a texture in the import setting. However, within the same category of devices - for example: Windows Phone, the memory and GPU capabilities vary a whole lot. Am I forced to assume the worst and go with the lowest device settings for texture compilation or to maintain two versions of the project or is there a neater way to go about this?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Wisearn · Dec 28, 2014 at 05:48 PM

http://docs.unity3d.com/ScriptReference/SystemInfo.html might work for Windows Phone.

I would include small/medium/big and load the textures accoarding to a % of something like SystemInfo.graphicsMemorySize if it works for WP.

Or maybe something more rudimentary like SystemInfo.deviceModel...

Comment
Add comment · Show 3 · 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 Muhwu · Dec 29, 2014 at 12:10 AM 0
Share

Getting the system information isn't really the problem as much as choosing the proper resources to load. Let's say I have 1000 different resources to load, how do I choose the proper versions dynamically so that I don't have to change the code in the game logic. Or do I have to include a new script on every sprite in the scene? That sounds like a horrible solution to me.

avatar image Wisearn · Dec 29, 2014 at 06:29 AM 0
Share

Normally you instantiate most things through code which lets you modify a property like this from a more central point before it's even in the scene.

It's also common to use one big "atlas texture" with lots of sprits in a giant 4k texture, in this case its also easy to "load the medium atlas texture" as your sprites would share material.

But yes if you start out sprites with no texture loaded and ins$$anonymous$$d place a script on them that has small/medium/big texture slots and loads it depending on the device, that would work as well. You could add ExecuteInEdit$$anonymous$$ode tag to it and you'll get the textures in editor by the script (through Update).

avatar image Muhwu · Dec 29, 2014 at 11:59 AM 0
Share

Do you know if the new UI system of Unity does this "behind the scenes". I'm assu$$anonymous$$g not though. The do$$anonymous$$ant 2D library before Unity's own (the name completely escapes me) used to pack the sprites really tight.

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

27 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

Related Questions

Reduce GPU Memory usage from textures 1 Answer

How can I tell how much grahics memory is available? 1 Answer

what's the conditions by main loop checked befor enter a frame works? 0 Answers

GPU Memory : Impact of Grayscale Textures 0 Answers

Texture Atlas Duplicating Because Of Material Differences? 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