UClass::GetDefaultObject

Get the default object from the class

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/Class.h"

Syntax

UObject * GetDefaultObject
(
    bool bCreateIfNeeded
) const

Remarks

Get the default object from the class

Returns

the CDO for this class

Parameters

Parameter

Description

bCreateIfNeeded

if true (default) then the CDO is created if it is null

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