MeshComponent

Reusable mesh rendering behavior that can be attached to any Node.

Public Methods

OnAwake

public override void OnAwake()

Initializes the component by resolving the runtime Vulkan service when available.

TransformationMatrix

public Matrix4x4 TransformationMatrix()

Calculates and returns the transformation matrix for the owning node.

Returns: Matrix4x4

  • The transformation matrix.

Bind

public static void Bind(CommandBuffer _)

Binds the mesh component to a command buffer for rendering.

Parameters:

  • _ (CommandBuffer): The Vulkan command buffer.

Draw

public void Draw(CommandBuffer commandBuffer)

Draws the mesh using the provided command buffer.

Parameters:

  • commandBuffer (CommandBuffer): The Vulkan command buffer.

Dispose

public void Dispose()

Disposes of the mesh component.