public void OnEnable() { this.me = (KinectPlayArea)base.target; this.editor = null; this.settingsProperty = base.serializedObject.FindProperty("settings"); this.enableInEditorProperty = base.serializedObject.FindProperty("enableInEditor"); }
public static void PlayAreaGizmos(KinectPlayArea playArea, GizmoType type) { if (playArea.Settings == null) { return; } Vector3[] coordinates = playArea.GetWorldCoordinates(); Gizmos.color = new Color(0.6f, 0.4f, 0.8f); Gizmos.DrawLine(coordinates[0], coordinates[1]); Gizmos.DrawLine(coordinates[1], coordinates[2]); Gizmos.DrawLine(coordinates[2], coordinates[3]); Gizmos.DrawLine(coordinates[3], coordinates[0]); Gizmos.DrawLine(coordinates[0], coordinates[0] + Vector3.up * 0.1f); Gizmos.DrawLine(coordinates[1], coordinates[1] + Vector3.up * 0.1f); Gizmos.DrawLine(coordinates[2], coordinates[2] + Vector3.up * 0.1f); Gizmos.DrawLine(coordinates[3], coordinates[3] + Vector3.up * 0.1f); }