engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 友元 | 所有成员列表
UUserWidget类 参考

The user widget is extensible by users through the WidgetBlueprint. 更多...

#include <UserWidget.h>

+ 类 UUserWidget 继承关系图:

Public 成员函数

bool AddToPlayerScreen (int32 ZOrder=0)
 Adds the widget to the game's viewport in a section dedicated to the player. 更多...
 
void AddToViewport (int32 ZOrder=0)
 Adds it to the game's viewport and fills the entire screen, unless SetDesiredSizeInViewport is called to explicitly set the size. 更多...
 
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
void BindToAnimationEvent (UWidgetAnimation *Animation, FWidgetAnimationDynamicEvent Delegate, EWidgetAnimationEvent AnimationEvent, FName UserTag=NAME_None)
 Allows binding to a specific animation's event. 更多...
 
void BindToAnimationFinished (UWidgetAnimation *Animation, FWidgetAnimationDynamicEvent Delegate)
 Bind an animation finished delegate. 更多...
 
void BindToAnimationStarted (UWidgetAnimation *Animation, FWidgetAnimationDynamicEvent Delegate)
 Bind an animation started delegate. 更多...
 
void CancelLatentActions ()
 Cancels any pending Delays or timer callbacks for this widget.
 
void Construct ()
 Called after the underlying slate widget is constructed. 更多...
 
void Destruct ()
 Called when a widget is no longer referenced causing the slate resource to destroyed. 更多...
 
void FlushAnimations ()
 Flushes all animations on all widgets to guarantee that any queued updates are processed before this call returns
 
float GetAnimationCurrentTime (const UWidgetAnimation *InAnimation) const
 Gets the current time of the animation in this widget 更多...
 
template<class T >
T * GetOwningLocalPlayer () const
 Gets the local player associated with this UI cast to the template type. 更多...
 
virtual ULocalPlayer * GetOwningLocalPlayer () const override
 Gets the local player associated with this UI. 更多...
 
template<class T >
T * GetOwningPlayer () const
 Gets the player controller associated with this UI cast to the template type. 更多...
 
virtual APlayerController * GetOwningPlayer () const override
 Gets the player controller associated with this UI. 更多...
 
class APlayerCameraManager * GetOwningPlayerCameraManager () const
 Gets the player camera manager associated with this UI. 更多...
 
template<class T >
T * GetOwningPlayerCameraManager () const
 Gets the player camera manager associated with this UI cast to the template type. 更多...
 
class APawn * GetOwningPlayerPawn () const
 Gets the player pawn associated with this UI. 更多...
 
template<class T >
T * GetOwningPlayerPawn () const
 Gets the player pawn associated with this UI cast to the template type. 更多...
 
template<class TPlayerState = APlayerState>
TPlayerState * GetOwningPlayerState (bool bChecked=false) const
 Get the owning player's PlayerState. 更多...
 
const FLocalPlayerContext & GetPlayerContext () const
 Gets the player context associated with this UI.
 
UWidget * GetRootWidget () const
 
TSharedPtr< SWidget > GetSlateWidgetFromName (const FName &Name) const
 
UWidget * GetWidgetFromName (const FName &Name) const
 
UWidget * GetWidgetHandle (TSharedRef< SWidget > InWidget)
 
bool IsAnimationPlaying (const UWidgetAnimation *InAnimation) const
 Gets whether an animation is currently playing on this widget. 更多...
 
bool IsAnimationPlayingForward (const UWidgetAnimation *InAnimation)
 returns true if the animation is currently playing forward, false otherwise. 更多...
 
bool IsAnyAnimationPlaying () const
 
virtual bool IsAsset () const
 Returns true if this object is considered an asset.
 
bool IsInteractable () const
 Gets a value indicating if the widget is interactive.
 
FORCEINLINE bool IsPlayingAnimation () const
 Are we currently playing any animations?
 
void OnAddedToFocusPath (FFocusEvent InFocusEvent)
 If focus is gained on on this widget or on a child widget and this widget is added to the focus path, and wasn't previously part of it, this event is called. 更多...
 
FEventReply OnAnalogValueChanged (FGeometry MyGeometry, FAnalogInputEvent InAnalogInputEvent)
 Called when an analog value changes on a button that supports analog 更多...
 
void OnDragCancelled (const FPointerEvent &PointerEvent, UDragDropOperation *Operation)
 Called when the user cancels the drag operation, typically when they simply release the mouse button after beginning a drag operation, but failing to complete the drag. 更多...
 
void OnDragDetected (FGeometry MyGeometry, const FPointerEvent &PointerEvent, UDragDropOperation *&Operation)
 Called when Slate detects that a widget started to be dragged. 更多...
 
void OnDragEnter (FGeometry MyGeometry, FPointerEvent PointerEvent, UDragDropOperation *Operation)
 Called during drag and drop when the drag enters the widget. 更多...
 
void OnDragLeave (FPointerEvent PointerEvent, UDragDropOperation *Operation)
 Called during drag and drop when the drag leaves the widget. 更多...
 
bool OnDragOver (FGeometry MyGeometry, FPointerEvent PointerEvent, UDragDropOperation *Operation)
 Called during drag and drop when the the mouse is being dragged over a widget. 更多...
 
bool OnDrop (FGeometry MyGeometry, FPointerEvent PointerEvent, UDragDropOperation *Operation)
 Called when the user is dropping something onto a widget. 更多...
 
void OnFocusLost (FFocusEvent InFocusEvent)
 Called when this widget loses focus. 更多...
 
FEventReply OnFocusReceived (FGeometry MyGeometry, FFocusEvent InFocusEvent)
 Called when keyboard focus is given to this widget. 更多...
 
void OnInitialized ()
 Called once only at game time on non-template instances. 更多...
 
FEventReply OnKeyChar (FGeometry MyGeometry, FCharacterEvent InCharacterEvent)
 Called after a character is entered while this widget has focus 更多...
 
FEventReply OnKeyDown (FGeometry MyGeometry, FKeyEvent InKeyEvent)
 Called after a key (keyboard, controller, ...) is pressed when this widget has focus (this event bubbles if not handled) 更多...
 
FEventReply OnKeyUp (FGeometry MyGeometry, FKeyEvent InKeyEvent)
 Called after a key (keyboard, controller, ...) is released when this widget has focus 更多...
 
FEventReply OnMotionDetected (FGeometry MyGeometry, FMotionEvent InMotionEvent)
 Called when motion is detected (controller or device) e.g. 更多...
 
FEventReply OnMouseButtonDoubleClick (FGeometry InMyGeometry, const FPointerEvent &InMouseEvent)
 Called when a mouse button is double clicked. 更多...
 
