Game.Prefabs.AuxiliaryNetInfo
Assembly: Assembly-CSharp (Assembly-CSharp.dll)
Namespace: Game.Prefabs
Type: class
Base: System.Object
Summary:
A small serializable data container used by prefab code to describe an auxiliary network (net) element associated with a main prefab. Contains the referenced net prefab, a position offset, and an inversion mode that controls when the auxiliary net should be mirrored/inverted. Typically used when a building or other prefab needs to spawn or reference an additional network piece (for example a connecting road segment) with a defined offset and mirroring behavior.
Fields
-
public NetPrefab m_Prefab
Reference to the net prefab to be used as the auxiliary network element. This is the asset that will be instantiated or referenced when the auxiliary net is applied. -
public float3 m_Position
Offset/position for the auxiliary net. Uses Unity.Mathematics.float3. Typically interpreted as a local offset relative to the parent prefab or as the placement position for the auxiliary net, depending on the calling code. -
public NetInvertMode m_InvertWhen
Controls when the auxiliary net should be inverted/mirrored. NetInvertMode is an enum (flags) used by the net/prefab placement system to determine inversion behavior under different conditions (for example, when the parent prefab is flipped or placed with mirrored orientation).
Properties
- This class does not expose any public properties; it uses public fields for data storage.
Constructors
public AuxiliaryNetInfo()
Default parameterless constructor (compiler-provided). The class is marked [Serializable], so instances are typically populated via serialization (e.g., from prefab data) or by direct assignment in code.
Methods
- This class does not declare any methods.
Usage Example
using Unity.Mathematics;
using Game.Prefabs;
// Create and configure an auxiliary net info
var aux = new AuxiliaryNetInfo();
aux.m_Prefab = someNetPrefabReference; // NetPrefab instance or reference
aux.m_Position = new float3(0f, 0f, 5f); // offset in prefab-local coordinates
aux.m_InvertWhen = NetInvertMode.MirrorWhenFlipped; // example enum value
// The aux instance can then be stored on a parent prefab or passed to placement/spawn logic
Notes: - The class is decorated with [Serializable], so it is intended to be serialized with the prefab data. - Exact semantics of m_Position and NetInvertMode depend on the code that consumes AuxiliaryNetInfo (placement/spawning logic in the prefab system).