Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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
1
Question by Wortex17 · Dec 09, 2015 at 01:50 PM · unity 5spriteui imageatlaspacking

How to pack a sprite with transparent areas

I have an image with a section of transpareny imported as sprite for our UI. It is beeing used as tiled list background (UI Image, Type: Tiled): there is an opaque stripe of color follow by a transparent stripe so in the end, every second list element has an opaque background.

When using this as the tiled image, there are artifacts showing up in the supposed-to-be transparent part of the tiled image. Looking at the atlas packed by unity, this artifacts comes from another sprite in the same atlas, which is packed near the opaque stripe (and the transparent stripe is not packed). Funny enough this only happens when the game is built, not in the editor, but I guess this comes from the fact that the editor does not actually use the atlas. Now i understand that unity automatically trims sprites on packing, which is probably the source of this error, but is there any way to tell Unity not to do that for specific images?

In short, i want the transparent half of the sprite to be part of the sprite in game.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by Tralfazy · Jan 25, 2017 at 06:43 PM

With unity 5.5 Sprite Compression of "High Quality" made packed sprites lose their transparency. After changing sprite compression settings to Normal, Low Quality or None it let the transparency work again.

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
avatar image
2

Answer by nindim · Apr 12, 2016 at 12:10 PM

I am having this same problem and this is the only place talking about it that I can find. Did you ever find a solution?

SOLUTION: The solution seems to be to use "Full Rect" rather than "Tight" in the "Mesh Type" setting for any sprites that you are using as Tiled Sprites. This makes sense as I would imagine tiled sprites just use simple procedurally generated quads, whereas the other sprite modes can use the special cut down mesh type generated with the "Tight" setting and this will cut out any neighbouring sprites in the atlas.

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.

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

Resource load default unity sprite? 1 Answer

Change resolution and format of Sprite Packer Atlas 0 Answers

Unity 5.1.1f1 hangs on repacking sprite atlases 2 Answers

Color blending in UI sprite 1 Answer

Make images fit in UI 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