/// <summary> /// 将GameplayTagNode的children node对应的tag添加到TagContainer中去 /// RecurseAll表示在树状节点中, 就添加一层child还是循环一直往下找 /// </summary> private void AddChildrenTags(CGameplayTagContainer TagContainer, CGameplayTagNode GameplayTagNode, bool RecurseAll = true, bool OnlyIncludeDictionaryTags = false) { if (!GameplayTagNode.IsValid()) { return; } var ChildrenNodes = GameplayTagNode.GetChildTagNodes(); foreach (CGameplayTagNode ChildNode in ChildrenNodes) { if (!ChildNode.IsValid()) { continue; } TagContainer.AddTag(ChildNode.GetCompleteTag()); if (RecurseAll) { AddChildrenTags(TagContainer, ChildNode, true, OnlyIncludeDictionaryTags); } } }