Game.Net.EndNodeGeometry
Assembly: Assembly-CSharp
Namespace: Game.Net
Type: struct
Base: System.ValueType, Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter, Colossal.Serialization.Entities.IEmptySerializable
Summary:
EndNodeGeometry is a lightweight ECS component that wraps an EdgeNodeGeometry value. It is intended to store geometry-related data for the "end" of a network edge/node within the game's entity-component system. Because it implements IComponentData it can be attached to Unity.Entities.Entity instances and used in Jobs/Systems. Implementing IQueryTypeParameter makes it usable directly in entity queries, and IEmptySerializable indicates it participates in the game's serialization system (Colossal.Serialization) in a specific, minimal way. For the exact contents of the geometry payload, see the EdgeNodeGeometry type.
Fields
public EdgeNodeGeometry m_Geometry
This field holds the actual geometry data for the end node. EdgeNodeGeometry is a separate value type that encapsulates whatever positional, normal/tangent, or other mesh-related information the engine uses for an edge node endpoint. Use this field to read or modify the geometry associated with an entity that represents an end node.
Properties
- None.
This struct exposes its data via the public field m_Geometry and does not define any properties.
Constructors
public EndNodeGeometry()
The default parameterless constructor (implicit for structs) produces a zero-initialized instance where m_Geometry is default-initialized. You can initialize with an object initializer, e.g. new EndNodeGeometry { m_Geometry = someGeometry }.
Methods
- None (no instance methods are declared).
All behavior is data-driven; any logic acting on this component should be implemented in Systems/Jobs that read or write the m_Geometry field. Interface implementations are marker-like and do not introduce explicit methods on this type.
Usage Example
using Unity.Entities;
using Game.Net;
// Adding the component to an entity (EntityManager API)
var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;
EdgeNodeGeometry geometry = new EdgeNodeGeometry(); // populate as appropriate
var endGeom = new EndNodeGeometry { m_Geometry = geometry };
entityManager.AddComponentData(someEntity, endGeom);
// Using in a System (Entities.ForEach / Job)
public partial class EndNodeProcessingSystem : SystemBase
{
protected override void OnUpdate()
{
Entities
.ForEach((ref EndNodeGeometry endNode) =>
{
// read or modify endNode.m_Geometry here
})
.ScheduleParallel();
}
}
{{ This component is a simple data container meant to be used inside Unity's ECS workflows in Cities: Skylines 2 mods. Check the EdgeNodeGeometry definition for specifics about what geometry data is stored and how to construct/populate it. }}