How to assign a TSubclassOf from a Blueprint class in C++?
From my ProjectilePak.h:
I am trying to assign the above as my blueprint projectile using ConstructorHelpers in my Magazine class constructor so that I can spawn a projectile on firing a weapon.
I have tried using both FObjectFinder & FClassFinder but neither seem to work, and I am unsure of what I am doing wrong.
Here is from my Magazine.cpp constructor:
Note: This compiles but the ProjectileClass is NULL & as such never spawns. I have also modified this to use FObjectFinder as well as changed the type in the <>.
asked Mar 30 '16 at 05:43 PM in C++ Programming
After doing some further testing I have solved the problem by adding _C to the end of the file path.
answered Mar 30 '16 at 05:55 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here