SceneManager.LoadScene调用后新场景会变暗的问题
根据百度贴吧的帖子,来到http://answers.Unity3D.com/questions/919940/applicationloadlevel-changes-lighting-for-some-rea.html
这篇文章说他重新load场景后的渲染会变黑,和我们出现的问题一样(不过根据内容,编译成可执行文件就不会有问题了,这只是编译器的问题)
回答
1.
To fix it in the Editor, Go to Window -> Lighting -> Lightmap Tab -> Disable Continuous Baking -> Press Build to bake the lighting once manually.
Note that if you add more lights or make some changes, you have to bake the lightmap again.
在编辑器Window -> Lighting -> Lightmap Tab -> Disable Continuous Baking -> Press Build 手工编译光源一次,如果增加新光源,从新编译一次,就会有新光源地图了。
2.In both of your scenes go to Window --> Lighting --> Lightmaps and disable auto and manually click Bake. Leave the auto checkbox off. Do this for both of your scenes, the start menu scene and your game scene. In both scenes the auto checkbox must be off and have a lightmap snapshot up above in the lightmap snapshot field.
在你所有的场景中Window --> Lighting --> Lightmaps中去掉自动,手动点次Bake(Building)。所有的场景自动编译都取消,手动编译所有场景就好了。
Unity5.3
更改成如我上图这样,去掉下方Auto,点次Build,Lighting Data Asset从None变为现在有东西就好了,似乎就是场景光源没编译的问题,难道是自动无效?
/////个人设置Window --> Lighting --> Lightmaps中去掉自动,手动点次Bake(Building) 则可以恢复正常