The setup is like this:
There's a standard variable in PlayerPawn like this:
var class<HUD> HUDType;
I want to get a property (using code within a custom PlayerPawn class) from that PlayerPawn's HUDType, but the variable I want only exists in a custom class that extends HUD. What I essentially wanted to do was:
SomeVariable = SpecialHUD(HUD).SpecialProperty;
Understandably though, the cast wouldn't work there (cast from class to SpecialHUD will always fail). I've tried using DynamicLoadObject, and while it did compile, it doesn't actually work. I tried something like:
SomeVariable = SpecialHUD(DynamicLoadObject(string(HUDType), class'class')).SpecialProperty;
Is what I am trying to do even possible on this engine?
There's a standard variable in PlayerPawn like this:
var class<HUD> HUDType;
I want to get a property (using code within a custom PlayerPawn class) from that PlayerPawn's HUDType, but the variable I want only exists in a custom class that extends HUD. What I essentially wanted to do was:
SomeVariable = SpecialHUD(HUD).SpecialProperty;
Understandably though, the cast wouldn't work there (cast from class to SpecialHUD will always fail). I've tried using DynamicLoadObject, and while it did compile, it doesn't actually work. I tried something like:
SomeVariable = SpecialHUD(DynamicLoadObject(string(HUDType), class'class')).SpecialProperty;
Is what I am trying to do even possible on this engine?