GetDefault

Get default object of a class.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/UObjectGlobals.h"

Source

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

Syntax

template<class T>
const T * GetDefault
(
    UClass * Class
)

Remarks

Get default object of a class. Gets the default object of a class.

In most cases, class default objects should not be modified. This method therefore returns an immutable pointer. If you need to modify the default object, use GetMutableDefault instead.

Returns

Class default object (CDO).

Parameters

Parameter

Description

Class

The class to get the CDO for.

See Also

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