Gizmos.DrawWireCube 绘制线框立方体

static function DrawWireCube (center : Vector3, size : Vector3) : void

Description描述

Draw a wireframe box with center and size.

使用center和size参数,绘制一个线框立方体。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	void OnDrawGizmosSelected() {
		Gizmos.color = Color.yellow;
		Gizmos.DrawWireCube(transform.position, new Vector3(1, 1, 1));
	}
}
function OnDrawGizmosSelected () {
	// Draw a yellow cube at the transforms position
	//绘制一个黄色立方体,在变换的位置
	Gizmos.color = Color.yellow;
	Gizmos.DrawWireCube (transform.position, Vector3 (1,1,1));
}
Page last updated: 2010-12-26