Closed rubit0 closed 2 years ago
Hello @rubit0 ,
Normal runtime errors can be read through Android Studio logcat for compiled Android Unity apps and through xcode in its output area. Messages can also be printed or sent from the Unity SDK/code into either of these consoles.
Test Unity C# code:
throw new System.Exception("Test C# exception manually thrown in Unity script");
An example console output in iOS:
Exception: Test C# exception manually thrown in Unity script
at NewBehaviourScript.Start () [0x00000] in <00000000000000000000000000000000>:0
Your title mentioned Crash Analytics specifically, were you looking for some sort of dashboard or deeper aggregation and analysis of Unity crashes? One easy solution is to log the errors as events in an Amplitude project. Let me know of any more concerns.
Dante
@rubit0 You mean something like Fabric? Amplitude doesn't help application tracking crashes.
@dantetam I'm referring to if Amplitude can automatically report app crashes to some kind of event log. Not in logcat or xcode but in Amplitude so that I can reason about why something is crashing - a fancy dashboard for that is not needed though. Also regarding c# Exceptions, my question was more about if the Amplitude Unity SDK can also automatically report all runtime exceptions, if not, then its no problem since I can easily add that like this:
AppDomain.CurrentDomain.FirstChanceException += (sender, args) => { //Trigger Amplitude log event thing };
@haoliu-amp do you have a link to Fabric? I can't find it via Google in context to Unity as that term always lead to cloth simulation related topics 😅
@rubit0 I see, to track exception coming from Unity itself. The way you proposed is correct. I also don't see Fabric has a SDK for Unity too.
Summary
Can amplitude report crashes on Android/iOS platform and also general c# Exceptions?