__光源__是每个场景必不可少的部分。虽然网格和纹理定义了场景的形状和外观,但光源定义了 3D 环境的颜色和氛围。在每个场景中可能会使用多个光源。让这些光源协同工作需要一些精力,但可能会带来非常令人惊叹的结果。
可通过 GameObject > Light 菜单将光源添加到场景中。然后从出现的子菜单中选择所需的光源格式。添加光源后,可以像任何其他游戏对象一样操作光源。此外,可使用 Component > Rendering > Light 将光源 (Light) 组件添加到任何选定的游戏对象。
光源组件在 Inspector 中提供了许多不同的选项。
只需更改光源的 __Color__,即可为场景提供完全不同的氛围。
Unity 支持不同的__渲染路径__。这些路径主要影响光源和阴影,因此根据游戏要求选择正确的渲染路径可以提高项目的性能。 有关渲染路径的更多信息,可访问渲染路径部分。
有关光源工作原理的更多信息,请参阅光照概述页面。有关如何使用光源组件的更多信息,请查看光照参考。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.