|
|
@ -7,11 +7,11 @@ using Fungus; |
|
|
|
|
|
|
|
|
|
|
|
namespace Fungus.EditorUtils |
|
|
|
namespace Fungus.EditorUtils |
|
|
|
{ |
|
|
|
{ |
|
|
|
[CustomEditor(typeof(SaveFlowchart))] |
|
|
|
[CustomEditor(typeof(SavePoint))] |
|
|
|
public class SaveFlowchartEditor : CommandEditor |
|
|
|
public class SavePointEditor : CommandEditor |
|
|
|
{ |
|
|
|
{ |
|
|
|
protected SerializedProperty resumeBlockProp; |
|
|
|
protected SerializedProperty resumeBlockProp; |
|
|
|
protected SerializedProperty saveImmediatelyProp; |
|
|
|
protected SerializedProperty saveNowProp; |
|
|
|
|
|
|
|
|
|
|
|
protected virtual void OnEnable() |
|
|
|
protected virtual void OnEnable() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -19,7 +19,7 @@ namespace Fungus.EditorUtils |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
resumeBlockProp = serializedObject.FindProperty("resumeBlock"); |
|
|
|
resumeBlockProp = serializedObject.FindProperty("resumeBlock"); |
|
|
|
saveImmediatelyProp = serializedObject.FindProperty("saveImmediately"); |
|
|
|
saveNowProp = serializedObject.FindProperty("saveNow"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public override void DrawCommandGUI() |
|
|
|
public override void DrawCommandGUI() |
|
|
@ -33,10 +33,10 @@ namespace Fungus.EditorUtils |
|
|
|
serializedObject.Update(); |
|
|
|
serializedObject.Update(); |
|
|
|
|
|
|
|
|
|
|
|
BlockEditor.BlockField(resumeBlockProp, |
|
|
|
BlockEditor.BlockField(resumeBlockProp, |
|
|
|
new GUIContent("Resume Block", "Block to call when save data is loaded again"), |
|
|
|
new GUIContent("Resume Block", "Block to call when save data is loaded again"), |
|
|
|
new GUIContent("<None>"), |
|
|
|
new GUIContent("<None>"), |
|
|
|
flowchart); |
|
|
|
flowchart); |
|
|
|
EditorGUILayout.PropertyField(saveImmediatelyProp); |
|
|
|
EditorGUILayout.PropertyField(saveNowProp); |
|
|
|
|
|
|
|
|
|
|
|
serializedObject.ApplyModifiedProperties(); |
|
|
|
serializedObject.ApplyModifiedProperties(); |
|
|
|
} |
|
|
|
} |