From e4e8350b253c85c76e39da6361b15a3689d9e67d Mon Sep 17 00:00:00 2001 From: Harrison Hough Date: Thu, 25 Apr 2024 08:45:29 +0300 Subject: [PATCH] fix: set config before load --- Runtime/NetworkPlayer.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Runtime/NetworkPlayer.cs b/Runtime/NetworkPlayer.cs index dd2afae..dd21c35 100644 --- a/Runtime/NetworkPlayer.cs +++ b/Runtime/NetworkPlayer.cs @@ -40,13 +40,12 @@ public void LoadAvatar(string url) private void SetPlayer(string incomingUrl) { AvatarObjectLoader loader = new AvatarObjectLoader(); - loader.LoadAvatar(incomingUrl); loader.AvatarConfig = config; + loader.LoadAvatar(incomingUrl); loader.OnCompleted += (sender, args) => { leftEye.transform.localPosition = AvatarBoneHelper.GetLeftEyeBone(args.Avatar.transform, true).localPosition; rightEye.transform.localPosition = AvatarBoneHelper.GetRightEyeBone(args.Avatar.transform, true).localPosition; - AvatarMeshHelper.TransferMesh(args.Avatar, gameObject); Destroy(args.Avatar); };