## Transform類提供了查找變換組件、改變位置、角度、大小功能
### Variables變量
* **position**
在世界空間坐標transform的位置。
* **localPosition**
相對于父級的變換的位置。
* **eulerAngles**
旋轉作為歐拉角度。
* **localEulerAngles**
旋轉作為歐拉角度,相對于父級的變換旋轉角度。
* **right**
在世界空間坐標變換的紅色軸。也就是x軸。
* **up**
在世界空間坐標變換的綠色軸。也就是y軸。
* **forward**
在世界空間坐標變換的藍色軸。也就是z軸。
* **rotation**
在世界空間坐標物體變換的旋轉角度作為Quaternion儲存。
* **localRotation**
物體變換的旋轉角度相對于父級的物體變換的旋轉角度。
* **localScale**
相對于父級物體變換的縮放。
* **parent**
物體變換的父級。
* **worldToLocalMatrix**
矩陣變換的點從世界坐標轉為自身坐標(只讀)。
* **localToWorldMatrix**
矩陣變換的點從自身坐標轉為世界坐標(只讀)。
* **root**
返回層次最高的變換。
* **childCount**
變換的子物體數量。
* **lossyScale**
物體的全局縮放(只讀)。
## **Functions函數**
* Translate
移動transform在translation的方向和距離。
* Rotate
應用一個歐拉角的旋轉角度,eulerAngles.z度圍繞z軸,eulerAngles.x度圍繞x軸,eulerAngles.y度圍繞y軸(這樣的順序)。
* RotateAround
按照angle度通過在世界坐標的point軸旋轉物體。
* LookAt
旋轉物體,這樣向前向量指向*target*的當前位置。
* TransformDirection
從自身坐標到世界坐標變換方向。
* InverseTransformDirection
變換方向從世界坐標到自身坐標。和[Transform.TransformDirection](Transform.TransformDirection.html)相反。
* TransformPoint
變換位置從自身坐標到世界坐標。
* InverseTransformPoint
變換位置從世界坐標到自身坐標。和[Transform.TransformPoint](Transform.TransformPoint.html)相反。
* DetachChildren
所有子物體解除父子關系。
* Find
通過名字查找子物體并返回它。
* IsChildOf
這個變換是父級的子物體?
Transform 變換 $(function() { $("ul.tabs").tabs("> .panes", {initialIndex: 1}); });
## Inherited members繼承成員
### Inherited Variables繼承變量
* [transform](../Component/Component.transform.html)
The [Transform](Transform.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[Transform](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [rigidbody](../Component/Component.rigidbody.html)
The [Rigidbody](../Rigidbod/Rigidbody.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[Rigidbody](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [camera](../Component/Component.camera.html)
The [Camera](../Camera/Camera.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[Camera](../Camera/Camera.html)[](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [light](../Component/Component.light.html)
The [Light](../Light/Light.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[Light](../Light/Light.html)[](../Camera/Camera.html)[](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [animation](../Component/Component.animation.html)
The [Animation](../Animation/Animation.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[Animation](../Animation/Animation.html)[](../Light/Light.html)[](../Camera/Camera.html)[](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [constantForce](../Component/Component.constantForce.html)
The [ConstantForce](../ConstantForce/ConstantForce.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[ConstantForce](../ConstantForce/ConstantForce.html)[](../Animation/Animation.html)[](../Light/Light.html)[](../Camera/Camera.html)[](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [renderer](../Component/Component.renderer.html)
The [Renderer](../Renderer/Renderer.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[Renderer](../Renderer/Renderer.html)[](../ConstantForce/ConstantForce.html)[](../Animation/Animation.html)[](../Light/Light.html)[](../Camera/Camera.html)[](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [audio](../Component/Component.audio.html)
The [AudioSource](../AudioSource/AudioSource.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[AudioSource](../AudioSource/AudioSource.html)[](../Renderer/Renderer.html)[](../ConstantForce/ConstantForce.html)[](../Animation/Animation.html)[](../Light/Light.html)[](../Camera/Camera.html)[](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [guiText](../Component/Component.guiText.html)
The [GUIText](../GUIText/GUIText.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[GUIText](../GUIText/GUIText.html)[](../AudioSource/AudioSource.html)[](../Renderer/Renderer.html)[](../ConstantForce/ConstantForce.html)[](../Animation/Animation.html)[](../Light/Light.html)[](../Camera/Camera.html)[](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [networkView](../Component/Component.networkView.html)
The [NetworkView](../NetworkView/NetworkView.html) attached to this [GameObject](../GameObject/GameObject.html) (Read Only). (null if there is none attached)
[NetworkView](../NetworkView/NetworkView.html)[](../GUIText/GUIText.html)[](../AudioSource/AudioSource.html)[](../Renderer/Renderer.html)[](../ConstantForce/ConstantForce.html)[](../Animation/Animation.html)[](../Light/Light.html)[](../Camera/Camera.html)[](../Rigidbod/Rigidbody.html)[](Transform.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(只讀)(如無附加則為空)。
* [guiTexture](../Component/Component.guiTexture.html)
The [GUITexture](../GUITexture/GUITexture.html) attached to this [GameObject](../GameObject/GameObject.html) (Read Only). (null if there is none attached)
[GUITexture](../GUITexture/GUITexture.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(只讀)(如無附加則為空)。
* [collider](../Component/Component.collider.html)
The [Collider](../Collider/Collider.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[Collider](../Collider/Collider.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [hingeJoint](../Component/Component.hingeJoint.html)
The [HingeJoint](../HingeJoint/HingeJoint.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[HingeJoint](../HingeJoint/HingeJoint.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [particleEmitter](../Component/Component.particleEmitter.html)
The [ParticleEmitter](../ParticleEmitter/ParticleEmitter.html) attached to this [GameObject](../GameObject/GameObject.html) (null if there is none attached).
[ParticleEmitter](../ParticleEmitter/ParticleEmitter.html)附加到[GameObject](../GameObject/GameObject.html)(游戲物體)(如無附加則為空)。
* [gameObject](../Component/Component.gameObject.html)
The game object this component is attached to. A component is always attached to a game object.
組件附加的游戲物體。一個組件總是被附加到一個游戲物體。
* [tag](../Component/Component.tag.html)
The tag of this game object.
游戲物體的標簽。
* [name](../Object/Object.name.html)
The name of the object. //物體的名字
* [hideFlags](../Object/Object.hideFlags.html)
Should the object be hidden, saved with the scene or modifiable by the user?
物體是否被隱藏、保存在場景中或被用戶修改?
### Inherited Functions繼承函數
* [GetComponent](../Component/Component.GetComponent.html)
Returns the component of Type type if the game object has one attached, null if it doesn't.
如果游戲物體有一個附加,則返回Type類型的組件,如果沒有則為null。
* [GetComponent.](../Component/Component.GetComponent.ltTgt.html)
* [GetComponent](../Component/Component.GetComponent.html)
Returns the component with name type if the game object has one attached, null if it doesn't.
如果游戲物體有一個附加,則返回名字類型組件,如果沒有則為null。
* [GetComponentInChildren](../Component/Component.GetComponentInChildren.html)
Returns the component of Type type in the [GameObject](../GameObject/GameObject.html) or any of its children using depth first search.
返回Type類型組件,在[GameObject](../GameObject/GameObject.html)或它的任何子物體使用深度優先搜索,僅返回激活的組件。
* [GetComponentInChildren.](../Component/Component.GetComponentInChildren.ltTgt.html)
* [GetComponentsInChildren](../Component/Component.GetComponentsInChildren.html)
Returns all components of Type type in the [GameObject](../GameObject/GameObject.html) or any of its children.
在[GameObject](../GameObject/GameObject.html)或任何它的子物體,返回全部Type類型組件
* [GetComponentsInChildren.](../Component/Component.GetComponentsInChildren.ltTgt.html)
* [GetComponents](../Component/Component.GetComponents.html)
Returns all components of Type type in the [GameObject](../GameObject/GameObject.html).
在游戲物體返回全部Type類型組件。
* [GetComponents.](../Component/Component.GetComponents.ltTgt.html)
* [CompareTag](../Component/Component.CompareTag.html)
Is this game object tagged tag?
游戲物體有被標記標簽么?
* [SendMessageUpwards](../Component/Component.SendMessageUpwards.html)
Calls the method named methodName on every [MonoBehaviour](../MonoBehaviour/MonoBehaviour.html) in this game object and on every ancestor of the behaviour
在游戲物體每一個[MonoBehaviour](../MonoBehaviour/MonoBehaviour.html)和每一個behaviour的祖先上調用名為methodName的方法。
* [SendMessage](../Component/Component.SendMessage.html)
Calls the method named methodName on every [MonoBehaviour](../MonoBehaviour/MonoBehaviour.html) in this game object.
在游戲物體每一個[MonoBehaviour](../MonoBehaviour/MonoBehaviour.html)上調用名為methodName的方法。
* [BroadcastMessage](../Component/Component.BroadcastMessage.html)
Calls the method named methodName on every [MonoBehaviour](../MonoBehaviour/MonoBehaviour.html) in this game object or any of its children.
在游戲物體每一個[MonoBehaviour](../MonoBehaviour/MonoBehaviour.html)和它的全部子物體上調用名為methodName的方法。
* [GetInstanceID](../Object/Object.GetInstanceID.html)
Returns the instance id of the object.
返回物體的實例ID
* [ToString](../Object/Object.ToString.html)
Returns the name of the game object.
返回游戲物體的名稱。
### Inherited Class Functions繼承類函數
* [operator bool](../Object/Object.operator_bool.html)
Does the object exist?
物體是否存在?
* [Instantiate](../Object/Object.Instantiate.html)
Clones the object original and returns the clone.
克隆原始物體,并返回克隆的物體
* [Instantiate.](../Object/Object.Instantiate.ltTgt.html)
* [Destroy](../Object/Object.Destroy.html)
Removes a gameobject, component or asset.
刪除一個游戲物體、組件或資源
* [DestroyImmediate](../Object/Object.DestroyImmediate.html)
Destroys the object obj immediately. It is strongly recommended to use Destroy instead.
立即銷毀物體obj,強烈建議使用Destroy代替。
* [FindObjectsOfType](../Object/Object.FindObjectsOfType.html)
Returns a list of all active loaded objects of Type type.
返回Type類型的所有激活的加載的物體列表
* [FindObjectOfType](../Object/Object.FindObjectOfType.html)
Returns the first active loaded object of Type type.
返回Type類型第一個激活的加載的物體。
* [operator ==](../Object/Object.operator_eq.html)
Compares if two objects refer to the same
比較如果兩個物體相同
* [operator !=](../Object/Object.operator_ne.html)
Compares if two objects refer to a different object
比較如果兩個物體不同
* [DontDestroyOnLoad](../Object/Object.DontDestroyOnLoad.html)
Makes the object target not be destroyed automatically when loading a new scene.
加載新場景的時候使目標物體不被自動銷毀。
- C#
- 基礎 System
- 命名規范
- 變量
- 數據類型
- 值類型
- 簡單類型
- 整數類型
- 字符類型
- 浮點類型
- 布爾類型
- 枚舉類型
- 結構體類型
- 引用類型
- 類類型
- 對象(Object)類型
- 字符串(String)類型
- 方法屬性
- 動態(Dynamic)類型
- 數組類型
- 接口Interface
- 委托類型delegate
- 裝箱和拆箱
- 指針類型
- 值類型與引用類型的區別
- Var類型
- 類型轉換
- 隱式轉換
- 顯式轉換
- 常量
- 常用函數
- 流程控制
- 循環
- 跳轉語句
- 數組
- 數組查找
- 添加組元素
- 復制與克隆數組
- 刪除數組元素
- 數組排序與反轉
- 數組排序
- 冒泡排序
- 直接插入排序
- 選擇排序法
- 數組對象
- 哈希表
- 其他
- 遞歸
- 屬性與方法及方法重載
- 結構與類
- 類
- 構造函數與析構函數
- 繼承
- 多態
- 泛型
- demo
- 漢字字符(串)比較
- 創建指定大小文件與讀取大文件
- 小截屏軟件功能
- 子窗體返回主窗體
- 判斷是否為數字
- 獲得字符串實際長度(包括中文字符)
- unity
- script腳本
- 腳本的生命周期
- 調試
- Unity Manual5.4
- Unity手冊
- Working In Unity
- Unity 2D
- Graphics(圖形)
- Physics(物理系統)
- Scripting(腳本)
- Multiplayer and Networking(多玩家和聯網)
- Audio(音頻)
- Animation(動畫)
- UI
- Navigation and Pathfinding(導航和尋路)
- Unity Services(Unity服務)
- Virtual Reality(虛擬現實VR)
- Open-source repositories(開源代碼庫)
- Platform-specific(特定于平臺的信息)
- Legacy Topics(舊版主題)
- Expert Guides(專家指南)
- 重要的類
- Object
- GameObject(重要)
- Component
- Transform(重要)
- Rigidbody
- ParticleSystem
- Behaviour
- Camera
- Animator
- AudioSource
- Animation
- AudioListener
- Light
- MonoBehaviour事件行為(重要)
- Terrain
- Collider
- Renderer
- Texture
- Mesh
- material
- Time
- Prefab預制件
- 功能demo
- 層級未知查找子物體
- 查找hp最小的敵人
- 查找最近的敵人
- 小項目之英雄無敵
- 界面操作
- Scene窗口
- Game窗口
- project窗口
- Hierarchy窗口
- 動畫
- Animation重要API
- 2D
- Sprite(creator) Sprite Renderer
- Sprite Editor
- Sprite Packer(遺留功能)
- 排序組組件
- 切片精靈
- 精靈遮罩
- 精靈圖集
- Tilemap
- 2D物理系統
- 全局設置(Project setting)
- 2D剛體(Rigidbody 2D)
- 碰撞(事件)消息
- 2D碰撞體(Collider 2D)
- 2D圓形碰撞體(Circle Collider 2D)
- 2D盒型碰撞體(BoxCollider 2D)
- 2D多邊形碰撞體( Polygon Collider 2D)
- 2D邊界碰撞體(EdgeCollider 2D)
- 2D膠囊碰撞體(CapsuleCollider 2D)
- 2D復合碰撞體(Composite Collider 2D)
- 2D物理材質(摩擦和彈性)(Physics Material 2D)
- 2D關節
- 2D距離關節(Distance Joint 2D)
- 2D固定關節(Fixed Joint 2D)
- 2D摩擦關節(Friction Joint 2D)
- 2D鉸鏈關節(Hinge Joint 2D)
- 2D相對關節(Relative Joint 2D)
- 2D滑動關節(Slider Joint 2D)
- 2D彈簧關節(Spring Joint 2D)
- 2D目標關節(Target Joint 2D)
- 2D車輪關節(Wheel Joint 2D)
- 2D恒定力(Constant Force 2D)
- 2D 效應
- 2D區域效應(AreaEffector 2D)
- 2D浮力效應(BuoyancyEffector 2D)
- 2D點效應(PointEffector 2D)
- 2D平臺效應(PlatformEffector 2D)
- 2D表面效應(SurfaceEffector 2D)
- 精靈動畫
- 2D動畫事件
- 重要類
- rigidbody2d
- 小竅門
- Unity中如何查找腳本掛載在哪個物體上