Unity SDK Bug report

In the AvatarObjectLoader.cs there is a problem with the exception handling.

in private async void Load(string url) only CustomException are being cached. Because this is an async void function, other expections are lost

            try
            {
                context = await executor.Execute(context);
            }
            catch (CustomException exception)
            {
                Failed(executor.IsCancelled ? FailureType.OperationCancelled : exception.FailureType, exception.Message);
                return;
            }

For example, in the editor, if trying to load two avatars with the same glb url at the same time, a native exception ¨Failed to create file¨ is thrown, but there is no way to catch it

The sdk code needs to be fixed to catch other exceptions:

            try
            {
                context = await executor.Execute(context);
            }
            catch (CustomException exception)
            {
                Failed(executor.IsCancelled ? FailureType.OperationCancelled : exception.FailureType, exception.Message);
                return;
            }
            catch (Excpetion exception) // Propagate unknown exceptions
            {
                Failed(FailureType.Unknown, exception.Message);
                return;
            }

This would allow the caller to handel other unknown exceptions. The current behaviour is that the LoadAvatarAsync never completes, if an unknown exception occurs

Hello,
We shared the feedback with the team, and it will be fixed soon.
Thank you
Edit: This is now fixed and will be part of the new next week SDK release :slight_smile: