Forum Discussion

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

How to disable/re-enable Oculus Avatar game objects?

I'd like to be able to hide an avatar and then re-enable it later without incurring the penalty of reloading the asset. There is a "hidden" property on the SampleAvatarEntity script but this is somewhat inconvenient because there may be other scripts attached to the avatar. It would be most useful to be able to disable the game object altogether but doing this triggers an error in AvatarLODManager.cs:483 (when the game object is disabled, the GetComponentInParent<>() call returns null and this is not checked).

 

OvrAvatarManager is very tightly coupled to the avatar instances and it's not clear how to safely disable/enable. Has anyone found a strategy that works?

Replies have been turned off for this discussion