Download

Slate Box IsEnabled function not being called or working anymore. Is this a bug?

This used to work. Now it doesn’t. I don’t know why:

This section of my Slate structure enabled state depends on the IsWidgetEnabled funcion:

SAssignNew(ToolkitWidget, SBorder) .HAlign(HAlign_Center) .Padding(5) .IsEnabled(&FXXXEdModeToolkit::IsWidgetEnabled)

    // Main Vertical Box
    SNew(SVerticalBox)

Which is defined like this:

bool FXXXEdModeToolkit::IsWidgetEnabled()
{
return GEditor->GetSelectedActors()->Num() != 0;
}

But nothing gets enabled or the function called. Sometimes this works… Why?