GetDefault

Gets the default object of a class.

Choose your operating system:

Windows

macOS

Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/Class.h"

Syntax

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

Remarks

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