FEventReply OnMouseButtonDown (FGeometry MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse button was pressed within it. 更多...
 
FEventReply OnMouseButtonUp (FGeometry MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse button was release within it. 更多...
 
void OnMouseCaptureLost ()
 Called when mouse capture is lost if it was owned by this widget.
 
void OnMouseEnter (FGeometry MyGeometry, const FPointerEvent &MouseEvent)
 The system will use this event to notify a widget that the cursor has entered it. 更多...
 
void OnMouseLeave (const FPointerEvent &MouseEvent)
 The system will use this event to notify a widget that the cursor has left it. 更多...
 
FEventReply OnMouseMove (FGeometry MyGeometry, const FPointerEvent &MouseEvent)
 The system calls this method to notify the widget that a mouse moved within it. 更多...
 
FEventReply OnMouseWheel (FGeometry MyGeometry, const FPointerEvent &MouseEvent)
 Called when the mouse wheel is spun. 更多...
 
FEventReply OnPreviewKeyDown (FGeometry MyGeometry, FKeyEvent InKeyEvent)
 Called after a key (keyboard, controller, ...) is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget. 更多...
 
FEventReply OnPreviewMouseButtonDown (FGeometry MyGeometry, const FPointerEvent &MouseEvent)
 Just like OnMouseButtonDown, but tunnels instead of bubbling. 更多...
 
void OnRemovedFromFocusPath (FFocusEvent InFocusEvent)
 If focus is lost on on this widget or on a child widget and this widget is no longer part of the focus path. 更多...
 
FEventReply OnTouchEnded (FGeometry MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is ended (finger lifted) 更多...
 
FEventReply OnTouchForceChanged (FGeometry MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad force has changed (user pressed down harder or let up) 更多...
 
FEventReply OnTouchGesture (FGeometry MyGeometry, const FPointerEvent &GestureEvent)
 Called when the user performs a gesture on trackpad. 更多...
 
FEventReply OnTouchMoved (FGeometry MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is moved (finger moved) 更多...
 
FEventReply OnTouchStarted (FGeometry MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is started (finger down) 更多...
 
float PauseAnimation (const UWidgetAnimation *InAnimation)
 Pauses an already running animation in this widget 更多...
 
UUMGSequencePlayer * PlayAnimation (UWidgetAnimation *InAnimation, float StartAtTime=0.0f, int32 NumLoopsToPlay=1, EUMGSequencePlayMode::Type PlayMode=EUMGSequencePlayMode::Forward, float PlaybackSpeed=1.0f, bool bRestoreState=false)
 Plays an animation in this widget a specified number of times 更多...
 
UUMGSequencePlayer * PlayAnimationAtTime (UWidgetAnimation *InAnimation, float StartAtTime=0.0f, int32 NumLoopsToPlay=1, EUMGSequencePlayMode::Type PlayMode=EUMGSequencePlayMode::Forward, float PlaybackSpeed=1.0f)
 Plays an animation in this widget a specified number of times 更多...
 
UUMGSequencePlayer * PlayAnimationForward (UWidgetAnimation *InAnimation, float PlaybackSpeed=1.0f, bool bRestoreState=false)
 Plays an animation on this widget relative to it's current state forward. 更多...
 
UUMGSequencePlayer * PlayAnimationReverse (UWidgetAnimation *InAnimation, float PlaybackSpeed=1.0f, bool bRestoreState=false)
 Plays an animation on this widget relative to it's current state in reverse. 更多...
 
UUMGSequencePlayer * PlayAnimationTimeRange (UWidgetAnimation *InAnimation, float StartAtTime=0.0f, float EndAtTime=0.0f, int32 NumLoopsToPlay=1, EUMGSequencePlayMode::Type PlayMode=EUMGSequencePlayMode::Forward, float PlaybackSpeed=1.0f, bool bRestoreState=false)
 Plays an animation in this widget a specified number of times stopping at a specified time 更多...
 
void PlaySound (class USoundBase *SoundToPlay)
 Plays a sound through the UI 更多...
 
virtual void PostDuplicate (bool bDuplicateForPIE) override
 Called after duplication & serialization and before PostLoad. 更多...
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
void PreConstruct (bool IsDesignTime)
 Called by both the game and the editor. 更多...
 
virtual void PreSave (const class ITargetPlatform *TargetPlatform) override
 Presave function. 更多...
 
virtual void RemoveFromParent () override
 Removes the widget from its parent widget. 更多...
 
void RemoveFromViewport ()
 Removes the widget from the viewport.
 
void ReverseAnimation (const UWidgetAnimation *InAnimation)
 If an animation is playing, this function will reverse the playback. 更多...
 
virtual void Serialize (FArchive &Ar) override
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
void SetAnimationCurrentTime (const UWidgetAnimation *InAnimation, float InTime)
 Sets the current time of the animation in this widget. 更多...
 
void SetColorAndOpacity (FLinearColor InColorAndOpacity)
 Sets the tint of the widget, this affects all child widgets. 更多...
 
void SetForegroundColor (FSlateColor InForegroundColor)
 Sets the foreground color of the widget, this is inherited by sub widgets. 更多...
 
void SetNumLoopsToPlay (const UWidgetAnimation *InAnimation, int32 NumLoopsToPlay)
 Changes the number of loops to play given a playing animation 更多...
 
void SetOwningLocalPlayer (ULocalPlayer *LocalPlayer)
 Sets the player associated with this UI via LocalPlayer reference. 更多...
 
void SetOwningPlayer (APlayerController *LocalPlayerController)
 Sets the local player associated with this UI via PlayerController reference. 更多...
 
void SetPadding (FMargin InPadding)
 Sets the padding for the user widget, putting a larger gap between the widget border and it's root widget.
 
void SetPlaybackSpeed (const UWidgetAnimation *InAnimation, float PlaybackSpeed=1.0f)
 Changes the playback rate of a playing animation 更多...
 
void SetPlayerContext (const FLocalPlayerContext &InPlayerContext)
 Sets the player context associated with this UI.
 
void SetPositionInViewport (FVector2D Position, bool bRemoveDPIScale=true)
 Sets the widgets position in the viewport. 更多...
 
virtual void SetVisibility (ESlateVisibility InVisibility) override
 Sets the visibility of the widget.
 
void StopAllAnimations ()
 Stop All actively running animations. 更多...
 
void StopAnimation (const UWidgetAnimation *InAnimation)
 Stops an already running animation in this widget 更多...
 
void StopAnimationsAndLatentActions ()
 Cancels any pending Delays or timer callbacks for this widget, and stops all active animations on the widget.
 
virtual void SynchronizeProperties () override
 Applies all properties to the native widget if possible. 更多...
 
void Tick (FGeometry MyGeometry, float InDeltaTime)
 Ticks this widget. 更多...
 
void UnbindFromAnimationFinished (UWidgetAnimation *Animation, FWidgetAnimationDynamicEvent Delegate)
 Unbind an animation finished delegate. 更多...
 
void UnbindFromAnimationStarted (UWidgetAnimation *Animation, FWidgetAnimationDynamicEvent Delegate)
 Unbind an animation started delegate. 更多...
 
- Public 成员函数 继承自 UWidget
void BuildNavigation ()
 Called by the owning user widget after the slate widget has been created. 更多...
 
virtual void FinishDestroy () override
 Called to finish destroying the object. 更多...
 
void ForceLayoutPrepass ()
 Forces a pre-pass. 更多...
 
void ForceVolatile (bool bForce)
 Sets the forced volatility of the widget.
 
FText GetAccessibleSummaryText () const
 Gets the accessible summary text from the underlying Slate accessible widget. 更多...
 
FText GetAccessibleText () const
 Gets the accessible text from the underlying Slate accessible widget 更多...
 
const FGeometry & GetCachedGeometry () const
 Gets the last geometry used to Tick the widget. 更多...
 
TSharedPtr< SWidget > GetCachedWidget () const
 Gets the last created widget does not recreate the gc container for the widget if one is needed.
 
EWidgetClipping GetClipping () const
 Gets the clipping state of this widget.
 
FVector2D GetDesiredSize () const
 Gets the widgets desired size. 更多...
 
UGameInstance * GetGameInstance () const
 Gets the game instance associated with this UI. 更多...
 
template<class TGameInstance = UGameInstance>
TGameInstance * GetGameInstance () const
 Gets the game instance associated with this UI. 更多...
 
bool GetIsEnabled () const
 Gets the current enabled status of the widget
 
virtual ULocalPlayer * GetOwningLocalPlayer () const
 Gets the local player associated with this UI. 更多...
 
template<class T >
T * GetOwningLocalPlayer () const
 Gets the local player associated with this UI cast to the template type. 更多...
 
virtual APlayerController * GetOwningPlayer () const
 Gets the player controller associated with this UI. 更多...
 
template<class TPlayerController = APlayerController>
TPlayerController * GetOwningPlayer () const
 Gets the player controller associated with this UI cast to the template type. 更多...
 
class UPanelWidget * GetParent () const
 Gets the parent widget
 
float GetRenderOpacity () const
 Gets the current visibility of the widget.
 
ESlateVisibility GetVisibility () const
 Gets the current visibility of the widget.
 
bool HasAnyUserFocus () const
 Returns true if this widget is focused by any user.
 
bool HasFocusedDescendants () const
 Returns true if any descendant widget is focused by any user.
 
bool HasKeyboardFocus () const
 Checks to see if this widget currently has the keyboard focus 更多...
 
bool HasMouseCapture () const
 Checks to see if this widget is the current mouse captor 更多...
 
bool HasMouseCaptureByUser (int32 UserIndex, int32 PointerIndex=-1) const
 Checks to see if this widget is the current mouse captor 更多...
 
bool HasUserFocus (APlayerController *PlayerController) const
 Returns true if this widget is focused by a specific user.
 
bool HasUserFocusedDescendants (APlayerController *PlayerController) const
 Returns true if any descendant widget is focused by a specific user.
 
void InvalidateLayoutAndVolatility ()
 Invalidates the widget from the view of a layout caching widget that may own this widget. 更多...
 
bool IsChildOf (UWidget *PossibleParent)
 Recurses up the list of parents and returns true if this widget is a descendant of the PossibleParent 更多...
 
bool IsConstructed () const
 Gets the last created widget does not recreate the gc container for the widget if one is needed.
 
virtual bool IsHovered () const
 Returns true if the widget is currently being hovered by a pointer device
 
bool IsVisible () const
 Returns true if the widget is Visible, HitTestInvisible or SelfHitTestInvisible.
 
virtual void PreSave (const class ITargetPlatform *TargetPlatform) override
 Presave function. 更多...
 
virtual void RemoveFromParent ()
 Removes the widget from its parent widget. 更多...
 
void ResetCursor ()
 Resets the cursor to use on the widget, removing any customization for it.
 
void SetAllNavigationRules (EUINavigationRule Rule, FName WidgetToFocus)
 Sets the widget navigation rules for all directions. 更多...
 
void SetClipping (EWidgetClipping InClipping)
 Sets the clipping state of this widget.
 
void SetCursor (EMouseCursor::Type InCursor)
 Sets the cursor to show over the widget.
 
void SetFocus ()
 Sets the focus to this widget for the owning user
 
virtual void SetIsEnabled (bool bInIsEnabled)
 Sets the current enabled status of the widget
 
void SetKeyboardFocus ()
 Sets the focus to this widget.
 
void SetNavigationRule (EUINavigation Direction, EUINavigationRule Rule, FName WidgetToFocus)
 Sets the widget navigation rules for a specific direction. 更多...
 
void SetNavigationRuleBase (EUINavigation Direction, EUINavigationRule Rule)
 Sets the widget navigation rules for a specific direction. 更多...
 
void SetNavigationRuleCustom (EUINavigation Direction, FCustomWidgetNavigationDelegate InCustomDelegate)
 Sets the widget navigation rules for a specific direction. 更多...
 
void SetNavigationRuleCustomBoundary (EUINavigation Direction, FCustomWidgetNavigationDelegate InCustomDelegate)
 Sets the widget navigation rules for a specific direction. 更多...
 
void SetNavigationRuleExplicit (EUINavigation Direction, UWidget *InWidget)
 Sets the widget navigation rules for a specific direction. 更多...
 
void SetRenderOpacity (float InOpacity)
 Sets the visibility of the widget.
 
void SetToolTip (UWidget *Widget)
 Sets a custom widget as the tooltip of the widget.
 
void SetToolTipText (const FText &InToolTipText)
 Sets the tooltip text for the widget.
 
void SetUserFocus (APlayerController *PlayerController)
 Sets the focus to this widget for a specific user (if setting focus for the owning user, prefer SetFocus())
 
virtual void SetVisibility (ESlateVisibility InVisibility)
 Sets the visibility of the widget.
 
virtual void SynchronizeProperties ()
 Applies all properties to the native widget if possible. 更多...
 
TSharedRef< SWidget > TakeWidget ()
 Gets the underlying slate widget or constructs it if it doesn't exist. 更多...
 
- Public 成员函数 继承自 UVisual
virtual void BeginDestroy () override
 Called before destroying the object. 更多...
 
virtual bool NeedsLoadForServer () const override
 Called during saving to determine the load flags to save with the object. 更多...
 
- Public 成员函数 继承自 UObject
void AbortInsideMemberFunction () const
 Abort with a member function call at the top of the callstack, helping to ensure that most platforms will stuff this object's memory into the resulting minidump.
 
virtual bool AreNativePropertiesIdenticalTo (UObject *Other) const
 Returns whether native properties are identical to the one of the passed in component. 更多...
 
virtual void BeginDestroy ()
 Called before destroying the object. 更多...
 
virtual void BuildSubobjectMapping (UObject *OtherObject, TMap< UObject *, UObject * > &ObjectMapping) const
 Given OtherObject (which will be the same type as 'this'), recursively find any matching sub-objects from 'this' that also exist within OtherObject, and add the mappings to ObjectMapping. 更多...
 
void CallAddReferencedObjects (FReferenceCollector &Collector)
 Helper function to call AddReferencedObjects for this object's class. 更多...
 
void CallFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 Internal VM method for executing a function
 
bool CallFunctionByNameWithArguments (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor, bool bForceCallWithNonExec=false)
 Handle calling a function by name when executed from the console or a command line
 
virtual bool CallRemoteFunction (UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack)
 Call the actor's function remotely 更多...
 
bool CheckDefaultSubobjects (bool bForceCheck=false) const
 Checks default sub-object assumptions. 更多...
 
void CollectDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects, bool bIncludeNestedSubobjects=false) const
 Uses the TArchiveObjectReferenceCollector to build a list of all components referenced by this object which have this object as the outer 更多...
 
bool ConditionalBeginDestroy ()
 Called before destroying the object. 更多...
 
bool ConditionalFinishDestroy ()
 Called when an object is actually destroyed, memory should never be accessed again
 
void ConditionalPostLoad ()
 PostLoad if needed.
 
void ConditionalPostLoadSubobjects (struct FObjectInstancingGraph *OuterInstanceGraph=NULL)
 Instances subobjects and components for objects being loaded from disk, if necessary. 更多...
 
 DECLARE_FUNCTION (execBreakpoint)
 Breakpoint; only observed in the editor; executing it at any other time is a NOP
 
 DECLARE_FUNCTION (execInstrumentation)
 Instrumentation event for profiling; only observed in the builds with blueprint instrumentation
 
 DECLARE_FUNCTION (execPopExecutionFlow)
 Pops a code offset from the execution flow stack and starts execution there. 更多...
 
 DECLARE_FUNCTION (execPopExecutionFlowIfNot)
 Pops a code offset from the execution flow stack and starts execution there, if a condition is not true. 更多...
 
 DECLARE_FUNCTION (execPushExecutionFlow)
 Push a code offset onto the execution flow stack for future execution. 更多...
 
 DECLARE_FUNCTION (execReturnNothing)
 failsafe for functions that return a value - returns the zero value for a property and logs that control reached the end of a non-void function
 
 DECLARE_FUNCTION (execTracepoint)
 Tracepoint; only observed in the editor; executing it at any other time is a NOP
 
 DECLARE_FUNCTION (ProcessInternal)
 Internal function call processing. 更多...
 
void DestroyNonNativeProperties ()
 Destroy properties that won't be destroyed by the native destructor
 
void ExecuteUbergraph (int32 EntryPoint)
 Execute the ubergraph from a specific entry point
 
virtual void ExportCustomProperties (FOutputDevice &Out, uint32 Indent)
 Exports the property values for the specified object as text to the output device. 更多...
 
UFunction * FindFunction (FName InName) const
 Returns a UFunction with the specified name, wrapper for UClass::FindFunctionByName()
 
UFunction * FindFunctionChecked (FName InName) const
 Version of FindFunction() that will assert if the function was not found
 
virtual void FinishDestroy ()
 Called to finish destroying the object. 更多...
 
UObject * GetArchetype () const
 Return the template this object is based on. 更多...
 
void GetArchetypeInstances (TArray< UObject * > &Instances)
 Builds a list of objects which have this object in their archetype chain. 更多...
 
virtual void GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const
 Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects 更多...
 
virtual const TCHAR * GetConfigOverridePlatform () const
 Returns the override config hierarchy platform (if NDAd platforms need defaults to not be in Base*.ini but still want editor to load them)
 
FString GetDefaultConfigFilename () const
 Get the default config filename for the specified UObject
 
virtual FString GetDesc ()
 Return a one line description of an object for viewing in the thumbnail view of the generic browser
 
FString GetDetailedInfo () const
 This will return detail info about this specific object. 更多...
 
virtual FName GetExporterName (void)
 Returns the name of the exporter factory used to export this object Used when multiple factories have the same extension
 
virtual int32 GetFunctionCallspace (UFunction *Function, FFrame *Stack)
 Return the space this function should be called. 更多...
 
FString GetGlobalUserConfigFilename () const
 Get the global user override config filename for the specified UObject
 
virtual void GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const
 Returns properties that are replicated for the lifetime of the actor channel
 
virtual bool GetNativePropertyValues (TMap< FString, FString > &out_PropertyValues, uint32 ExportFlags=0) const
 Callback for retrieving a textual representation of natively serialized properties. 更多...
 
virtual int32 GetNetPushIdDynamic () const
 Should only ever be used by internal systems.
 
virtual void GetPreloadDependencies (TArray< UObject * > &OutDeps)
 Called during cooking. 更多...
 
virtual void GetPrestreamPackages (TArray< UObject * > &OutPrestream)
 Called during cooking. 更多...
 
virtual FPrimaryAssetId GetPrimaryAssetId () const
 Returns an Type:Name pair representing the PrimaryAssetId for this object. 更多...
 
FString GetProjectUserConfigFilename () const
 Get the project user override config filename for the specified UObject
 
SIZE_T GetResourceSizeBytes (EResourceSizeMode::Type Mode)
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the simple version which just returns the total number of bytes used by this object. 更多...
 
virtual void GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize)
 Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). 更多...
 
virtual FRestoreForUObjectOverwrite * GetRestoreForUObjectOverwrite ()
 Save information for StaticAllocateObject in the case of overwriting an existing object. 更多...
 
virtual UScriptStruct * GetSparseClassDataStruct () const
 Return the UStruct corresponding to the sidecar data structure that stores data that is constant for all instances of this class.
 
virtual void GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList)
 Returns a list of sub-objects that have stable names for networking
 
template<class T >
FORCEINLINE bool Implements () const
 Returns true if this object implements the interface T, false otherwise.
 
template<class T >
bool Implements () const
 Returns true if this object implements the interface T, false otherwise.
 
virtual void ImportCustomProperties (const TCHAR *SourceText, FFeedbackContext *Warn)
 Exports the property values for the specified object as text to the output device. 更多...
 
void InstanceSubobjectTemplates (struct FObjectInstancingGraph *InstanceGraph=NULL)
 Wrapper for calling UClass::InstanceSubobjectTemplates() for this object.
 
virtual bool IsAsset () const
 Returns true if this object is considered an asset.
 
bool IsBasedOnArchetype (const UObject *const SomeObject) const
 Determine if this object has SomeObject in its archetype chain.
 
virtual bool IsDestructionThreadSafe () const
 Called during garbage collection to determine if an object can have its destructor called on a worker thread. 更多...
 
virtual bool IsEditorOnly () const
 Called during saving to determine if the object is forced to be editor only or not 更多...
 
virtual bool IsFullNameStableForNetworking () const
 IsFullNameStableForNetworking means an object can be referred to its full path name over the network
 
bool IsInBlueprint () const
 Returns whether this object is contained in or part of a blueprint object
 
virtual bool IsLocalizedResource () const
 Returns true if this object is considered a localized resource.
 
virtual bool IsNameStableForNetworking () const
 IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network
 
virtual bool IsPostLoadThreadSafe () const
 Called during async load to determine if PostLoad can be called on the loading thread. 更多...
 
virtual bool IsReadyForAsyncPostLoad () const
 Called before calling PostLoad() in FAsyncPackage::PostLoadObjects(). 更多...
 
virtual bool IsReadyForFinishDestroy ()
 Called to check if the object is ready for FinishDestroy. 更多...
 
virtual bool IsSafeForRootSet () const
 Returns true if this object is safe to add to the root set.
 
bool IsSelected () const
 Test the selection state of a UObject 更多...
 
virtual bool IsSupportedForNetworking () const
 IsSupportedForNetworking means an object can be referenced over the network
 
void LoadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL)
 Imports property values from an .ini file. 更多...
 
virtual void MarkAsEditorOnlySubobject ()
 Called during subobject creation to mark this component as editor only, which causes it to get stripped in packaged builds
 
FORCEINLINE bool Modify (bool bAlwaysMarkDirty=true)
 Note that the object will be modified. 更多...
 
virtual bool NeedsLoadForClient () const
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForEditorGame () const
 Called during saving to include this object in client/servers running in editor builds, even if they wouldn't normally be. 更多...
 
virtual bool NeedsLoadForServer () const
 Called during saving to determine the load flags to save with the object. 更多...
 
virtual bool NeedsLoadForTargetPlatform (const class ITargetPlatform *TargetPlatform) const
 Called during saving to determine the load flags to save with the object. 更多...
 
void OutputReferencers (FOutputDevice &Ar, FReferencerInformationList *Referencers=NULL)
 Outputs a string to an arbitrary output device, describing the list of objects which are holding references to this one. 更多...
 
virtual void OverridePerObjectConfigSection (FString &SectionName)
 Allows PerObjectConfig classes, to override the ini section name used for the PerObjectConfig object. 更多...
 
void ParseParms (const TCHAR *Parms)
 Import an object from a file.
 
virtual void PostCDOContruct ()
 Called after the C++ constructor has run on the CDO for a class. 更多...
 
virtual void PostDuplicate (bool bDuplicateForPIE)
 Called after duplication & serialization and before PostLoad. 更多...
 
virtual void PostEditImport ()
 Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization
 
virtual void PostInitProperties ()
 Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多...
 
virtual void PostInterpChange (FProperty *PropertyThatChanged)
 This is called when property is modified by InterpPropertyTracks 更多...
 
virtual void PostLoad ()
 Do any object-specific cleanup required immediately after loading an object. 更多...
 
virtual void PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph)
 Instances components for objects being loaded from disk, if necessary. 更多...
 
