EObjectMark

Object marks are bits associated with [UObject](API\Runtime\CoreUObject\UObject\UObject).

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectMarks.h

Include

#include "UObject/UObjectMarks.h"

Syntax

enum EObjectMark
{
    OBJECTMARK_NOMARKS                         = 0x00000000,
    OBJECTMARK_Saved                           = 0x00000004,
    OBJECTMARK_TagImp                          = 0x00000008,
    OBJECTMARK_TagExp                          = 0x00000010,
    OBJECTMARK_NotForClient                    = 0x00000020,
    OBJECTMARK_NotForServer                    = 0x00000040,
    OBJECTMARK_NotAlwaysLoadedForEditorGame    = 0x00000080,
    OBJECTMARK_EditorOnly                      = 0x00000100,
    OBJECTMARK_KeepForTargetPlatform           = 0x00000200,
    OBJECTMARK_ALLMARKS                        = 0xffffffff,
}

Values

Name

Description

OBJECTMARK_NOMARKS

OBJECTMARK_Saved

OBJECTMARK_TagImp

OBJECTMARK_TagExp

OBJECTMARK_NotForClient

OBJECTMARK_NotForServer

OBJECTMARK_NotAlwaysLoadedForEditorGame

OBJECTMARK_EditorOnly

OBJECTMARK_KeepForTargetPlatform

OBJECTMARK_ALLMARKS

Remarks

Object marks are bits associated with UObject. Marks are:

  • Never saved

  • Temporary and usually not valid outside of the scope of some function

  • Low performance (!) Careful here, do not use marks for performance critical things.

  • Public in the sense that the thing marking the objects is treating objects generically and is often not a uobject

This is primarily a legacy support subsystem. Unwinding the scope, lifetime and relationship between marks was not feasible, so the legacy marks are all grouped here. New mark-like things should probably just be new custom annotations.

An alternative design would have been to incorporate marks into the UObjectArray. That would allow high performance iteration, and could save memory if the marks are not sparse. This design was chosen to avoid coupling. Here are the legacy flags that were converted to marks; listed here for find in files #define RF_Saved DECLARE_UINT64(0x0000000080000000) // Object has been saved via SavePackage. Temporary. #define RF_TagImp DECLARE_UINT64(0x0000000800000000) // Temporary import tag in load/save. #define RF_TagExp DECLARE_UINT64(0x0000001000000000) // Temporary export tag in load/save. #define RF_NotForClient DECLARE_UINT64(0x0010000000000000) // LT Don't load this object for the game client. These are always overwritten on save based on the virtual methods. #define RF_NotForServer DECLARE_UINT64(0x0020000000000000) // LT Don't load this object for the game server. The base virtual methods always just look at the flag so leave things unchanged. Enumeration for the available object marks. It is strongly advised that you do NOT add to this list, but rather make a new object annotation for your needs The reason is that the relationship, lifetime, etc of these marks is often unrelated, but given the legacy code it is really hard to tell. We don't want to replicate that confusing situation going forward.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss