Odd Lighting Issue

After one round of the game, the directional light stops working.

https://drive.google.com/file/d/17JOvjPVQNwSE3ha1aJhnpMOyUmnxrY6e/view?usp=sharing

If anyone has an idea of why this is not working, please let me know.

try window → rendering → lighting and disable the auto light generation

Is this what you are looking for?

image

If yes, it was already disabled.

Hi RishMa,

Have you clicked on “Generate Lighting” after you arranged your game objects and lights in the scene? Do that for every scene.

I am having this same issue. I have generated the lighting for the scene, and when I play the game the lighting is how I have it set up correctly. But when I crash, (or lands on the pad), and the level restarts(or it loads the next scene) the lighting is drastically darker.

Which version of Unity do you use, @SimoninSD82?

I am using 2021.1.12f1
Here is my Lighting, before finishing the level or crashing.


And after restarting, via reloading on crash or success.

Its subtle, but makes a big, noticible (especially when playing) difference on the appearance of the Ship and Meteors.

That’s indeed way too dark and should not have happened. I’m wondering if this might be a hardware problem because it happens to a few students only. Do you happen to use a notebook? If so, is the power chord plugged in?

Are there any error messages in your console when the scene gets reloaded?

If you cannot fix the problem, could you please upload your project to GitHub without the Temp and Library folder and share a link to the public repository here? I’d like to take a look into this.

Here is a tutorial video by Brackeys:

https://www.youtube.com/watch?v=qpXxcvS-g3g

I do use very powerful gaming laptop, but always with the power cord plugged in. I’ve been working my way through the tutorial classes and have not run into this issue before, but this is the first project I’ve built in this Version of Unity.

There are no errors in the console.

I will watch the Brackeys Video (their videos have been SOOO helpful!), and see if I can figure out how to upload the project to GitHub, and will post a link, when I believe I am successful.
Thank you.

I’m not exactly sure what fixed the issue but I went through, deleted and replaced all of my lighting, and regenerated the lighting. It took a little longer (about 4 minutes total) but afterward, the lighting works as intended!

I don’t understand how to import the Unity project to Github.

https://drive.google.com/drive/folders/1JuNIuOHlMAD0WsgBQxdeEHcyHGQfKSj0?usp=sharing

This is the project.

Maybe there was an internal problem in Unity. That’s not uncommon. It might be that the lightmap was not updated correctly when you made changes in the scene. Or that the calculation of the lightmap was not complete. I’m glad redoing the lights fixed the problem for you. :slight_smile:

Thank you. Just one question: Do you keep your working project on your harddrive or do you work with the project on google drive? If you work with the project on google drive, that could be causing the problem. The project folder always has to be on your internal harddrive and in a folder not managed by your operating system.

No, I work on my hard drive. I sent it on Google because I couldn’t figure out how to upload to Github.

@RishMa, I downloaded your project and noticed that your project seems to be created with a beta version of Unity. We do not support alpha or beta versions in this course as they are known for being full of bugs, and they are not meant for creating actual projects with them. Please install a stable version of Unity, import your project into it and test it again. Maybe the problem in your game is caused by a bug in Unity.

If the issue persists after you imported your project into a stable version of Unity and after you generated the lighting for your scenes again, please upload your game again to Google Drive and make sure the Temp and the Library folders are not part of the upload.

Okay. I will keep a note of that. In Section 4 I am using the 2020 LTS version.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms