- HoloLens Beginner's Guide
- Jason Odom
- 221字
- 2021-07-02 23:35:16
Components
Components add additional functionality to a GameObject. These components come in many forms. Here are some of the components we already have or will see in this chapter:
- Transform: The job of this component is to define the position, rotation, and scale of each GameObject in a scene. This is the minimum defining element of a GameObject, so all GameObjects have one.
- Camera component: We have seen this component when we set up the camera earlier in this chapter.
- Mesh renderer: This handles details of lighting and materials.
- Rigidbody: This component allows you to control how the GameObject reacts to physics.
- Box collider: This component adds a way to detect and react to collisions in the program.
As a point of reference, a simple cube is made up of five components. First we have the Transform component, whose job it is to set the Position, Rotation, and Scale of the object it is attached to. Another component is Box Collider, which provides the unity system with the ability to know when the object hits another object.
We also have the Mesh Renderer, here we can set certain properties involving materials and lighting. We can tell the object whether we want it to cast or receive shadows, we can change the materials applied to the 3D object as well.

推薦閱讀
- 深入理解Android(卷I)
- Objective-C應(yīng)用開發(fā)全程實錄
- 機(jī)器人Python青少年編程開發(fā)實例
- Visual C++串口通信技術(shù)詳解(第2版)
- Silverlight魔幻銀燈
- HTML5入門經(jīng)典
- 琢石成器:Windows環(huán)境下32位匯編語言程序設(shè)計
- 量化金融R語言高級教程
- 新一代SDN:VMware NSX 網(wǎng)絡(luò)原理與實踐
- LabVIEW虛擬儀器程序設(shè)計從入門到精通(第二版)
- Arduino計算機(jī)視覺編程
- 新印象:解構(gòu)UI界面設(shè)計
- Arduino電子設(shè)計實戰(zhàn)指南:零基礎(chǔ)篇
- Solr權(quán)威指南(下卷)
- JavaWeb從入門到精通(視頻實戰(zhàn)版)