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 Gaming-Dudester · Nov 30, 2016 at 11:06 AM · uibugsinvisible

UI is turning invisible every time i run my game

I keep running my game and the UI turns invisible every time. There's nothing in my code that could be doing this. The problem might have to do with a image covering the entire canvas but the image is full alpha. There is no way that one image could make the rest invisible. And no the other bits of the ui are not children of the big image. I think this is a bug because it fixes every time i re-import assets...but then it breaks again. Plz help. :(

Comment
Add comment · Show 5
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 Gaming-Dudester · Nov 30, 2016 at 11:14 AM 0
Share

Also the big transparent image turns invisible as well. Like even if i change the alpha through the inspector it still is invisible.

avatar image Jacky-Marley · Nov 30, 2016 at 03:38 PM 0
Share

can you please give us more informations like picture of your screen and a picture of your UI Inspector ?

avatar image teal_dragon · Nov 30, 2016 at 10:00 PM 1
Share

is it possible that the renderer is disabled or even the object itself?

avatar image Gaming-Dudester teal_dragon · Nov 30, 2016 at 11:18 PM 0
Share

Nope. If i reload the assets and/or close and open the project it'll be visible again. That is until i run the game again.

avatar image roman_sedition Gaming-Dudester · Dec 01, 2016 at 04:05 AM 0
Share

I think there's something which is changing the color which is making it transparent permanently, because after you re-import the assets it's ok, but after you run it again for the first time it is permanently not. Look at what happened to the material itself in the inspector after after you have done a fresh re-import and again after a play through.

I know this occurred for me when I used 'sharedmaterial' ins$$anonymous$$d of 'material' in $$anonymous$$eshRenderer.

2 Replies

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

Answer by Gaming-Dudester · Nov 30, 2016 at 11:35 PM

Ok so for some weird reason...i think this script made the problem. as soon as i took it off the problem stopped. Heres the script.

using UnityEngine; using System.Collections; using UnityEngine.UI; using UnityEngine.SceneManagement; public class Fade : MonoBehaviour {

 public float alpha = 0.1f;
 public Color color;
 public GameObject fadeOutObject;
 public bool triggerFade;
 public float fadeOutSpeed;


 void Update ()
 {
     if (triggerFade == true) 
     {

         alpha += fadeOutSpeed;

     }
         color.a = alpha;
         fadeOutObject.GetComponent<Image>().material.color = color;
     }


}

i dont know if this is the actual cause but i think for now i will hold off on the fade script

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 Gaming-Dudester · Nov 30, 2016 at 11:36 PM 0
Share

and no...the fade out object was the big black thing. it was not the ui because if it was then it would only be effected at runtime. Which this problem did not.

avatar image
0

Answer by Denscrivent · Dec 01, 2016 at 08:14 AM

From the script you showed, there is:
public float alpha = 0.1f;

then inside Update, you have
color.a = alpha; fadeOutObject.GetComponent().material.color = color;

that makes the object faded I think

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

86 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 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

Renderer on object disabled after level reload 1 Answer

[Solved] Buttons become invisible when scaling game view 1 Answer

Adding a ui text as a child of canvas disables all child buttons and makes them break 1 Answer

Unity Rendering Some Images, But Not Others (World Space UI) 1 Answer

Workaround for UI render to texture bug 0 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