Can we control the execution order of subsystem in unreal ? Any idea ?
The author mentions setting up subsystem dependencies. I think that it what you need in this case.
Can’t test it at the moment, on mobile
Source is in project
inside the subsystem cpp Initialize function you can initialize dependencies like this:
void USubAGameInstanceSubsystem::Initialize(FSubsystemCollectionBase& Collection)
{
Collection.InitializeDependency(USubBInstanceSubsystem::StaticClass());
UE_LOG(LogTemp, Warning, TEXT("Initialize the SubB Game Instance Subsystem."));
}
Hi, thanks for the response. The example show how we can initialized subsystem related to they dependencies. What i’m looking for it’s more a way of ordering the ticking of my subsystem. For example, some of my data in subsystem B are depending of the calculation of some data in subsystem A. Right now the ordering of the ticking of my subsystem is depending on the engine. So sometime, if subsystem B ticking before A the rendering of the data will be apply the next iteration. Could be 2 iterations if 3 subsystems are interdependent.
Ticking happens in four separate groups. You can have your different subsystems run in different world tick groups.
If you need finer grain control, you can instead use the Task system, and schedule exact dependencies between tasks.
In general, trying to enforce a static ordering will cause serial dependencies and make multi-threading less effective, making for lower frame rate.