Hi Andrew,
Unfortunately, even if you give components the same name, the engine sees them as different components.
I’ve found a couple discussions that have some ideas for moving blueprint components to C++. That being said, they all have duplicates that need to be deleted.
Discussion 1: Ideas of moving bp components to cpp such as implementation inheritance.
Discussion 2: Mentions needing to do it manually, but as a workaround would be to keep the components in bp and instead of moving them entirely, we get references to them and use those references in cpp. The references can be found through things like FindComponentByClass. (Here’s a video on that)
Discussion 3: Same name (Move Blueprint actor components to C++ w/o losing reference) as discussion 2, but on reddit had a slightly different approach where they still manually create the component in cpp with CreateDefaultSubobject but use +PropertyRedirects in the DefaultEngine.ini to ensure all references to the old component are pointing to the new cpp class.
I’d say there is no intended way that preserves references without duplicates. The reference in discussion 1 with implementation inheritance would most likely be the closest, but that still has the step of deleting the bp component class.
My recommendation to make it so that those components will no longer be exclusive to the blueprints would be to use something like FindComponentByClass as mentioned in the tutorial video.
As for automating, the recommended approach is through scripting with Python or with blueprints. Here’s some general information regarding Scripting and Automating the Unreal Editor.
Please let me know if these help to achieve what you’re looking for!
Regards