Skip to content

Commit

Permalink
Fix local debug changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpiroman committed Sep 19, 2019
1 parent 8bbee96 commit c5ffb0a
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions scripts/LowLevelPluginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ public static void Initialize()
if (_unityInterfacePtr == IntPtr.Zero)
throw new Exception($"{nameof(GetUnityInterfacesPtr)} returned null");
}
catch(DllNotFoundException ex)
catch(DllNotFoundException)
{
Debug.Log(ex);
Debug.LogWarning("Stub native plugin not found. Low level native callback won't fire. If you didn't install this tool via Unity package, you'll need to build it manually ");
}

Debug.Log("Initialize()");
}

public static void OnDllLoaded(NativeDll dll)
Expand All @@ -44,10 +42,7 @@ public static void OnDllLoaded(NativeDll dll)

DllManipulator.LoadTargetFunction(unityPluginLoadFunc, true);
if (unityPluginLoadFunc.@delegate != null)
{
((UnityPluginLoadDel)unityPluginLoadFunc.@delegate)(_unityInterfacePtr);
Debug.Log("Called UnityPluginLoad");
}
}

public static void OnBeforeDllUnload(NativeDll dll)
Expand All @@ -58,9 +53,7 @@ public static void OnBeforeDllUnload(NativeDll dll)

DllManipulator.LoadTargetFunction(unityPluginUnloadFunc, true);
if (unityPluginUnloadFunc.@delegate != null)
{
Debug.Log("Called UnityPluginUnload");
}
((UnityPluginUnloadDel)unityPluginUnloadFunc.@delegate)();
}

delegate void UnityPluginLoadDel(IntPtr unityInterfaces);
Expand Down

0 comments on commit c5ffb0a

Please sign in to comment.