Integration with Modular Avatar (Legacy)

This page provides instructions and important information for setting up VirtualLens2 using Modular Avatar.

VirtualLens2 v2.9.4 introduced an experimental workflow for using Modular Avatar, which allows changes to Animator Controller, Expressions Menu, and Expression Parameters to be delayed until avatar build, ensuring a non-destructive process.

How to Use

If your project has imported Modular Avatar, you will find a new setting called “Enable Modular Avatar Integration” within the VirtualLens Settings. By enabling this option and pressing the “Apply as a Modular Avatar Module” button, you can set up VirtualLens2 using Modular Avatar.

If you’ve previously set up VirtualLens2 using a different method and now want to transition to Modular Avatar, follow the same steps: enable the checkbox and reapply. The previous changes to Animator Controller, Expressions Menu, and Expression Parameters will be automatically reverted during reapplication.

Important Notes

Object Placement in the Hierarchy

Objects placed in the hierarchy, such as the display mesh for the camera and various markers, continue to be directly placed as before. Even if you remove the _VirtualLens_Root object, it won’t be removed from the avatar. To completely remove VirtualLens2, manually remove the elements listed under “Camera Object” and “Marker Objects” within VirtualLens Settings.

Cases Requiring Module Regeneration

In cases where there have been changes in the hierarchy structure or transformations of objects related to “Camera Object” and “Marker Objects” between module generation and avatar build, VirtualLens2 may not function correctly. If this happens, try reapplying the settings in VirtualLens Settings to regenerate the modules.

Reuse of Generated Modules

Modules generated during the setup are specific to that avatar and cannot be used by prefabbing them and placing them in other avatars. When setting up for other avatars, prepare VirtualLens Settings for each avatar and regenerate the modules accordingly.