Skip to content

Game.Net.StartNodeGeometry

Assembly: Assembly-CSharp (game assembly — may also appear in Game.dll depending on build)
Namespace: Game.Net

Type: struct

Base: System.ValueType

Summary:
StartNodeGeometry is a lightweight ECS component used to store the geometry information for a start node of a network edge. It is intended for use with Unity's DOTS/ECS systems in Cities: Skylines 2 modding code. The struct implements IComponentData so it can be attached to entities, IQueryTypeParameter to be used in query APIs, and IEmptySerializable to participate in Colossal's custom serialization system.


Fields

  • public EdgeNodeGeometry m_Geometry
    This field holds the geometry data for the start node. EdgeNodeGeometry is defined elsewhere in the codebase and typically contains positional, normal, tangent or other mesh-related information required when building or updating network segment meshes at the node. Use this field to read or set the node's geometry when processing entities that represent network start nodes.

Properties

  • This type does not expose any properties. It only contains the public field m_Geometry.

Constructors

  • public StartNodeGeometry()
    No explicit constructors are defined in the source — the default parameterless struct constructor is used. Initialize fields manually when creating the component.

Methods

  • This struct does not declare any methods. It is a plain data container used by ECS systems.

Usage Example

// Example: Create an entity with a StartNodeGeometry component and set its geometry.
// Note: EdgeNodeGeometry members are placeholders here — replace with actual fields.

var entityManager = World.DefaultGameObjectInjectionWorld.EntityManager;

// Create an archetype that includes StartNodeGeometry
var archetype = entityManager.CreateArchetype(typeof(StartNodeGeometry));

// Create the entity
var entity = entityManager.CreateEntity(archetype);

// Construct an EdgeNodeGeometry instance (fill in actual fields as required)
EdgeNodeGeometry geometry = new EdgeNodeGeometry
{
    // e.g. position, normal, tangent, etc.
};

// Assign the component data
entityManager.SetComponentData(entity, new StartNodeGeometry { m_Geometry = geometry });

// Example: Reading the component inside a SystemBase
public class StartNodeProcessingSystem : SystemBase
{
    protected override void OnUpdate()
    {
        Entities.ForEach((ref StartNodeGeometry startGeom) =>
        {
            var geom = startGeom.m_Geometry;
            // Process geometry: generate mesh, update buffers, etc.
        }).ScheduleParallel();
    }
}

{{ This component is primarily a data carrier for node geometry in the networking/meshing pipeline. Because it implements IEmptySerializable, it integrates with the game's custom serialization flow — no extra serialization code is required for basic use. When using this in mod code, ensure you reference the proper EdgeNodeGeometry definition and consider job safety / burst compatibility when accessing or modifying this data inside jobs. }}