Game.Pathfind.LocationSpecification
Assembly:
Namespace: Game.Pathfind
Type: struct
Base: System.ValueType
Summary:
LocationSpecification is a small value-type container used by the pathfinding subsystem to describe a geometric location as a 3D line segment. It holds a single Line3.Segment (from Colossal.Mathematics), which represents a line segment in world space. As a struct, instances are copied by value; this type is intended as a lightweight carrier of positional data for pathfinding queries and related operations.
Fields
public Colossal.Mathematics.Line3.Segment m_Line
Holds the line-segment that specifies the location. The segment encodes the geometric start and end points in 3D space (via the Line3.Segment type from Colossal.Mathematics). This field is public and can be read or written directly. When a LocationSpecification is default-constructed, m_Line will have the default value of Line3.Segment.
Properties
- (none)
This struct does not declare any properties. Use the public field m_Line to get or set the contained segment.
Constructors
public LocationSpecification()
The type has the implicit default parameterless constructor provided for structs. It initializes m_Line to the default value of Colossal.Mathematics.Line3.Segment.
Methods
- (none)
There are no methods defined on this struct.
Usage Example
using Game.Pathfind;
using Colossal.Mathematics;
using UnityEngine;
// create a LocationSpecification that represents a line from (0,0,0) to (10,0,0)
var spec = new LocationSpecification
{
m_Line = new Line3.Segment(new Vector3(0f, 0f, 0f), new Vector3(10f, 0f, 0f))
};
// pass spec to pathfinding-related APIs that expect a location represented as a line segment
Additional notes: - Because LocationSpecification is a struct, assigning it or passing it to methods copies the value; modify copies with that in mind. - The exact members and constructors of Colossal.Mathematics.Line3.Segment depend on the Colossal.Mathematics implementation; adapt the construction above to the actual available constructors/types in your modding environment.