Download

Scene component doesn't update/render (DrawDebug) unless I edit a variable in runtime

Hi,
I have an annoying problem. Basically I want to draw a debug box every frame and I call this function from the TickComponent.


void UShapeCollisionComponent::DrawDebugShape()
{
        DrawDebugBox(World, GetComponentLocation(), Box.Shape, GetComponentRotation().Quaternion(), Box.Color, false, Box.LifeTime, 0, Box.Tickness);
}

The problem is it doesn’t render, I also tried to call it from the tick actor in blueprint, making it BlueprintCallable, but it doesn’t render at all.
It only starts to render when in runtime I eject from the player, select him, then I go to the component that it’s attached to the player and I just change any variable, and the DrawDebugLine starts to render.
I tried to put a breakpoint on the DrawDebugBox function and it gets called every frame, but it doesn’t render until I edit a variable in the component.

For example in this screenshot I just pressed on Auto Activate and it started to render the box, if I edit some variables in code it doesn’t do anything. I tried to search for the function that updates the component when I edit a variable in the call stack, but I don’t know what it is that suddenly makes the box render.

Edit: I just tried and it also happens when I use the component to other actors.