UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UObjectMarks.h File Reference
#include "Containers/Array.h"

Go to the source code of this file.

Enumerations

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_NotForTargetPlatform = 0x00000200 , OBJECTMARK_INHERITEDMARKS = OBJECTMARK_NotForClient | OBJECTMARK_NotForServer | OBJECTMARK_EditorOnly | OBJECTMARK_NotForTargetPlatform , OBJECTMARK_ALLMARKS = 0xffffffff
}
 

Functions

COREUOBJECT_API void MarkObject (const class UObjectBase *Object, EObjectMark Marks)
 
COREUOBJECT_API void UnMarkObject (const class UObjectBase *Object, EObjectMark Marks)
 
COREUOBJECT_API void MarkAllObjects (EObjectMark Marks)
 
COREUOBJECT_API void UnMarkAllObjects (EObjectMark Marks=OBJECTMARK_ALLMARKS)
 
COREUOBJECT_API bool ObjectHasAnyMarks (const class UObjectBase *Object, EObjectMark Marks)
 
COREUOBJECT_API bool ObjectHasAllMarks (const class UObjectBase *Object, EObjectMark Marks)
 
COREUOBJECT_API EObjectMark ObjectGetAllMarks (const class UObjectBase *Object)
 
COREUOBJECT_API void GetObjectsWithAllMarks (TArray< UObject * > &Results, EObjectMark Marks)
 
COREUOBJECT_API void GetObjectsWithAnyMarks (TArray< UObject * > &Results, EObjectMark Marks)
 

Enumeration Type Documentation

◆ EObjectMark

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. 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.

Enumerator
OBJECTMARK_NOMARKS 
OBJECTMARK_Saved 
OBJECTMARK_TagImp 
OBJECTMARK_TagExp 
OBJECTMARK_NotForClient 
OBJECTMARK_NotForServer 
OBJECTMARK_NotAlwaysLoadedForEditorGame 
OBJECTMARK_EditorOnly 
OBJECTMARK_NotForTargetPlatform 
OBJECTMARK_INHERITEDMARKS 
OBJECTMARK_ALLMARKS 

Function Documentation

◆ GetObjectsWithAllMarks()

COREUOBJECT_API void GetObjectsWithAllMarks ( TArray< UObject * > &  Results,
EObjectMark  Marks 
)

Build an array of objects having ALL of a set of marks

Parameters
Resultsarray of objects which have any flag. This array is emptied before we add to it.
MarksLogical OR of OBJECTMARK_'s to test

◆ GetObjectsWithAnyMarks()

COREUOBJECT_API void GetObjectsWithAnyMarks ( TArray< UObject * > &  Results,
EObjectMark  Marks 
)

Build an array of objects having ANY of a set of marks

Parameters
Resultsarray of objects which have any flag. This array is emptied before we add to it.
MarksLogical OR of OBJECTMARK_'s to test

◆ MarkAllObjects()

COREUOBJECT_API void MarkAllObjects ( EObjectMark  Marks)

Adds marks to an ALL objects Note: Some objects, those not accessible via FObjectIterator, will not be marked

Parameters
MarksLogical OR of OBJECTMARK_'s to apply

◆ MarkObject()

COREUOBJECT_API void MarkObject ( const class UObjectBase Object,
EObjectMark  Marks 
)

Adds marks to an object

Parameters
ObjectObject to add marks to
MarksLogical OR of OBJECTMARK_'s to apply

◆ ObjectGetAllMarks()

COREUOBJECT_API EObjectMark ObjectGetAllMarks ( const class UObjectBase Object)

Returns all of the object marks on a specific object

Parameters
ObjectObject to get marks for
Returns
all Marks for an object

◆ ObjectHasAllMarks()

COREUOBJECT_API bool ObjectHasAllMarks ( const class UObjectBase Object,
EObjectMark  Marks 
)

Tests an object for having ALL of a set of marks

Parameters
ObjectObject to test marks on
MarksLogical OR of OBJECTMARK_'s to test
Returns
true if the object has any of the given marks.

◆ ObjectHasAnyMarks()

COREUOBJECT_API bool ObjectHasAnyMarks ( const class UObjectBase Object,
EObjectMark  Marks 
)

Tests an object for having ANY of a set of marks

Parameters
ObjectObject to test marks on
MarksLogical OR of OBJECTMARK_'s to test
Returns
true if the object has any of the given marks.

◆ UnMarkAllObjects()

COREUOBJECT_API void UnMarkAllObjects ( EObjectMark  Marks = OBJECTMARK_ALLMARKS)

Removes marks from ALL objects Note: Some objects, those not accessible via FObjectIterator, will not be marked

Parameters
MarksLogical OR of OBJECTMARK_'s to remove

◆ UnMarkObject()

COREUOBJECT_API void UnMarkObject ( const class UObjectBase Object,
EObjectMark  Marks 
)

Removes marks from and object

Parameters
ObjectObject to remove marks from
MarksLogical OR of OBJECTMARK_'s to remove