Skip to main content
Flow Core Documentation
Menu

Execution & Queries

GUID Tag Combinations

Discover registered GameObjects with explicit OR and AND combinations of GameObjectGuid tags.

Audience
Working with Flow Core
Time
15 minutes
Requires
A writable Unity scene with a FlowCoreProcess and Local Blackboard
Modules
Flow Core
On this page

Use Find GameObjectGuid By Tags when a graph needs to discover a group of registered objects by role instead of holding exact references. This tutorial runs the same [Enemy, Ranged] query twice so the difference between Or and And is visible in both the result lists and counts.

What you will query

Create three objects with overlapping GameObjectGuid tags:

GameObjectTags
Enemy ArcherEnemy, Ranged
Enemy BruteEnemy, Melee
Defense TurretDefense, Ranged

For the query [Enemy, Ranged], Or matches all three objects because each has at least one requested tag. And matches only Enemy Archer because it has both requested tags.

Add the tag whitelist

  1. Open Edit > Project Settings > Flow Core.
  2. Select Personal > Names & Whitelists, then open GameObjectGuid Tags.
  3. Add Enemy, Defense, Ranged, and Melee.

The whitelist is a personal suggestion list for this project location. It helps you reuse consistent literal names in supported tag pickers. It is not a runtime validator: a tag does not have to be listed there to exist or match at runtime. Tags assigned to a GameObject or query remain serialized project data and synchronize normally. See Personal & Project Settings for the storage boundary.

Tag the three GameObjects

  1. Create three GameObjects named Enemy Archer, Enemy Brute, and Defense Turret.
  2. Add GameObjectGuid to each object.
  3. Choose Open Full Configuration, select Tags, and assign the two tags shown in the table above.

Three native GameObjectGuid configuration views showing Enemy Archer with Enemy and Ranged, Enemy Brute with Enemy and Melee, and Defense Turret with Defense and Ranged

Each crop shows the Tags module for its named target.

Create the output keys

On the Local Blackboard used by your FlowCoreProcess, choose Open Full Configuration > Variables > Edit. Use Add Entry for each key in the table.

TypeKeys
GameObject ListOrResults, AndResults
IntOrCount, AndCount

Keep this Blackboard at Local index 0. The two list keys make the matching members inspectable; the two integer keys make the expected counts easy to verify or branch on later.

Build the two combination queries

  1. Create a Flow Graph, assign it to the FlowCoreProcess, and add a Unity Start Trigger.
  2. Connect the Trigger to an Action node.
  3. Select the Action. Choose Add instruction, find Find GameObjectGuid By Tags under GameObject/Guid/Tags, then select its row to open Parameters.
  4. Open the Tags binding, choose Literal, add Enemy and Ranged, then choose Apply.
  5. Set Match Mode to Or.
  6. Write Results to Local Blackboard index 0, key OrResults.
  7. Write Count to Local Blackboard index 0, key OrCount.
  8. Use Back to return to the Action’s sequence and add a second Find GameObjectGuid By Tags Instruction.
  9. Use the same literal tags, set Match Mode to And, and write to AndResults and AndCount.

The Start Trigger runs Compare Tag Matches. The two Instruction editors use two literal tags with Or or And matching and distinct result and count keys.

Both Instructions take the same two literal tags. Their Parameters show Or on the left and And on the right, with separate Local result and count keys.

The instructions run in order, but neither query depends on the other’s output. Their separate keys keep the comparison explicit.

Verify in Play Mode

  1. Save the graph and scene.
  2. Enter Play Mode after all three tagged objects are active and registered.
  3. On the Local Blackboard, choose Open Full Configuration, then Variables > Edit.
  4. Select OrResults, then AndResults. Each selected key shows its Items list. Expand it if collapsed. Switch to Summary to compare the counts.

The expected result is:

QueryMatching setCount
OrEnemy Archer, Enemy Brute, and Defense Turret3
AndEnemy Archer1

Native runtime Blackboard views showing the three OrResults members, the single AndResults member Enemy Archer, and Summary values OrCount 3 and AndCount 1

Variables > Edit shows all three OrResults members and the single AndResults member. Summary shows OrCount = 3 and AndCount = 1 for that same run.

Know the query boundaries

  • Tags are trimmed at their ends, but matching remains case-sensitive. Enemy and enemy are different tags.
  • Empty or whitespace-only query entries are ignored. If no usable query tags remain, every registered GameObjectGuid matches.
  • The personal tag whitelist improves authoring consistency but does not reject runtime tags outside the list.
  • Runtime discovery searches registered GameObjectGuid components. If an expected object is missing, confirm that it is active and registered before the Action runs.
  • Result order is an implementation detail. Branch on membership or count, not on list position.
  • If the graph already knows one exact object, prefer a direct reference instead of searching the registry.

When you already have a target

Use Has GameObjectGuid Tags when a target GameObject is already resolved and the graph only needs a bool for an Or or And membership check. Use Find GameObjectGuid By Tags when the graph must discover all matching objects.

The single-tag Has GameObjectGuid Tag and Find GameObjectGuid By Tag instructions are shorter forms for one tag. See the GameObjectGuid tag instruction Tech Docs for the complete instruction reference.

Common Mistakes

SymptomCheck
Both queries return 0Confirm the objects are active, registered, and own GameObjectGuid.
And returns too many objectsConfirm both instructions use [Enemy, Ranged] and the second mode is And.
A visually similar tag missesCompare capitalization and remove unintended internal characters.
Results cannot be writtenConfirm the Local index, key names, and Blackboard value types.
Downstream logic changes run to runDo not depend on the result list’s order.

What You Built

You created an overlapping tag model, ran the same multi-tag query with both match modes, and stored inspectable GameObject List and Int outputs. The result demonstrates the main strength of the GUID Tag system: composing roles such as affiliation and combat range without hard-coding individual scene references.