Gizmos.DrawSphere 绘制球体
static function DrawSphere (center : Vector3, radius : float) : void
Description描述
Draws a solid sphere with center and radius.
使用center和radius参数,绘制一个实心球体。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void OnDrawGizmosSelected() {
Gizmos.color = Color.yellow;
Gizmos.DrawSphere(transform.position, 1);
}
}
function OnDrawGizmosSelected () {
// Draw a yellow sphere at the transform's position
//在变换的位置,绘制一个黄色球体
Gizmos.color = Color.yellow;
Gizmos.DrawSphere (transform.position, 1);
}
最后修改:2010年12月25日 Saturday 23:34