Forum Discussion
GotBrawndo
7 years agoHonored Guest
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;
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
- GotBrawndoHonored GuestNever 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?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 15 days ago
- 6 months ago
- 2 years ago