IDamageableInterface* Damageable = Cast(OtherActor);
if (Damageable-> ???)
{
// Do stuff here
}
Why does a simple c++ interface give me 4 functions to chose from when I only have one in the actual class?
Declaration in interface:
// Check if this actor can be damaged by the specified faction
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "IDamageable")
bool CanBeDamagedByFaction(const int32 ByThisFactionId);
Declaration in actor:
// header
virtual bool CanBeDamagedByFaction_Implementation(const int32 ByThisFactionId);
// cpp
bool ASpaceShip::CanBeDamagedByFaction_Implementation(const int32 ByThisFactionId)
{
return GST->GetFactionInstance(FactionId)->CanBeDamagedByFaction(ByThisFactionId);
}