# Methods

### ResumePathFollowing

This (optional) method is used when the `PathFollowingComponent` enters into this specific [`NLAPhysicalLink`](https://cryomen.gitbook.io/navigation-link-array/classes/nla-physical-link). It ensures that path-following resumes correctly after the agent exits the link. While [`exit events will trigger`](https://cryomen.gitbook.io/navigation-link-array/classes/events#onphysicallinkmovestatechangedevent) even without calling this method, they may be unreliable in some cases. Calling `ResumePathFollowing` guarantees that the `Exit` events for this navigation link are accurately traced and handled.&#x20;

{% hint style="info" %}
Unlike the `ResumePathFollowing` method in [`NLAComponent`](https://cryomen.gitbook.io/navigation-link-array/classes/nla-component), this method applies exclusively to the current `NLAPhysicalLink`.
{% endhint %}

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://2187864037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEwplnD6ruPD0TeodXYO%2Fuploads%2F9f5NUb7MKrgxuWGHd6Kx%2FNLA%20-%20ResumePathFollowing%20-%20small.png?alt=media&#x26;token=753e154c-ceef-449d-b784-3b5e9ac3b618" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
UFUNCTION(BlueprintCallable, Category="AI|Navigation Link Array")
	void ResumePathFollowing (UPathFollowingComponent* PathFollowingComponent);
```

{% endtab %}
{% endtabs %}

***

### GetNavigationLinkArrayComponent

Returns the owner [`NLAComponent`](https://cryomen.gitbook.io/navigation-link-array/classes/nla-component) of this navigation link. This allows you to access the parent component that manages the link. The function may return `nullptr`, so it is crucial to validate the returned value before attempting to use it.

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://2187864037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEwplnD6ruPD0TeodXYO%2Fuploads%2FB4C9hV8gmwq9BroIE3ne%2FNLA%20-%20GetNavigationLinkArrayComponent%20-%20small.png?alt=media&#x26;token=5225d10d-8c5c-4c24-abb2-fbc47b8c3566" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
/*
 * Returns the Navigation Link Array Component that this Navigation Link was created from.
 */
UFUNCTION(BlueprintCallable, Category="AI|Navigation Link Array")
	UNLAComponent* GetNavigationLinkArrayComponent () const;
```

{% endtab %}
{% endtabs %}

***

### GetNavigationLinkArraySet

Returns a copy of the [`FNLASet`](https://cryomen.gitbook.io/navigation-link-array/structures/nlaset) structure that was used to create this specific navigation link. This value reflects the latest settings from the [`NLAComponent`](https://cryomen.gitbook.io/navigation-link-array/classes/nla-component) and updates whenever changes are made to the [component’s settings](https://cryomen.gitbook.io/navigation-link-array/classes/nla-component/settings).

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://2187864037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEwplnD6ruPD0TeodXYO%2Fuploads%2Fqn4wv4FkLZOFOl1SFQ22%2FNLA%20-%20GetNavigationLinkArraySet%20-%20small.png?alt=media&#x26;token=eb4e80a0-2541-43d6-aad9-5e26ea1ca24f" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
/*
 * A copy of the Navigation Link Array Set that was used to create this Navigation Link
 * by the Navigation Link Array Component.
 */
UFUNCTION(BlueprintCallable, Category="AI|Navigation Link Array")
        FNLASet GetNavigationLinkArraySet () const;
```

{% endtab %}
{% endtabs %}

***

### GetNavLinkModifier

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://2187864037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEwplnD6ruPD0TeodXYO%2Fuploads%2FirHSiPzHCoo4W4m7HXZb%2FNLA%20-%20GetNavLinkModifier%20-%20small.png?alt=media&#x26;token=92a50724-102a-4eb4-838c-9154f34cd13c" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
/*
 * NavLinkId unique identifier for a link. Its recommended to use
 * |GetNavigationLinkArraySet| if you need to know more about the link.
 */
UFUNCTION(BlueprintCallable, Category="AI|Navigation Link Array")
	FNavigationLink GetNavLinkModifier () const;
```

{% endtab %}
{% endtabs %}

***

### GetNavigationLinkOrigin

Returns the origin point of the navigation link in world space. This value dynamically updates whenever the settings in the [`NLAComponent`](https://cryomen.gitbook.io/navigation-link-array/classes/nla-component) are modified, the component itself moves, or the shape of the spline changes.

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://2187864037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEwplnD6ruPD0TeodXYO%2Fuploads%2Fs1sFLjS3jIZWuso3vtgz%2FNLA%20-%20GetNavigationLinkOrigin%20-%20small.png?alt=media&#x26;token=13f1bb05-d72d-4f26-825e-a0fad8f02d36" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
/*
 * Returns the origin of the Navigation Link. This is the transform
 * that was used to place the link on the spline.
 */
UFUNCTION(BlueprintCallable, Category="AI|Navigation Link Array")
        FTransform GetNavigationLinkOrigin () const;
```

{% endtab %}
{% endtabs %}

***

### GetNavigationLinkPoints

Returns the left and right points of the navigation link in world space. These points define the two endpoints of the link as positioned in the game world.

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://2187864037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEwplnD6ruPD0TeodXYO%2Fuploads%2FuvJvAy0loVJwgY4DCAJU%2FNLA%20-%20GetNavigationLinkPoints%20-%20small.png?alt=media&#x26;token=f9d01e2f-fb07-4fe2-ab77-0471a7857c3c" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
/*
 * Returns Left and Right points in World Space.
 * 
 * @Param Left - Left point of the link.
 * @Param Right - Right point of the link.
 */
UFUNCTION(BlueprintCallable, Category="AI|Navigation Link Array")
	void GetNavigationLinkPoints (FVector& Left, FVector& Right);
```

{% endtab %}
{% endtabs %}

***

### GetNavigationLinkStartEndPoints

This method works similarly to [`GetNavigationLinkPoints`](#getnavigationlinkpoints) but adjusts the returned points based on the [direction](https://cryomen.gitbook.io/navigation-link-array/nla-component/settings#direction) of the navigation link.

* If the direction is set to `Direction::LeftToRight`, the start point will be the left point, and the end point will be the right point.
* If the direction is set to `Direction::RightToLeft`, the start point will be the right point, and the end point will be the left point.
* For `Direction::Both`, the method defaults to returning the left point as the start and the right point as the end.

This is particularly useful when the navigation link’s directionality matters for pathfinding or traversal logic.

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://2187864037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEwplnD6ruPD0TeodXYO%2Fuploads%2FEv3fIJHObrTCrEWJI1EF%2FNLA%20-%20GetNavigationLinkStartEndPoints%20-%20small.png?alt=media&#x26;token=12aa9fc2-f1dd-4974-85fa-cd9e3e8dc2c7" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
UFUNCTION(BlueprintCallable, Category="AI|Navigation Link Array")
	void GetNavigationLinkStartEndPoints (FVector& Start, FVector& End);
```

{% endtab %}
{% endtabs %}

***

### GetMovingAgents

Returns a map containing all `PathFollowingComponents` that are currently using this navigation link.

* **Key**: The `PathFollowingComponent` representing the agent utilizing the link.
* **Value**: An [`NLAPhysicalLinkMoveStateChangedEvent`](https://cryomen.gitbook.io/navigation-link-array/structures/nlaphysicallinkmovestatechangedevent) structure that provides details about the agent's movement state on the link.

This method is useful for tracking active agents on the navigation link and their current traversal status.

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="https://2187864037-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMEwplnD6ruPD0TeodXYO%2Fuploads%2FsTUpAneRzRnIpB8WqKNS%2FNLA%20-%20GetMovingAgents%20-%20small.png?alt=media&#x26;token=be74d1d5-6638-46a2-b61c-53e60bbbdff5" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
UFUNCTION(BlueprintCallable, Category="AI|Navigation Link Array")
	TMap<UObject*, FNLAPhysicalLinkMoveStateChangedEvent> GetMovingAgents () const;
```

{% endtab %}
{% endtabs %}
