AActor::IsEditorOnly
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtualoverride
Description
Returns true if this actor should exist only in editor builds and be stripped from cooked/packaged games. Driven by the `bIsEditorOnlyActor` property.
Caveats & Gotchas
- • Any actor that references an editor-only actor will have that reference silently set to null in cooked builds — make sure no runtime gameplay code assumes that reference is valid.
- • Setting `bIsEditorOnlyActor` does not automatically exclude the actor from packaging; the cooker respects this flag, but the actor must not be referenced by non-editor-only content to be fully excluded.
Signature
ENGINE_API virtual bool IsEditorOnly() const override; Return Type
bool Example
Mark a custom debug actor as editor-only C++
AMyDebugVisualizerActor::AMyDebugVisualizerActor()
{
bIsEditorOnlyActor = true;
} Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?