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
1
Question by Tryptex · Aug 16, 2017 at 03:43 AM · objecttransparencystartupfadeoutlogo

How to slowly change an objects transparency

I want to have an image of my company logo appear when I start the program, and I want to slowly fade to back and then have it load a new scene, does anyone know how to slowly change the transparency of and object?

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

3 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by x4637x · Aug 16, 2017 at 03:52 AM

I think the best solution to your problem is Splash Screen.

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 Tryptex · Aug 16, 2017 at 03:04 PM 0
Share

But how do I do that if I am running unity personal edition?

avatar image x4637x Tryptex · Aug 17, 2017 at 02:03 AM 0
Share

Personal edition still can do the fade in and out like you said. It just can not disable the whole Splash Screen or the Unity logo.

The Unity Personal Edition license has the following limitations:

The Unity Splash Screen cannot be disabled.

The Unity logo cannot be disabled.

The opacity level can be set to a $$anonymous$$imum value of 0.5.

You should try it first.

avatar image
0

Answer by Welgum · Aug 16, 2017 at 04:16 PM

You can use a SceneManager.LoadSceneAsync with an animation between the scenes.

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 M-G-Production · Aug 16, 2017 at 04:40 PM

This would be the most simple way to do it

Create a C# script, name it 'FadeOut' and then drag it on your logo gameObject. Then copy/paste the code and tweak it.

 using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using UnityEngine.SceneManagement;
 using UnityEngine.UI;
 
 public class FadeOut : MonoBehaviour
 {
     [Header("Fade Out Script")]
     public Image logoImage;
     [Tooltip("Will start the fade out after value (in seconds)")]
     public float timeToStartFading = 2f;
     [Tooltip("Higher values = faster Fade Out")]
     public float fadeSpeed = 1f;
     [Tooltip("Scene to Load (Must be stored in Builded Scenes Index -> File/Build Settings...)")]
     public int sceneToLoad = 1;
 
     public void Start()
     {
         //If you didn't drag the component
         if (logoImage == null)
             logoImage = GetComponent<Image>();
     }
 
     public void Update()
     {
         //Timer
         if (timeToStartFading > 0)
         {
             timeToStartFading -= Time.deltaTime;
             return;
         }
 
         //Modify the color by changing alpha value
         logoImage.color = new Color(logoImage.color.r, logoImage.color.g, logoImage.color.b, logoImage.color.a - (fadeSpeed * Time.deltaTime));
         
         //Basic scene change
         if (logoImage.color.a <= 0)
             SceneManager.LoadScene(sceneToLoad, LoadSceneMode.Single);
     }
 }
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 Tryptex · Aug 17, 2017 at 03:29 PM 0
Share

That doesn't work, it complains about this line of code " logoImage.color = new Color(logoImage.color.r, logoImage.color.g, logoImage.color.b, logoImage.color.a - (fadeSpeed * Time.deltaTime));" and It says: " Object reference not set to an instance of an object FadeOut.Update () (at Assets/Scripts/FadeOut.cs:35)" what do I do?

avatar image Tryptex Tryptex · Aug 30, 2017 at 10:13 PM 0
Share

@ $$anonymous$$-G-Production oops, sorry, I forgot to add the @ symbol and your name.

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

74 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 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 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

Fade 2 out of 3 gameobjects on the screen who have the same material 2 Answers

Transparent Character but Overriding Background 0 Answers

Can I Make Holes In Objects? 1 Answer

Transparency cone between object and camera 1 Answer

How can I make objects change color, then fade/return to its original color? 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