Skip to content

Commit 4bfe95e

Browse files
committed
Fix namespacing issues between Unity <6.4 and >=6.4
1 parent cf80b14 commit 4bfe95e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/Runtime/RuntimeTestUtility.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ Yarn Spinner is licensed to you under the terms found in the file LICENSE.md.
1010

1111
#if UNITY_EDITOR
1212
using UnityEditor;
13+
14+
#if UNITY_6000_4_OR_NEWER
15+
using UnityGUID = UnityEngine.GUID;
16+
#else
17+
using UnityGUID = UnityEditor.GUID;
18+
#endif
19+
1320
#endif
1421

1522
namespace Yarn.Unity.Tests
@@ -36,7 +43,7 @@ public static void AddSceneToBuild(string GUID)
3643
}
3744

3845
// Add the test scene
39-
var dialogueRunnerTestScene = new EditorBuildSettingsScene(new UnityEngine.GUID(GUID), true);
46+
var dialogueRunnerTestScene = new EditorBuildSettingsScene(new UnityGUID(GUID), true);
4047
EditorBuildSettings.scenes = EditorBuildSettings.scenes.Concat(new[] { dialogueRunnerTestScene }).ToArray();
4148
#endif
4249
}

0 commit comments

Comments
 (0)