Loading Personalized Avatars script error
I am following the documentation of the Avatar Developer Guide at https://developer.oculus.com/documentation/unity/as-avatars-gsg-unity/
Under loading personalized avatar, we are supposed to save a script call 'filename.cs'.
however the script text gave a bunch of errors starting with the public class that does not match.
using UnityEngine; using Oculus.Avatar; using Oculus.Platform; using Oculus.Platform.Models; using System.Collections; public class <classname> : MonoBehaviour { public OvrAvatar myAvatar; void Awake () { Oculus.Platform.Core.Initialize(); Oculus.Platform.Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback); Oculus.Platform.Request.RunCallbacks(); //avoids race condition with OvrAvatar.cs Start(). } private void GetLoggedInUserCallback(Message<User> message) { if (!message.IsError) { myAvatar.oculusUserID = message.Data.ID.ToString(); } } }
Anyone has a solution to this? I have the latest Oculus Integration 32.0 Installed. Using unity 2021.1.
