reckfellENGINE

BoxMesh

Procedural box with independent dimensions and subdivisions.

On this page
class BoxMeshReckfellSharpInherits PrimitiveMesh

BoxMesh defines a single box surface centered on the local origin. Size gives full dimensions; SubdivideWidth/Height/Depth add segments along X/Y/Z. Subdivision does not round the box. Instances sharing one resource share its changes.

Enable AddUV2 and follow the LightmapGI guide for baked lighting. Material and UV2 settings are inherited from PrimitiveMesh; configure collision separately when needed.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

BoxMeshConstructor
# BoxMesh
C#
public BoxMesh();

Creates a 1×1×1 box with zero additional subdivisions. Its single surface uses 24 vertices for separate face normals/UVs and 12 triangles. Inherited AddUV2 defaults to false. This is a visual geometry resource, not a complete physics body.

Properties4

SizeProperty
# Size
C#
public Vector3 Size { get; set; }

Full local dimensions along X, Y and Z; defaults to (1, 1, 1). Geometry is centered at the origin, with positive-size bounds from −Size/2 to +Size/2. This is not instance Scale. Use finite positive dimensions: the setter does not sanitize arbitrary input. Changing size updates the mesh and, with AddUV2, the lightmap size hint.

SubdivideDepthProperty
# SubdivideDepth
C#
public int SubdivideDepth { get; set; }

Additional subdivisions along Z, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

SubdivideHeightProperty
# SubdivideHeight
C#
public int SubdivideHeight { get; set; }

Additional subdivisions along Y, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

SubdivideWidthProperty
# SubdivideWidth
C#
public int SubdivideWidth { get; set; }

Additional subdivisions along X, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

Methods8

GetSizeVector3
# GetSize
C#
public Vector3 GetSize();

Returns Size. Full local dimensions along X, Y and Z; defaults to (1, 1, 1). Geometry is centered at the origin, with positive-size bounds from −Size/2 to +Size/2. This is not instance Scale. Use finite positive dimensions: the setter does not sanitize arbitrary input. Changing size updates the mesh and, with AddUV2, the lightmap size hint.

Returns Vector3

Current Size in the mesh resource.

GetSubdivideDepthint
# GetSubdivideDepth
C#
public int GetSubdivideDepth();

Returns SubdivideDepth. Additional subdivisions along Z, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

Returns int

Current SubdivideDepth in the mesh resource.

GetSubdivideHeightint
# GetSubdivideHeight
C#
public int GetSubdivideHeight();

Returns SubdivideHeight. Additional subdivisions along Y, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

Returns int

Current SubdivideHeight in the mesh resource.

GetSubdivideWidthint
# GetSubdivideWidth
C#
public int GetSubdivideWidth();

Returns SubdivideWidth. Additional subdivisions along X, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

Returns int

Current SubdivideWidth in the mesh resource.

SetSizevoid
# SetSize
C#
public void SetSize(Vector3 size);

Sets Size. Full local dimensions along X, Y and Z; defaults to (1, 1, 1). Geometry is centered at the origin, with positive-size bounds from −Size/2 to +Size/2. This is not instance Scale. Use finite positive dimensions: the setter does not sanitize arbitrary input. Changing size updates the mesh and, with AddUV2, the lightmap size hint.

Parameters
NameTypeDefault
sizeVector3—
size

New Size value, applied to the resource rather than one instance.

SetSubdivideDepthvoid
# SetSubdivideDepth
C#
public void SetSubdivideDepth(int divisions);

Sets SubdivideDepth. Additional subdivisions along Z, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

Parameters
NameTypeDefault
divisionsint—
divisions

New SubdivideDepth value, applied to the resource rather than one instance.

SetSubdivideHeightvoid
# SetSubdivideHeight
C#
public void SetSubdivideHeight(int divisions);

Sets SubdivideHeight. Additional subdivisions along Y, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

Parameters
NameTypeDefault
divisionsint—
divisions

New SubdivideHeight value, applied to the resource rather than one instance.

SetSubdivideWidthvoid
# SetSubdivideWidth
C#
public void SetSubdivideWidth(int subdivide);

Sets SubdivideWidth. Additional subdivisions along X, default 0. Negative values are stored as 0. The corresponding faces have value + 1 segments along that axis. Bounds remain unchanged and faces are not rounded; more subdivisions mean more geometry, not beveled edges. Changes automatically regenerate the mesh.

Parameters
NameTypeDefault
subdivideint—
subdivide

New SubdivideWidth value, applied to the resource rather than one instance.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.