Hey all,
I’ve been using a blueprint for my character and know how to set the default ProjectileClass inside the blueprint. I was wondering if it’s possible to set this value through code, so that I don’t have to use a blueprint for my main character?
Thanks!
I recently asked a similar question about Spawning Blueprints through C++. I figured it out and posted it on my question.
Linked!
Hopefully this will save you the trouble of blindly trying figuring it out like it did =)
Figured out the solution. All I needed was projectile = AProjectile::StaticClass() to initialise the class so I could spawn it.
The solution I needed was different, but your link will help for some other things. Thanks!