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 sk8rboy6289 · Mar 11, 2012 at 08:35 PM · guifade

GUI fade in Fade out

hey everybody i'm new to unity and know nothing about scripting and i wanted to know if there was someway i could fade in and fade out like if i enter a zone it will say the name and then fade out that would be great thanks.

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
1

Answer by Kleptomaniac · Mar 12, 2012 at 02:08 AM

Use color.a. This represents a GUI element's alpha values.

Therefore, if you use OnTriggerEnter or OnCollisionEnter and you have your 'name' as a GUIText, you could assign a script to that GUIText and use say:

 guiText.color.a += Time.deltaTime * fadeMultiplier; //Fade multiplier can be used if you want to speed up or slow down the fade

You can base the time at which it fades out on an actual timer or using OnTriggerExit or OnCollisionExit, depending on what you want.

Next time, try to broaden out your question a bit more because its rather ambiguous.

Hope that helps! Klep

Comment
Add comment · Show 5 · 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 Berenger · Mar 12, 2012 at 02:37 AM 0
Share

Coroutines will help also. => OnTrigger... can be coroutines.

avatar image sk8rboy6289 · Mar 12, 2012 at 09:06 PM 0
Share

thanks man

avatar image sk8rboy6289 · Mar 12, 2012 at 09:22 PM 0
Share

also what i want is that when you go into a new zone the name of it will pop up and then fade away like in everquest

avatar image Berenger · Mar 12, 2012 at 10:07 PM 1
Share

I suggest you take a look here. It's a script to animate a text on alpha, pos and scale. It is done with curves, so you have full control over it.

avatar image Kleptomaniac · Mar 13, 2012 at 06:05 AM 0
Share

That's actually a pretty cool script @Berenger ... but @sk8rboy6289, if you didn't want to use that script (which I doubt you won't :D), like I said you would use OnTriggerEnter or OnCollisionEnter to trigger an event which will fade the pop-up in and then after a certain time has elapsed (using a variable probably based on Time.time), simply fade it back out again. Simple is that. That's what I said in my original answer. ;)

avatar image
0

Answer by flamy · Mar 12, 2012 at 05:10 AM

I guess this page would be helpful for you. This can fade both material as well as GUIText of textures.

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 sk8rboy6289 · Mar 12, 2012 at 09:22 PM 0
Share

thanks man

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

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Fading an image drawn with GUI.DrawTexture 1 Answer

making a fadeout with the new GUI in 4.6? 3 Answers

Fade in from black 4 Answers

Is there anyway to fade in/out a GUI image without using an addon/asset? 2 Answers

How to make 3D Text fade in and out? 3 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