Forum Discussion

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

SetActiveView() on SampleAvatarEntity

I'm trying to make an avatar invisible during the game. The avatar has the SampleAvatarEntity component and the Active View is set to ThirdPerson in the Unity Editor, this is how it should be at the start of the game. However, at a certain point I want to set the ActiveView to None from a different script. However when I call 

avatarEntity.SetActiveView(ovrAvatar2EntityViewFlags.None);

I get the error ' error CS0122: 'OvrAvatarEntity.SetActiveView(CAPI.ovrAvatar2EntityViewFlags)' is inaccessible due to its protection level'

Is there a way to make the avatar invisible from code while using the SampleAvatarEntity?