Hi, here FSM Action to calculate a path between NavMesh Agent GameObject and mouse click, draw path before it is needed, set end path marker prefab(optional).
Usage;
Put thise action on some GameObject (sphere,box) - action create:
LineRender, NavMesh Agent, and care for mouse click, raycast, set destination, draw line, activate/deactivate end path marker prefab.