FSlateNavigationEventSimulator

HOW TO DEBUG NAVIGATION EVENTS Test the static result via [FSlateNavigationEventSimulator](API\Developer\SlateReflector\FSlateNavigationEventSimulator).

Unreal Engine C++ API Reference > Developer > SlateReflector

References

   
Module SlateReflector
Header /Engine/Source/Developer/SlateReflector/Public/SlateNavigationEventSimulator.h
Include #include "SlateNavigationEventSimulator.h"

Syntax

class FSlateNavigationEventSimulator  

Remarks

HOW TO DEBUG NAVIGATION EVENTS Test the static result via FSlateNavigationEventSimulator. If the simulation doesn't work, your widget is probably not be configured properly. If the simulation does work, use the "WidgetReflector events log" or the "Console Slate Debugger" to get information on the navigation event while playing. A - If you do not find the event, check it has been consumed by the viewport or by a widget with OnKeyDown. B - If you find the event, note if the Reply and Consumed widget are different. i- If they are different, then use the "WidgetReflector routing" tool to understand why another widget has consumed the routing. For example, the widget can be disabled or it may have a custom OnNavigation event. ii- If they are not different, then the GameViewportClient or the application may have consumed the event. You may also check if you received the focus event with the "WidgetReflector events log" or with the "Console Slate Debugger". Simulate navigation attempt and collect the result for later display. Some elements may steel the navigation attempt dynamically and can be evaluated until evaluated in game. A list of elements that can still the navigation attempt and modify the result.

The viewport may consume the Navigation.

A widget may override the OnNavigation function and return a different result dynamically.

A widget can change its "enabled" and "supports keyboard focus" flags dynamically during gameplay.

The GameViewportClient may consume the event via the CustomNavigationEvent.

The application or a widget can consume the "set focus" event. Resulting in different behavior.

Variables

Type Name Description
FHandleNavigati... OnViewportHandleNavigation Once the destination widget has been decided, the viewport may handled the event.

Functions

Type Name Description
TArray< FSim... Simulate ( const FWidgetPath& WidgetPath, int32 UserIndex, ENavigationGenesis Genesis, ENavigationStyle Navigation ) Simulate a navigation event for a widget
FSimulationR... Simulate ( const FWidgetPath& WidgetPath, int32 UserIndex, ENavigationGenesis Genesis, EUINavigation Navigation ) Simulate a navigation event for a widget
TArray< FSim... SimulateForEachWidgets ( const FWidgetPath& WidgetPath, int32 UserIndex, ENavigationGenesis Genesis, ENavigationStyle Navigation ) Simulate for each widgets that are enabled and support keyboard focus
TArray< FSim... SimulateForEachWidgets ( const TSharedRef< SWindow >& Windo..., int32 UserIndex, ENavigationGenesis Genesis, ENavigationStyle Navigation ) Simulate for each widgets that are enabled and support keyboard focus
TArray< FSim... SimulateForEachWidgets ( const FWidgetPath& WidgetPath, int32 UserIndex, ENavigationGenesis Genesis, EUINavigation Navigation ) Simulate for each widgets that are enabled and support keyboard focus
TArray< FSim... SimulateForEachWidgets ( const TSharedRef< SWindow >& Windo..., int32 UserIndex, ENavigationGenesis Genesis, EUINavigation Navigation ) Simulate for each widgets that are enabled and support keyboard focus
FText ToText ( ENavigationStyle NavigationStyle )  
FText ToText ( ERoutedReason RoutedReason )  

Classes

Type Name Description
Public struct FSimulatedReply  
Public struct FSimulationResult  

Enums

Type Name Description
Public enum ENavigationStyle  
Public enum ERoutedReason  

Typedefs

Name Description
FHandleNavigation  

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library