## 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中如何查找脚本挂载在哪个物体上