Game.Rendering.Bone
Assembly:
Namespace: Game.Rendering
Type: struct
Base: IBufferElementData, IEmptySerializable
Summary:
Represents a single bone transform used by the rendering system. This struct is an ECS buffer element (IBufferElementData) intended to be stored in a DynamicBuffer
Fields
-
public float3 m_Position
Represents the bone position in local (or model) space. -
public quaternion m_Rotation
Represents the bone rotation as a quaternion. -
public float3 m_Scale
Represents the bone scale.
Properties
None
This struct exposes no C# properties; it only contains public fields.
Constructors
None (default generated)
No explicit constructors are defined; the default parameterless constructor provided by C# / Unity value types is used.
Methods
None
No methods are defined on this struct.
Usage Example
// add or get a DynamicBuffer<Bone> on an entity and populate it
EntityManager.AddBuffer<Bone>(entity);
var buffer = EntityManager.GetBuffer<Bone>(entity);
buffer.Clear();
Bone b = new Bone
{
m_Position = new float3(0f, 1f, 0f),
m_Rotation = quaternion.EulerXYZ(new float3(0f, 0f, 0f)),
m_Scale = new float3(1f, 1f, 1f)
};
buffer.Add(b);