Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Returning back to the game via Main Menu puts dark tint on screen...

Discussion in 'Scripting' started by moynzy, Mar 24, 2015.

  1. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    upload_2015-3-24_4-29-34.png
    The top image is me in game mode, as you can see the colours are bright and "normal".

    upload_2015-3-24_4-30-12.png
    After hitting the main menu button, i arrive at the load game screen.

    upload_2015-3-24_4-30-35.png
    I press the "Play" button and now it's dark!

    Anyone ever come across this problem. I made no changed to lightning, via code.

    NOW YOU may be asking "Moynzy, you have errors popping up on your console window..."

    upload_2015-3-24_4-31-44.png
    I start the game from the main Menu, how it's suppose to be Played.

    upload_2015-3-24_4-32-8.png
    I press Play, and same result, pure darkness, and no errors.

    Does anyone know why this is happening?

    I've tried messing around with the lighting directional lighting in game mode, and it appears there's a nasty tint that's made everything darken.
     
  2. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Is there a fade-in/fade-out effect involved?
     
  3. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    @reveriejake No fade in or fade out. I didn't tinker with no lighting settings. Funny thing is, I built the game to test it, and the dark lighting goes away...
     
  4. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    I've noticed that in the darkened shots, there is an additional "GameControl" object in the scene. Could it be that it is some leftover object, perhaps by using DontDestroyOnLoad()?
     
  5. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    I've tested with out GameControl script, so from the main menu scene, there is a GameControl, and the continues into the next scene (The next scene has no GameControl).
     
  6. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Ah, okay. I thought maybe it had some UI component on it that would darken the scene.
     
  7. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    I don't understand, when I build the game, it doesn't affect it, but in game preview it does.

    I even tried it with different scenes, that have no UI components nor game objects, so going from scene A to Scene B just game me dark overlay.
     
  8. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    In the built game, there is no way to randomly select a scene and run it as the first scene. The Unity player always plays the first scene that has been specified in the build dialog.

    What I'm trying to say is, did you try playing your scenes exactly as they will be played in the built game? For example, in my games, I have a "logo" scene that always comes first. But in the editor, I'm always skipping it because it can get on my nerves if played every few minutes.
     
  9. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    Yes, I tired playing the scenes exactly how they're build in the game(built game). I start from Menu > Game
     
  10. Notter

    Notter

    Joined:
    Mar 8, 2015
    Posts:
    65
    I just saw a tutorial yesterday, and they said that after you create an object with a light, even if you remove that object, it turns off the world inherent light (the lightbulb at the top)
     
  11. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    I've seen this bug :D

    Go to window > lighting and disable continuous baking. It's bugged right now, apparently.
     
  12. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    Didn't work :(

    Went on my first scene, clicked play, and second scene the colour was not normal.
     
  13. Tomnnn

    Tomnnn

    Joined:
    May 23, 2013
    Posts:
    4,148
    For me the bug was caused when ever I reloaded my level. Are there any more details for your scene?
     
  14. LoneCipher

    LoneCipher

    Joined:
    Apr 3, 2013
    Posts:
    4
    I have a similar effect when I add a button to my scene. It looks like a semi-transparent tint is displayed over the screen. If i duplicate my buttons, the screen will eventually be opaque.
    Do you have a UI button in the scene when you come in from the menu? Removing the buttons while the game is running removes this tint in my tests.
     
  15. moynzy

    moynzy

    Joined:
    Oct 22, 2014
    Posts:
    82
    Hey, in the main menu I have multiple buttons ui elements. These elements are destroyed before entering the next scene, however my game level has HUD button elements.

    I've tested transition from Main menu screen, to a game level with no ui elements nor object. Same tint over lay.

    I have tested transition from a fresh scene, to a new fresh scene, still I get the tinted overlay.