本文整理汇总了C++中UEdGraph::GetClass方法的典型用法代码示例。如果您正苦于以下问题:C++ UEdGraph::GetClass方法的具体用法?C++ UEdGraph::GetClass怎么用?C++ UEdGraph::GetClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UEdGraph
的用法示例。
在下文中一共展示了UEdGraph::GetClass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DiffBlueprints
/**
* Takes two blueprints and compares them (as if we were running the in-editor
* diff tool). Any discrepancies between the two graphs will be listed in the DiffsOut array.
*
* @param LhsBlueprint The baseline blueprint you wish to compare against.
* @param RhsBlueprint The blueprint you wish to look for changes in.
* @param DiffsOut An output list that will contain any graph internal differences that were found.
* @return True if the two blueprints differ, false if they are identical.
*/
static bool DiffBlueprints(UBlueprint* const LhsBlueprint, UBlueprint* const RhsBlueprint, TArray<FDiffSingleResult>& DiffsOut)
{
TArray<UEdGraph*> LhsGraphs;
LhsBlueprint->GetAllGraphs(LhsGraphs);
TArray<UEdGraph*> RhsGraphs;
RhsBlueprint->GetAllGraphs(RhsGraphs);
bool bDiffsFound = false;
// walk the graphs in the rhs blueprint (because, conceptually, it is the more up to date one)
for (auto RhsGraphIt(RhsGraphs.CreateIterator()); RhsGraphIt; ++RhsGraphIt)
{
UEdGraph* RhsGraph = *RhsGraphIt;
UEdGraph* LhsGraph = NULL;
// search for the corresponding graph in the lhs blueprint
for (auto LhsGraphIt(LhsGraphs.CreateIterator()); LhsGraphIt; ++LhsGraphIt)
{
// can't trust the guid until we've done a resave on every asset
//if ((*LhsGraphIt)->GraphGuid == RhsGraph->GraphGuid)
// name compares is probably sufficient, but just so we don't always do a string compare
if (((*LhsGraphIt)->GetClass() == RhsGraph->GetClass()) &&
((*LhsGraphIt)->GetName() == RhsGraph->GetName()))
{
LhsGraph = *LhsGraphIt;
break;
}
}
// if a matching graph wasn't found in the lhs blueprint, then that is a BIG inconsistency
if (LhsGraph == NULL)
{
bDiffsFound = true;
continue;
}
bDiffsFound |= FGraphDiffControl::DiffGraphs(LhsGraph, RhsGraph, DiffsOut);
}
return bDiffsFound;
}