Skip to content

Game.Pathfind.PathEventData

Assembly:
Namespace: Game.Pathfind

Type: struct

Base: System.ValueType

Summary:
A small plain-old-data struct used to carry two 3D positions for pathfinding-related events. Both positions use Unity.Mathematics.float3 (SIMD-friendly, blittable) and typically represent a source/target pair or two sample points used by the pathfinding system. The struct contains only public fields and no behavior—intended for fast value-type passing and storage (including use in native containers or jobified code).


Fields

  • public Unity.Mathematics.float3 m_Position1
    First position in world-space (float3). Commonly used as the start/source or the first sample point for a pathfinding event. Coordinates are in game world units.

  • public Unity.Mathematics.float3 m_Position2
    Second position in world-space (float3). Commonly used as the target/end or the second sample point for a pathfinding event. Coordinates are in game world units.

Properties

  • This struct defines no properties; it exposes two public fields directly.

Constructors

  • No explicit constructors are declared in the source. The type has the default parameterless struct constructor (all fields initialized to their default values). You can also initialize the fields with an object initializer or by assigning values directly.

Methods

  • This struct defines no methods.

Usage Example

using Unity.Mathematics;
using Game.Pathfind;

// create and initialize
var evt = new PathEventData
{
    m_Position1 = new float3(10f, 0f, 20f),
    m_Position2 = new float3(15f, 0f, 25f)
};

// pass to pathfinding subsystem (pseudo-code)
PathEventQueue.Enqueue(evt);

// or update an existing instance
evt.m_Position1 = new float3(12f, 0f, 22f);

Notes: - Because it is a blittable value type (float3 fields), PathEventData can be stored in Native containers or used in Unity Jobs if required by your mod code. - The struct is mutable (public fields) — if immutability is needed, wrap or copy the data accordingly.