Hi,
GetSubsystemArray(TSubclassOf) Only works for the first parent.
If I have a USubsystemChild
that inherits from USubystemParent
that also inherits from UGameInstanceSubsystem
, then, when I call TArray<UGameInstanceSubsystem*> Subsystems = GetWorld()->GetGameInstance()->GetSubsystemArray<UGameInstanceSubsystem>();
the instance of USubsystemChild is not there.
My GameInstance
's FSubsystemCollection
has the SubsystemArrayMap
with two entries UGameInstanceSubsystem
and USubystemParent
, that is one with all the different UGameInstanceSubsystem
instances that the first parent is UGameInstanceSubsystem
and another list with the subsystem instance that inherits USubystemParent.
From my point of view, USubsystemChild
's instance should be included in the list for the map SubsystemArrayMap
entry UGameInstanceSubsystem
.
The problem that I have is that I need to iterate all UGameInstanceSubsystem to find one that implements an interface.
Does anybody know if this is intended or a bug? also, is there a way to get all subsystems so I can see if they implement an specific interface?
Thanks.