Aego Русский

Mesh 2D

Draws the standard mesh vertex layout in a 2D camera with a compatible Mesh2D material.

component engine.Mesh2D
On this page

Usage

Add it with Create → Rendering → Mesh 2D.

Try it

Mesh 2D draw order

The blue mesh overlaps the red sprite. Its Order controls which one is in front.

Change Order from 2 to 0, then use Reset to restore it.

Starts the scene; open the example parameters to experiment.
Open in AegoDownload example project
Scene3 nodes
Mesh 2D
Transform
position[-0.5, 0]rotation0scale[3, 3]
Mesh 2D
meshMeshasset("ae900000000000000000000000000001")textureTextureasset("ae900000000000000000000000000010")tintColor#38bdf8fflayerint0orderint2
Overlap
Transform
position[1, 0]rotation0scale[1, 1]
Sprite Renderer
spriteTextureasset("ae900000000000000000000000000010")layerint0orderint1tintColor#f43f5efforiginVec2[0.5, 0.5]sizeVec2[3, 3]blendenumpremultipliedfilterenumnearest
Camera
Transform
position[0, 0]rotation0scale[1, 1]
Camera 2D
zoomfloat96viewportRect[0, 0, 1, 1]maskint-1orderint0clearbooltrueclearColorColor#111827ffscaleenumfitVirtualvirtualVec2[960, 540]activebooltrue

Fields

NameTypeDefaultDescription
MeshMeshnone

Mesh asset with the standard position, normal, UV and vertex color layout.

TextureTexturenone

Main texture sampled in mesh UV coordinates. Empty uses white.

MaterialAssetRef<material>none

Shared material asset. The shader domain must be mesh2d.

TintColorrgba(1, 1, 1, 1)

Linear color multiplied with the texture; alpha controls transparency.

Layerint0

Visual layer for this 2D mesh.

Orderint0

Painter order among sprites and meshes in the same layer; higher values draw later.