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
2
Question by frank · Aug 30, 2010 at 02:45 PM · guitexturetransparent

How to draw a transparent texture in GUI?

Hi! I have a .png picture which background is transparent. When i draw it in GUI the background became all white, not transparent. Is there any way to solve that problem? THX!

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

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by salvador007 · Apr 17, 2014 at 12:45 PM

Simply Click on your Texture >>In INSPECTOR change Texture Type : GUI apply settings

it will work fine...

alt text


screen shot 2014-04-17 at 6.05.13 pm.png (14.3 kB)
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
0

Answer by squall_789 · Aug 30, 2010 at 05:04 PM

Hi.

I also had the same problem, I managed to find the following shader help within the spaceinvaders project. see link here Invaders Project

You could also paste this code into a shader to achieve the same effect.

http://www.unifycommunity.com/wiki/index.php?title=AlphaSelfIllum

or alternitivly try this for double sided

http://www.unifycommunity.com/wiki/index.php?title=AlphaDiffuse2sided

or this that doesnt work with blending, so its a little faster to use. http://www.unifycommunity.com/wiki/index.php?title=UnlitAlpha

Hope that helps a little.

Comment
Add comment · Show 11 · 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 frank · Aug 31, 2010 at 05:32 AM 0
Share

Wow, thats really comprehensive! But honestly speaking, the codes are too hard for me to understand. I'm still a beginner, so sorry. Could you please tell me how to use these scripts to let my .png file become transparent?

avatar image squall_789 · Aug 31, 2010 at 11:23 AM 0
Share

Hi. If you just click the invaders Project Link I've provided, download it, and inside there is the shader i've mentioned, simpley copy and paste it into your project folder, then when selecting a material select the new material. I'm also a beginner so don't worry about it, this also took me a few $$anonymous$$utes to figure out.

avatar image frank · Aug 31, 2010 at 03:41 PM 0
Share

Hi! I copied the shaders folder to my Unity Object assets folder, and create a new material with my transparent .PSD file(I dont know whether theres difference between .png and .psd or not). I havent figure out how to use a material on GUI, so i just simply attached it to a plane. But none of the three shaders i imported could make the plane become transparent. But in "Invaders", I truely see the transparent plane, like "buttoncontrols" under "buttonbase" in Scene "title". Is there any step i miss? THX.

avatar image Tethys · Apr 09, 2014 at 08:03 PM 0
Share

$$anonymous$$aking a transparent SHADER is easy and it comes with Unity. The original question asks, and still hasn't been answered, how to keep transparency on texture import to be used with UI elements. That means NO SHADER.

avatar image Hoeloe · Apr 09, 2014 at 08:06 PM 0
Share

And you just bumped a 4 year old question. Nice going.

Show more comments
avatar image
0

Answer by jtbentley · Aug 30, 2010 at 02:51 PM

Either the alpha isn't working properly, or you're not select the correct import option. Ensure you chose RGBA (24bit, 16bit, dx/pvrt, doesn't matter) for whichever method of compression you chose.

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 frank · Aug 30, 2010 at 04:02 PM 0
Share

I choose the RGBA, but it still doesnt work. I realize something, my Unity is free version, does it support transparent textures?

avatar image Eric5h5 · Aug 30, 2010 at 05:07 PM 0
Share

@CHyTER: of course it does.

avatar image
0

Answer by musaranya · Apr 17, 2014 at 09:41 AM

Select your png in the project panel. In the Inspector panel you will see the import settings, make sure you select GUI in the Texture Type dropdown, and then click Apply. This way your texture will keep its transparent background when using it as GUITexture

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Cooldown indication, transparent rotating texture 1 Answer

Transparent & self illumin object? 1 Answer

Edges on Transparent GUI - Still not working 1 Answer

OnGUI Button 1 Answer

GUITexture Button? 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