CDA Pickers are used to select Customization Data Assets in-game.
The Index defaults to 0. You are free to use multiple CDA Apparel Pickers for the same CDA 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 at the same time. CDA Pickers with the same CDA Class block their sibling's CDA, so the user cannot select the same e.g., necklace in both pickers.
The picker may host any number of data assets as they are handled, virtually. The final display implementation is up to you, but we provide an example with WBP_CDA_Picker_DefaultStyle and WBP_CDA_PickerItem_DefaultStyle, which uses a horizontally scrollable List View (see In-game Controls). Since [V11], this abstraction layer provides you with all the functionality to easily inherit your custom CDA pickers. This makes it easier to initialize CDA pickers, as well.
A CDA Collection Picker can further define what data assets are displayed. In Unreal Editor it just displays four empty data assets.
When being initialized, it automatically selects the CDA Picker Item that matches the current CDA profile of the given Character Customization. (see Initialize Selected CDA By Picker Settings for details)
The main logic happens between WBP_CDA_PickerBase (Widget Blueprint) and BP_CDA_PickerItemObject (object) where the widget manages multiple CDAs and the object represents a single CDA that can be selected. The WBP_CDA_PickerItemBase is the parent for the visual representation of a CDA.
The following chapters as well as the Initialize & Update Visuals and Selecting CDAs diagrams on this page, explain in detail how the different Blueprints interact with each other.
The BP_CDA_PickerItemObject represents a single CDA that can be selected. It provides various functions for selection and can handle one of the possible CDA types at once. Which CDA type/profile is used, depends on the specified CDA Class. Selection only happens, if the object is marked as IsSelectable.
The important functions and event dispatchers are as follows. Protected functions are intended to be used internally or in your derived child Blueprints. You can find detailed descriptions in engine.
The WBP_CDA_PickerBase manages multiple CDAs in the form of BP_CDA_PickerItemObject and is the parent for the visual representation of the CDA list.
It provides various functions for settings and selection, but requires a child Blueprint of your desired style (our example is WBP_CDA_Picker_DefaultStyle) to configure how exactly the visual list of CDAs is initialized and updated.
It can handle one of the possible CDA types at once, defined by its CDA Class, which is passed to the instantiated BP_CDA_PickerItemObjects.
Multiple CDA Pickers with the same CDA Class (called "Sibling CDA Pickers") share their selection state, thus the same CDA can only be selected once and does not produce unnecessary overlapping. Sibling CDA Pickers disable those CDAs to make them unavailable for selection.
The important functions and event dispatchers are as follows. Protected functions are intended to be used internally or in your derived child Blueprints. You can find detailed descriptions in engine.
The WBP_CDA_PickerItemBase is the parent for the visual representation of a single CDA.
It provides base initialization functions, but requires a child Blueprint of your desired style (our example is WBP_CDA_PickerItem_DefaultStyle) to configure how exactly the visuals of the CDA is initialized and updated.
That child Blueprint must be assigned to the Entry Widget Class of any following UE-native list widgets (List View, Tile View, or Tree View) in the CDA Picker widget for maximum performance and compatibility with the preconfigured User Object List Entry interface. If displayed elsewhere, e.g. a normal Horizontal Box, you have to trigger Initialize, manually. The WBP_CDA_Picker_DefaultStyle uses a List View.
This diagram shows the flow for Initialize and Update Visuals across the related Blueprints. WBP_CharacterEditor starts on the left column by iterating all CDA Pickers. Since each CDA Picker inside of WBP_CharacterEditor is a WBP_CDA_Picker_DefaultStyle the flow continues in the second column, bottom box (below its parent WBP_CDA_PickerBase in the top box). From there you can follow the arrows.
The diagram nodes are representing individual Blueprint nodes or groups of Blueprint nodes for simplicity. The green nodes are representing Initialize and Update Visuals and their parent functions.
The yellow, orange and purple nodes are representing the event dispatcher flow of the Selecting CDAs diagram below. The red text references places where CDA-data is passed or used.
Compare the diagram with the Blueprints and use the browser zoom to improve the diagram readability.
The starting point in Blueprint is at WBP_CharacterEditor > Initialize - CDA Pickers And CDA Collection Pickers.
This diagram shows the flow, when using Select CDA or Select CDA Apparel Profile on a CDA Picker and the interaction between WBP_CDA_PickerBase and BP_CDA_PickerItemObject.
The diagram nodes are representing individual Blueprint nodes or groups of Blueprint nodes for simplicity. The green nodes are representing Select CDA and Select CDA Apparel Profile as well as Update Visuals to create a connection to the Initialize & Update Visuals diagram above.
The yellow, orange, purple and blue nodes are representing the event dispatchers and connected functions that are called upon selection. See the diagram above to recap when they are bound.
Compare the diagram with the Blueprints and use the browser zoom to improve the diagram readability.