Create and Attach Custom Actor Component
I believe I have solved the problem. There are things to mention before the solution:
"AttachTo" method is belong to "USceneComponent"s. Therefore, you are not supposed to attach an "ActorComponent" to them. The idea of attaching a component which is not a "USceneComponent" is also not true. If your component does not have any attribute in 3d world, you are not supposed to attach it to the components having attributes in 3d world.
1) It is correct to create a component by using
2) If you dive into the API document for AActor, you find a method `AddOwnedComponent( UActorComponent * Component`). Yes, this is the method you should call if you want to add an actor component into your actor.
Here is my SpellCaster component inside a blueprint of my "Hero" class:
answered Dec 11 '15 at 10:19 AM
answered Dec 10 '15 at 05:09 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here