• 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 GeneralGadd · Apr 28, 2010 at 11:32 AM · splash-screen

How to make a simple splash screen

Hello I have been having some trouble trying to create a simple splash screen. What I want to do is when the character goes to the final teleporter it fades to a splash screen that says thank you for playing etc, then after a few seconds goes back to the main screen. I have looked around and unity doesnt identify Fade for some reason :S

Here is my code so far

function OnTriggerEnter(other : Collider){ var startTime = Time.time; var fadeDuration = 2.0; var i = 0;

while (i <= 1) { i = (Time.time - startTime) / fadeDuration; guiTexture.color = new Color(1,1,1,i); yield; } Application.LoadLevel("0"); }

I have tried using things like yield Fade.use.Alpha(guiTexture, 1.0, 0.0, 1.5); but I donnot why it doesnt work, I'm still learning.

Thanks for the help

[EDIT]

I have updated it so that the Splash screen goes onto another scene however as the scene fades into the other scene, the fade on the other scene loads up automatically, so you dont see the splash screen long enough. Here is the script from the teleporter.

var teleporterSound : AudioClip;

//when player hits the object the game ends function OnTriggerEnter(other : Collider){ audio.clip = teleporterSound; audio.Play();

//fade to splash screen LevelLoadFade.FadeAndLoadLevel(3, Color.white, 1.0);

 }

And here is the script from the splash screen- ideally id like it to fade out onto the main menu.

//fade to splash screen
LevelLoadFade.FadeAndLoadLevel(0, Color.white, 2);

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 AndyMartin458 · Jul 18, 2012 at 06:20 PM 0
Share

//Fade in a Texture2D

GUI.color = new Color(1,1,1,elapsedTime / fadeDuration);

GUI.DrawTexture(new Rect(0, 30, 500, 400), logo);

//Fade in GUIText

textName.material.color = new Color(1,1,1,elapsedTime / fadeDuration);

5 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by GeneralGadd · May 03, 2010 at 03:53 PM

Solved it.

I took a different root altogther, I made new scene with a plain with the splash screen on, then reimported a button from my game over screen added it, so now when I collide it goes to a new scene with splash screen, and button to link back to main menu. I couldnt get the other methods to work, but this works fine, as the scene fades in, then the button fades to the main menu.

Thanks for everyone who tried tho :D

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 pikkupr · May 07, 2015 at 06:19 AM

Check here: http://techmon.in/u3d/2playertictactoe/

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
1

Answer by matheusrma · Sep 10, 2014 at 11:28 AM

If you are still having a hard time working a good looking splash screen, check it out my Asset Store package.

https://www.assetstore.unity3d.com/en/#!/content/9918

You can get a professional looking splash screen in less than 3 minutes using the build in examples

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 Seb.du · Sep 09, 2010 at 12:18 AM

Heres The Most Simpilest Code: (Add To AppDelgate.m)

#import "AppDelegate.h"

@implementation AppDelegate

@synthesize window; @synthesize tabBarController;

(void)applicationDidFinishLaunching:(UIApplication *)application {

sleep(4);

...........

@end

Add the image and name it : Default.png The Size Of The Image Has To Be : 320 X 480

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 duck · Apr 28, 2010 at 12:49 PM

You could use something like this to fade a guiTexture in over a period of 2 seconds, then load a different scene:

var startTime = Time.time; var fadeDuration = 2.0; var i = 0;

while (i <= 1) { i = (Time.time - startTime) / fadeDuration; guiTexture.color = new Color(1,1,1,i); yield; }

Application.LoadLevel(0);

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 duck ♦♦ · Apr 28, 2010 at 01:37 PM 0
Share

doh, sorry - typo. should read "guiTexture.color" ins$$anonymous$$d of "guiTexture.Color". (fixing the example now!)

avatar image johan-skold · Apr 28, 2010 at 03:16 PM 0
Share

The i will fade from 0.0 to 1.0 over the span of fadeDuration seconds. The reason they don't "appear" (I'm assu$$anonymous$$g you mean in the inspector) is cause they're inside the OnTriggerEnter function and not variables you have to set manually in the editor. They set themselves so to speak.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

using Unity iPUnity splash screen from your game 0 Answers

How to custom web player loading screen with "facebook binary url" embed method? 0 Answers

How to make an animated splash screen (Android) ? 1 Answer

Xcode Crashes on Launch: SplashScreen updateOrientation 1 Answer

Issues With Scene Transition 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