Hi There,
I’ve run into an issue which I’m struggling to understand.
When I try to compile the following code I get the error:
AlsCppV4\ALSInterfaces.gen.cpp(535): error C2511: 'void IALSCharacterInterface::GetCurrentStates(TEnumAsByte<EMovementMode> &,EALSMovementState &,EALSMovementState &,EALSMovementAction &,EALSRotationMode &,EALSGait &,EALSStance &,EALSViewMode &,EALSOverlayState &)': overloaded member function not found in 'IALSCharacterInterface'
Here’s my code:
UINTERFACE(BlueprintType)
class ALSCPPV4_API UALSCharacterInterface : public UInterface
{
GENERATED_BODY()
};
class ALSCPPV4_API IALSCharacterInterface
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "CharacterInformation")
void GetCurrentStates(
TEnumAsByte<EMovementMode>& PawnMovementMode,
TEnumAsByte<EALSMovementState>& MovementState,
TEnumAsByte<EALSMovementState>& PrevMovementState,
TEnumAsByte<EALSMovementAction>& MovementAction,
TEnumAsByte<EALSRotationMode>& RotationMode,
TEnumAsByte<EALSGait>& ActualGait,
TEnumAsByte<EALSStance>& ActualStance,
TEnumAsByte<EALSViewMode>& ViewMode,
TEnumAsByte<EALSOverlayState>& OverlayState
);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "CharacterInformation")
void GetEssentialValues(
FVector& Velocity,
FVector& Acceleration,
FVector& MovementInput,
bool& IsMoving,
bool& HasMovementInput,
float& Speed,
float& MovementInputAmount,
FRotator& AimingRotation,
float& AimYawValue
);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "CharacterStates")
void SetMovementState(EALSMovementState NewMovementState = EALSMovementState::None);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "CharacterStates")
void SetMovementAction(EALSMovementAction NewMovementAction = EALSMovementAction::None);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "CharacterStates")
void SetRotationMode(EALSRotationMode NewRotationMode = EALSRotationMode::VelocityDirection);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "CharacterStates")
void SetGait(EALSGait NewGait = EALSGait::Walking);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "CharacterStates")
void SetViewMode(EALSViewMode NewViewMode = EALSViewMode::ThirdPerson);
UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "CharacterStates")
void SetOverlayState(EALSOverlayState NewOverlayState = EALSOverlayState::Default);
};
I’m not sure why it would be complaining about a function overload when these are just interface declarations?
FYI the referenced enums are also declared in C++, and the header is referenced in this file. The intention behind the “GetCurrentStates” function is to be used in Blueprints (hence the pass by ref).
Any help would be appreciated.