@@ -17,6 +17,8 @@ public class Bugfender : MonoBehaviour {
1717
1818 public enum LogLevel { Debug , Warning , Error , Trace , Info , Fatal } ;
1919
20+ private const int SDK_VERSION = 20260119 ;
21+
2022#if UNITY_ANDROID && ! UNITY_EDITOR
2123 private static AndroidJavaClass bugfender ;
2224#elif UNITY_IOS && ! UNITY_EDITOR
@@ -64,6 +66,9 @@ public enum LogLevel { Debug, Warning, Error, Trace, Info, Fatal };
6466
6567 [ DllImport ( "__Internal" ) ]
6668 private static extern void BugfenderForceSendOnce ( ) ;
69+
70+ [ DllImport ( "__Internal" ) ]
71+ private static extern void BugfenderSetSDKType ( string sdkType , int version ) ;
6772#endif
6873
6974 // Automatically called when scene starts
@@ -301,4 +306,17 @@ public static void ForceSendOnce()
301306#endif
302307 }
303308
309+ public static void SetSDKType ( string sdkType , int version )
310+ {
311+ #if UNITY_ANDROID && ! UNITY_EDITOR
312+ if ( bugfender != null ) {
313+ bugfender . CallStatic ( "setSDKType" , sdkType , version ) ;
314+ }
315+ #elif UNITY_IOS && ! UNITY_EDITOR
316+ BugfenderSetSDKType ( sdkType , version ) ;
317+ #else
318+ Debug . Log ( "[BF] Set SDK type: " + sdkType + " version: " + version ) ;
319+ #endif
320+ }
321+
304322}
0 commit comments