Skip to content

Commit

Permalink
Merge pull request #2 from CarterGames/2.1.6
Browse files Browse the repository at this point in the history
📦 2.1.6 Release
  • Loading branch information
JonathanMCarter authored May 7, 2024
2 parents e87368d + 5003b1f commit 20f696c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public void EditorWindowGUI()

DrawInfoSection();
EditorGUILayout.Space(3.5f);

DrawValuesSection();

// Applies changes only if there are changes made.
Expand All @@ -96,10 +95,6 @@ public override void OnInspectorGUI()
EditorGUILayout.Space(3.5f);
InspectorDrawValues();

// Applies changes only if there are changes made.
if (!EditorGUI.EndChangeCheck()) return;

serializedObject.ApplyModifiedProperties();
serializedObject.Update();
}

Expand Down Expand Up @@ -193,7 +188,7 @@ private void DrawValuesSection()
UtilEditor.DrawHorizontalGUILine();

var prop = serializedObject.GetIterator();

if (prop.NextVisible(true))
{
while (prop.NextVisible(false))
Expand Down Expand Up @@ -234,7 +229,6 @@ private void InspectorDrawValues()

EditorGUI.indentLevel++;


EditorGUILayout.PropertyField(serializedObject.Fp(prop.name).Fpr("value"), new GUIContent(prop.displayName), true);

EditorGUI.indentLevel--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void DrawTab(List<SaveObject> saveObjects)

PerUserSettings.SaveEditorTabScrollRectPos =
EditorGUILayout.BeginScrollView(PerUserSettings.SaveEditorTabScrollRectPos);

foreach (var saveObj in saveObjects)
{
SerializedObject sObj;
Expand All @@ -95,8 +95,13 @@ public void DrawTab(List<SaveObject> saveObjects)

EditorGUILayout.Space(5f);
EditorGUILayout.EndScrollView();

// UtilEditor.CreateDeselectZone(ref deselectRect);

// Force update all elements...
foreach (var lookup in editorsLookup)
{
lookup.Value.serializedObject.ApplyModifiedProperties();
lookup.Value.serializedObject.Update();
}
}


Expand Down Expand Up @@ -229,7 +234,15 @@ private void DrawSaveObjectEditor(SaveObject targetSaveObject)

if (editorsLookup[targetSaveObject].serializedObject.Fp("isExpanded").boolValue)
{
EditorGUI.BeginChangeCheck();
editorsLookup[targetSaveObject].EditorWindowGUI();

if (EditorGUI.EndChangeCheck())
{
editorsLookup[targetSaveObject].serializedObject.ApplyModifiedProperties();
editorsLookup[targetSaveObject].serializedObject.Update();
}

GUILayout.Space(1.5f);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static class AssetVersionData
/// <summary>
/// The version number of the asset.
/// </summary>
public static string VersionNumber => "2.1.5";
public static string VersionNumber => "2.1.6";


/// <summary>
Expand All @@ -40,6 +40,6 @@ public static class AssetVersionData
/// <remarks>
/// Asset owner is in the UK, so its D/M/Y format.
/// </remarks>
public static string ReleaseDate => "17/04/2024";
public static string ReleaseDate => "07/05/2024";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public enum EncryptionOption
/// <summary>
/// Doesn't use encryption & the save data will be saved in plain JSON text.
/// </summary>
[InspectorName("Disabled (Not Recommended | Debug)")] Disabled,
[InspectorName("Disabled (Plain Text)")] Disabled,


/// <summary>
Expand Down

0 comments on commit 20f696c

Please sign in to comment.