Game.Prefabs.AuxiliaryNet
Assembly:
Assembly-CSharp (typical game assembly; actual mod/project assembly may vary)
Namespace:
Game.Prefabs
Type:
struct (value type implementing IBufferElementData)
Base:
System.ValueType
Unity.Entities.IBufferElementData
Summary:
Represents a buffer element used to store an auxiliary network prefab reference, its placement position, and an invert-mode flag. Marked with InternalBufferCapacity(0) so the dynamic buffer has no inline storage capacity and elements are stored externally.
Fields
-
public Entity m_Prefab
Reference to the prefab entity that this auxiliary net element represents. Typically used when instantiating or referencing a prefab in ECS code. -
public float3 m_Position
Position (Unity.Mathematics.float3) where the auxiliary net prefab should be placed or is located relative to the parent entity or world. -
public NetInvertMode m_InvertMode
Invert mode enum controlling orientation/flip behavior for the placed prefab. (NetInvertMode is an enum defined elsewhere in the codebase.)
Additional note: The type is decorated with [InternalBufferCapacity(0)]
, meaning the dynamic buffer for this element type has zero inline capacity; elements are stored in separate heap memory rather than inline on the entity.
Properties
- None (no properties declared).
Constructors
- No explicit constructors declared. A default parameterless constructor (zero-initialized fields) is provided by the C# compiler for the struct.
Methods
- None (no methods declared).
Usage Example
// Add or get a dynamic buffer of AuxiliaryNet on an entity and add an element.
var buffer = entityManager.GetBuffer<AuxiliaryNet>(entity); // or ecb.AddBuffer<AuxiliaryNet>(entity) using an EntityCommandBuffer
buffer.Add(new AuxiliaryNet
{
m_Prefab = prefabEntity,
m_Position = new Unity.Mathematics.float3(10f, 0f, 20f),
m_InvertMode = NetInvertMode.None // or the appropriate enum value
});