Unity3D说明文档翻译-Creating Components
2017-03-23 10:51
513 查看
Creating Components
创建组件When you create a script and attach it to a GameObject, the script appears in the GameObject’s Inspector just like a Component. This is because
scripts become Components when they are saved - a script is just a specific type of Component. In technical terms, a script compiles as a type of Component, and is treated like any other Component by the Unity engine. So basically, a script is a Component
that you are creating yourself. You will define its members to be exposed in the Inspector, and it will execute whatever functionality you’ve written.
当你创建一个脚本并附加到一个游戏对象上,脚本将显示在对象的检视面板上就像一个组件.这是因为当脚本被保存时脚本变成了组件-一个脚本仅是一个特定类型的组件.在专业术语中,一个脚本编译为一个组件类型,并被Unity引擎视为和任何其他组件一样.所以本质上,一个脚本就是一个组件.你可以定义它的成员来在检视面板上暴露,和它将执行些什么功能.
Read more about creating and using scripts the Scripting section of the manual.
阅读更多关于创建和使用脚本,查看手册的”脚本”部分.
相关文章推荐
- Unity3D说明文档翻译-Input
- Unity3D说明文档翻译-Searching
- Unity3D说明文档翻译-Adding Random Gameplay Elements
- Unity3D说明文档翻译-The Inspector Window
- Unity3D说明文档翻译-Rotation and Orientation in Unity
- Unity3D说明文档翻译-Animation Integration
- Unity3D说明文档翻译--Unity Manual
- Unity3D说明文档翻译-Build Settings
- Unity3D说明文档翻译-Manual Versions
- Unity3D说明文档翻译-Transforms
- Unity3D说明文档翻译Working In Unity
- Unity3D说明文档翻译-Physics Manager
- Unity3D说明文档翻译-New in 5.3
- Unity3D说明文档翻译-Creating Gameplay
- Unity3D说明文档翻译-Cross-Platform Considerations
- Unity3D说明文档翻译-Publishing Builds
- Unity3D说明文档翻译-Basics
- Unity3D说明文档翻译-Network Emulation
- Unity3D说明文档翻译-Scenes
- Unity3D说明文档翻译-Deactivating GameObjects