MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / ShouldCreateSubsystem

Method ShouldCreateSubsystem

Source/Flow/Private/FlowSubsystem.cpp:33–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33bool 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
52void UFlowSubsystem::Initialize(FSubsystemCollectionBase& Collection)
53{

Callers

nothing calls this directly

Calls 1

GetWorldMethod · 0.45

Tested by

no test coverage detected