Docsv3.30.0
Back to API Reference
Class

Attach3DModifier

sealed
Inherits:Text3DRangeModifier<byte>
Implements:IGlyphOutlineReader

Copies of prefabs on the glyphs of a range of extruded text — candles on top, gems on the faces, snow on the upper sides — each keeping its place on its glyph as poses, animations and deformers move it.

Remarks

Prefabs are measured in em: a copy is its prefab's size times the glyph's em where it sits, so it grows with the font size and with the glyph's pose. Copies live under a hidden child of the text and are never saved; they are placed whenever the text draws new geometry or a setting changes, at a cost per copy, and each keeps its object while it copies the same prefab. Glyphs of colour fonts take no copies, and a line that misses its glyph places none. On flat text it does nothing.
public Text3DAttachPlacement Placement{ get; set }

Where the copies sit on each glyph.

public int Count{ get; set }

Copies per glyph: spread across it on top, underneath or on the front; at most this many along the strokes or scattered.

public Text3DSurfaces Surfaces{ get; set }

The surfaces scattered copies may sit on.

public float Facing{ get; set }

How far up a surface must face to take scattered copies: −1 takes any, 0 those facing up or sideways, 1 flat tops only.

public float Spacing{ get; set }

Distance between copies along the strokes, or the least distance between scattered copies on one glyph, in em.

public bool AlignToSurface{ get; set }

Whether copies stand along the surface's normal instead of the glyph's up.

public float Scale{ get; set }

Size of the copies relative to their prefabs.

public float ScaleJitter{ get; set }

How much smaller a copy may come out at random, as a share of its size.

public float Spin{ get; set }

Largest random turn of a copy about its up axis, in degrees.

public int Seed{ get; set }

Seed of the random choices: places, prefabs, sizes and turns.

protected override void OnEnable()
protected override void OnDisable()
protected override void OnDestroy()
protected override void BeforeApply()