cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot add Meta Avatars SDK (v29.7.0) to a clean project in Unity. [Solved!]

mike.golembewski
Explorer

Hello!

I am currently unable to set up the newest Meta Avatars SDK (v29.7.0).  Every time I try to install, it raises the same three errors :

  • Library\PackageCache\com.meta.xr.sdk.core@68.0.3\Scripts\BuildingBlocks\MultiplayerBlocks\Shared\NetworkedAvatar\Scripts\EntityInputManager.cs(31,17): error CS0103: The name 'BodyTracking' does not exist in the current context
  • Library\PackageCache\com.meta.xr.sdk.core@68.0.3\Scripts\BuildingBlocks\MultiplayerBlocks\Shared\NetworkedAvatar\Scripts\EntityInputManager.cs(33,17): error CS0103: The name 'BodyTracking' does not exist in the current context
  • Library\PackageCache\com.meta.xr.sdk.core@68.0.3\Scripts\BuildingBlocks\MultiplayerBlocks\Shared\NetworkedAvatar\Scripts\EntityInputManager.cs(34,17): error CS0103: The name 'BodyTracking' does not exist in the current context

Does anyone else seem to be having similar issues?  Any insight as to why this might be happening, or if there are any steps to be taken to resolve this, would be greatly appreciated.

Thanks, 

Mike.

 

[UPDATE : If this happens, first try going to the Packages folder in the Project tab, selecting the 'Meta XR Core SDK', right-clicking it and reimporting.  Over a bunch of tests, this seems to fix the issue fairly reliably.]

For additional context, here are the steps I've taken leading to the issue :

  1. Starting from a clean base URP project in Unity 2022.3.42f1, I switched the build settings to Android, and configured a keystore for build signing.
  2. I installed Photon Fusion (2.0.3) and Photon Voice (2.56), and configured these to work with a photon cloud app.  I then tested and confirmed that these were working as expected.
  3. I installed the Meta All-In-One SDK (v68.0.3) via the package manager, then applied all suggested project changes (graphics and lighting settings, manifest creation, etc...).  I confirmed that these were working as expected.
  4. I configured the Oculus Platform Settings with a valid App ID and confirmed that the values were correct.

I then added the Meta Avatars SDK (v29.7.0) via the package manager.  The package was installed, but when it compiling, the previously mentioned errors were thrown, preventing completion.  To repeat the error (also thrown from lines 33 and 34):

  • Library\PackageCache\com.meta.xr.sdk.core@68.0.3\Scripts\BuildingBlocks\MultiplayerBlocks\Shared\NetworkedAvatar\Scripts\EntityInputManager.cs(31,17): error CS0103: The name 'BodyTracking' does not exist in the current context

 

1 ACCEPTED SOLUTION

Accepted Solutions

mike.golembewski
Explorer

OK!  I think I've found a working solution here.  I'm pretty sure the issue has to do with the order in which the packages are installed.  The Avatars SDK must be installed first, followed by the All-In-One SDK.

I was able to get the Meta Avatars SDK (29.7) to work in a project with Meta All-In-One SDK (68.0.2) by:

  1. Starting with a clean (no meta packages) project.
  2. Adding the Meta Avatars SDK (29.7) via the package manager.
  3. Adding the Meta All-In-One SDK (68.0.2) via the package manager.

I was also able to 'upgrade' a project by :

  1. Removing the existing Meta Avatars SDK (24.1) via the package manager.
  2. Removing the existing All-In-One SDK (68.0.1) via the package manager.
  3. Adding the Meta Avatars SDK (29.7) via the package manager.
  4. Adding the All-In-One SDK (68.0.2) via the package manager.

This worked for me - right up until I quit the browser and restarted.  At that point, the errors came back (along with some console flooding for good measure).  This was repaired, though, after I cleared the library package cache and restarted,  It's been working well since, although it seems that a number of features have been removed as of the latest version (networking and colocation building blocks, interaction building blocks, etc,,,).

View solution in original post

14 REPLIES 14

78Star
Explorer

I was just updating our project and faced the same issue. Though first thought it was because I was using Unity 6.000.0.21f1. Have you tried rolling back the Meta SDK version?

