Skip to content

Commit

Permalink
Merge pull request #24 from dj-kusuha/fix_il2cpp_runtime_error
Browse files Browse the repository at this point in the history
fixed a runtime error when using the IL2CPP scripting backend
  • Loading branch information
hecomi authored Sep 11, 2018
2 parents 70cfad9 + f7798f7 commit 8a6cee9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Assets/uDesktopDuplication/Scripts/Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,13 @@ static public Monitor primary
private float reinitializationTimer_ = 0f;
private bool isFirstFrame_ = true;

public static event Lib.DebugLogDelegate onDebugLog = msg => Debug.Log(msg);
public static event Lib.DebugLogDelegate onDebugErr = msg => Debug.LogError(msg);
public static event Lib.DebugLogDelegate onDebugLog = OnDebugLog;
public static event Lib.DebugLogDelegate onDebugErr = OnDebugErr;

[AOT.MonoPInvokeCallback(typeof(Lib.DebugLogDelegate))]
private static void OnDebugLog(string msg) { Debug.Log(msg); }
[AOT.MonoPInvokeCallback(typeof(Lib.DebugLogDelegate))]
private static void OnDebugErr(string msg) { Debug.LogError(msg); }

public delegate void ReinitializeHandler();
public static event ReinitializeHandler onReinitialized;
Expand Down

0 comments on commit 8a6cee9

Please sign in to comment.