virtual void PostNetReceive ()
 Called right after receiving a bunch
 
virtual void PostReloadConfig (class FProperty *PropertyThatWasLoaded)
 Called from ReloadConfig after the object has reloaded its configuration data.
 
virtual void PostRename (UObject *OldOuter, const FName OldName)
 Called at the end of Rename(), but only if the rename was actually carried out
 
virtual void PostRepNotifies ()
 Called right after calling all OnRep notifies (called even when there are no notifies)
 
virtual void PostSaveRoot (bool bCleanupIsRequired)
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual void PreDestroyFromReplication ()
 Called right before being marked for destruction due to network replication
 
virtual void PreDuplicate (FObjectDuplicationParameters &DupParams)
 Called before duplication. 更多...
 
virtual void PreNetReceive ()
 Called right before receiving a bunch
 
virtual void PreSave (const class ITargetPlatform *TargetPlatform)
 Presave function. 更多...
 
virtual bool PreSaveRoot (const TCHAR *Filename)
 Called from within SavePackage on the passed in base/root object. 更多...
 
virtual bool ProcessConsoleExec (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor)
 This function handles a console exec sent to the object; it is virtual so 'nexus' objects like a player controller can reroute the command to several different objects.
 
virtual void ProcessEvent (UFunction *Function, void *Parms)
 Called by VM to execute a UFunction with a filled in UStruct of parameters
 
