Skip to content

Commit 2773bf9

Browse files
committed
add: empty check
1 parent 0d0b263 commit 2773bf9

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Scripts/Runtime/Core/CollectionItemQuery.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,20 @@ public bool Matches(IEnumerable<T> targetItems, out int resultMatchCount)
137137

138138
return true;
139139
}
140+
141+
public bool IsEmpty()
142+
{
143+
bool allEmpty = true;
144+
foreach (QuerySet qs in query)
145+
{
146+
if (qs.Picker.Count != 0)
147+
{
148+
allEmpty = false;
149+
break;
150+
}
151+
}
152+
153+
return allEmpty;
154+
}
140155
}
141156
}

0 commit comments

Comments
 (0)