• 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 StephanK · Dec 28, 2010 at 11:45 AM · texturespritetexture2datlaspacktextures

Texture2D.PackTextures() - maximumAtlasSize

The manual says PackTextures() will create an atlas that has a maximum size of maximumAtlasSize, if the textures don't fit in there they will be downscaled. I have some rather long animations, that would require an atlas that is at least 2048x2048 pixels big. However for some reason PackTextures() will always create a 1024x1024 texture and downscale everything to fit in there. The result is suboptimal at best. If I pass 2048 or 4096 as maximum size it will still generate a 1024 texure. If I set it to a smaller value (e.g. 512) it will create a smaller texture (512x512). So the question is how do I get PackTextures() to create textures of sizes > 1024x1024??

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 Peter G · Dec 28, 2010 at 01:29 PM 0
Share

Are you building to Unity iPhone? I can't imagine Unity would limit your atlas sized based on your build settings, but you could check.

avatar image StephanK · Jan 03, 2011 at 08:12 AM 0
Share

You are correct. When I switch to Standalone the behaviour is as expected. However it's a bit annoying that atlas size gets limited to 1024 on iphone automatically, as I wanted to create a special "HD" version for ipad and iphone4 using 2048x2048 textures because with the higher resolution my units look pixelated. i guess I'll do the import in a separate project and just copy the textures to my main project.

If you write this down as an answer I'll accept it and give you the rep points.

avatar image jlupianez_freedom · Mar 09, 2015 at 11:48 AM 0
Share

I have discovered that, when this function is called in a Headless, batchmode instance of a unity game for Linux (x64 tested here), it cannot PackTextures of size > 1024x1024. However, when Headless tick is unchecked in Build Settings Window, it can PackTextures of any size and also without opening any window with -batchmode command.... However, you will probably need to launch it with xvfb as stated here: http://answers.unity3d.com/questions/353653/can-a-unity-game-be-started-over-ssh.html , but it works!

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by SeikoTheWiz · Oct 05, 2012 at 10:13 AM

you can actually switch your project to pc and mac standalone, build in any size you want and then use the texture created in 2048 or 4096 on iphone just fine

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

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Packing unity textures into atlases 0 Answers

Combine Array of Sprites to Form One Sprite 0 Answers

How to scroll a region of texture (which is an atlas) on a mesh (which is a sprite) 2 Answers

Get a portion of a Texture2D to another Texture2D 1 Answer

i'm trying to make the packed atlas and use the reacts to get the width and height then apply it to the material how do you do it 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