本文档的这一部分包含 Unity 提供的脚本 API 的详细信息。要使用这些信息,应熟悉 Unity 中的脚本基本理论和实践;有关具体内容,请参阅我们手册的“脚本”部分。
脚本参考是根据脚本可用的类进行组织的,此外还会提供这些类的方法、属性以及与其用法相关的任何其他信息。
这些页面提供了广泛的示例代码,您可以随意将其用于任何目的,无需知会 Unity。使用每一页顶部的菜单可按 C# 或 JavaScript 语言查看这些示例。请注意,无论使用哪种语言,API 都是相同的,因此语言的选择完全取决于个人偏好。
API 按其所属的命名空间进行分组,可从左侧的侧栏中进行选择。对于大多数用户,UnityEngine 部分将是主要的调用端口。
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.