Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
GotBrawndo's avatar
GotBrawndo
Honored Guest
7 years ago

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

  • Never Mind the answer is to disable the ovravatar script and not to enable it until after the id is set
  • Thanks for the solution... I don't remember having to do that last time I tried playing with OvrAvatar. Is this new?