MonoBehaviour
- Awake
- CancelInvoke
- FixedUpdate
- InvokeRepeating
- Invoke
- IsInvoking
- LateUpdate
- OnApplicationFocus
- OnApplicationPause
- OnApplicationQuit
- OnBecameInvisible
- OnBecameVisible
- OnCollisionEnter
- OnCollisionExit
- OnCollisionStay
- OnConnectedToServer
- OnControllerColliderHit
- OnDestroy
- OnDisable
- OnDisconnectedFromServer
- OnDrawGizmosSelected
- OnDrawGizmos
- OnEnable
- OnFailedToConnectToM...
- OnFailedToConnect
- OnGUI
- OnJointBreak
- OnLevelWasLoaded
- OnMasterServerEvent
- OnMouseDown
- OnMouseDrag
- OnMouseEnter
- OnMouseExit
- OnMouseOver
- OnMouseUpAsButton
- OnMouseUp
- OnNetworkInstantiate
- OnParticleCollision
- OnPlayerConnected
- OnPlayerDisconnected
- OnPostRender
- OnPreCull
- OnPreRender
- OnRenderImage
- OnRenderObject
- OnSerializeNetworkView
- OnServerInitialized
- OnTriggerEnter
- OnTriggerExit
- OnTriggerStay
- OnWillRenderObject
- Reset
- StartCoroutine
- Start
- StopAllCoroutines
- StopCoroutine
- Update
- useGUILayout
MonoBehaviour.OnDrawGizmos 当绘制Gizmos
function OnDrawGizmos () : void
Description描述
Implement this OnDrawGizmos if you want to draw gizmos that are also pickable and always drawn.
如果你想绘制可被点选的gizmos,执行这个函数。
This allows you to quickly pick important objects in your scene.
这允许你在场景中快速选择重要的物体。
Note that OnDrawGizmos will use a mouse position that is relative to the Scene View.
注意: OnDrawGizmos使用相对鼠标坐标。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnDrawGizmos() {
Gizmos.DrawIcon(transform.position, "Light Gizmo.tiff");
}
}
// Draws the Light bulb icon at position of the object.
//在物体的位置绘制一个灯泡图标
function OnDrawGizmos () {
Gizmos.DrawIcon (transform.position, " Light Gizmo.tiff");
}
最后修改:2011年1月2日 Sunday 17:59