Target Filters
Target Filters are used to filter targets for the current decision.
Note
- A decision may or may not have targets, so target filters are optional.
- You can enable/disable target filters of a decision by checking/unchecking the HasNoTarget toggle in the Decision Tab.
Creating Target Filters¶
-
To create a new target filter, define a new class that inherits from
TargetFilter
and override theOnFilterTarget
method:
-
To add the the target filter to the intelligence asset, go to the Target Filter Tab, select the target filter type, give it a name, and then click the Create button:
-
To attach the target filter to a decision, select the decision in the Decision Tab, choose the target filter’s name, and then click the Add button:
Adding Parameter Fields¶
There are many cases when you need to add parameters to an target filer to customize how it filter targets. To achieve this, you need to declare these parameters as public fields in your target filters. Here an example of how to do this:
public class TeamFilter : TargetFilter
{
public Team Team;
protected override bool OnFilterTarget(UtilityEntity target)
{
if (target.EntityFacade is Character targetCharacter)
{
return targetCharacter.Team == this.Team;
}
return false;
}
}
Supported Field Types¶
Currently, only the supported field types can be serialized to JSON and adjusted using the Utility Intelligence Editor. Therefore, you should use these types when declaring parameter fields for your target filters.
Built-in Target Filters¶
Currently, we provides these built-in target filters:
- OtherFilter: Filters out the current agent, leaving other entities as targets.
- AgentFilter: Filters out entities that are not utility agents, leaving only utility agents as targets.
If you like Utility Intelligence, please consider supporting it by leaving a 5-star review on the Asset Store.
Your positive feedback motivates me to keep improving and delivering more updates for this framework.
Thank you so much for your support. I love you all! 🥰

Created : September 1, 2024