Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Runtime/LLMUnitySetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public static async Task AndroidExtractFile(string assetName, bool overwrite = f
{
if (!androidExtractTasks.TryGetValue(assetName, out extractionTask))
{
#if UNITY_ANDROID
#if !UNITY_EDITOR && UNITY_ANDROID
extractionTask = AndroidExtractFileOnce(assetName, overwrite, log, chunkSize);
#else
extractionTask = Task.CompletedTask;
Expand Down
8 changes: 4 additions & 4 deletions Runtime/LlamaLib/LibraryLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static IntPtr LoadLibrary(string libraryPath)
if (string.IsNullOrEmpty(libraryPath))
throw new ArgumentNullException(nameof(libraryPath));

#if (ANDROID || IOS || VISIONOS) || (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS)
#if (ANDROID || IOS || VISIONOS) || (!UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS))
return Mobile.dlopen(libraryPath);
#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand All @@ -64,7 +64,7 @@ public static IntPtr GetSymbol(IntPtr library, string symbolName)
if (string.IsNullOrEmpty(symbolName))
throw new ArgumentNullException(nameof(symbolName));

#if (ANDROID || IOS || VISIONOS) || (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS)
#if (ANDROID || IOS || VISIONOS) || (!UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS))
return Mobile.dlsym(library, symbolName);
#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand All @@ -86,7 +86,7 @@ public static void FreeLibrary(IntPtr library)
if (library == IntPtr.Zero)
return;

#if (ANDROID || IOS || VISIONOS) || (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS)
#if (ANDROID || IOS || VISIONOS) || (!UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS))
Mobile.dlclose(library);
#else
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
Expand Down Expand Up @@ -192,7 +192,7 @@ private static class Mobile
{
public static IntPtr dlopen(string path) => dlopen(path, 1);

#if (ANDROID || IOS || VISIONOS) || (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS)
#if (ANDROID || IOS || VISIONOS) || (!UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS || UNITY_VISIONOS))
[DllImport("__Internal")]
public static extern IntPtr dlopen(string filename, int flags);

Expand Down
Loading