Create and attach a component from a UClass
Hi there guys, i'm trying to make a power up system, in wich the character can attach a component of certain type.
This is made so any blueprint powerup can call the AbsorbEssence with the type of the EssenceComponent that i want
The problem is that i given this TSubclassOf Object (UClass) i can't attach the component or create it.
I tried doing:
But the engine crashes because something something about the world of the actor not existing. (its a ensure that RegisterComponent does that my component fails).
I'm banging my head here, any idea how can i dinamycally add these components to my actor given the UClass?
asked Oct 21 '16 at 09:05 PM in C++ Programming
Check this answer
Maybe there is a problem on how you are constructing the essenceComponent object
answered Oct 21 '16 at 09:14 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here