Unreal Engine Version: 5.4.4
This post is related to bug report UE-229303.
I have the same issue, but the reason for it is not the “Include Actor in HLOD” flag - it’s the wrong HLOD layer is being assigned to the HLODActors, but you only get the Errors “…has an invalid HLOD layer…” when your HLOD layers are on a Grid other than the MainGrid (index 0).
Thats the setup of the 2nd Runtime Grid/Partition. 2 HLOD Layers: HLOD0 (Instancing) and HLOD1 (Approximated). Also notice the “Default HLOD Layer” name at the bottom - it will appear again in the error message shown below.
Thats how the HLOD Assets are set up:
After Building the HLODs, we get Errors like:
Actor /Game/Maps/PerformanceTest/PerfTest01.PerfTest01_HLOD_Approximated_Trees/PerfTest01_FoliageHLOD_0_-1_2_0_0 has an invalid HLOD layer /Game/Maps/PerformanceTest/PerfTest01_HLOD0_Instancing.PerfTest01_HLOD0_Instancing
Which makes sense, as these (1 example for each layer) HLOD actors got created:
In the last screenshot no HLOD Layer is assigned. That explains the error messages, as when an Actor is set to be Included in HLOD, but HLOD Layer Property is empty, it uses the “Default HLOD Layer” as fallback.
So the HLODActors on the Instanced Layer got HLOD Layer Approximated assigned (originally on the Mesh I had the Instanced layer assigned and also expected to be set for this HLODActor) and for the Approximated we have no HLOD layer assigned (expected the Approximated Layer gets set).
It somehow looks, as the “Parent Layer” Property is (mistakenly) used for the HLOD Layer properties of the HLOD actors instead of the assigned Layer.
Also: why are these Partition Layers get set, when setting “Is Spatiallly loaded” to false?