本文整理汇总了C++中UObject::GetDefaultSubobjects方法的典型用法代码示例。如果您正苦于以下问题:C++ UObject::GetDefaultSubobjects方法的具体用法?C++ UObject::GetDefaultSubobjects怎么用?C++ UObject::GetDefaultSubobjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UObject
的用法示例。
在下文中一共展示了UObject::GetDefaultSubobjects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
FFindHeadersToInclude(FGatherConvertedClassDependencies& InDependencies)
: FGatherConvertedClassDependenciesHelperBase(InDependencies)
{
FindReferences(Dependencies.GetActualStruct());
// special case - literal enum
UBlueprintGeneratedClass* BPGC = Cast<UBlueprintGeneratedClass>(Dependencies.GetActualStruct());
UBlueprint* BP = BPGC ? Cast<UBlueprint>(BPGC->ClassGeneratedBy) : nullptr;
if (BP)
{
TArray<UEdGraph*> Graphs;
BP->GetAllGraphs(Graphs);
for (UEdGraph* Graph : Graphs)
{
if (Graph)
{
TArray<UK2Node_EnumLiteral*> LiteralEnumNodes;
Graph->GetNodesOfClass<UK2Node_EnumLiteral>(LiteralEnumNodes);
for (UK2Node_EnumLiteral* LiteralEnumNode : LiteralEnumNodes)
{
UEnum* Enum = LiteralEnumNode ? LiteralEnumNode->Enum : nullptr;
IncludeTheHeaderInBody(Enum);
}
}
}
}
// Include classes of native subobjects
if (BPGC)
{
UClass* NativeSuperClass = BPGC->GetSuperClass();
for (; NativeSuperClass && !NativeSuperClass->HasAnyClassFlags(CLASS_Native); NativeSuperClass = NativeSuperClass->GetSuperClass())
{}
UObject* NativeCDO = NativeSuperClass ? NativeSuperClass->GetDefaultObject(false) : nullptr;
if (NativeCDO)
{
TArray<UObject*> DefaultSubobjects;
NativeCDO->GetDefaultSubobjects(DefaultSubobjects);
for (UObject* DefaultSubobject : DefaultSubobjects)
{
IncludeTheHeaderInBody(DefaultSubobject ? DefaultSubobject->GetClass() : nullptr);
}
}
}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:45,代码来源:BlueprintCompilerCppBackendGatherDependencies.cpp