Files
UnrealEngineUWP/Engine/Source/Runtime/NavigationSystem/Public/BaseGeneratedNavLinksProxy.h
aris theophanidis 9d914b08c0 [NavLink Generation] Allow generated navlinks to be discovered and handled by pathfollow in a similar way to custom links.
Addition of UGeneratedNavLinksProxy class
Addition of properties to FNavLinkGenerationJumpDownConfig to configure the link handler

#rb Mieszko.Zielinski
#jira UE-213923

[CL 34843997 by aris theophanidis in ue5-main branch]
2024-07-16 12:28:09 -04:00

39 lines
1.2 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "UObject/ObjectMacros.h"
#include "UObject/Object.h"
#include "NavLinkCustomInterface.h"
#include "BaseGeneratedNavLinksProxy.generated.h"
/**
* Experimental
* Base class used to create generated navlinks proxy.
* The proxy id is used to represent multiple links generated from the same configuration.
*/
UCLASS(Blueprintable, MinimalAPI)
class UBaseGeneratedNavLinksProxy : public UObject, public INavLinkCustomInterface
{
GENERATED_UCLASS_BODY()
// BEGIN INavLinkCustomInterface
NAVIGATIONSYSTEM_API virtual void GetLinkData(FVector& LeftPt, FVector& RightPt, ENavLinkDirection::Type& Direction) const override;
NAVIGATIONSYSTEM_API virtual FNavLinkId GetId() const override;
NAVIGATIONSYSTEM_API virtual void UpdateLinkId(FNavLinkId ProxyId) override;
NAVIGATIONSYSTEM_API virtual UObject* GetLinkOwner() const override;
// END INavLinkCustomInterface
void SetOwner(UObject* NewOwner) { Owner = NewOwner; }
protected:
/** The LinkID will be the same for all navlinks using the proxy. */
UPROPERTY(Transient)
FNavLinkId LinkProxyId;
/** Proxy owner. */
UPROPERTY(Transient)
TObjectPtr<UObject> Owner = nullptr;
};