diff --git a/src/MoonSharp.Interpreter/Loaders/UnityAssetsScriptLoader.cs b/src/MoonSharp.Interpreter/Loaders/UnityAssetsScriptLoader.cs index 7db23081..a4747f98 100755 --- a/src/MoonSharp.Interpreter/Loaders/UnityAssetsScriptLoader.cs +++ b/src/MoonSharp.Interpreter/Loaders/UnityAssetsScriptLoader.cs @@ -31,7 +31,7 @@ public class UnityAssetsScriptLoader : ScriptLoaderBase public UnityAssetsScriptLoader(string assetsPath = null) { assetsPath = assetsPath ?? DEFAULT_PATH; -#if UNITY_5 +#if UNITY_5 || UNITY_2017_1_OR_NEWER LoadResourcesUnityNative(assetsPath); #else LoadResourcesWithReflection(assetsPath); @@ -48,7 +48,7 @@ public UnityAssetsScriptLoader(Dictionary scriptToCodeMap) m_Resources = scriptToCodeMap; } -#if UNITY_5 +#if UNITY_5 || UNITY_2017_1_OR_NEWER void LoadResourcesUnityNative(string assetsPath) { try diff --git a/src/MoonSharp.Interpreter/Platforms/PlatformAutoDetector.cs b/src/MoonSharp.Interpreter/Platforms/PlatformAutoDetector.cs index b1765517..c8f62023 100755 --- a/src/MoonSharp.Interpreter/Platforms/PlatformAutoDetector.cs +++ b/src/MoonSharp.Interpreter/Platforms/PlatformAutoDetector.cs @@ -84,7 +84,7 @@ private static void AutoDetectPlatformFlags() IsUnityNative = true; #endif #else -#if UNITY_5 +#if UNITY_5 || UNITY_2017_1_OR_NEWER IsRunningOnUnity = true; IsUnityNative = true;