Hey,
So this happens on native oculus quest 2 only.
I implemented an object pool to avoid causing lag spikes when spawning actors.
Still the GPU ms increases (not the draw ms, that stays at around 3ms) a lot when actors activated and moved (so “removing” them from the pool).
Also the GPU increases to like 30ms, and then goes back down to the 5-10ms I target.
Did anyone have this before or know how I can debug this properly?
How my object pool works is
void AObjectPoolActor::SetActive(bool InpActive)
{
this->Active = InpActive;
this->SetActorHiddenInGame(!Active);
this->SetActorEnableCollision(Active);
this->SetActorTickEnabled(Active);
TArray<UActorComponent*> children;
this->GetComponents(children);
for (int i = 0; i < children.Num(); i++)
{
UActorComponent* child = children[i];
if (child != nullptr)
{
if(Active)
child->Activate();
else
child->Deactivate();
}
}
}