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 /
This question was closed Jan 22, 2018 at 08:14 AM by Hellium for the following reason:

https://answers.unity.com/questions/919940/applicationloadlevel-changes-lighting-for-some-rea.html

avatar image
0
Question by Mazar_93 · May 03, 2016 at 05:02 PM · lightdark

Light Problem after loading the scene

Hi,

I´ve got a problem with the light in my scene. Wenn I die in the game, I load the scene with

 Application.LoadLevel(Application.loadedLevel);

new.

But after that, the scene is much darker.

Here are two pics to compare.

alt text

alt text

I can't find any difference. The directional Light component is exactly the same than before.

before.jpg (279.6 kB)
after.jpg (232.3 kB)
Comment
Add comment · Show 3
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 Jessespike · May 03, 2016 at 06:52 PM 0
Share

Are you using DontDestroyOnLoad anywhere? And how is the scene is first loaded? Are you playing it straight from the editor or do you have a Title screen scene that loads this scene with LoadLevel / LoadLevelAdditive? I ran into this issue once before when the scene was being loaded additively, doesn't seem the case here. Looks like the ambient lighting properties are changing, not sure why though. (Window -> Lighting)

avatar image FortisVenaliter · May 03, 2016 at 07:36 PM 0
Share

Wow, that's odd... I have to agree with Jessespike, it's probably something in the Ambient settings... Are you maybe using a skybox as the ambient source in one but it's not carrying over in the reload?

The only other thing I can think of would be the Sunlight field in the Lighting settings... It should be set automatically to the brightest light in the scene, and I believe it's used for the realtime GI, so you might want to check and make sure it's getting set properly when loading the scene.

The only really odd thing I noticed is that the sky does not appear to darken in the game view, but it does in the editor view (or is that water below the level?). Are you using a lit shader for the sky?

avatar image alx1 · May 03, 2016 at 11:39 PM 0
Share

does it happen in the build game? unity has some funky light setting in the editor. every time i go to a new level the light in that level is messed up, but only in the unity editor the build is fine.

3 Replies

  • Sort: 
avatar image
1

Answer by kavanavak · Jan 22, 2018 at 04:23 AM

This is kind of old now, but..

Go to Window/Lighting/Settings (DebugSettings) and unCheck "AutoGenerate".

You will have to manually regenerate the baked lightmap when you make changes, but this will allow unity editor to show the scene as you want it, post loadScene.

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 ThisTestWillDo · May 03, 2016 at 11:42 PM

It's just a common part of the way the scenes are pre-loaded in the build verses Unity. When the game is built, this problem will not exist, so it's nothing to worry about.

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 SQ_11 · Jan 22, 2018 at 08:04 AM

Check if there is any "Don't DestroyOnLoad" is calling. Comment or remove it and check again.

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 RemusRain · Apr 08, 2021 at 07:58 AM 0
Share

What do you mean by this? Why would a problem happen if a DontDestroyOnLoad is calling something?

Follow this Question

Answers Answers and Comments

9 People are following this question.

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

Related Questions

Using Lightning to light up a dark 2d level 1 Answer

Light gets darker after loading another scene 2 Answers

Dark light cookie 1 Answer

Normal map in dark 1 Answer

Lighting only happening when the player get close. 4 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