File tree 4 files changed +14
-16
lines changed
UnityChatDemo/Assets/AgoraChat/AgoraChat 4 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class LogPrinter
11
11
public static void Log ( object message )
12
12
{
13
13
#if ! _WIN32
14
- Debug . Log ( "UNITYSDK: " + message ) ;
14
+ // Debug.Log("UNITYSDK: " + message);
15
15
#endif
16
16
}
17
17
}
Original file line number Diff line number Diff line change 1
1
using AgoraChat . SimpleJSON ;
2
2
using System ;
3
3
using System . Runtime . InteropServices ;
4
+ #if ! _WIN32
5
+ using UnityEngine ;
6
+ #endif
4
7
5
8
namespace AgoraChat
6
9
{
@@ -104,18 +107,14 @@ internal NativeListener()
104
107
} ;
105
108
}
106
109
107
- internal class MonoPInvokeCallbackAttribute : Attribute
108
- {
109
- public MonoPInvokeCallbackAttribute ( Type t ) { }
110
- }
111
-
112
- [ MonoPInvokeCallback ( typeof ( NativeListenerEvent ) ) ]
110
+ #if ! _WIN32
111
+ [ AOT . MonoPInvokeCallback ( typeof ( NativeListenerEvent ) ) ]
113
112
public static void OnRunCallback ( string listener , string method , string jsonString )
114
113
{
115
114
LogPrinter . Log ( $ "OnRunCallback listener: { listener } , method: { method } , jsonString: { jsonString } ") ;
116
115
SDKClient . Instance . _clientImpl . nativeListener . nativeListenerEvent ? . Invoke ( listener , method , jsonString ) ;
117
116
}
118
-
117
+ #endif
119
118
~ NativeListener ( )
120
119
{
121
120
queue_worker . ClearQueue ( ) ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class LogPrinter
11
11
public static void Log ( object message )
12
12
{
13
13
#if ! _WIN32
14
- Debug . Log ( "UNITYSDK: " + message ) ;
14
+ // Debug.Log("UNITYSDK: " + message);
15
15
#endif
16
16
}
17
17
}
Original file line number Diff line number Diff line change 1
1
using AgoraChat . SimpleJSON ;
2
2
using System ;
3
3
using System . Runtime . InteropServices ;
4
+ #if ! _WIN32
5
+ using UnityEngine ;
6
+ #endif
4
7
5
8
namespace AgoraChat
6
9
{
@@ -104,18 +107,14 @@ internal NativeListener()
104
107
} ;
105
108
}
106
109
107
- internal class MonoPInvokeCallbackAttribute : Attribute
108
- {
109
- public MonoPInvokeCallbackAttribute ( Type t ) { }
110
- }
111
-
112
- [ MonoPInvokeCallback ( typeof ( NativeListenerEvent ) ) ]
110
+ #if ! _WIN32
111
+ [ AOT . MonoPInvokeCallback ( typeof ( NativeListenerEvent ) ) ]
113
112
public static void OnRunCallback ( string listener , string method , string jsonString )
114
113
{
115
114
LogPrinter . Log ( $ "OnRunCallback listener: { listener } , method: { method } , jsonString: { jsonString } ") ;
116
115
SDKClient . Instance . _clientImpl . nativeListener . nativeListenerEvent ? . Invoke ( listener , method , jsonString ) ;
117
116
}
118
-
117
+ #endif
119
118
~ NativeListener ( )
120
119
{
121
120
queue_worker . ClearQueue ( ) ;
You can’t perform that action at this time.
0 commit comments