From 60e8b3ac49d623803245fee369529952dc221658 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 24 Feb 2015 23:51:02 +0000 Subject: [PATCH] Removed Command prefix label #84 --- .../FungusScript/Editor/CommandEditor.cs | 19 +------- .../FungusExamples/TheHunter/TheHunter.unity | 44 ++++++++++++++++++- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/Assets/Fungus/FungusScript/Editor/CommandEditor.cs b/Assets/Fungus/FungusScript/Editor/CommandEditor.cs index 0a9e2f7b..8887165c 100644 --- a/Assets/Fungus/FungusScript/Editor/CommandEditor.cs +++ b/Assets/Fungus/FungusScript/Editor/CommandEditor.cs @@ -47,8 +47,6 @@ namespace Fungus return; } - EditorGUILayout.PrefixLabel(new GUIContent("Command")); - GUILayout.BeginVertical(GUI.skin.box); if (t.enabled) @@ -150,20 +148,8 @@ namespace Fungus objectNames.Add(nullLabel); for (int i = 0; i < objectList.Count; ++i) { - string formattedName = ""; - if (objectList[i] != null) - { - if ( typeof(T).IsSubclassOf(typeof(MonoBehaviour)) == true ) - { - formattedName = objectList[i].name; - } - else - { - formattedName = objectList[i].ToString(); - formattedName = formattedName.Substring(0, formattedName.LastIndexOf("(") - 1); - } - } - objectNames.Add(new GUIContent(formattedName)); + if (objectList[i] == null) continue; + objectNames.Add(new GUIContent(objectList[i].name)); if (selectedObject == objectList[i]) { @@ -186,5 +172,4 @@ namespace Fungus property.objectReferenceValue = result; } } - } diff --git a/Assets/FungusExamples/TheHunter/TheHunter.unity b/Assets/FungusExamples/TheHunter/TheHunter.unity index adffffcc..9014632d 100644 --- a/Assets/FungusExamples/TheHunter/TheHunter.unity +++ b/Assets/FungusExamples/TheHunter/TheHunter.unity @@ -2624,8 +2624,8 @@ MonoBehaviour: m_EditorClassIdentifier: nodeRect: serializedVersion: 2 - x: 106.654449 - y: -380.268433 + x: 107.654449 + y: -378.268433 width: 125 height: 40 sequenceName: Check for fish @@ -3772,6 +3772,46 @@ Prefab: m_RootGameObject: {fileID: 700450243} m_IsPrefabParent: 0 m_IsExploded: 1 +--- !u!1 &1897260604 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 162616, guid: fc60ec7d1547709459b3b733d4162575, type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1897260606} + - 114: {fileID: 1897260605} + m_Layer: 0 + m_Name: Prefabs + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1897260605 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11462616, guid: fc60ec7d1547709459b3b733d4162575, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1897260604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 0} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1897260606 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 462616, guid: fc60ec7d1547709459b3b733d4162575, type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1897260604} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 --- !u!1 &2006673388 GameObject: m_ObjectHideFlags: 0