The CDA Apparel Picker can display all available data assets inheriting the given Class which is a child of BP_CDA_Apparel and is not flagged as “Debug Asset” in its settings. A CDA Collection Picker can further define what data assets are displayed. If setup like the image above e.g., to BP_CDA_Apparel_Hat it displays all hats when the editor is open in-game by default (in Unreal editor it just displays four empty data assets). The selected apparel will be stored in an Apparel Profile variable.
The Index is defaulted to 0. You are free to use multiple CDA Apparel Pickers for the same class in your Character Editor. Each additional picker must have an increasing index (0, 1, 2 etc.) always starting at 0! This way e.g., two pickers could display accessories (which in our examples is the base class for data assets like rings, necklaces, watches etc.) and in-game you are able to choose a ring and a necklace. We have prepared the CDA Apparel Picker in a way that pickers with the same class block their siblings’ WBP_CDA_ApparelPicker_MainButtons, so the user cannot select the same e.g., necklace in both pickers.
The picker may host any number of data assets as it can be scrolled horizontally with the mouse wheel (see In-game Controls). On scroll, the next apparel is selected and set in the current customization profile. By clicking an apparel button or when loading a profile, the picker automatically scrolls to the selected apparel.
The Vertical Box around the whole Details Panel also reacts on mouse scroll and does not scroll while the mouse is over a CDA Apparel Picker. Just press and hold the right mouse button to drag the details panel up and down.
When calling
SetCollection
(manually or by selecting a collection in theWBP_CDA_CollectionPicker
) the picker gets re-initialized with a new collection and tries to use the same ApparelProfile as before to directly select the correct data asset that was worn before changing the collection. As it may be set up in your Data Assets, the selected collection might not contain that stored apparel. Then, the picker will fall back to its first main button (in our showcase this is the “No Apparel” button.
This Main Button gets generated and populated with data by the Apparel Picker for each available data asset of the given class. It can be blocked by the above-described mechanism for pickers with the same class. It also reveals the display name and material variants of the apparel by hovering the mouse over it.
When clicked it sets the selected apparel of its hosting CDA Apparel Picker with a Material Variant Index of -1.
This Variant Button gets generated by each Main Button and displays a color and tooltip on mouse over.
When clicked it sets the selected apparel of its hosting CDA Apparel Picker with a Material Variant Index equal to the button index within the Main Button.