VRTK: Error when SDK_OCULUS_AVATAR is checked

I’m using: Unity 2018.1.1f1 Oculus Avatar SDK 1.26 VRTK 3.3.0

In SDK_Manager script I check SDK_OCULUS_AVATAR and try to run it gives the error.

Assets/VRTK/Source/SDK/Oculus/SDK_OculusController.cs(692,32): error CS0122: `OvrAvatar.AssetsDoneLoading’ is inaccessible due to its protection level

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (1 by maintainers)

Most upvoted comments

Multiple solutions here:

  1. Tell Oculus to fix their change they did to make this private as it’s needed by developers (not just by VRTK).
  2. Fix it in that Oculus script yourself by just changing private to public.
  3. Fix it by using an older Oculus package version that doesn’t have that change to private yet.

Had this issue today and in OvrAvatar on line 179, took AssetsDoneLoading line out of the #ifAVATAR_INTERNAL. It now looks like so:

#if AVATAR_INTERNAL
public AvatarControllerBlend BlendController;
#endif
public UnityEvent AssetsDoneLoading = new UnityEvent();

Had to add using UnityEngine.Events; at the top to make that work.

Now it works and haven’t had any problems from that change.

Thanks, bddckr! Replacing “private” with “public” did the trick. Greatly appreciate your advice. (on mine, it was line 100 of “OvrAvatar” script, just before “UnityEvent AssetsDoneLoading = new UnityEvent();”)

Having this issue.