Skip to content

Commit

Permalink
fix to the scripting defines version so that all unity versions compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed May 19, 2024
1 parent cf1c215 commit 74c1e70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/LDtkUnity/Editor/Utility/LDtkScriptingDefines.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private static void DrawButton()
{
BuildTargetGroup current = EditorUserBuildSettings.selectedBuildTargetGroup;

#if UNITY_2020_1_OR_NEWER
#if UNITY_2021_2_OR_NEWER
NamedBuildTarget group = NamedBuildTarget.FromBuildTargetGroup(current);
string currentDefines = PlayerSettings.GetScriptingDefineSymbols(group);
#else
Expand Down Expand Up @@ -66,7 +66,7 @@ private static void DrawButton()

void SetNewDefines(string newDefines)
{
#if UNITY_2020_1_OR_NEWER
#if UNITY_2021_2_OR_NEWER
PlayerSettings.SetScriptingDefineSymbols(group, newDefines);
#else
PlayerSettings.SetScriptingDefineSymbolsForGroup(current, newDefines);
Expand Down

0 comments on commit 74c1e70

Please sign in to comment.