Skip to content

Commit

Permalink
fix: set config before load
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Apr 25, 2024
1 parent ccea90b commit e4e8350
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Runtime/NetworkPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down

0 comments on commit e4e8350

Please sign in to comment.