diff --git a/.gitignore b/.gitignore index cd79a53c..c5b5192c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ *.sln *.userprefs + +.gitignore diff --git a/Assets/Fungus/Dialog/Editor/AddOptionEditor.cs b/Assets/Fungus/Dialog/Editor/AddOptionEditor.cs index 204763a6..bb76713d 100644 --- a/Assets/Fungus/Dialog/Editor/AddOptionEditor.cs +++ b/Assets/Fungus/Dialog/Editor/AddOptionEditor.cs @@ -35,13 +35,14 @@ namespace Fungus new GUIContent("Target Sequence", "Sequence to execute when this option is selected by the player."), new GUIContent(""), t.GetFungusScript()); + + serializedObject.ApplyModifiedProperties(); + base.DrawCommandGUI(); + serializedObject.Update(); EditorGUILayout.PropertyField(hideOnSelectedProp, new GUIContent("Hide On Selected", "Hide this option forever once the player has selected it.")); - serializedObject.ApplyModifiedProperties(); - - } } diff --git a/Assets/Fungus/Dialog/Editor/ChooseEditor.cs b/Assets/Fungus/Dialog/Editor/ChooseEditor.cs index 5c82b018..7ea2a051 100644 --- a/Assets/Fungus/Dialog/Editor/ChooseEditor.cs +++ b/Assets/Fungus/Dialog/Editor/ChooseEditor.cs @@ -31,9 +31,7 @@ namespace Fungus public override void DrawCommandGUI() { serializedObject.Update(); - - - + CommandEditor.ObjectField(characterProp, new GUIContent("Character", "Character to display in dialog"), new GUIContent(""), @@ -43,7 +41,7 @@ namespace Fungus new GUIContent("Choose Dialog", "Choose Dialog object to use to display the multiple player choices"), new GUIContent(""), ChooseDialog.activeDialogs); - + EditorGUILayout.BeginHorizontal(); EditorGUILayout.PropertyField(chooseTextProp); @@ -51,7 +49,7 @@ namespace Fungus EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); - + GUILayout.FlexibleSpace(); if (GUILayout.Button(new GUIContent("Tag Help", "Show help info for tags"), new GUIStyle(EditorStyles.miniButton))) { @@ -79,7 +77,9 @@ namespace Fungus Texture2D characterTexture = t.character.profileSprite.texture; float aspect = (float)characterTexture.width / (float)characterTexture.height; - Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(250), GUILayout.ExpandWidth(true)); + + Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); + CharacterEditor characterEditor = Editor.CreateEditor(t.character) as CharacterEditor; characterEditor.DrawPreview(previewRect, characterTexture); DestroyImmediate(characterEditor); diff --git a/Assets/Fungus/Dialog/Editor/SayEditor.cs b/Assets/Fungus/Dialog/Editor/SayEditor.cs index 2a738048..0cc2fd16 100644 --- a/Assets/Fungus/Dialog/Editor/SayEditor.cs +++ b/Assets/Fungus/Dialog/Editor/SayEditor.cs @@ -105,7 +105,9 @@ namespace Fungus Texture2D characterTexture = t.character.profileSprite.texture; float aspect = (float)characterTexture.width / (float)characterTexture.height; - Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(250), GUILayout.ExpandWidth(true)); + + Rect previewRect = GUILayoutUtility.GetAspectRect(aspect, GUILayout.Width(100), GUILayout.ExpandWidth(true)); + CharacterEditor characterEditor = Editor.CreateEditor(t.character) as CharacterEditor; characterEditor.DrawPreview(previewRect, characterTexture); DestroyImmediate(characterEditor); diff --git a/Assets/Fungus/Portrait.meta b/Assets/Fungus/Portrait.meta new file mode 100644 index 00000000..7b186d14 --- /dev/null +++ b/Assets/Fungus/Portrait.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 0018d8c9e4d14f043af5b7e5b48e7b50 +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/FungusExamples/Tutorial.meta b/Assets/FungusExamples/Tutorial.meta new file mode 100644 index 00000000..17aaeda5 --- /dev/null +++ b/Assets/FungusExamples/Tutorial.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: febb44a1ff0963a4ab2049cd9139fbaa +folderAsset: yes +DefaultImporter: + userData: