Question: AIPath to specific Graph

–==ESPAÑOL==–
Buenas tardes.
Tengo este código hecho y me gustaría agregarle soporte a GraphMask.
La duda seria como agregar este soporte y que permita calcular constantemente la ruta.
hay alguna forma directa de definir en cual GraphMask está trabajando?
Gracias por la atención prestada.

–==TRANSLATOR==–
Good afternoon.
I have this code done and I would like to add support to GraphMask.
The doubt would be how to add this support and allow to calculate the route constantly.
Is there any direct way to define which GraphMask is working on?
Thank you for your attention.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Pathfinding;

[RequireComponent(typeof(Seeker))]
public class CharacterBotAI : AIPath
{
    public GeneratePoints generatePoints;
    public Transform targetPosition;
    public bool isFinishDistance = false;
    public float distance = 2;

    public Animator animator;
    public float sleepVelocity = 0.4F;
    public float animationSpeed = 0.2F;

    private IAstarAI ai;

    new void OnEnable()
    {
        base.OnEnable();
        ai = GetComponent<IAstarAI>();
        if (ai != null) ai.onSearchPath += Update;
    }

    new void OnDisable()
    {
        base.OnDisable();
        if (ai != null) ai.onSearchPath -= Update;
    }

    public new void Start()
    {
        base.Start();
        
        targetPosition = generatePoints.ListGameObject[Random.Range(0, generatePoints.ListGameObject.Count)].transform;
    }

    public override void OnTargetReached()
    {
        if (!isFinishDistance && targetPosition != null && Vector3.Distance(tr.position, targetPosition.transform.position) > endReachedDistance / 2)
        {
            targetPosition = generatePoints.ListGameObject[Random.Range(0, generatePoints.ListGameObject.Count)].transform;
            Debug.Log("Llego " + this.name);
        }
    }

    protected override void Update()
    {
        base.Update();

        if (targetPosition != null) ai.destination = targetPosition.position;

        if (isFinishDistance && targetPosition != null && Vector3.Distance(this.transform.position, targetPosition.transform.position) < distance)
        {
            targetPosition = generatePoints.ListGameObject[Random.Range(0, generatePoints.ListGameObject.Count)].transform;
        }

        Vector3 relVelocity = tr.InverseTransformDirection(velocity);
        relVelocity.y = 0;

        if (relVelocity.sqrMagnitude <= sleepVelocity * sleepVelocity)
        {
            animator.SetFloat("Blend", 0);
            animator.speed = 1;
        }
        else
        {
            animator.SetFloat("Blend", 1);

            float speed = relVelocity.z;
            animator.speed = speed * animationSpeed;
        }
    }
}

.

Hi

I answered your original post here Question: RichAI to specific Graph

Muchas gracias por la pronta respuesta aron.
Solucionaste mi problema.