格式
typescript
Gizmos.DrawIcon(center, texture, allowScaling, tint)所属类: Gizmos
描述
绘制一个图标。
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| center | Vector3 | 中心坐标 |
| texture | Texture2D | 纹理 |
| allowScaling | boolean? | 是否允许缩放 |
| tint | Color? | 着色 |
返回值
| 类型 | 描述 |
|---|---|
void |
代码示例
typescript
OnUpdate(): void {
let center = new Vector3(1,1,1);
let texture = Resources.Load<Texture2D>(Texture2D,"assetsID");
Gizmos.DrawIcon(center,texture);
}