本节介绍使用 Unity 时可能出现的常见问题。本节分别介绍每个平台。
由于视频驱动程序存在错误,macOS 10.6.4 上的 GeForce 7300 GT 无法正确显示材质,因此系统禁用了延迟渲染。
当 Visual Studio 报告它未能打开您的脚本时,就会发生这种情况。最常见的原因是外部插件在 Unity 之外创建的一组代码,用于在 Unity 中创建功能。在 Unity 中可以使用两种类型的插件:托管插件(使用 Visual Studio 等工具创建的托管 .NET 程序集)和原生插件(特定于平台的原生代码库)。更多信息
参见 词汇表(如 ReSharper)在启动时显示对话框,请求用户输入。这会导致 Visual Studio 报告它未能打开。
如果您的显卡驱动程序没有更新到最新版本,可能会出现这种情况。请确保您拥有来自显卡供应商的最新官方驱动程序。
对象的渲染器必须启用接收阴影才能在其上渲染阴影。此外,对象必须启用投射阴影才能在其他对象上投射阴影(两者默认情况下都已启用)。
只有不透明对象才能投射和接收阴影。这意味着使用内置透明或粒子着色器的对象不会投射阴影。通常可以使用透明切除着色器来处理栅栏、植被等对象。如果您使用自定义编写的着色器在 GPU 上运行的程序。更多信息
参见 词汇表,则它们必须是像素光照的,并使用几何体渲染队列。使用顶点光照着色器的对象不会接收阴影,但可以投射阴影。
只有像素光才能投射阴影。如果您希望确保灯光始终投射阴影,无论场景中还有多少其他灯光,则可以将其设置为强制像素渲染模式(请参阅灯光参考页面)。
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.