Game.Net.EdgeIteratorValue
Assembly: Assembly-CSharp.dll
Namespace: Game.Net
Type: struct
Base: System.ValueType
Summary: A lightweight value type used by the network/edge iteration logic. Represents a single edge item encountered while iterating network edges, carrying the Entity reference and simple flags indicating whether the iterator is at an end point or a middle segment. Intended for transient use during iteration; no behavior or methods are defined on this type.
Fields
-
public Unity.Entities.Entity m_Edge
Represents the ECS Entity that corresponds to the edge being iterated. This is the primary identifier you use to look up components or perform operations on the edge entity. -
public bool m_End
Flag that indicates the current iterator position corresponds to an end of a network segment (for example a node-end). True when this EdgeIteratorValue represents an end point. -
public bool m_Middle
Flag that indicates the current iterator position corresponds to a middle segment (not an end). True when this EdgeIteratorValue represents a middle segment between nodes.
Properties
- None. This struct exposes plain public fields for simple, allocation-free access.
Constructors
public EdgeIteratorValue()
(implicit) Structs in C# have an implicit parameterless constructor that initializes fields to their default values: m_Edge = Entity.Null, m_End = false, m_Middle = false.
Methods
- None. This type is a POD-like container without behavior.
Usage Example
// Example of creating and using EdgeIteratorValue in an iteration context
using Unity.Entities;
using Game.Net;
void ProcessEdges()
{
// Construct and initialize
var edgeValue = new EdgeIteratorValue
{
m_Edge = someEdgeEntity,
m_End = false,
m_Middle = true
};
// Example checks
if (edgeValue.m_Edge != Entity.Null)
{
if (edgeValue.m_End)
{
// Handle end-of-segment logic
}
else if (edgeValue.m_Middle)
{
// Handle middle-segment logic
}
}
}
{{ Additional notes: - This struct is intended for short-lived, stack-friendly usage in iterators or jobs. - When used inside Jobs or Burst-compiled code, prefer keeping it as a blittable, field-based struct (as it is). - To fetch components for the referenced edge, use the Entity (m_Edge) with an EntityManager or within an ECS System/Job. }}