I’m getting Failed to import glb model from bytes. Object reference not set to an instance of an object.
as the failure reason. This is (most of) the code that loads the avatar:
private void Start()
{
_avatarObjectLoader = new AvatarObjectLoader();
_avatarObjectLoader.OnCompleted += OnAvatarLoadingCompleted;
_avatarObjectLoader.OnFailed += OnAvatarLoadingFailed;
_avatarObjectLoader.LoadAvatar(overrideAvatar ?? SaveSystem.AppUserData.AvatarUrl ?? DefaultFemaleAvatar);
}
private void OnAvatarLoadingFailed(object _, FailureEventArgs args)
{
Debug.LogError($"Failed to load avatar: {args.Message}");
}
private void OnAvatarLoadingCompleted(object _, CompletionEventArgs args)
{
... Game logic ...
}
It works in the editor, but not in the build.
Unity version: 6000.0.23f1
Build target: Android, API level 29 (min), API level 32 (target)
Device: Meta Quest 3
I have also confirmed that downgrading to the previous version of the SDK fixes this issue.