my idea was that I was going to hold objects in a
TArray<TObjectPtr<UInteractableComponentBase>> Interactables;
and for baseline sorting I gave it a public property of
int32 PriorityValue
supposedly I could define
virtual bool UInteractableComponentBase::operator<(const UInteractableComponentBase& Other) const
{
return PriorityValue < Other.PriorityValue;
}
then in the derived classes I could override the “operator<” to use a cast to check against say an ItemID member value of the derived class.
but UBT throws an error about needing to define a predicate, where from what I understand a predicate would mean that I would need to effectively create a sort function to take account of everything at once?