virtual UClass * RegenerateClass (UClass *ClassToRegenerate, UObject *PreviousCDO)
 Called on the target when a class is loaded with ClassGeneratedBy is loaded. 更多...
 
void ReinitializeProperties (UObject *SourceObject=NULL, struct FObjectInstancingGraph *InstanceGraph=NULL)
 Wrapper function for InitProperties() which handles safely tearing down this object before re-initializing it from the specified source object. 更多...
 
void ReloadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL)
 Wrapper method for LoadConfig that is used when reloading the config data for objects at runtime which have already loaded their config data at least once. 更多...
 
virtual bool Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None)
 Rename this object to a unique name, or change its outer. 更多...
 
void RetrieveReferencers (TArray< FReferencerInformation > *OutInternalReferencers, TArray< FReferencerInformation > *OutExternalReferencers)
 Called by OutputReferencers() to get the internal list of referencers to write
 
void SaveConfig (uint64 Flags=CPF_Config, const TCHAR *Filename=NULL, FConfigCacheIni *Config=GConfig, bool bAllowCopyToDefaultObject=true)
 Save configuration out to ini files 更多...
 
virtual void Serialize (FArchive &Ar)
 Handles reading, writing, and reference collecting using FArchive. 更多...
 
void SerializeScriptProperties (FArchive &Ar) const
 Serializes the script property data located at Data. 更多...
 
void SerializeScriptProperties (FStructuredArchive::FSlot Slot) const
 Serializes the script property data located at Data. 更多...
 
void SetLinker (FLinkerLoad *LinkerLoad, int32 LinkerIndex, bool bShouldDetachExisting=true)
 Changes the linker and linker index to the passed in one. 更多...
 
virtual void ShutdownAfterError ()
 After a critical error, perform any mission-critical cleanup, such as restoring the video mode orreleasing hardware resources.
 
void SkipFunction (FFrame &Stack, RESULT_DECL, UFunction *Function)
 advances Stack's code past the parameters to the given Function and if the function has a return value, copies the zero value for that property to the memory for the return value 更多...
 
virtual void TagSubobjects (EObjectFlags NewFlags)
 Tags objects that are part of the same asset with the specified object flag, used for GC checking 更多...
 
void UpdateDefaultConfigFile (const FString &SpecificFileLocation="")
 Saves just the section(s) for this class into the default ini file for the class (with just the changes from base)
 
void UpdateGlobalUserConfigFile ()
 Saves just the section(s) for this class into the global user ini file for the class (with just the changes from base)
 
void UpdateProjectUserConfigFile ()
 Saves just the section(s) for this class into the project user ini file for the class (with just the changes from base)
 
void UpdateSinglePropertyInConfigFile (const FProperty *InProperty, const FString &InConfigIniName)
 Saves just the property into the global user ini file for the class (with just the changes from base)
 
- Public 成员函数 继承自 UObjectBaseUtility
void AddToCluster (UObjectBaseUtility *ClusterRootOrObjectFromCluster, bool bAddAsMutableObject=false)
 Adds this objects to a GC cluster that already exists 更多...
 
FORCEINLINE void AddToRoot ()
 Add an object to the root set. 更多...
 
FORCEINLINE void AppendName (FString &ResultString) const
 Optimized version of GetName that appends to an existing string
 
FORCEINLINE bool AtomicallyClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 Atomically clears passed in internal flags. 更多...
 
virtual bool CanBeClusterRoot () const
 Called after load to determine if the object can be a cluster root 更多...
 
virtual bool CanBeInCluster () const
 Called during cluster construction if the object can be added to a cluster 更多...
 
FORCEINLINE void ClearFlags (EObjectFlags NewFlags)
 Clears subset of flags for a specific object
 
FORCEINLINE void ClearInternalFlags (EInternalObjectFlags FlagsToClear) const
 Clears passed in internal flags. 更多...
 
FORCEINLINE void ClearPendingKill ()
 Unmarks this object as PendingKill.
 
virtual void CreateCluster ()
 Called after PostLoad to create UObject cluster
 
void DetachExternalPackage ()
 Utility function to temporarily detach the object external package, if any GetPackage will report the outer's package once detached
 
const UClass * FindNearestCommonBaseClass (const UClass *TestClass) const
 Finds the most-derived class which is a parent of both TestClass and this object's class. 更多...
 
FORCEINLINE EObjectMark GetAllMarks () const
 Returns all of the object marks on a specific object 更多...
 
FString GetFullGroupName (bool bStartWithOuter) const
 Walks up the chain of packages until it reaches the top level, which it ignores. 更多...
 
