I suggest the following solution:
- Keep your parent and children’s classes in the same folder.
- Create a BlueprintFunctionLibrary and add this function:
- Call the function anywhere in your project:
There is one important note. This works in PIE and packaging build but doesn’t work in standalone mode.
I hope it’ll be helpful for you.