FLinkerLoad::ForceRegenerateClass

Sometimes we have to instantiate an export object that is of an imported type, and sometimes in those scenarios (thanks to cyclic dependencies) the type class could be a Blueprint type that is half resolved.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/LinkerLoad.h"

Source

/Engine/Source/Runtime/CoreUObject/Private/Blueprint/BlueprintSupport.cpp

Syntax

bool ForceRegenerateClass
(
    UClass * ImportClass
)

Remarks

Sometimes we have to instantiate an export object that is of an imported type, and sometimes in those scenarios (thanks to cyclic dependencies) the type class could be a Blueprint type that is half resolved. To avoid having to re-instance objects on load, we have to ensure that the class is fully regenerated before we spawn any instances of it. That's where this function comes in. It will make sure that the specified class is fully loaded, finalized, and regenerated.

NOTE: be wary, if called in the wrong place, then this could introduce nasty infinite recursion!

Returns

True if the class could be regenerated (false if it didn't have its linker set).

Parameters

Parameter

Description

ImportClass

The class you want to make sure is fully regenerated.

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