private void DrawZone(Zone zone)
        {
            EditorGUILayout.BeginHorizontal();

            if (GUILayout.Button("X", EditorToolkit.CloseButtonLayoutOption()))
            {
                GameObject.DestroyImmediate(zone.gameObject);
                return;
            }

            if (zone.messageReceiver == null && zone.triggerType == Zone.ZoneTriggerTypes.SendMessage)
            {
                EditorGUILayout.LabelField(
                    string.Format("{0} (no receiver)", zone.gameObject.name),
                    EditorToolkit.ErrorLabelStyle()
                    );
            }
            else
            {
                zone.gameObject.name = EditorGUILayout.TextField(
                    zone.gameObject.name,
                    EditorToolkit.BoundaryGroupSytle(zone.color)
                    );
            }

            if (GUILayout.Button("Go >", EditorToolkit.GoButtonLayoutOption()))
            {
                Selection.activeGameObject = zone.gameObject;
            }

            EditorGUILayout.EndHorizontal();
        }
示例#2
0
        private void ShowGroup(Group group)
        {
            EditorGUILayout.BeginHorizontal();

            if (GUILayout.Button("X", EditorToolkit.CloseButtonLayoutOption()))
            {
                GameObject.DestroyImmediate(group.gameObject);
                return;
            }

            group.gameObject.name = EditorGUILayout.TextField(
                group.gameObject.name,
                EditorToolkit.BoundaryGroupSytle(group.color)
                );

            if (GUILayout.Button("Go >", EditorToolkit.GoButtonLayoutOption()))
            {
                Selection.activeGameObject = group.gameObject;
            }

            EditorGUILayout.EndHorizontal();
        }