Since the Selector/Usable system can be used for anything, not just Dialogue System Triggers, it doesn't natively check if the NPC's Dialogue System Trigger > Conditions are valid. If you want to do this so that it prevents the Selector/Proximity Selector from selecting a Usable whose Dialogue System Trigger > Conditions are false, you can make a subclass. Example:
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class MyProximitySelector : ProximitySelector
{
protected override void CheckTriggerEnter(GameObject other)
{
if (!enabled || other == null) return;
var usable = other.GetComponent<Usable>();
if (usable == null || !usable.enabled) return;
var dsTrigger = other.GetComponent<DialogueSystemTrigger>();
if (dsTrigger != null && !(dsTrigger.enabled && dsTrigger.condition.IsTrue(transform))) return;
base.CheckTriggerEnter(other);
}
{/code]
If your Dialogue System Trigger is configured to start a conversation, and if you want to also check if the conversation currently has valid entries before showing the usable UI, you can add a check for that.
1. UNtick the Dialogue System Trigger's Actions > Start Conversation > Skip If No Valid Entries.
using UnityEngine;
using PixelCrushers.DialogueSystem;
public class MyProximitySelector : ProximitySelector
{
protected override void CheckTriggerEnter(GameObject other)
{
if (!enabled || other == null) return;
var usable = other.GetComponent<Usable>();
if (usable == null || !usable.enabled) return;
// Check if Dialogue System Trigger's Conditions are true:
var dsTrigger = other.GetComponent<DialogueSystemTrigger>();
if (dsTrigger != null && !(dsTrigger.enabled && dsTrigger.condition.IsTrue(transform))) return;
// Check if conversation has valid entries:
if (!(string.IsNullOrEmpty(dsTrigger.conversation) && DialogueManager.ConversationHasValidEntry(dsTrigger.conversation))) return;
// All checks passed, so show usable UI:
base.CheckTriggerEnter(other);
}
}