Game.Pathfind.CreateActionData
Assembly: Assembly-CSharp
Namespace: Game.Pathfind
Type: struct
Base: System.ValueType
Summary:
CreateActionData is a plain data container (POD) used to describe a single path-creation action for the pathfinding subsystem. It aggregates the entity that requested the path plus up to primary and secondary node endpoints, path specifications, and a location descriptor. This struct is intended to be passed to path-creation logic (systems or jobs) and contains only simple fields (no behavior).
Fields
-
public Entity m_Owner
Identifies the ECS Entity that owns or requested this path creation. Typically used to associate results back to the requester or to access entity components during processing. -
public PathNode m_StartNode
Primary start node for the path. Represents the starting graph node/slot in the pathfinder's node model. -
public PathNode m_MiddleNode
Optional middle node on the path. Used when the path needs to go through an intermediate node (e.g., waypoint or transfer node). May be a default/empty value when not required. -
public PathNode m_EndNode
Primary end node for the path. Represents the target graph node/slot. -
public PathNode m_SecondaryStartNode
Secondary/alternate start node. Used for complex routing cases where two start points are relevant (for example multi-lane starts, split-route handling, or fallback start). -
public PathNode m_SecondaryEndNode
Secondary/alternate end node. Used similarly to m_SecondaryStartNode for alternate/fallback target handling. -
public PathSpecification m_Specification
Primary path specification that encodes constraints/preferences for the path (e.g., allowed vehicle types, speed/cost modifiers, routing flags). Consult PathSpecification definition for exact fields. -
public PathSpecification m_SecondarySpecification
Secondary path specification, used if a different constraint set is required for an alternate leg or fallback path. -
public LocationSpecification m_Location
Location descriptor (position, orientation, segment/vertex details, or higher-level location info) associated with this path action. Used by path creation to resolve nodes or perform spatial queries.
Properties
- None.
This struct exposes only public fields; there are no properties.
Constructors
public CreateActionData()
Structs in C# have an implicit parameterless constructor that initializes all fields to their default values. There are no custom constructors defined in this file. Users typically initialize via object initializer syntax.
Methods
- None.
This type contains no methods; it is a simple data holder.
Usage Example
// Example: creating and populating a CreateActionData to enqueue for path creation
var action = new CreateActionData
{
m_Owner = requesterEntity,
m_StartNode = startNode,
m_EndNode = endNode,
m_MiddleNode = default, // if not used
m_SecondaryStartNode = default, // optional
m_SecondaryEndNode = default, // optional
m_Specification = preferredSpec,
m_SecondarySpecification = default, // optional
m_Location = locationSpec
};
// Pass `action` to the path creation system or job queue for processing.
Notes: - The concrete semantics of PathNode, PathSpecification, and LocationSpecification are defined elsewhere; consult their types for details on valid values and required fields. - Because this is a plain struct, prefer object-initializer construction and avoid mutating shared instances concurrently across threads/jobs unless properly synchronized.