I have an Actor that has several actor components: componentA, componentB, componentC and component D.
What I want to do, is to be able to select, in the editor, one of the components A to C from component D.
What I managed to do so far is:
- add a string array to componentD
- add the names of the components (eg. componentA and componentB) in the array
- in BeginPlay of the componentD, I add the references to componentA and componentB by name. (add all components of type to a TMap<name, component>, and retrieve them from there)
I am sure this is not the ideal solution, so I tried, with no luck, to find another method of selecting components in the editor.
I am working with C++, so any help would be appreciated.