Version: 5.4

Handles.DrawWireCube

Switch to Manual
public static void DrawWireCube (Vector3 center, Vector3 size);

Parameters

center @param position Позиция маркера.
Name="size">Size of the cube.

Description

Рисует каркасный куб с центром в точке center и размером size.

To use this example, save this script in the Assets/Editor folder:

using UnityEngine;
using UnityEditor;

[CustomEditor( typeof( DrawWireCube ) )] public class DrawWireCubeEditor : Editor { void OnSceneGUI( ) { DrawWireCube t = target as DrawWireCube;

Handles.color = Color.yellow; Handles.DrawWireCube( t.transform.position, t.size ); } }

Скрипт, прикрепленный к маркеру:

using UnityEngine;

[ExecuteInEditMode] public class DrawWireCube : MonoBehaviour { public float size = 5; }