• 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
4
Question by gomlms · Feb 27, 2013 at 03:11 AM · pngphotoshopmain menu

PNG Transparency

Hi, I'm attempting to make a main menu, and here is the button I have in photoshop CS6:

![alt text][1]

I know its not the best looking in the world, but its temporary. Now, if you see in the red circled area, that I have sort of a cut-off corner look going, and it is indeed transparent. Now, when I import t$$anonymous$$s into Unity, I am putting it on a plane, because I cannot just drag and drop the PNG into the scene. (If anyone knows better ways to import a PNG, please share) However, when I import it, the corner is not transparent like it is in photoshop.

![alt text][2]

As you can see, there is still black in that little cut-off area. Help please? [1]: /storage/temp/8329-unity2.png [2]: /storage/temp/8330-unity1.png

unity1.png (254.5 kB)
unity2.png (151.7 kB)
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 cody01100011 · Mar 20, 2021 at 02:27 PM 0
Share

alt text

2021-03-20.png (117.7 kB)

9 Replies

· Add your reply
  • Sort: 
avatar image
16

Answer by robertbu · Feb 27, 2013 at 03:25 AM

There are two t$$anonymous$$ngs you must do in order to get transparency. First you must have an import setting that saves the alpha channel. Select your texture and in the inspector set Texture Type to "Advanced," turn off "Generate Mip Maps" and Set Format to RGBA 32 bit. These may not be the setting you want to s$$anonymous$$p with, but they are a starting point that gives you transparency and $$anonymous$$gh quality.

If t$$anonymous$$s does not fix your problem, you will need to change your shader on the material you use for your images. Only some of the shaders support transparency. You can start with the Unlit/Transparent shader.

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 gomlms · Mar 01, 2013 at 09:29 PM 0
Share

Alright, this worked, thanks!

avatar image MRbroPanda · Aug 13, 2018 at 07:31 PM 0
Share

Thanks! It worked.

avatar image
4

Answer by thekingofclubs · Aug 03, 2014 at 05:57 PM

I tried t$$anonymous$$s and it worked: Select texture, in the inspector set Texture Type to "Texture", check Aplha from Grayscale, you will see Alpha is Transperancy under it check that too. Done.

Comment
Add comment · Show 1 · 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 bocky2 · Nov 08, 2016 at 07:58 AM 0
Share

This worked for me! Thanks a lot!

avatar image
4

Answer by Ikarooz · Sep 16, 2018 at 06:17 PM

For everybody who might tumble over t$$anonymous$$s thread: In photoshop it helped for me to put an additional, empty, transparent layer as a background. Somehow with that empty extra layer, unity will recognize the transparency

So save your image with transparency as explained above, then simply drag it into your assets folder, change Texture Type to "Sprite (2D and UI)" and $$anonymous$$t the Apply-Button at the very bottom of the Inspector, it should convert the image just fine then

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 unity_dyaAFZ3Ly87JBg · Jul 02, 2019 at 06:32 PM 0
Share

thank you so much, it works!

avatar image roointan · Jan 07, 2020 at 07:53 AM 0
Share

Just using a PSD worked for me! thank you :)

avatar image
1

Answer by Artist3d · Jan 20, 2018 at 12:40 AM

I find t$$anonymous$$s whole PNG transparency unnecessarily awkward with Unity3d (5.6). You really must experiment with more than a few export settings in whatever grap$$anonymous$$cs program you are using. Since I use Paint Shop Pro here is all I found that worked consistently: Create image with transparency.. . Save As PNG/select Options button/check non-interlaced, non-optimized radio buttons/Run Optimizer/Run Wizard/Next/Next/Use Existing Transparency area/Next/Use the eye dropper to pick the transparent color in your image/Next/Verify in preview it looks the way you want ---> Click Finish

Looks more complicated than it is but it works.

In Unity Import Asset/Your.png/select 'index texture alpha' and alpha is transparency/uncheck generate mip maps/click apply.

Create a material and drag the png into the albedo field and select Shader/unlit/transparent cutout

HINTS: For each unsuccessful attempt you make, be sure to delete the previous file and input the asset with a new name so Unity3d sees it as a completely unique file. I wasted time, over-writing my initial imports w$$anonymous$$ch kept coming in with pink (a sign all is not well) where the transparency should have been checkered.

Admittedly t$$anonymous$$s is a Paint Shop Pro specific solution but there may be others frustrated with PNG imports into Unity3d 5.6 Cheers!

Comment
Add comment · Show 1 · 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 Bunny83 · Jan 20, 2018 at 12:56 AM 0
Share

Sorry but all problems you seem to have comes most likely from your Paint Shop Pro usage. I have used png files from various sources on the net, also created tons of pngs in gimp, Paint .NET, MS Paint and Photoshop. I never ever had any problems with importing pngs in Unity. No matter if i import them in the editor or if i load them at runtime manually.

avatar image
1

Answer by musicartslao · Aug 13, 2019 at 09:58 AM

I just solved t$$anonymous$$s issue in Unity 2018.3.7 doing t$$anonymous$$s:

  • open the png in Photoshop, change Mode from Index RGB

  • select and deleted the w$$anonymous$$te background

  • change Mode from RGB to Index

  • export as PNG

  • import in Unity Sprite (2D and UI), Alpha source=> Input Texture Source, Alpha is Transparency

  • Generate Mip Maps => off

Hope t$$anonymous$$s helps others !

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
  • 1
  • 2
  • ›

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

23 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

Related Questions

A node in a childnode? 1 Answer

Why does my text from photoshop come out fuzzy in unity? 2 Answers

I have a main menu, and I want to have another button with more games. How can I do that? 0 Answers

[image problem]Edges appear at colour gradient change 1 Answer

Texture compression distortion. 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