Toggle clothing and accessories
هذا المحتوى غير متوفر بلغتك بعد.
When to use this
Section titled “When to use this”Use a toggle when one press should show or hide something: a hat, a jacket, or a jacket and its scarf together. The same toggle can also hide one piece while it shows another.
If only one of several outfits may be worn at a time, see Make one-of-many choices. To build a whole outfit menu in one window, see Your first outfit selector.
-
In the Hierarchy, select the object that holds your AvatarDoc component.
-
In the inspector's toolbar, press + Toggle.
You should now see a toggle named New Toggle, selected in the tree. Its panel has an empty Objects section.
-
In the toggle's panel, type a name into Name, such as Jacket, and press Enter.
-
In the Hierarchy, drag the jacket onto the Objects section of the panel.
You should now see a row with the jacket, set to Shown.
-
To change more pieces with the same press, drag each of them onto the section too. Each piece gets its own row.
-
For a piece that should disappear while the toggle is on, press Hidden on its row.
In the picture, 1 is the Objects section, where the jacket is shown and the hoodie is hidden while the toggle is on. 2 is the choice on each row. 3 is the Scene preview row you use in the next part.
-
To start with the toggle on when the avatar loads, tick Default on.
You can also press + Add in the Objects section and then the small circle at the right end of the new row. A list of your avatar's objects opens, with a search field.
To make many toggles at once, drag objects from the Hierarchy onto the menu tree instead. Each object becomes its own toggle, named after the object.
While the toggle is off, AvatarDoc hides every Shown piece and shows every Hidden piece. It does this whatever the piece looks like in the scene, so you do not have to switch pieces on or off in the Hierarchy before you upload.
Check it worked
Section titled “Check it worked”- In the toggle's panel, press On and then Off in the Scene preview row (Advanced mode). The Scene view shows the pieces change. Press Default to stop the preview. The preview needs NDMF's previews: turn them on under Tools > NDM Framework > Enable Previews.
- In Play mode with Gesture Manager, press the toggle in the menu, as in Your first toggle.
If it does not work
Section titled “If it does not work”- The Scene view does not change when you press On: NDMF's previews are off, or the AvatarDoc preview is off under Tools > NDM Framework > Configure Previews. The inspector's header says so while they are off.
- The piece stays visible in the game: another toggle or animation on the avatar also switches that piece. Check the other toggles in the tree for a row with the same piece.
- The toggle is not where you expect it in the menu: In menu is off in its panel, or its submenu is full. A submenu holds eight controls, and AvatarDoc moves the extra ones to a More page.
Related
Section titled “Related”- Toggle and Objects describe every setting of the panel.
- Make one-of-many choices turns several toggles into a group where only one is on.
- A toggle never turns off and a toggle that does nothing in Troubleshooting.
Docs for AvatarDoc 0.7.1