Update registration flow since CreateRenderState_Concurrent can't be used to register our delegate since it needs to be initialized first (CreateSceneProxy) and in some code paths for loaded actors the call order might be different since primitive registration gets deferred (i.e. FRegisterComponentContext != nullptr).
In that case initialization won't called and an ensure will fire in UnregisterDebugDrawDelegate since registration failed (was not initialized).
Case 1: FRegisterComponentContext == nullptr ==> Super::CreateRenderState_Concurrent + sync CreateSceneProxy (init) + RegisterDebugDrawDelegate ==> works fine
Case 2: FRegisterComponentContext != nullptr ==> Super::CreateRenderState_Concurrent + deferred CreateSceneProxy + RegisterDebugDrawDelegate (skipped since not init) + CreateSceneProxy ==> ensures in UnregisterDebugDrawDelegate
Bonus:
- some code analysis fixes
- removed some 'CoreMinimal.h' includes
- exported log category 'LogVisual'
- fixed some uninitialized properties (FNavTestDebugDrawDelegateHelper, UNavMeshRenderingComponent, FNavMeshSceneProxyData)
- fixed some methods hiding non-virtual from base class (GetAllocatedSize)
- fixed FGameplayDebuggerCompositeSceneProxy::GetMemoryFootprint that was not considering base class allocations
#rnx
#jira UE-125097
#preflight 614362684778fa00016a8cad
#rb mieszko.zielinski
[CL 17544171 by Yoan StAmant in ue5-main branch]
I've also tabbified *.build.cs since I was modifying it anyway.
#review-14812433 @Mikko.Mononen, @Stephen.Holmes
#rb swarm
#rnx
[CL 14812500 by Mieszko Zielinski in ue5-main branch]
#jira UE-89355
#rb aris.theophanidis
#ROBOMERGE-SOURCE: CL 11607220 via CL 11607234
#ROBOMERGE-BOT: (v656-11643781)
[CL 11754758 by yoan stamant in Main branch]
Yoan.StAmant, Maxime.Mercier
#rb Yoan.StAmant, Maxime.Mercier
#ROBOMERGE-SOURCE: CL 11496843 via CL 11496844 via CL 11496845
#ROBOMERGE-BOT: (v654-11333218)
[CL 11496846 by mieszko zielinski in Main branch]