Reference Root component from c

I spawned a blueprint from C++ which is nothing more than a static mesh with a material.

I spawned the blueprint as an AActor as MYCustomClass does not exist yet in c++.

This works fine. Now I wish to access the components that are listed int he component list that was created in the blueprint inside the editor.

How to do this? I can’t cast the AActor to my custom class as it doesn’t exist it c++

If you have the Actor pointer you can call the templated GetComponents function on it and get a list of all the components and then look in the returned array for the component name or type you are looking for.