I have a SButton and when the framework calls SButton::OnMouseEnter the code breaks in
void FSlateAttributeMetaData::InvalidateWidget(SWidget& OwningWidget, const FSlateAttributeBase& Attribute, ESlateAttributeType AttributeType, EInvalidateWidgetReason Reason)
{
....
#if WITH_SLATE_DEBUGGING
ensureAlwaysMsgf(FSlateAttributeBase::IsInvalidateWidgetReasonSupported(Reason), TEXT("%s is not an EInvalidateWidgetReason supported by SlateAttribute."), *LexToString(Reason));
#endif
OwningWidget.Invalidate(Reason);
}
The given output is for the Reason=223
Ensure condition failed: FSlateAttributeBase::IsInvalidateWidgetReasonSupported(Reason) [File:D:\GitHub\UnrealEngine\Engine\Source\Runtime\SlateCore\Private\Types\SlateAttributeMetaData.cpp] [Line: 365]
Layout|Paint|Volatility|ChildOrder|RenderTransform|AttributeRegistration|Prepass is not an EInvalidateWidgetReason supported by SlateAttribute.
[2022.05.31-14.28.12:706][683]LogOutputDevice: Error: Ensure condition failed: FSlateAttributeBase::IsInvalidateWidgetReasonSupported(Reason) [File:D:\GitHub\UnrealEngine\Engine\Source\Runtime\SlateCore\Private\Types\SlateAttributeMetaData.cpp] [Line: 365]
Layout|Paint|Volatility|ChildOrder|RenderTransform|AttributeRegistration|Prepass is not an EInvalidateWidgetReason supported by SlateAttribute.
[2022.05.31-14.28.12:706][683]LogStats: FDebug::EnsureFailed - 0.000 s
A breakpoint instruction (__debugbreak() statement or a similar call) was executed in KSGMClient-Win64-DebugGame.exe.
I don’t understand why the value 223=11011111 is invalid, since 11011111 is equivalent to
But how can I know when the slate is in SlatePrepass or in FastPath.
I’m adding content to a widget dynamically, not necessarily in Construct only. In my case, when the player’s information changed, or when the match is in count down, or starting, …
And the error is firing on SButton::OnMouseEnter()
and don’t call the SButton base member function, no more error.
void SKButton::OnMouseEnter(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent)
{
// Don't call parent implementation
// otherwise it generates an error
/* @todo Check if the error disappears in future version of UE5 */
//SButton::OnMouseEnter(MyGeometry, MouseEvent);
}
void SKButton::OnMouseLeave(const FPointerEvent& MouseEvent)
{
// Don't call parent implementation
// otherwise it generates an error
/* @todo Check if the error disappears in future version of UE5 */
//SButton::OnMouseLeave(MouseEvent);
}
Something should be wrong in SButton::OnMouseEnter() or something somewhere else.