Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Grady · Sep 27, 2011 at 09:25 AM · scenefadetransitions

How to fade a scene in/out

Hey guys

I was wondering, what is the most efficient and easy way to make a scene changing transitions....?

I was looking at http://answers.unity3d.com/questions/8540/how-to-fade-inout-a-scene.html but couldn't seem to get it to work. So far I have figured out that I need a texture over the screen or something like that, but I'm having a bit of trouble... :/

Thanks

-Grady

Comment
Add comment · Show 4
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 syclamoth · Sep 27, 2011 at 09:44 AM 0
Share

Well, if you want both the scenes to be moving during the transition, it can be pretty difficult. Just out of interest, are you using Unity Pro? If so, there is an easy way of faking a snapshot transition.

avatar image Eric5h5 · Sep 27, 2011 at 09:45 AM 0
Share

Duck's answer in the question you linked to is spot on. I'm afraid I don't really see the point of this question since it's already answered.

avatar image Grady · Sep 27, 2011 at 09:52 AM 0
Share

I'm using the free version of unity unfortunately...

And for Eric5h5, I copied the code into a OnGUI() funtion, but I just got errors in the console.... I don't know what I am doing wrong....

avatar image syclamoth · Sep 27, 2011 at 09:54 AM 0
Share

Look at the errors, they're surprisingly helpful. Obviously directly copy-pasting won't work, you have to actually understand the code as well! You need to define a member variable on your script to store the current fade level.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by yeoldesnake 1 · Sep 27, 2011 at 01:28 PM

You could draw a Black GUI Texture that fills the screen , whose Alpha would slowly ascend from zero to 1 , then load the level. Then you should set it that whenever the new level is loaded , a black texture is also drawn , but now it's alpha descends from 1 to 0 , that should make for a nice transition and should cover up the loading time.

Comment
Add comment · Show 13 · 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 syclamoth · Sep 27, 2011 at 01:37 PM 0
Share

Which, coincidentally, is exactly the same answer as the one from the link posted with the question!

avatar image yeoldesnake 1 · Sep 27, 2011 at 01:39 PM 0
Share

Interesting...

avatar image Eric5h5 · Sep 27, 2011 at 07:42 PM 0
Share

Alpha goes from 0 to 1 though.

avatar image Grady · Sep 27, 2011 at 10:30 PM 0
Share

so would it be easier to draw the texture from code, or make the gui texture as a game object and then try and change it...?

avatar image Grady · Sep 28, 2011 at 01:10 AM 0
Share

O$$anonymous$$, I managed to get something to work how I wanted it to... Here is the code I used:

var theTexture : Texture2D;

function OnGUI(){

     GUI.color.a = $$anonymous$$athf.Lerp(0.0, 1.0, (Time.time / 2));

     GUI.DrawTexture(Rect(0,0,Screen.width, Screen.height), theTexture);

 }

That is if you want it to fade out straight away, i have to try and find a better value ins$$anonymous$$d of Time.time /2 ...

Show more comments

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

6 People are following this question.

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

Related Questions

Superimposition fade between two scenes 1 Answer

Cross dissolve between scenes 1 Answer

Fading scene in unity 3 Answers

fade between scenes? 1 Answer

Fading To New Scene Problem? 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