Skip to main content

Finding Nodes And Fragments

Sometimes, you need to access specific Joint Nodes or Fragments in your Joint Actor Instances. This guide will walk you through the methods to find and access these components effectively.

Why Do I Need to Find Nodes or Fragments?

In complex Joint graphs, you may need to manipulate or query specific nodes or fragments during runtime. Finding these components allows you to control playback flow, modify properties, or trigger specific behaviors based on your application's logic.

For example, you might want to find a fragment that contains the player controller that indicates the players that can interact with the Joint instance - and feed the controller dynamically based on the game state. This is quite common in multiplayer games where the players can change during the game.

One Solid Recommendation: Using Manager Fragments for Easy External Access

Keeping the nodes that need to be accessed externally in some place specifically is a good practice. And Manager Fragments are especially good place for that.

So we recommend using Manager Fragments for the nodes or fragments that you want to access externally to make it easier to find them.

note

You might don't want to use Manager Fragments for everything for some specific reason. In that case, you can still use the methods below to find the nodes and fragments you want.

In this case, You might try to use a specific node that holds references to the nodes or fragments you want to access, and find that node first via GUID, then access the nodes or fragments from there.

img_1.png

You can find specific Joint Nodes via their GUIDs with Find Base Node with Guid and Find Fragment with Guid.

They will traverse the whole graph to find the node you want.

Finding Manager Fragments

img.png

You can get the Joint Manager from the Joint Actor Instance, then use the functions named GetManagerFragments~ or FindManagerFragmentWith~~ to find the Manager Fragments you want.

Basically, we provide two types of functions to find the fragments - functions that search only the direct children of the manager (non-recursive), and functions that search the full lower hierarchy of the manager (recursive). And you can query the nodes with either class type or tags.

NameDescription / Notes
FindManagerFragmentByClassFinds the first fragment of the given class attached directly to the manager (no recursion).
FindManagerFragmentsByClassFinds all fragments of the given class attached directly to the manager (no recursion).
GetAllManagerFragmentsReturns all fragments attached directly to the manager (no recursion).
FindManagerFragmentByClassOnLowerHierarchyFinds the first fragment of the given class by searching the manager's full lower hierarchy (recursive).
FindManagerFragmentsByClassOnLowerHierarchyFinds all fragments of the given class in the manager's full lower hierarchy (recursive).
GetAllManagerFragmentsOnLowerHierarchyReturns all fragments in the manager's full lower hierarchy (recursive).
FindManagerFragmentWithTagOnLowerHierarchyFinds first fragment matching InNodeTag while searching recursively; bExact controls exact match.
FindManagerFragmentsWithTagOnLowerHierarchyFinds fragments matching InNodeTag recursively; returns all matches.
FindManagerFragmentWithAnyTagsOnLowerHierarchyFinds first fragment that matches any tag from the container recursively; bExact optional.
FindManagerFragmentsWithAnyTagsOnLowerHierarchyFinds fragments that match any of the provided tags recursively; returns all matches.
FindManagerFragmentWithAllTagsOnLowerHierarchyFinds first fragment that contains all provided tags recursively; bExact optional.
FindManagerFragmentsWithAllTagsOnLowerHierarchyFinds fragments that contain all provided tags recursively; returns all matches.
FindManagerFragmentWithTagFinds first fragment matching InNodeTag among manager's direct children (non-recursive).
FindManagerFragmentsWithTagFinds fragments matching InNodeTag among manager's direct children (non-recursive).
FindManagerFragmentWithAnyTagsFinds first fragment that matches any tag from the container among direct children (non-recursive).
FindManagerFragmentsWithAnyTagsFinds fragments that match any provided tags among direct children (non-recursive).
FindManagerFragmentWithAllTagsFinds first fragment that contains all provided tags among direct children (non-recursive).
FindManagerFragmentsWithAllTagsFinds fragments that contain all provided tags among direct children (non-recursive).

Finding Fragments

It's quite same as finding Manager Fragments, but this time, you have to call the function from the existing node or fragment that you want to start the search from.

tip

You can of course use these functions on the fragment classes as well, to find sub-fragments under the fragment (This is probably the most common use case of these functions).

img_2.png

NameDescription / Notes
FindFragmentWithTagOnLowerHierarchyFinds the first fragment matching InNodeTag recursively through the lower hierarchy; bExact controls exact match.
FindFragmentsWithTagOnLowerHierarchyFinds all fragments matching InNodeTag recursively through the lower hierarchy.
FindFragmentWithAnyTagsOnLowerHierarchyFinds the first fragment that matches any tag in InNodeTagContainer recursively; bExact optional.
FindFragmentsWithAnyTagsOnLowerHierarchyFinds all fragments that match any tag in InNodeTagContainer recursively.
FindFragmentWithAllTagsOnLowerHierarchyFinds the first fragment that contains all tags in InNodeTagContainer recursively; bExact optional.
FindFragmentsWithAllTagsOnLowerHierarchyFinds all fragments that contain all tags in InNodeTagContainer recursively.
FindFragmentWithGuidOnLowerHierarchyFinds the first fragment with the specified InNodeGuid recursively through the lower hierarchy.
FindFragmentByClassOnLowerHierarchyFinds the first fragment of the specified class recursively through the lower hierarchy.
FindFragmentsByClassOnLowerHierarchyFinds all fragments of the specified class recursively through the lower hierarchy.
GetAllFragmentsOnLowerHierarchyReturns all fragments from the node’s full lower hierarchy (recursive).
FindFragmentWithTagFinds the first fragment matching InNodeTag among direct child nodes only; bExact controls exact match.
FindFragmentsWithTagFinds all fragments matching InNodeTag among direct child nodes only.
FindFragmentWithAnyTagsFinds the first fragment that matches any tag in InNodeTagContainer among direct child nodes only; bExact optional.
FindFragmentsWithAnyTagsFinds all fragments that match any tag in InNodeTagContainer among direct child nodes only.
FindFragmentWithAllTagsFinds the first fragment that contains all tags in InNodeTagContainer among direct child nodes only; bExact optional.
FindFragmentsWithAllTagsFinds all fragments that contain all tags in InNodeTagContainer among direct child nodes only.
FindFragmentWithGuidFinds the first fragment with the given InNodeGuid among direct child nodes only (non-recursive).
FindFragmentByClassFinds the first fragment of the specified class among direct child nodes only (non-recursive).
FindFragmentsByClassFinds all fragments of the specified class among direct child nodes only (non-recursive).
GetAllFragmentsReturns all fragments directly attached to this node (non-recursive).