AActor::ShouldTickIfViewportsOnly
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtualENGINE_API
Description
Returns whether this actor should tick in editor viewports (TickType == LEVELTICK_ViewportsOnly). Override and return true to enable editor-time previews that require a tick.
Caveats & Gotchas
- • The default implementation returns false for regular actors, so Tick() is not called in the editor unless you override this. Actors like camera preview actors override it to return true.
- • Even when this returns true, ticking in viewports still respects bCanEverTick and tick enable state — it is an additional gate, not a full bypass.
- • This is only relevant in editor contexts. In a shipping build, TickType never equals LEVELTICK_ViewportsOnly.
Signature
ENGINE_API virtual bool ShouldTickIfViewportsOnly() const; Return Type
bool Example
Enable editor-time ticking for live preview C++
bool AMyEditorPreviewActor::ShouldTickIfViewportsOnly() const
{
// Allow this actor to tick in the editor for live preview updates
return true;
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?