Skip to content

Commit 716cf35

Browse files
authored
Merge branch 'develop' into codex/unity-sdk-3.0.0-native-update
2 parents b0cb809 + fc9ba0d commit 716cf35

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

Runtime/Bugfender.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

Runtime/Plugins/iOS/BugfenderBridge.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,8 @@ void BugfenderForceSendOnce() {
104104
[Bugfender forceSendOnce];
105105
}
106106

107+
void BugfenderSetSDKType(const char* sdkType, int version) {
108+
[Bugfender setSDKType:convertCStringToNSString(sdkType) version:version];
109+
}
110+
107111
}

0 commit comments

Comments
 (0)