How to add an ActorComponent created in blueprints to an Actor created in c++?
I have a custom ActorComponent created with blueprints. Now I am creating a new Character in code, but I haven't been able to find an example on how to add the component to the Character.
This is what I have so far:
But when I open the project I get:
If I create a blueprint based on AZCParentCharacter, it doesn't have the component in the components tab:
The path to the component must be right because I right clicked it in the Editor, then clicked "Copy Reference", and pasted it in the function.
I have a feeling everything I've done is wrong lol. Any help is appreaciated.
asked Jul 14 '15 at 08:27 PM in C++ Programming
I haven't done this before but I have a few thoughts about what's wrong here
you need to load the blueprint first so change UActorComponent to UBlueprint, and get the components inside of it. You can get the detailed class structure in debugger, that's how I would do it
answered Jul 15 '15 at 02:48 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here