void GetFullName (const UObject *StopOuter, FString &ResultString, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 Version of GetFullName() that eliminates unnecessary copies.
 
FString GetFullName (const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const
 Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost[.Outer].Name'. 更多...
 
void * GetInterfaceAddress (UClass *InterfaceClass)
 Returns a pointer to this object safely converted to a pointer of the specified interface class. 更多...
 
FORCEINLINE EInternalObjectFlags GetInternalFlags () const
 Gets internal flags. 更多...
 
class FLinkerLoad * GetLinker () const
 Returns the linker for this object. 更多...
 
int32 GetLinkerCustomVersion (FGuid CustomVersionKey) const
 Returns the custom version of the linker for this object corresponding to the given custom version key. 更多...
 
int32 GetLinkerIndex () const
 Returns this object's LinkerIndex. 更多...
 
int32 GetLinkerLicenseeUE4Version () const
 Returns the licensee version of the linker for this object. 更多...
 
int32 GetLinkerUE4Version () const
 Returns the UE4 version of the linker for this object. 更多...
 
FORCEINLINE EObjectFlags GetMaskedFlags (EObjectFlags Mask=RF_AllFlags) const
 Returns object flags that are both in the mask and set on the object. 更多...
 
FORCEINLINE FString GetName () const
 Returns the name of this object (with no path information) 更多...
 
FORCEINLINE void GetName (FString &ResultString) const
 Optimized version of GetName that overwrites an existing string
 
void * GetNativeInterfaceAddress (UClass *InterfaceClass)
 Returns a pointer to the I* native interface object that this object implements. 更多...
 
const void * GetNativeInterfaceAddress (UClass *InterfaceClass) const
 Returns a pointer to the const I* native interface object that this object implements. 更多...
 
UPackage * GetOutermost () const
 Legacy function, has the same behavior as GetPackage use GetPackage instead. 更多...
 
UObject * GetOutermostObject () const
 Walks up the list of outers until it finds the top-level one that isn't a package. 更多...
 
UPackage * GetPackage () const
 Walks up the list of outers until it finds a package directly associated with the object. 更多...
 
void GetPathName (const UObject *StopOuter, FString &ResultString) const
 Versions of GetPathName() that eliminates unnecessary copies and allocations.
 
FString GetPathName (const UObject *StopOuter=NULL) const
 Returns the fully qualified pathname for this object, in the format: 'Outermost[.Outer].Name' 更多...
 
FORCEINLINE TStatId GetStatID (bool bForDeferredUse=false) const
 Returns the stat ID of the object, used for profiling. 更多...
 
template<typename T >
T * GetTypedOuter () const
 Traverses the outer chain searching for the next object of a certain type. 更多...
 
UObject * GetTypedOuter (UClass *Target) const
 Traverses the outer chain searching for the next object of a certain type. 更多...
 
FORCEINLINE bool HasAllFlags (EObjectFlags FlagsToCheck) const
 Used to safely check whether all of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAllMarks (EObjectMark Marks) const
 Tests an object for having ALL of a set of marks 更多...
 
FORCEINLINE bool HasAnyFlags (EObjectFlags FlagsToCheck) const
 Used to safely check whether any of the passed in flags are set. 更多...
 
FORCEINLINE bool HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const
 Used to safely check whether any of the passed in internal flags are set. 更多...
 
FORCEINLINE bool HasAnyMarks (EObjectMark Marks) const
 Tests an object for having ANY of a set of marks 更多...
 
template<class T >
bool IsA () const
 Returns true if this object is of the template type.
 
template<typename OtherClassType >
FORCEINLINE bool IsA (OtherClassType SomeBase) const
 Returns true if this object is of the specified type.
 
bool IsDefaultSubobject () const
 Returns whether this component was instanced from a component/subobject template, or if it is a component/subobject template. 更多...
 
bool IsIn (const UObject *SomeOuter) const
 Return the dispatch to IsInOuter or IsInPackage depending on SomeOuter's class. 更多...
 
bool IsIn (const UPackage *SomePackage) const
 Overload to determine if an object is in the specified package which can now be different than its outer chain. 更多...
 
bool IsInA (const UClass *SomeBaseClass) const
 Find out if this object is inside (has an outer) that is of the specified class 更多...
 
bool IsInOuter (const UObject *SomeOuter) const
 Returns true if the object is contained in the specified outer.
 
bool IsInPackage (const UPackage *SomePackage) const
 Returns true if the object is contained in the specified package.
 
FORCEINLINE bool IsNative () const
 Checks if the object is native.
 
FORCEINLINE bool IsPendingKill () const
 Checks the PendingKill flag to see if it is dead but memory still valid
 
FORCEINLINE bool IsPendingKillOrUnreachable () const
 Checks if the object is pending kill or unreachable.
 
FORCEINLINE bool IsRooted () const
 Returns true if this object is explicitly rooted 更多...
 
bool IsTemplate (EObjectFlags TemplateTypes=RF_ArchetypeObject|RF_ClassDefaultObject) const
 Determines whether this object is a template object 更多...
 
FORCEINLINE bool IsUnreachable () const
 Checks if the object is unreachable.
 
FORCEINLINE void Mark (EObjectMark Marks) const
 Adds marks to an object 更多...
 
bool MarkPackageDirty () const
 Finds the outermost package and marks it dirty. 更多...
 
FORCEINLINE void MarkPendingKill ()
 Marks this object as RF_PendingKill.
 
virtual void OnClusterMarkedAsPendingKill ()
 Called during Garbage Collection to perform additional cleanup when the cluster is about to be destroyed due to PendingKill flag being set on it.
 
FORCEINLINE bool operator< (const UObjectBaseUtility &Other) const
 Overloaded < operator. 更多...
 
void ReattachExternalPackage ()
 Utility function to reattach the object external package, if any GetPackage will report the object external package if set after this call
 
FORCEINLINE void RemoveFromRoot ()
 Remove an object from the root set.
 
bool RootPackageHasAnyFlags (uint32 CheckFlagMask) const
 Checks whether this object's top-most package has any of the specified flags 更多...
 
FORCEINLINE void SetFlags (EObjectFlags NewFlags)
 Modifies object flags for a specific object
 
FORCEINLINE void SetInternalFlags (EInternalObjectFlags FlagsToSet) const
 Clears passed in internal flags. 更多...
 
FORCEINLINE bool ThisThreadAtomicallyClearedRFUnreachable ()
 Atomically clear the unreachable flag 更多...
 
FORCEINLINE void UnMark (EObjectMark Marks) const
 Removes marks from and object 更多...
 
- Public 成员函数 继承自 UObjectBase
FORCENOINLINE void AtomicallyClearFlags (EObjectFlags FlagsToClear)
 Atomically clears the specified flags. 更多...
 
FORCENOINLINE void AtomicallySetFlags (EObjectFlags FlagsToAdd)
 Atomically adds the specified flags. 更多...
 
FORCEINLINE UClass * GetClass () const
 Returns the UClass that defines the fields of this object
 
UPackage * GetExternalPackage () const
 Returns the external UPackage associated with this object, if any
 
UPackage * GetExternalPackageInternal () const
 Returns the external UPackage for this object, if any, NOT THREAD SAFE, used by internal gc reference collecting.
 
FORCEINLINE EObjectFlags GetFlags () const
 Retrieve the object flags directly 更多...
 
FORCEINLINE FName GetFName () const
 Returns the logical name of this object
 
FORCEINLINE UObject * GetOuter () const
 Returns the UObject this object resides in
 
FORCEINLINE uint32 GetUniqueID () const
 Returns the unique ID of the object...these are reused so it is only unique while the object is alive. 更多...
 
bool IsValidLowLevel () const
 Checks to see if the object appears to be valid 更多...
 
bool IsValidLowLevelFast (bool bRecursive=true) const
 Faster version of IsValidLowLevel. 更多...
 
void SetExternalPackage (UPackage *InPackage)
 Associate an external package directly to this object.
 
 UObjectBase (UClass *InClass, EObjectFlags InFlags, EInternalObjectFlags InInternalFlags, UObject *InOuter, FName InName)
 Constructor used by StaticAllocateObject 更多...
 
virtual ~UObjectBase ()
 Final destructor, removes the object from the object array, and indirectly, from any annotations
 

Public 属性

TArray< UUMGSequencePlayer * > ActiveSequencePlayers
 All the sequence players currently playing
 
uint8 bHasScriptImplementedPaint: 1
 If a widget has an implemented paint blueprint function
 
uint8 bHasScriptImplementedTick: 1
 If a widget has an implemented tick blueprint function
 
uint8 bIsFocusable: 1
 Setting this flag to true, allows this widget to accept focus when clicked, or when navigated to.
 
FLinearColor ColorAndOpacity
 The color and opacity of this widget. 更多...
 
FSlateColor ForegroundColor
 The foreground color of the widget, this is inherited by sub widgets. 更多...
 
FOnVisibilityChangedEvent OnVisibilityChanged
 Called when the visibility has changed
 
FMargin Padding
 The padding area around the content.
 
TArray< UUMGSequencePlayer * > StoppedSequencePlayers
 List of sequence players to cache and clean up when safe
 
UWidgetTree * WidgetTree
 The widget tree contained inside this user widget initialized by the blueprint
 
- Public 属性 继承自 UWidget
uint8 bCreatedByConstructionScript:1
 Flag if the Widget was created from a blueprint
 
uint8 bIsEnabled:1
 Sets whether this widget can be modified interactively by the user
 
FGetBool bIsEnabledDelegate
 A bindable delegate for bIsEnabled
 
uint8 bIsVariable:1
 Allows controls to be exposed as variables in a blueprint. 更多...
 
EWidgetClipping Clipping
 Controls how the clipping behavior of this widget. 更多...
 
TEnumAsByte< EMouseCursor::Type > Cursor
 The cursor to show when the mouse is over the widget
 
EFlowDirectionPreference FlowDirectionPreference
 Allows you to set a new flow direction
 
class UWidgetNavigation * Navigation
 The navigation object for this widget is optionally created if the user has configured custom navigation rules for this widget in the widget designer. 更多...
 
float RenderOpacity
 The opacity of the widget
 
FWidgetTransform RenderTransform
 A bindable delegate for Cursor 更多...
 
FVector2D RenderTransformPivot
 The render transform pivot controls the location about which transforms are applied. 更多...
 
UPanelSlot * Slot
 The parent slot of the UWidget. 更多...
 
FText ToolTipText
 Tooltip text to show when the user hovers over the widget with the mouse
 
FGetText ToolTipTextDelegate
 A bindable delegate for ToolTipText
 
UWidget * ToolTipWidget
 Tooltip widget to show when the user hovers over the widget with the mouse
 
FGetWidget ToolTipWidgetDelegate
 A bindable delegate for ToolTipWidget
 
ESlateVisibility Visibility
 The visibility of the widget
 
FGetSlateVisibility VisibilityDelegate
 A bindable delegate for Visibility
 
TWeakObjectPtr< UClass > WidgetGeneratedByClass
 Stores a reference to the class responsible for this widgets construction.
 

Protected 成员函数

virtual void AddToScreen (ULocalPlayer *LocalPlayer, int32 ZOrder)
 Adds the widget to the screen, either to the viewport or to the player's screen depending on if the LocalPlayer is null.
 
void BroadcastAnimationStateChange (const UUMGSequencePlayer &Player, EWidgetAnimationEvent AnimationEvent)
 Broadcast any events based on a state transition for the sequence player, started, finished...etc.
 
virtual void InitializeNativeClassData ()
 The function is implemented only in nativized widgets (automatically converted from BP to c++)
 
bool IsListeningForInputAction (FName ActionName) const
 Checks if the action has a registered callback with the input component.
 
void ListenForInputAction (FName ActionName, TEnumAsByte< EInputEvent > EventType, bool bConsume, FOnInputAction Callback)
 Listens for a particular Player Input Action by name. 更多...
 
virtual int32 NativePaint (const FPaintArgs &Args, const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) const
 Native implemented paint function for the Widget Returns the maximum LayerID painted on
 
void OnAnimationFinished (const UWidgetAnimation *Animation)
 Called when an animation has either played all the way through or is stopped 更多...
 
virtual void OnAnimationFinishedPlaying (UUMGSequencePlayer &Player)
 Called when a sequence player is finished playing an animation
 
void OnAnimationStarted (const UWidgetAnimation *Animation)
 Called when an animation is started. 更多...
 
virtual void OnAnimationStartedPlaying (UUMGSequencePlayer &Player)
 Called when a sequence player is finished playing an animation
 
virtual void OnLevelRemovedFromWorld (ULevel *InLevel, UWorld *InWorld)
 Called when a top level widget is in the viewport and the world is potentially coming to and end. 更多...
 
virtual void OnWidgetRebuilt () override
 Function called after the underlying SWidget is constructed.
 
virtual TSharedRef< SWidget > RebuildWidget () override
 Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.
 
void RegisterInputComponent ()
 ListenForInputAction will automatically Register an Input Component with the player input system. 更多...
 
void StopListeningForAllInputActions ()
 Stops listening to all input actions, and unregisters the input component with the player controller.
 
void StopListeningForInputAction (FName ActionName, TEnumAsByte< EInputEvent > EventType)
 Removes the binding for a particular action's callback.
 
void TickActionsAndAnimation (float InDeltaTime)
 Ticks the active sequences and latent actions that have been scheduled for this Widget.
 
void UnregisterInputComponent ()
 StopListeningForAllInputActions will automatically Register an Input Component with the player input system. 更多...
 
- Protected 成员函数 继承自 UWidget
FORCEINLINE TSharedRef< SWidget > BuildDesignTimeWidget (TSharedRef< SWidget > WrapWidget)
 Just returns the incoming widget in non-editor builds.
 
FText GetDisplayNameBase () const
 Gets the base name used to generate the display label/name of this widget.
 
virtual void OnWidgetRebuilt ()
 Function called after the underlying SWidget is constructed.
 
virtual TSharedRef< SWidget > RebuildWidget ()
 Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.
 
void SynchronizeAccessibleData ()
 Copy all accessible properties to the AccessibleWidgetData object
 
- Protected 成员函数 继承自 UObject
bool CanCheckDefaultSubObjects (bool bForceCheck, bool &bResult) const
 Checks it's ok to perform subobjects check at this time.
 
virtual bool CheckDefaultSubobjectsInternal () const
 Checks default sub-object assumptions. 更多...
 
virtual FString GetDetailedInfoInternal () const
 This function actually does the work for the GetDetailedInfo() and is virtual. 更多...
 
- Protected 成员函数 继承自 UObjectBase
virtual void DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name)
 Convert a boot-strap registered class into a real one, add to uobject array, etc 更多...
 
void LowLevelRename (FName NewName, UObject *NewOuter=NULL)
 Just change the FName and Outer and rehash into name hash tables. 更多...
 
void Register (const TCHAR *PackageName, const TCHAR *Name)
 Enqueue the registration for this object.
 
virtual void RegisterDependencies ()
 Force any base classes to be registered first
 
FORCEINLINE void SetFlagsTo (EObjectFlags NewFlags)
 Set the object flags directly 更多...
 
 UObjectBase (EObjectFlags InFlags)
 Constructor used for bootstrapping 更多...
 

Protected 属性

uint8 bInitialized: 1
 Has this widget been initialized by its class yet?
 
uint8 bStoppingAllAnimations: 1
 If we're stopping all animations, don't allow new animations to be created as side-effects.
 
friend UUMGSequencePlayer
 The sequence player is a friend because we need to be alerted when animations start and finish without going through the normal event callbacks as people have a tendency to RemoveAll(this), which would permanently disable callbacks that are critical for UserWidget's base class - so rather we just directly report to the owning UserWidget of state transitions.
 
- Protected 属性 继承自 UWidget
uint8 bIsVolatile:1
 If true prevents the widget or its child's geometry or layout information from being cached. 更多...
 
TWeakPtr< SObjectWidget > MyGCWidget
 The underlying SWidget contained in a SObjectWidget
 
TWeakPtr< SWidget > MyWidget
 The underlying SWidget.
 
TArray< UPropertyBinding * > NativeBindings
 Native property bindings.
 

友元

class FWidgetBlueprintCompilerContext
 The compiler is a friend so that it can disable initialization from the widget tree
 
class SObjectWidget
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 UObject
static void AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector)
 Callback used to allow object register its direct object references that are not already covered by the token stream. 更多...
 
