Skip to main content
New Participant
February 27, 2019

Avatar not loading

Question i am trying to get my avatar to load in unity
If i put my id in before i launch the application it appears to load but if i do it the way the tutorial suggests it doesn't load

is there some sort of refresh that needs to be called if the avatar object exists in the scene already?

void Start()
{
        Oculus.Platform.Core.Initialize();
        Oculus.Platform.Users.GetLoggedInUser().OnComplete(OnGetUser);
        Oculus.Platform.Request.RunCallbacks();

    }
    private void OnGetUser(Oculus.Platform.Message<User> message)
    {

        myAvatar.oculusUserID = message.Data.ID.ToString();
        myAvatar.enabled = true;
        myAvatar.RecordPackets = true;
        myAvatar.PacketRecorded += OnLocalAvatarPacketRecorded;

}





2 replies

New Participant
February 27, 2019
Never Mind the answer is to disable the ovravatar script and not to enable it until after the id is set
JeffNik
Honored Contributor
March 7, 2019
Thanks for the solution... I don't remember having to do that last time I tried playing with OvrAvatar. Is this new?