| 31 | } |
| 32 | |
| 33 | bool UFlowSubsystem::ShouldCreateSubsystem(UObject* Outer) const |
| 34 | { |
| 35 | // Only create an instance if there is no override implementation defined elsewhere |
| 36 | TArray<UClass*> ChildClasses; |
| 37 | GetDerivedClasses(GetClass(), ChildClasses, false); |
| 38 | if (ChildClasses.Num() > 0) |
| 39 | { |
| 40 | return false; |
| 41 | } |
| 42 | |
| 43 | // in this case, we simply create subsystem for every instance of the game |
| 44 | if (GetDefault<UFlowSettings>()->bCreateFlowSubsystemOnClients) |
| 45 | { |
| 46 | return true; |
| 47 | } |
| 48 | |
| 49 | return Outer->GetWorld()->GetNetMode() < NM_Client; |
| 50 | } |
| 51 | |
| 52 | void UFlowSubsystem::Initialize(FSubsystemCollectionBase& Collection) |
| 53 | { |