Skip to content

Commit

Permalink
Fix compile errors with Unity versions before 2022.2
Browse files Browse the repository at this point in the history
  • Loading branch information
seanb-22ct committed Aug 22, 2023
1 parent e8c30b4 commit 175b212
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,11 @@ private void ForceDeselectAndExit()

private void InternalSaveChanges()
{
#if UNITY_2022_2_OR_NEWER
SaveChanges();
#else
ApplyAndImport();
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ public override void OnEnable()
base.OnEnable();
}

#if UNITY_2022_2_OR_NEWER
public override void DiscardChanges()
{
base.DiscardChanges();
CacheSerializedProperites();
}
#endif

protected void ShowTiledAssetGui()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ public override void OnEnable()
base.OnEnable();
}

#if UNITY_2022_2_OR_NEWER
public override void DiscardChanges()
{
base.DiscardChanges();
CacheSerializedProperites();
}
#endif

protected override void InternalOnInspectorGUI()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ public override void OnEnable()
m_ShowAtlasSettings.value = m_UseSpriteAtlas.boolValue;
}

#if UNITY_2022_2_OR_NEWER
public override void DiscardChanges()
{
base.DiscardChanges();
CacheSerializedProperites();
}
#endif

private void CacheSerializedProperites()
{
Expand Down

0 comments on commit 175b212

Please sign in to comment.