Bring your own animator or menu
هذا المحتوى غير متوفر بلغتك بعد.
When to use this
Section titled “When to use this”A gimmick or a shader often comes with its own animator controller and its own menu. Rebuilding them as toggles would take a long time. AvatarDoc can merge the controller's layers into the avatar's FX controller and install the menu, the way Modular Avatar's Merge Animator and Menu Installer do. Neither asset is ever changed: AvatarDoc works on copies when you upload.
To turn toggles made with VRCFury or Modular Avatar into AvatarDoc entries, see Convert from VRCFury or Modular Avatar.
This needs Advanced mode, the default.
Merge an animator controller
Section titled “Merge an animator controller”-
In the Hierarchy, select the object that holds your AvatarDoc component.
-
In the inspector's toolbar, press + More, then + Animator. On a wide inspector, it sits on the toolbar itself.
You should now see a merged animator named (no controller), selected under Animators in the tree. You can also drag the controller from the Project window onto the tree.
-
In its panel, drag your controller onto Controller.
You should now see the controller's layers under Layers and its parameters under Parameters.
-
If the controller's animations were made inside a prefab, set Path root to that prefab's root on the avatar. Leave it empty when the animations start at the avatar root.
-
Under Layers, untick each layer that should stay out of the avatar.
In the picture, 1 is Controller, 2 Path root, 3 the list of layers, and 4 Add control beside a parameter.
Match write defaults is on for a new merged animator: its layers follow the Write Defaults choice of the avatar's own layers instead of the controller's own.
The list of parameters says who looks after each one: the name of the AvatarDoc entry that drives it, existing on the avatar, or not synced. Only a parameter marked not synced has an Add control button beside it. Press it to give that parameter a button in the menu. AvatarDoc makes a toggle named after the parameter, or a radial for a Float parameter. It drives the parameter from the menu and adds no layer of its own: its panel says Drives a parameter only..
Install a menu asset
Section titled “Install a menu asset”-
In the inspector's toolbar, press + More, then + Menu asset. On a wide inspector, it sits on the toolbar itself.
You should now see an entry named (no menu asset), selected under Menu assets in the tree. You can also drag the menu asset from the Project window onto the tree.
-
In its panel, drag your menu asset onto Menu asset.
-
In Install path, type where the menu goes, such as Outfits/Summer. Leave it empty to install it where this component installs its entries. A single slash,
/, installs it into the avatar's root menu. -
In Place, choose As submenu to wrap the whole menu in one new submenu, or Append items to put its controls in that place directly.
With As submenu, type the submenu's name into Name. Left empty, it uses the asset's name.
The asset's controls show in the tree with an asset chip. The tree shows these chips only while it is at least 360 pixels wide: on a narrower inspector, widen it to see them. You can rename, re-icon, hide or move them like the avatar's own items: see Change the avatar's existing menu.
Declare a parameter
Section titled “Declare a parameter”VRChat ignores a menu control whose parameter the avatar does not declare. The Parameters list of a menu asset's panel says who declares each parameter its controls use.
-
In the menu asset's panel, find a parameter marked nobody declares it.
-
Press Add declaration beside it.
You should now see a Parameters row in the tree, and the parameter marked declared here.
-
In the tree, select Parameters.
You should now see one row per declared parameter, with its name, Bool, Int or Float, its default value, Saved, Synced and the bits it costs.
+ Parameter in that panel declares one more parameter. A declared parameter the avatar already has is reused, with the avatar's own settings.
A parameter no menu asset lists, such as one only a merged animator reads, is declared from the toolbar. In the inspector's toolbar, press + More, then + Parameter. On a wide inspector, it sits on the toolbar itself. The Parameters row appears, selected, with a parameter named New parameter in its table. Give it the name the animator reads.
Merged animators and menu assets each have their own Platform, to leave them out of the PC or the Quest build.
Check it worked
Section titled “Check it worked”- In Play mode with Gesture Manager, open the menu, find the installed controls and use them. The merged layers react. See Your first toggle for Play mode.
- The scene preview does not show merged animators: the panel says so. Test them in Play mode.
If it does not work
Section titled “If it does not work”- A warning says the merged animator has no controller set: drag one onto Controller. See the message.
- An error says the avatar already has a parameter of the controller as another type: give the parameter the same type in both, or rename one. See the message.
- A warning says nothing declares a parameter that an installed control drives: press Add declaration for it. See the message.
Related
Section titled “Related”- Merged animators and Menu assets and parameters describe every setting.
- Fit in VRChat's parameter memory explains what declared parameters cost.
Docs for AvatarDoc 0.7.1