This may be a UT source related question, but I’m not sure. I’m not actually not doing anything with UT other than trying to rip some of its weapon mechanics out for my own project.
Anyway, I see the use of GetOuterAUTWeapon() a lot, which appears to be some kind of method that is generated automatically, and I have a hunch it’s related to Within=UTWeapon:
UCLASS(DefaultToInstanced, EditInlineNew, CustomConstructor, Within=UTWeapon)
class UNREALTOURNAMENT_API UUTWeaponState : public UObject
But I can’t find any documentation on this at all. Could anyone clue me in here?
UHT is the Unreal Header Tool. It generates the function and it exists in the resulting generated.h file… The Within keyword basically says that this class can only ever be created using that type as it’s outer.
Be aware though that you can only really use it on non-blueprintable objects. Trying to make a sub-class of an object that has ‘Within’ specified will crash the editor (because the outer will not be correct).