FAQ

Questions and answers

Geometry, layers, animation and rendering.

Basics

How does shape rendering work?

The shader evaluates distance to the outline per pixel. Curves, corners, strokes and soft edges stay sharp at any scale. Geometry and appearance remain editable parameters.

How is this different from an Image with a rounded sprite?

A UniShape stores editable geometry and layers. Corner radii, outlines, shadows and gradients remain parameters, so a new appearance does not require another sprite.

Does it work with Mask and RectMask2D?

Both. The shader declares the standard uGUI stencil block — stencil id, comparison, operation and the read and write masks — and compiles the clip-rect variant, so a UniShape is masked exactly the way an Image is.

Can I use it outside a Canvas, on 3D geometry?

Yes. UniShapeWorld renders in 3D scenes without a Canvas, with sorting, pointer interaction and Core's shared world batching.

Vector outlines

Can I paste in an SVG path?

Yes — GameObject ▸ UI ▸ UniShape from SVG Path, or the same entry from the LightSide palette on Alt+L. The parser handles M, L, H, V, C, S, Q, T, A and Z in both absolute and relative form, converts elliptical arcs to cubics and flips to Unity’s y-up. It reads the first sub-path only, so one contour per shape.

Can a shape have a hole, like a donut or the letter O?

Composite shapes support subtraction, intersection and exclusion. Cut layers subtract from lower appearance layers. An imported vector path still represents a single contour.

Is there a limit on how complex an outline can be?

Each flattened polygon or polyline has a 64-vertex budget. Shared outline storage grows with live content and device limits. The 18 analytic primitives do not use polygon rows.

Can I turn an existing sprite into a shape?

The tracing tool converts a sprite's alpha boundary into an editable contour. Alpha threshold and simplification are configurable; the source texture must be readable.

Rendering

How many draw calls does a shape cost?

A compatible stack uses one draw call and can batch with UniText and UniLottie. Different materials, sampled textures, blend modes, masks or draw order can split batches.

Do the built-in Outline and Shadow components work?

UniShapes uses its own stroke and shadow layers. Each layer has editable paint, geometry and blending settings; standard uGUI mesh modifiers are not applied.

Can I write my own layer type?

Custom ShapeLayer subclasses appear in the layer selector and use the shared rendering and change-tracking mechanisms.

Can I supply my own outline provider?

Serializable IShapeProvider implementations supply geometry and appear in the shape selector. The built-in providers cover primitives, vector paths, shape assets, sprites and composites.

Performance

Does rebuilding a shape allocate?

Rendering buffers and GPU data rows are reused. Capacity growth, authoring changes and asset creation may allocate; the rendering reference describes those boundaries.

Is a vector outline more expensive than a primitive?

Analytic primitives have a fixed formula per pixel. Polygon and polyline rendering also reads their vertices, so more vertices require more shader work. Each path supports up to 64 vertices.

Will this blow up my shader variant count?

Shape and layer choices are supplied as data to common shaders. Render features, graphics APIs and Unity's shader keywords determine the compiled variants.

Platforms

Does it run on WebGL and mobile?

The shared shader supports Shader Model 3.5 graphics APIs, including WebGL 2.0, GLES3, Vulkan, Metal and desktop graphics backends.

Which Unity versions are supported?

Unity 2022.3 and newer. Installing UniShapes also installs media.lightside.core, which owns the shared shader, the paint and gradient types and the point-editing tools the editor uses.

Do I need UniText as well?

UniShapes depends on LightSide Core, and its Canvas component uses uGUI. UniText is required only by samples that contain text. Shared Core systems include paints, property state, geometry tools and rendering infrastructure.

Support and discussion

Discord is the main channel for questions, bug reports, help and discussion.