Game.Vehicles.FixParkingLocation
Assembly:
Assembly-CSharp.dll
Namespace:
Game.Vehicles
Type:
struct
Base:
System.ValueType
Implements: Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter
Summary:
A lightweight ECS component used by the vehicle/parking systems to carry references to two related Entities involved in fixing a vehicle's parking location: one entity representing a lane-change target (m_ChangeLane) and one representing a reset/backup location (m_ResetLocation). As a value-type component it can be attached to entities and queried in Jobs/Systems.
Fields
-
public Unity.Entities.Entity m_ChangeLane
Holds an Entity reference that represents the lane (or lane-change target) the vehicle should use when fixing its parking position. -
public Unity.Entities.Entity m_ResetLocation
Holds an Entity reference that represents a reset or fallback parking location used when the normal parking location must be corrected.
Properties
- (None)
This struct does not expose any properties — it only contains two public Entity fields.
Constructors
public FixParkingLocation(Unity.Entities.Entity changeLane, Unity.Entities.Entity resetLocation)
Creates a new FixParkingLocation component instance, initializing m_ChangeLane and m_ResetLocation with the provided Entity references.
Methods
- (None)
This struct does not define methods beyond the constructor. It is a plain data container intended for use as an IComponentData (and as a query type parameter) in ECS systems and jobs.
Usage Example
// Example: create and attach the component to an entity using an EntityManager
Entity changeLaneEntity = /* obtain or create the lane entity */;
Entity resetLocationEntity = /* obtain or create the reset location entity */;
Entity parkingEntity = /* the vehicle or parking-related entity */;
var comp = new FixParkingLocation(changeLaneEntity, resetLocationEntity);
entityManager.AddComponentData(parkingEntity, comp);
// Example: read the component inside a system
Entities
.ForEach((in FixParkingLocation fpl) =>
{
Entity lane = fpl.m_ChangeLane;
Entity reset = fpl.m_ResetLocation;
// use lane and reset to compute/fix parking behavior
})
.Schedule();
{{ Additional notes: - Because this is an IComponentData, it is a blittable value type suitable for high-performance ECS usage. - As IQueryTypeParameter it can also be used to structure queries; treat it as a simple data carrier linking to other entities rather than containing logic. - Ensure referenced Entities (m_ChangeLane, m_ResetLocation) remain valid while systems operate on them; consider entity lifecycle and checks for existence if entities may be destroyed. }}