Hello everyone,
I’m facing a really specific bug that was really difficult to spot correctly.
The static lightning building never end and stay at 90%+
In the swarm agent log, all seems working fine, the baking goes really fast to 100% and that’s all.
Well, to reproduce this bug :
- Create an empty project on U4.17 (You can add the StarterContent we gonna need a static mesh later)
- Add a new C++ Class “UMyPointLightComponent” that inherit from “UPointLightComponent”, do not change anything at the generated code.
- Create a new C++ Class “AMyActor” that inherit from AActor this time and add your “UMyPointLightComponent” as a child of this new actor.
In other words, add this to your “MyActor.h” :
UPROPERTY( meta = ( DisplayName = "Light" ), EditAnywhere, Category = "Light" )
UMyPointLightComponent * pointLight;
And change your constructor in “MyActor.cpp” to this :
AMyActor::AMyActor() :
pointLight( CreateDefaultSubobject<UMyPointLightComponent>( TEXT( "Light.001" ) ) )
{
}
-
Compile and create an Actor Blueprint and add your freshly created Class “AMyActor” in your Blueprint.
-
Put everything with Mobility “Stationary” (including the “UMyPointLightComponent” child) and save your blueprint.
-
Add at least two instances of your blueprint in your scene
-
Add a static mesh ( the cube from the starter content will do the trick ) and put its Mobility to “Static” (for having at least one shadow to be baked)
-
Try “Build Lightning”…it should stuck at ~90%
Well, it’s a really specific problem and any change in this work flow will not bug. (like changing the mobility to something else, instancing the C++ class directly in the scene…)
If I’m doing something wrong, I apologize and any help is welcome, because I lost many time and I’m actually stuck in my project.
Thank you in advance.