Class ScyllaFloorTileShape
Parametric floor tile: a thin slab in the XZ plane with optional rounded edges. The
tile's surface normal points up UnityEngine.Vector3.up; the slab's top face sits at
+Thickness * 0.5 and its bottom face at -Thickness * 0.5, centered on the
origin so a tile can be positioned by setting its Transform.position to the
desired floor cell center (with y = 0 for a floor that sits on the world plane).
Inherited Members
Namespace: Scylla.Core.Util.Geom
Assembly: ScyllaCore.dll
Syntax
[AddComponentMenu("Scylla/Geometry/Floor Tile")]
public sealed class ScyllaFloorTileShape : ScyllaShapeBase3D
Remarks
Topologically a floor tile is a thin box, so the mesh delegates to
Build(Mesh, Size3D, float, int, RoundedBoxColoringMode, IFaceColorResolver) (or Build(Mesh, float, float, float, IFaceColorResolver)
when BevelRadius is 0). The wrapper exposes floor-tile
semantic field names (Width / Depth /
Thickness) and clamps the bevel against the thickness so the bevel
never bulges the top face above the slab's nominal height.
Note: the bevel rounds all 12 edges, including the bottom-face edges that face away from typical floor cameras. For a tile design that rounds only the top-face perimeter (matching real-world chamfered floor tiles), use ScyllaBoxShape with a custom material or wait for a future v2 of this shape with top-edges-only bevel support.
Properties
BevelRadius
Edge rounding radius in mesh units. Set to 0 for a sharp-edged tile; the
builder then delegates to Build(Mesh, float, float, float, IFaceColorResolver) instead of
Build(Mesh, Size3D, float, int, RoundedBoxColoringMode, IFaceColorResolver). Clamped to half the Thickness
at build time. Setting this property triggers an immediate mesh rebuild.
Declaration
public float BevelRadius { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
BevelSegments
Number of subdivisions per quarter-arc on each rounded edge and corner patch.
Only relevant when BevelRadius is greater than 0. Higher values
produce smoother curvature at the cost of extra geometry. Clamped to [1, 32]
at build time. Setting this property triggers an immediate mesh rebuild.
Declaration
public int BevelSegments { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Depth
Tile size along the Z axis in mesh units. Setting this property triggers an immediate mesh rebuild.
Declaration
public float Depth { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Thickness
Vertical extent of the tile slab along the Y axis in mesh units. Also acts as the
effective ceiling for BevelRadius: the bevel is clamped to
Thickness * 0.5 so the top and bottom face panels are never eliminated.
Setting this property triggers an immediate mesh rebuild.
Declaration
public float Thickness { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Width
Tile size along the X axis in mesh units. Setting this property triggers an immediate mesh rebuild.
Declaration
public float Width { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
Build(Mesh, float, float, float, float, int, IFaceColorResolver)
Populates target with a parametric floor-tile mesh. Existing
mesh data is overwritten. When bevelRadius is 0 the
output mesh is a hard-edged box; otherwise it is a rounded box clamped so the
bevel never exceeds half the thickness.
Declaration
public static void Build(Mesh target, float width, float depth, float thickness, float bevelRadius, int bevelSegments, IFaceColorResolver resolver = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | target | Destination mesh. Must be non-null. |
| float | width | Tile size along X. |
| float | depth | Tile size along Z. |
| float | thickness | Tile size along Y. |
| float | bevelRadius | Edge rounding radius. |
| int | bevelSegments | Quarter-arc subdivisions when |
| IFaceColorResolver | resolver | Optional per-face color resolver forwarded to the underlying box / rounded-box builder. When non-null, a per-vertex color channel is emitted. When null, no color channel is written. |
BuildMesh(Mesh)
Subclass extension point: write vertex / triangle / normal / uv data into
target from the shape's serialized parameters. The base class
calls Clear(bool) before invoking this method and
UnityEngine.Mesh.RecalculateBounds() afterwards, so subclasses should not invoke
either themselves.
Declaration
protected override void BuildMesh(Mesh target)
Parameters
| Type | Name | Description |
|---|---|---|
| Mesh | target | The owned mesh to populate. Already cleared by the base class. |
Overrides
GetMeshName()
Returns the shape's mesh name as it should appear on the generated mesh asset. Defaults to the subclass type name; override to provide a friendlier label.
Declaration
protected override string GetMeshName()
Returns
| Type | Description |
|---|---|
| string | A short identifier for the generated mesh, used as UnityEngine.Object.name. |
Overrides
TryAttachPrimitiveCollider()
Subclass extension point: when ColliderMode is
MatchingPrimitive, attach the appropriate
primitive collider for this shape and return true. Return false to
let the base class fall back to UnityEngine.MeshCollider.
Declaration
protected override bool TryAttachPrimitiveCollider()
Returns
| Type | Description |
|---|---|
| bool |
|