Okay so Im going to admit I feel like an idiot with this issue, I have a inkling I might be missing something really simple but I’ll run through it and hopefully someone can help
UObject* GameAbilityObj = LoadObject<UObject>(GetOwner(), *AbilityPath);
LogTemp: Warning: LoadObject: LaunchDrone_DA
When I load a class using UObject
like this it loads fine but I need to cast this object to get access to call a function.
UIroncladGameplayAbility* IronGameAbilityObj = Cast<UIroncladGameplayAbility>(StaticLoadObject(UIroncladGameplayAbility::StaticClass(), nullptr, *AbilityPath));
AbilityPath
in this instance is copied from the UAsset
in the Content Browser:
"/Game/Commander/Abilities/Drone/LaunchDrone_DA.LaunchDrone_DA"
Ive tried loading the UClass
manually and it loads fine as with the UObject
loading fine unless its cast during load or after. UIroncladGameplayAbility
is a subclass of UObject
its nothing fancy, Im using it as a container to link GAS with EnhancedInput.
UIroncladGameplayAbility* CastedAbility = Cast<UIroncladGameplayAbility>(GameAbilityObj);
This also returns null
which about feels where my brain is! I thought it might be an Angelscript issue but confirmed the same thing happens on stock 5.2 and 5.3 preview. Its definitely not the expected behaviour, like I said I feel like Ive missed a step but I continually get LoadObject
warnings.
LogUObjectGlobals: Warning: Failed to find object 'IroncladGameplayAbility /Game/Commander/Abilities/Drone/LaunchDrone_DA.LaunchDrone_DA'
I can provide a sample project for 5.2 if anyone wants to take a look at more of the specifics but Ive tried to eliminate all possible problems outside of LoadObject
. Any help would be greatly appreciated.
Thanks