UZoneGraphSubsystem

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

ZoneGraph

Header

/Engine/Plugins/Runtime/ZoneGraph/Source/ZoneGraph/Public/ZoneGraphSubsystem.h

Include

#include "ZoneGraphSubsystem.h"

Syntax

UCLASS()
class UZoneGraphSubsystem : public UTickableWorldSubsystem

Variables

Name Description

Protected variable

bool

 

bInitialized

Protected variable

FZoneGraphBuild...

 

Builder

Protected variable

FCriticalSectio...

 

DataRegistrationSection

Protected variable

FDelegateHandle

 

OnActorMovedHandle

Protected variable

FDelegateHandle

 

OnRequestRebuildHandle

Protected variable UProperty

TArray< FRegist...

 

RegisteredZoneGraphData

Protected variable

TArray< int32 >

 

ZoneGraphDataFreeList

Constructors

Name Description

Public function

UZoneGraphSubsystem()

Functions

Name Description

Public function Const

bool

 

AdvanceLaneLocation

(
    const FZoneGraphLaneLocation& InLa...,
    const float AdvanceDistance,
    FZoneGraphLaneLocation& OutLaneLoc...
)

Moves LaneLocation along a lane.

Public function Const

bool

 

CalculateLocationAlongLane

(
    const FZoneGraphLaneHandle LaneHand...,
    const float Distance,
    FZoneGraphLaneLocation& OutLaneLoc...
)

Returns point at a distance along a specific lane.

Public function Const

bool

 

FindLaneOverlaps

(
    const FVector& Center,
    const float Radius,
    const FZoneGraphTagFilter TagFilter,
    TArray< FZoneGraphLaneSection >& O...
)

Find sections of lanes fully overlapping (including lane width). Finds results from all registered ZoneGraph data.

Public function Const

bool

 

FindNearestLane

(
    const FBox& QueryBounds,
    const FZoneGraphTagFilter TagFilter,
    FZoneGraphLaneLocation& OutLaneLoc...,
    float& OutDistanceSqr
)

Find nearest lane that touches the query bounds. Finds results from all registered ZoneGraph data.

Public function Const

bool

 

FindNearestLocationOnLane

(
    const FZoneGraphLaneHandle LaneHand...,
    const FBox& Bounds,
    FZoneGraphLaneLocation& OutLaneLoc...,
    float& OutDistanceSqr
)

Find nearest location on a specific lane.

Public function Const

bool

 

FindNearestLocationOnLane

(
    const FZoneGraphLaneHandle LaneHand...,
    const FVector& Center,
    const float Range,
    FZoneGraphLaneLocation& OutLaneLoc...,
    float& OutDistanceSqr
)

Find nearest location on a specific lane.

Public function Const

bool

 

FindOverlappingLanes

(
    const FBox& QueryBounds,
    const FZoneGraphTagFilter TagFilter,
    TArray< FZoneGraphLaneHandle >& Ou...
)

Find overlapping lanes that touches the query bounds. Finds results from all registered ZoneGraph data.

Public function

FZoneGraphBu...

 

GetBuilder()

Public function Const

FBox

 

GetCombinedBounds()

Returns bounds of all ZoneGraph data.

Public function Const

bool

 

GetFirstLinkedLane

(
    const FZoneGraphLaneHandle LaneHand...,
    const EZoneLaneLinkType Types,
    const EZoneLaneLinkFlags IncludeFla...,
    const EZoneLaneLinkFlags ExcludeFla...,
    FZoneGraphLinkedLane& OutLinkedLan...
)

Returns handle to first linked lane matching the connection type and flags.

Public function Const

bool

 

GetLaneLength

(
    const FZoneGraphLaneHandle LaneHand...,
    float& OutLength
)

Returns the length of a specific lane.

Public function Const

bool

 

GetLaneTags

(
    const FZoneGraphLaneHandle LaneHand...,
    FZoneGraphTagMask& OutTags
)

Returns the Tags of a specific lane.

Public function Const

bool

 

GetLaneWidth

(
    const FZoneGraphLaneHandle LaneHand...,
    float& OutWidth
)

Returns the width of a specific lane.

Public function Const

bool

 

GetLinkedLanes

(
    const FZoneGraphLaneHandle LaneHand...,
    const EZoneLaneLinkType Types,
    const EZoneLaneLinkFlags IncludeFla...,
    const EZoneLaneLinkFlags ExcludeFla...,
    TArray< FZoneGraphLinkedLane >& Ou...
)

Returns all links to connected lanes of a specific lane.

Public function Const

TConstArrayV...

 

GetRegisteredZoneGraphData()

Public function Const

FZoneGraphTa...

 

GetTagByName

(
    FName TagName
)

Returns tag based on name.

Public function Const

const FZoneG...

 

GetTagInfo

(
    FZoneGraphTag Tag
)

Returns info about a specific tag.

Public function Const

TConstArrayV...

 

GetTagInfos()

Returns all tag infos.

Public function Const

FName

 

GetTagName

(
    FZoneGraphTag Tag
)

Returns the name of a specific tag.

Public function Const

const AZoneG...

 

GetZoneGraphData

(
    const FZoneGraphDataHandle DataHand...
)

Returns Zone Graph data associated with specified handle.

Public function Const

const FZoneG...

 

GetZoneGraphStorage

(
    const FZoneGraphDataHandle DataHand...
)

Returns Zone Graph data storage associated with specified handle, or nullptr if not found.

Public function Const

bool

 

IsLaneValid

(
    const FZoneGraphLaneHandle LaneHand...
)

Returns true if lane handle is valid.

Protected function

void

 

OnActorMoved

(
    AActor* Actor
)

Protected function

void

 

OnRequestRebuild()

Protected function

void

 

RebuildGraph

(
    const bool bForceRebuild
)

Rebuilds the graph.

Public function

FZoneGraphDa...

 

RegisterZoneGraphData

(
    AZoneGraphData& InZoneGraphData
)

Protected function

void

 

RegisterZoneGraphDataInstances()

Protected function

void

 

RemoveRegisteredDataItem

(
    const int32 Index
)

Protected function

void

 

SpawnMissingZoneGraphData()

Protected function

void

 

UnregisterStaleZoneGraphDataInstances()

Public function

void

 

UnregisterZoneGraphData

(
    AZoneGraphData& InZoneGraphData
)

Overridden from UWorldSubsystem

Name Description

Protected function Virtual

void

 

PostInitialize()

Called once all UWorldSubsystems have been initialized

Overridden from USubsystem

Name Description

Protected function Virtual

void

 

Deinitialize()

Implement this for deinitialization of instances of the system

Protected function Virtual

void

 

Initialize

(
    FSubsystemCollectionBase& Collecti...
)

USubsystem implementation Begin.

Overridden from FTickableObjectBase

Name Description

Protected function Virtual Const

TStatId

 

GetStatId()

Return the stat id to use for this tickable

Protected function Virtual

void

 

Tick

(
    float DeltaTime
)

Pure virtual that must be overloaded by the inheriting class.