本文整理汇总了C++中UClass::GetClassGroupNames方法的典型用法代码示例。如果您正苦于以下问题:C++ UClass::GetClassGroupNames方法的具体用法?C++ UClass::GetClassGroupNames怎么用?C++ UClass::GetClassGroupNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UClass
的用法示例。
在下文中一共展示了UClass::GetClassGroupNames方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NewEntry
TArray<FComponentClassComboEntryPtr> SortedClassList;
AddBasicShapeComponents(SortedClassList);
TArray<FName> InMemoryClasses;
for (TObjectIterator<UClass> It; It; ++It)
{
UClass* Class = *It;
// If this is a subclass of Actor Component, not abstract, and tagged as spawnable from Kismet
if (Class->IsChildOf(UActorComponent::StaticClass()))
{
InMemoryClasses.Push(Class->GetFName());
if (!Class->HasAnyClassFlags(CLASS_Abstract) && Class->HasMetaData(FBlueprintMetadata::MD_BlueprintSpawnableComponent) && !FKismetEditorUtilities::IsClassABlueprintSkeleton(Class)) //@TODO: Fold this logic together with the one in UEdGraphSchema_K2::GetAddComponentClasses
{
TArray<FString> ClassGroupNames;
Class->GetClassGroupNames(ClassGroupNames);
if (ClassGroupNames.Contains(CommonClassGroup))
{
FString ClassGroup = CommonClassGroup;
FComponentClassComboEntryPtr NewEntry(new FComponentClassComboEntry(ClassGroup, Class, ClassGroupNames.Num() <= 1, EComponentCreateAction::SpawnExistingClass));
SortedClassList.Add(NewEntry);
}
if (ClassGroupNames.Num() && !ClassGroupNames[0].Equals(CommonClassGroup))
{
const bool bIncludeInFilter = true;
FString ClassGroup = ClassGroupNames[0];
FComponentClassComboEntryPtr NewEntry(new FComponentClassComboEntry(ClassGroup, Class, bIncludeInFilter, EComponentCreateAction::SpawnExistingClass));
SortedClassList.Add(NewEntry);
}