RealDocs

AActor::NotifyActorEndCursorOver

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: virtual

Description

Called when the mouse cursor leaves this actor after having entered it while click-events are enabled. Use this to undo hover-state changes applied in NotifyActorBeginCursorOver.

Caveats & Gotchas

  • Requires bEnableMouseOverEvents on the PlayerController, the same flag needed for NotifyActorBeginCursorOver. If the flag is disabled mid-hover, the leave event may never fire.
  • This event is not guaranteed to fire if the actor is destroyed while the cursor is still over it — clean up hover state in EndPlay as a fallback.

Signature

ENGINE_API virtual void NotifyActorEndCursorOver();

Return Type

void

Example

Remove hover highlight C++
void AMyActor::NotifyActorEndCursorOver()
{
    Super::NotifyActorEndCursorOver();
    MeshComponent->SetRenderCustomDepth(false);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.