The problem of changing the scene in Unity3d may cause the material to darken

Source: Internet
Author: User

Unity version: 5.1.1F1

Do the company project, inadvertently found a very strange phenomenon: Scene A (pure UI, so no light source) transition to scene B when, B, some light source seems to be invalid, but in the hierarchy window can see the light source exists, adjust the light source of the brightness parameters, the effect is also some, It just looks still very dark.

There is no problem with loading the B scene directly.

Explain the problem. I made two scenes, a scene without lights, and a button to jump to the B scene:

  

B scene has a light source, there is a jump to a scene button, but also put a cylinder for the performance of material problems:

  

This is the effect of loading the B scene directly:

  

This is the effect of the jump B scene from a scene:

  

As you can see, the light is not dimmed (the Sky box does not change), but the cylinder itself darkens.

Then we look at the cylindrical material, we can see from a scene into the B scene, the material really changed (the material ball itself has changed, the other values have not changed):

  

The default material used by the cylinder does not have any settings in the code.

The only difference between the two scenes is that one has a light source and the other is not. Presumably the reason for this is the change in the material ball caused by the light source.

  

Start in the following order: A->b->a->b, the problem remains;

B->a->b, Normal.

  

Can see from the scene without light to start, the material ball will be dimmed, and from the scene of light to start, there will be no change, so the solution came out: to start the scene (scene a) to add a light source is OK . Because scene A is a purely UI part, adding a light source does not affect the performance of the UI.

Because you do not see the underlying code, you do not know why it is caused. Does this count as a u3d bug?

The problem of changing the scene in Unity3d may cause the material to darken

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.