Skip to content

Game.Pathfind.TimeActionData

Assembly:
Assembly-CSharp (game assembly)

Namespace:
Game.Pathfind

Type:
struct

Base:
System.ValueType

Summary:
Lightweight POD (plain-old-data) struct used to represent a scheduled/time-based pathfinding action. It bundles an owner Entity reference, up to two path segments (start/end and an optional secondary start/end), a time value (typically a timestamp or delay in seconds), and flags that control the action's behavior. This type is intended to be used by the pathfinding systems to queue or describe actions that should occur at a specific time or after a delay.


Fields

  • public Entity m_Owner
    Reference to the ECS Entity that owns or requested the time action. This links the scheduled action back to the entity responsible for it.

  • public PathNode m_StartNode
    Primary start node of the path/action. Represents the starting node for the path segment associated with this action.

  • public PathNode m_EndNode
    Primary end node of the path/action. Represents the ending node for the path segment associated with this action.

  • public PathNode m_SecondaryStartNode
    Optional secondary start node. Used when the action involves two segments or an alternate start (for example, a two-part path).

  • public PathNode m_SecondaryEndNode
    Optional secondary end node. Used when the action involves two segments or an alternate end.

  • public float m_Time
    Time value associated with the action. Typically used as a timestamp or delay (in seconds) indicating when the action should run or expire.

  • public TimeActionFlags m_Flags
    Flags controlling details of the time action (behavioral modifiers, options, or state bits). The concrete semantics depend on the TimeActionFlags enum definition.

Properties

  • This struct does not declare any properties.

Constructors

  • This struct does not declare an explicit constructor. It is a value type and can be default-initialized or initialized using an object initializer.

Methods

  • This struct does not declare any methods.

Usage Example

// Create and populate a TimeActionData instance.
var timeAction = new TimeActionData
{
    m_Owner = ownerEntity,
    m_StartNode = startNode,
    m_EndNode = endNode,
    m_SecondaryStartNode = secondaryStart,
    m_SecondaryEndNode = secondaryEnd,
    m_Time = 5.0f, // e.g. delay or timestamp in seconds
    m_Flags = TimeActionFlags.None
};

// The struct can then be passed to pathfinding systems, stored in arrays,
// or used as part of scheduling logic. Example: enqueue into a list for later processing.
timeActionQueue.Add(timeAction);