Skip to content

Commit 76e5c38

Browse files
nansoftingJoy-less
authored andcommitted
Added compatibility with Unity 2017+
1 parent 4afcf71 commit 76e5c38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/MoonSharp.Interpreter/Loaders/UnityAssetsScriptLoader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class UnityAssetsScriptLoader : ScriptLoaderBase
3131
public UnityAssetsScriptLoader(string assetsPath = null)
3232
{
3333
assetsPath = assetsPath ?? DEFAULT_PATH;
34-
#if UNITY_5
34+
#if UNITY_5 || UNITY_2017_1_OR_NEWER
3535
LoadResourcesUnityNative(assetsPath);
3636
#else
3737
LoadResourcesWithReflection(assetsPath);
@@ -48,7 +48,7 @@ public UnityAssetsScriptLoader(Dictionary<string, string> scriptToCodeMap)
4848
m_Resources = scriptToCodeMap;
4949
}
5050

51-
#if UNITY_5
51+
#if UNITY_5 || UNITY_2017_1_OR_NEWER
5252
void LoadResourcesUnityNative(string assetsPath)
5353
{
5454
try

src/MoonSharp.Interpreter/Platforms/PlatformAutoDetector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private static void AutoDetectPlatformFlags()
8484
IsUnityNative = true;
8585
#endif
8686
#else
87-
#if UNITY_5
87+
#if UNITY_5 || UNITY_2017_1_OR_NEWER
8888
IsRunningOnUnity = true;
8989
IsUnityNative = true;
9090

0 commit comments

Comments
 (0)