static bool CanCreateInCurrentContext (UObject *Template)
 Determines if you can create an object from the supplied template in the current context (editor, client only, dedicated server, game/listen) This calls NeedsLoadForClient & NeedsLoadForServer
 
static UObject * GetArchetypeFromRequiredInfo (const UClass *Class, const UObject *Outer, FName Name, EObjectFlags ObjectFlags)
 Return the template that an object with this class, outer and name would be 更多...
 
static const FName & SourceFileTagName ()
 Get the common tag name used for all asset source file import paths
 
static void UpdateClassesExcludedFromDedicatedClient (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 Update the list of classes that we should exclude from dedicated client builds
 
static void UpdateClassesExcludedFromDedicatedServer (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames)
 Update the list of classes that we should exclude from dedicated server builds
 
- 静态 Public 成员函数 继承自 UObjectBase
static void EmitBaseReferences (UClass *RootClass)
 Emit GC tokens for UObjectBase, this might be UObject::StaticClass or Default__Class
 
static FString RemoveClassPrefix (const TCHAR *ClassName)
 Removes the class prefix from the given string
 
- 静态 Protected 成员函数 继承自 UObjectBaseUtility
static void CreateClusterFromObject (UObjectBaseUtility *ClusterRootObject, UObjectBaseUtility *ReferencingObject)
 Helper function to create a cluster from UObject
 

详细描述

The user widget is extensible by users through the WidgetBlueprint.

示例
/github/workspace/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

成员函数说明

◆ AddToPlayerScreen()

bool UUserWidget::AddToPlayerScreen ( int32  ZOrder = 0)

Adds the widget to the game's viewport in a section dedicated to the player.

This is valuable in a split screen game where you need to only show a widget over a player's portion of the viewport.

参数
ZOrderThe higher the number, the more on top this widget will be.

◆ AddToViewport()

void UUserWidget::AddToViewport ( int32  ZOrder = 0)

Adds it to the game's viewport and fills the entire screen, unless SetDesiredSizeInViewport is called to explicitly set the size.

参数
ZOrderThe higher the number, the more on top this widget will be.

◆ BeginDestroy()

virtual void UUserWidget::BeginDestroy ( )
overridevirtual

Called before destroying the object.

This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.

重载 UVisual .

◆ BindToAnimationEvent()

void UUserWidget::BindToAnimationEvent ( UWidgetAnimation *  Animation,
FWidgetAnimationDynamicEvent  Delegate,
EWidgetAnimationEvent  AnimationEvent,
FName  UserTag = NAME_None 
)

Allows binding to a specific animation's event.

参数
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes
AnimationEventthe event to watch for.
UserTagScopes the delegate to only be called when the animation completes with a specific tag set on it when it was played.

◆ BindToAnimationFinished()

void UUserWidget::BindToAnimationFinished ( UWidgetAnimation *  Animation,
FWidgetAnimationDynamicEvent  Delegate 
)

Bind an animation finished delegate.

参数
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes

◆ BindToAnimationStarted()

void UUserWidget::BindToAnimationStarted ( UWidgetAnimation *  Animation,
FWidgetAnimationDynamicEvent  Delegate 
)

Bind an animation started delegate.

参数
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes

◆ Construct()

void UUserWidget::Construct ( )

Called after the underlying slate widget is constructed.

Depending on how the slate object is used this event may be called multiple times due to adding and removing from the hierarchy. If you need a true called-once-when-created event, use OnInitialized.

◆ Destruct()

void UUserWidget::Destruct ( )

Called when a widget is no longer referenced causing the slate resource to destroyed.

Just like Construct this event can be called multiple times.

◆ GetAnimationCurrentTime()

float UUserWidget::GetAnimationCurrentTime ( const UWidgetAnimation *  InAnimation) const

Gets the current time of the animation in this widget

参数
Thename of the animation to get the current time for
返回
the current time of the animation.

◆ GetOwningLocalPlayer() [1/2]

template<class T >
T * UUserWidget::GetOwningLocalPlayer ( ) const
inlinevirtual

Gets the local player associated with this UI cast to the template type.

返回
The owning local player. May be NULL if the cast fails.

重载 UWidget .

◆ GetOwningLocalPlayer() [2/2]

virtual ULocalPlayer * UUserWidget::GetOwningLocalPlayer ( ) const
overridevirtual

Gets the local player associated with this UI.

返回
The owning local player.

重载 UWidget .

◆ GetOwningPlayer() [1/2]

template<class T >
T * UUserWidget::GetOwningPlayer ( ) const
inlinevirtual

Gets the player controller associated with this UI cast to the template type.

返回
The player controller that owns the UI. May be NULL if the cast fails.

重载 UWidget .

◆ GetOwningPlayer() [2/2]

virtual APlayerController * UUserWidget::GetOwningPlayer ( ) const
overridevirtual

Gets the player controller associated with this UI.

返回
The player controller that owns the UI.

重载 UWidget .

◆ GetOwningPlayerCameraManager() [1/2]

class APlayerCameraManager * UUserWidget::GetOwningPlayerCameraManager ( ) const

Gets the player camera manager associated with this UI.

返回
Gets the owning player camera manager that's owned by the player controller assigned to this widget.

◆ GetOwningPlayerCameraManager() [2/2]

template<class T >
T * UUserWidget::GetOwningPlayerCameraManager ( ) const
inline

Gets the player camera manager associated with this UI cast to the template type.

返回
Gets the owning player camera manager that's owned by the player controller assigned to this widget. May be NULL if the cast fails.

◆ GetOwningPlayerPawn() [1/2]

class APawn * UUserWidget::GetOwningPlayerPawn ( ) const

Gets the player pawn associated with this UI.

返回
Gets the owning player pawn that's owned by the player controller assigned to this widget.

◆ GetOwningPlayerPawn() [2/2]

template<class T >
T * UUserWidget::GetOwningPlayerPawn ( ) const
inline

Gets the player pawn associated with this UI cast to the template type.

返回
Gets the owning player pawn that's owned by the player controller assigned to this widget. May be NULL if the cast fails.

◆ GetOwningPlayerState()

template<class TPlayerState = APlayerState>
TPlayerState * UUserWidget::GetOwningPlayerState ( bool  bChecked = false) const
inline

Get the owning player's PlayerState.

返回
const APlayerState*

◆ GetRootWidget()

UWidget * UUserWidget::GetRootWidget ( ) const
返回
The root UObject widget wrapper

◆ GetSlateWidgetFromName()

TSharedPtr< SWidget > UUserWidget::GetSlateWidgetFromName ( const FName &  Name) const
返回
The slate widget corresponding to a given name

◆ GetWidgetFromName()

UWidget * UUserWidget::GetWidgetFromName ( const FName &  Name) const
返回
The uobject widget corresponding to a given name

◆ GetWidgetHandle()

UWidget * UUserWidget::GetWidgetHandle ( TSharedRef< SWidget >  InWidget)
返回
The UObject wrapper for a given SWidget

◆ IsAnimationPlaying()

bool UUserWidget::IsAnimationPlaying ( const UWidgetAnimation *  InAnimation) const

Gets whether an animation is currently playing on this widget.

参数
InAnimationThe animation to check the playback status of
返回
True if the animation is currently playing

◆ IsAnimationPlayingForward()

bool UUserWidget::IsAnimationPlayingForward ( const UWidgetAnimation *  InAnimation)

returns true if the animation is currently playing forward, false otherwise.

参数
InAnimationThe playing animation that we want to know about

◆ IsAnyAnimationPlaying()

bool UUserWidget::IsAnyAnimationPlaying ( ) const
返回
True if any animation is currently playing

◆ ListenForInputAction()

void UUserWidget::ListenForInputAction ( FName  ActionName,
TEnumAsByte< EInputEvent >  EventType,
bool  bConsume,
FOnInputAction  Callback 
)
protected

Listens for a particular Player Input Action by name.

This requires that those actions are being executed, and that we're not currently in UI-Only Input Mode.

◆ OnAddedToFocusPath()

void UUserWidget::OnAddedToFocusPath ( FFocusEvent  InFocusEvent)

If focus is gained on on this widget or on a child widget and this widget is added to the focus path, and wasn't previously part of it, this event is called.

参数
InFocusEventFocusEvent

◆ OnAnalogValueChanged()

FEventReply UUserWidget::OnAnalogValueChanged ( FGeometry  MyGeometry,
FAnalogInputEvent  InAnalogInputEvent 
)

Called when an analog value changes on a button that supports analog

参数
MyGeometryThe Geometry of the widget receiving the event
InAnalogInputEventAnalog Event
返回
Returns whether the event was handled, along with other possible actions

◆ OnAnimationFinished()

void UUserWidget::OnAnimationFinished ( const UWidgetAnimation *  Animation)
protected

Called when an animation has either played all the way through or is stopped

参数
AnimationThe animation that has finished playing

◆ OnAnimationStarted()

void UUserWidget::OnAnimationStarted ( const UWidgetAnimation *  Animation)
protected

Called when an animation is started.

参数
Animationthe animation that started

◆ OnDragCancelled()

void UUserWidget::OnDragCancelled ( const FPointerEvent &  PointerEvent,
UDragDropOperation *  Operation 
)

Called when the user cancels the drag operation, typically when they simply release the mouse button after beginning a drag operation, but failing to complete the drag.

参数
PointerEventLast mouse event from when the drag was canceled.
OperationThe drag operation that was canceled.

◆ OnDragDetected()

void UUserWidget::OnDragDetected ( FGeometry  MyGeometry,
const FPointerEvent &  PointerEvent,
UDragDropOperation *&  Operation 
)

Called when Slate detects that a widget started to be dragged.

参数
InMyGeometryWidget geometry
PointerEventMouseMove that triggered the drag
OperationThe drag operation that was detected.

◆ OnDragEnter()

void UUserWidget::OnDragEnter ( FGeometry  MyGeometry,
FPointerEvent  PointerEvent,
UDragDropOperation *  Operation 
)

Called during drag and drop when the drag enters the widget.

参数
MyGeometryThe geometry of the widget receiving the event.
PointerEventThe mouse event from when the drag entered the widget.
OperationThe drag operation that entered the widget.

◆ OnDragLeave()

void UUserWidget::OnDragLeave ( FPointerEvent  PointerEvent,
UDragDropOperation *  Operation 
)

Called during drag and drop when the drag leaves the widget.

参数
PointerEventThe mouse event from when the drag left the widget.
OperationThe drag operation that entered the widget.

◆ OnDragOver()

bool UUserWidget::OnDragOver ( FGeometry  MyGeometry,
FPointerEvent  PointerEvent,
UDragDropOperation *  Operation 
)

Called during drag and drop when the the mouse is being dragged over a widget.

参数
MyGeometryThe geometry of the widget receiving the event.
PointerEventThe mouse event from when the drag occurred over the widget.
OperationThe drag operation over the widget.
返回
'true' to indicate that you handled the drag over operation. Returning 'false' will cause the operation to continue to bubble up.

◆ OnDrop()

bool UUserWidget::OnDrop ( FGeometry  MyGeometry,
FPointerEvent  PointerEvent,
UDragDropOperation *  Operation 
)

Called when the user is dropping something onto a widget.

Ends the drag and drop operation, even if no widget handles this.

参数
MyGeometryThe geometry of the widget receiving the event.
PointerEventThe mouse event from when the drag occurred over the widget.
OperationThe drag operation over the widget.
返回
'true' to indicate you handled the drop operation.

◆ OnFocusLost()

void UUserWidget::OnFocusLost ( FFocusEvent  InFocusEvent)

Called when this widget loses focus.

This event does not bubble.

参数
InFocusEventFocusEvent

◆ OnFocusReceived()

FEventReply UUserWidget::OnFocusReceived ( FGeometry  MyGeometry,
FFocusEvent  InFocusEvent 
)

Called when keyboard focus is given to this widget.

This event does not bubble.

参数
MyGeometryThe Geometry of the widget receiving the event
InFocusEventFocusEvent
返回
Returns whether the event was handled, along with other possible actions

◆ OnInitialized()

void UUserWidget::OnInitialized ( )

Called once only at game time on non-template instances.

While Construct/Destruct pertain to the underlying Slate, this is called only once for the UUserWidget. If you have one-time things to establish up-front (like binding callbacks to events on BindWidget properties), do so here.

◆ OnKeyChar()

FEventReply UUserWidget::OnKeyChar ( FGeometry  MyGeometry,
FCharacterEvent  InCharacterEvent 
)

Called after a character is entered while this widget has focus

参数
MyGeometryThe Geometry of the widget receiving the event
InCharacterEventCharacter event
返回
Returns whether the event was handled, along with other possible actions

◆ OnKeyDown()

FEventReply UUserWidget::OnKeyDown ( FGeometry  MyGeometry,
FKeyEvent  InKeyEvent 
)

Called after a key (keyboard, controller, ...) is pressed when this widget has focus (this event bubbles if not handled)

参数
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
返回
Returns whether the event was handled, along with other possible actions

◆ OnKeyUp()

FEventReply UUserWidget::OnKeyUp ( FGeometry  MyGeometry,
FKeyEvent  InKeyEvent 
)

Called after a key (keyboard, controller, ...) is released when this widget has focus

参数
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
返回
Returns whether the event was handled, along with other possible actions

◆ OnLevelRemovedFromWorld()

virtual void UUserWidget::OnLevelRemovedFromWorld ( ULevel *  InLevel,
UWorld *  InWorld 
)
protectedvirtual

Called when a top level widget is in the viewport and the world is potentially coming to and end.

When this occurs, it's not save to keep widgets on the screen. We automatically remove them when this happens and mark them for pending kill.

◆ OnMotionDetected()

FEventReply UUserWidget::OnMotionDetected ( FGeometry  MyGeometry,
FMotionEvent  InMotionEvent 
)

Called when motion is detected (controller or device) e.g.

Someone tilts or shakes their controller.

参数
MyGeometryThe geometry of the widget receiving the event.
MotionEventThe motion event generated

◆ OnMouseButtonDoubleClick()

FEventReply UUserWidget::OnMouseButtonDoubleClick ( FGeometry  InMyGeometry,
const FPointerEvent &  InMouseEvent 
)

Called when a mouse button is double clicked.

Override this in derived classes.

参数
InMyGeometryWidget geometry
InMouseEventMouse button event
返回
Returns whether the event was handled, along with other possible actions

◆ OnMouseButtonDown()

FEventReply UUserWidget::OnMouseButtonDown ( FGeometry  MyGeometry,
const FPointerEvent &  MouseEvent 
)

The system calls this method to notify the widget that a mouse button was pressed within it.

This event is bubbled.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

◆ OnMouseButtonUp()

FEventReply UUserWidget::OnMouseButtonUp ( FGeometry  MyGeometry,
const FPointerEvent &  MouseEvent 
)

The system calls this method to notify the widget that a mouse button was release within it.

This event is bubbled.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

◆ OnMouseEnter()

void UUserWidget::OnMouseEnter ( FGeometry  MyGeometry,
const FPointerEvent &  MouseEvent 
)

The system will use this event to notify a widget that the cursor has entered it.

This event is NOT bubbled.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event

◆ OnMouseLeave()

void UUserWidget::OnMouseLeave ( const FPointerEvent &  MouseEvent)

The system will use this event to notify a widget that the cursor has left it.

This event is NOT bubbled.

参数
MouseEventInformation about the input event

◆ OnMouseMove()

FEventReply UUserWidget::OnMouseMove ( FGeometry  MyGeometry,
const FPointerEvent &  MouseEvent 
)

The system calls this method to notify the widget that a mouse moved within it.

This event is bubbled.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

◆ OnMouseWheel()

FEventReply UUserWidget::OnMouseWheel ( FGeometry  MyGeometry,
const FPointerEvent &  MouseEvent 
)

Called when the mouse wheel is spun.

This event is bubbled.

参数
MouseEventMouse event
返回
Returns whether the event was handled, along with other possible actions

◆ OnPreviewKeyDown()

FEventReply UUserWidget::OnPreviewKeyDown ( FGeometry  MyGeometry,
FKeyEvent  InKeyEvent 
)

Called after a key (keyboard, controller, ...) is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget.

This event is primarily to allow parent widgets to consume an event before a child widget processes it and it should be used only when there is no better design alternative.

参数
MyGeometryThe Geometry of the widget receiving the event
InKeyEventKey event
返回
Returns whether the event was handled, along with other possible actions

◆ OnPreviewMouseButtonDown()

FEventReply UUserWidget::OnPreviewMouseButtonDown ( FGeometry  MyGeometry,
const FPointerEvent &  MouseEvent 
)

Just like OnMouseButtonDown, but tunnels instead of bubbling.

If this even is handled, OnMouseButtonDown will not be sent.

Use this event sparingly as preview events generally make UIs more difficult to reason about.

参数
MyGeometryThe Geometry of the widget receiving the event
MouseEventInformation about the input event
返回
Whether the event was handled along with possible requests for the system to take action.

◆ OnRemovedFromFocusPath()

void UUserWidget::OnRemovedFromFocusPath ( FFocusEvent  InFocusEvent)

If focus is lost on on this widget or on a child widget and this widget is no longer part of the focus path.

参数
InFocusEventFocusEvent

◆ OnTouchEnded()

FEventReply UUserWidget::OnTouchEnded ( FGeometry  MyGeometry,
const FPointerEvent &  InTouchEvent 
)

Called when a touchpad touch is ended (finger lifted)

参数
MyGeometryThe geometry of the widget receiving the event.
InTouchEventThe touch event generated

◆ OnTouchForceChanged()

FEventReply UUserWidget::OnTouchForceChanged ( FGeometry  MyGeometry,
const FPointerEvent &  InTouchEvent 
)

Called when a touchpad force has changed (user pressed down harder or let up)

参数
MyGeometryThe geometry of the widget receiving the event.
InTouchEventThe touch event generated

◆ OnTouchGesture()

FEventReply UUserWidget::OnTouchGesture ( FGeometry  MyGeometry,
const FPointerEvent &  GestureEvent 
)

Called when the user performs a gesture on trackpad.

This event is bubbled.

参数
MyGeometryThe geometry of the widget receiving the event.
GestureEventgesture event
返回
Returns whether the event was handled, along with other possible actions

◆ OnTouchMoved()

FEventReply UUserWidget::OnTouchMoved ( FGeometry  MyGeometry,
const FPointerEvent &  InTouchEvent 
)

Called when a touchpad touch is moved (finger moved)

参数
MyGeometryThe geometry of the widget receiving the event.
InTouchEventThe touch event generated

◆ OnTouchStarted()

FEventReply UUserWidget::OnTouchStarted ( FGeometry  MyGeometry,
const FPointerEvent &  InTouchEvent 
)

Called when a touchpad touch is started (finger down)

参数
MyGeometryThe geometry of the widget receiving the event.
InTouchEventThe touch event generated

◆ PauseAnimation()

float UUserWidget::PauseAnimation ( const UWidgetAnimation *  InAnimation)

Pauses an already running animation in this widget

参数
Thename of the animation to pause
返回
the time point the animation was at when it was paused, relative to its start position. Use this as the StartAtTime when you trigger PlayAnimation.

◆ PlayAnimation()

UUMGSequencePlayer * UUserWidget::PlayAnimation ( UWidgetAnimation *  InAnimation,
float  StartAtTime = 0.0f,
int32  NumLoopsToPlay = 1,
EUMGSequencePlayMode::Type  PlayMode = EUMGSequencePlayMode::Forward,
float  PlaybackSpeed = 1.0f,
bool  bRestoreState = false 
)

Plays an animation in this widget a specified number of times

参数
InAnimationThe animation to play
StartAtTimeThe time in the animation from which to start playing, relative to the start position. For looped animations, this will only affect the first playback of the animation.
NumLoopsToPlayThe number of times to loop this animation (0 to loop indefinitely)
PlaybackSpeedThe speed at which the animation should play
PlayModeSpecifies the playback mode
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ PlayAnimationAtTime()

UUMGSequencePlayer * UUserWidget::PlayAnimationAtTime ( UWidgetAnimation *  InAnimation,
float  StartAtTime = 0.0f,
int32  NumLoopsToPlay = 1,
EUMGSequencePlayMode::Type  PlayMode = EUMGSequencePlayMode::Forward,
float  PlaybackSpeed = 1.0f 
)
inline

Plays an animation in this widget a specified number of times

参数
InAnimationThe animation to play
StartAtTimeThe time in the animation from which to start playing, relative to the start position. For looped animations, this will only affect the first playback of the animation.
NumLoopsToPlayThe number of times to loop this animation (0 to loop indefinitely)
PlaybackSpeedThe speed at which the animation should play
PlayModeSpecifies the playback mode

◆ PlayAnimationForward()

UUMGSequencePlayer * UUserWidget::PlayAnimationForward ( UWidgetAnimation *  InAnimation,
float  PlaybackSpeed = 1.0f,
bool  bRestoreState = false 
)

Plays an animation on this widget relative to it's current state forward.

You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.

参数
InAnimationThe animation to play
PlayModeSpecifies the playback mode
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ PlayAnimationReverse()

UUMGSequencePlayer * UUserWidget::PlayAnimationReverse ( UWidgetAnimation *  InAnimation,
float  PlaybackSpeed = 1.0f,
bool  bRestoreState = false 
)

Plays an animation on this widget relative to it's current state in reverse.

You should use this version in situations where say a user can click a button and that causes a panel to slide out, and you want to reverse that same animation to begin sliding in the opposite direction.

参数
InAnimationThe animation to play
PlayModeSpecifies the playback mode
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ PlayAnimationTimeRange()

UUMGSequencePlayer * UUserWidget::PlayAnimationTimeRange ( UWidgetAnimation *  InAnimation,
float  StartAtTime = 0.0f,
float  EndAtTime = 0.0f,
int32  NumLoopsToPlay = 1,
EUMGSequencePlayMode::Type  PlayMode = EUMGSequencePlayMode::Forward,
float  PlaybackSpeed = 1.0f,
bool  bRestoreState = false 
)

Plays an animation in this widget a specified number of times stopping at a specified time

参数
InAnimationThe animation to play
StartAtTimeThe time in the animation from which to start playing, relative to the start position. For looped animations, this will only affect the first playback of the animation.
EndAtTimeThe absolute time in the animation where to stop, this is only considered in the last loop.
NumLoopsToPlayThe number of times to loop this animation (0 to loop indefinitely)
PlayModeSpecifies the playback mode
PlaybackSpeedThe speed at which the animation should play
bRestoreStateRestores widgets to their pre-animated state when the animation stops

◆ PlaySound()

void UUserWidget::PlaySound ( class USoundBase *  SoundToPlay)

Plays a sound through the UI

参数
Thesound to play

◆ PostDuplicate()

virtual void UUserWidget::PostDuplicate ( bool  bDuplicateForPIE)
overridevirtual

Called after duplication & serialization and before PostLoad.

Used to e.g. make sure UStaticMesh's UModel gets copied as well. Note: NOT called on components on actor duplication (alt-drag or copy-paste). Use PostEditImport as well to cover that case.

重载 UObject .

◆ PostLoad()

virtual void UUserWidget::PostLoad ( )
overridevirtual

Do any object-specific cleanup required immediately after loading an object.

This is not called for newly-created objects, and by default will always execute on the game thread.

重载 UObject .

◆ PreConstruct()

void UUserWidget::PreConstruct ( bool  IsDesignTime)

Called by both the game and the editor.

Allows users to run initial setup for their widgets to better preview the setup in the designer and since generally that same setup code is required at runtime, it's called there as well.

WARNING This is intended purely for cosmetic updates using locally owned data, you can not safely access any game related state, if you call something that doesn't expect to be run at editor time, you may crash the editor.

In the event you save the asset with blueprint code that causes a crash on evaluation. You can turn off PreConstruct evaluation in the Widget Designer settings in the Editor Preferences.

◆ PreSave()

virtual void UUserWidget::PreSave ( const class ITargetPlatform *  TargetPlatform)
overridevirtual

Presave function.

Gets called once before an object gets serialized for saving. This function is necessary for save time computation as Serialize gets called three times per object from within SavePackage.

警告
: Objects created from within PreSave will NOT have PreSave called on them!!!

重载 UWidget .

◆ RegisterInputComponent()

void UUserWidget::RegisterInputComponent ( )
protected

ListenForInputAction will automatically Register an Input Component with the player input system.

If you however, want to Pause and Resume, listening for a set of actions, the best way is to use UnregisterInputComponent to pause, and RegisterInputComponent to resume listening.

◆ RemoveFromParent()

virtual void UUserWidget::RemoveFromParent ( )
overridevirtual

Removes the widget from its parent widget.

If this widget was added to the player's screen or the viewport it will also be removed from those containers.

重载 UWidget .

◆ ReverseAnimation()

void UUserWidget::ReverseAnimation ( const UWidgetAnimation *  InAnimation)

If an animation is playing, this function will reverse the playback.

参数
InAnimationThe playing animation that we want to reverse

◆ Serialize()

virtual void UUserWidget::Serialize ( FArchive &  Ar)
overridevirtual

Handles reading, writing, and reference collecting using FArchive.

This implementation handles all FProperty serialization, but can be overridden for native variables.

重载 UObject .

◆ SetAnimationCurrentTime()

void UUserWidget::SetAnimationCurrentTime ( const UWidgetAnimation *  InAnimation,
float  InTime 
)

Sets the current time of the animation in this widget.

Does not change state.

参数
Thename of the animation to get the current time for
Thecurrent time of the animation.

◆ SetColorAndOpacity()

void UUserWidget::SetColorAndOpacity ( FLinearColor  InColorAndOpacity)

Sets the tint of the widget, this affects all child widgets.

参数
InColorAndOpacityThe tint to apply to all child widgets.

◆ SetForegroundColor()

void UUserWidget::SetForegroundColor ( FSlateColor  InForegroundColor)

Sets the foreground color of the widget, this is inherited by sub widgets.

Any color property that is marked as inherit will use this color.

参数
InForegroundColorThe foreground color.

◆ SetNumLoopsToPlay()

void UUserWidget::SetNumLoopsToPlay ( const UWidgetAnimation *  InAnimation,
int32  NumLoopsToPlay 
)

Changes the number of loops to play given a playing animation

参数
InAnimationThe animation that is already playing
NumLoopsToPlayThe number of loops to play. (0 to loop indefinitely)

◆ SetOwningLocalPlayer()

void UUserWidget::SetOwningLocalPlayer ( ULocalPlayer *  LocalPlayer)

Sets the player associated with this UI via LocalPlayer reference.

参数
LocalPlayerThe local player you want to be the conceptual owner of this UI.

◆ SetOwningPlayer()

void UUserWidget::SetOwningPlayer ( APlayerController *  LocalPlayerController)

Sets the local player associated with this UI via PlayerController reference.

参数
LocalPlayerControllerThe PlayerController of the local player you want to be the conceptual owner of this UI.

◆ SetPlaybackSpeed()

void UUserWidget::SetPlaybackSpeed ( const UWidgetAnimation *  InAnimation,
float  PlaybackSpeed = 1.0f 
)

Changes the playback rate of a playing animation

参数
InAnimationThe animation that is already playing
PlaybackRatePlayback rate multiplier (1 is default)

◆ SetPositionInViewport()

void UUserWidget::SetPositionInViewport ( FVector2D  Position,
bool  bRemoveDPIScale = true 
)

Sets the widgets position in the viewport.

参数
PositionThe 2D position to set the widget to in the viewport.
bRemoveDPIScaleIf you've already calculated inverse DPI, set this to false.
Otherwise inverse DPI is applied to the position so that when the location is scaled by DPI, it ends up in the expected position.

◆ StopAllAnimations()

void UUserWidget::StopAllAnimations ( )

Stop All actively running animations.

参数
Thename of the animation to stop

◆ StopAnimation()

void UUserWidget::StopAnimation ( const UWidgetAnimation *  InAnimation)

Stops an already running animation in this widget

参数
Thename of the animation to stop

◆ SynchronizeProperties()

virtual void UUserWidget::SynchronizeProperties ( )
overridevirtual

Applies all properties to the native widget if possible.

This is called after a widget is constructed. It can also be called by the editor to update modified state, so ensure all initialization to a widgets properties are performed here, or the property and visual state may become unsynced.

重载 UWidget .

◆ Tick()

void UUserWidget::Tick ( FGeometry  MyGeometry,
float  InDeltaTime 
)

Ticks this widget.

Override in derived classes, but always call the parent implementation.

参数
MyGeometryThe space allotted for this widget
InDeltaTimeReal time passed since last tick

◆ UnbindFromAnimationFinished()

void UUserWidget::UnbindFromAnimationFinished ( UWidgetAnimation *  Animation,
FWidgetAnimationDynamicEvent  Delegate 
)

Unbind an animation finished delegate.

参数
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes

◆ UnbindFromAnimationStarted()

void UUserWidget::UnbindFromAnimationStarted ( UWidgetAnimation *  Animation,
FWidgetAnimationDynamicEvent  Delegate 
)

Unbind an animation started delegate.

参数
Animationthe animation to listen for starting or finishing.
Delegatethe delegate to call when the animation's state changes

◆ UnregisterInputComponent()

void UUserWidget::UnregisterInputComponent ( )
protected

StopListeningForAllInputActions will automatically Register an Input Component with the player input system.

If you however, want to Pause and Resume, listening for a set of actions, the best way is to use UnregisterInputComponent to pause, and RegisterInputComponent to resume listening.

类成员变量说明

◆ ColorAndOpacity

FLinearColor UUserWidget::ColorAndOpacity

The color and opacity of this widget.

Tints all child widgets.

◆ ForegroundColor

FSlateColor UUserWidget::ForegroundColor

The foreground color of the widget, this is inherited by sub widgets.

Any color property that is marked as inherit will use this color.


该类的文档由以下文件生成: