I’ve been learning quite a bit about C++ and BP by converting C++ functions from ShooterGame into Blueprints.
Hopefully, that makes it clear what I’m doing.
I’m having trouble determining when to use a Class reference or a Object reference:
Here’s the code for the function I was trying to convert:
On line 622 you can see the parameters for the function include the ‘class’ keyword, so I would expect in Blueprint I would want to use class references.
I’ve experimented with both:
If I use Class reference variables in the Blueprint, I run into issues once I get to line 638: ‘LocalLastWeapon->OnUnEquip();’
I can’t seem to call member functions from a class reference variable.
If I go with using Object references, there doesn’t seem to be a non-hacky way of setting an object reference to Null.
(In the picture above, I worked around this by creating a second variable of the same type)
Any suggestions as to which is the correct one to use?