Just tested. Going from 68.0.2 to 68.0.0 on the Meta XR All-in-One SDK didn't fix it, but switching the Meta Avatars SDK to 24.1.1 fixed it, which is good as the Meta AiO didn't like getting set to an older version.

Hi!  Thanks for replying and thanks for the help with this.  I've had similar results : 

I can load the Meta Avatars SDK 24.1 with The Meta All-In-One SDK 68.0.1, without any issue.

Likewise, I can open the Meta Avatars SDK 24.1 with the Meta All-In-One SDK 68.0.2.

When I upgrade both to the latest (Meta Avatars SDK 29.7 and Meta All-In-One SDK 68.0.2, the 'legacy code' referencing BodyTracking in the 'building blocks' EntityInputManager.cs class prevents compilation.  

 

 

 

ltfleming
Honored Guest

Actually, ignore me, my suggestion didn't work 😕

mike.golembewski
Explorer

OK!  I think I've found a working solution here.  I'm pretty sure the issue has to do with the order in which the packages are installed.  The Avatars SDK must be installed first, followed by the All-In-One SDK.

I was able to get the Meta Avatars SDK (29.7) to work in a project with Meta All-In-One SDK (68.0.2) by:

  1. Starting with a clean (no meta packages) project.
  2. Adding the Meta Avatars SDK (29.7) via the package manager.
  3. Adding the Meta All-In-One SDK (68.0.2) via the package manager.

I was also able to 'upgrade' a project by :

  1. Removing the existing Meta Avatars SDK (24.1) via the package manager.
  2. Removing the existing All-In-One SDK (68.0.1) via the package manager.
  3. Adding the Meta Avatars SDK (29.7) via the package manager.
  4. Adding the All-In-One SDK (68.0.2) via the package manager.

This worked for me - right up until I quit the browser and restarted.  At that point, the errors came back (along with some console flooding for good measure).  This was repaired, though, after I cleared the library package cache and restarted,  It's been working well since, although it seems that a number of features have been removed as of the latest version (networking and colocation building blocks, interaction building blocks, etc,,,).

78Star
Explorer

I unfortunantly can't install the Avatar SDK First. Throws an error.

[Package Manager Window] Error adding package: com.meta.xr.sdk.avatars@29.7.0.
Unable to add package [com.meta.xr.sdk.avatars@29.7.0]:
One or more dependencies could not be added to the local file system:
com.meta.xr.sdk.core: EPERM: operation not permitted, rename 'C:\...\Library\PackageCache\com.meta.xr.sdk.core' -> 'C:\(Work)\...\Library\PackageCache\.del--36060-kVioiJN3q9em'

Hmmm.... this is tricky!  Based on those errors, it might be that some part of Unity or an external tool has a hold on the package file or folder in the project package cache, so it screws things up when moving the files.  Might be worth trying the following?  Can't guarantee it will help but it's worth a try,,,

- Quit Unity, as well as VS / VS Code / any other code editor that might also be looking at the packages (I've been caught out by this a few times, w/ package files open in VS code during operations throwing things off).

- Look into the Library/Package Cache folder... it might be worth removing the ',del--' caches manually (these are caches for packages that you have added and then removed).  It might also be worth removing all caches for Meta libraries, and letting Unity pull down new versions internally as needed.  Updating those cached files might help w/ the previous issue.

- Go back into Unity - it should be a slow import as Unity updates those removed cache files,

- Once it's done, try adding the avatars (29.7) and then the all-in-one sdk (68.0.3) via the package manager again... 

- |f the issue with the 'BodyTracking' errors takes place or recurs, go to the packages folder, select the 'Meta XR Core SDK' library from the Packages folder in the Project tab and right-click to reimport; I have found that this seems to fix the issue.

Mytholodi
Honored Guest

I'm having the same problem. Unfortunately for me, the above resolution did not work.

Taking the reference to BodyTracking out of the code is a temporary fix for me, but it will obviously cause problems elsewhere.

RolandTwinnyVR
Honored Guest

Same error here. But the solution of putting the meta avatar before the meta all-in-one didnt worked for me. And now my project that I was working on dont show any avatar anymore, even in the older version.