User guide

SpriteLess UI

Create everyday uGUI shapes without sprite files. Choose a shape in one component, then adjust it with the Inspector and RectTransform.

Unity 2021.3 LTS+uGUIRuntime-ready
Free & open source · MIT

Installation

In Unity's Package Manager, choose Add package from git URL and paste:

https://github.com/DarknessTyranno/SpriteLess-UI.git?path=/Packages/io.github.darknesstyranno.spriteless-ui

You need Unity 2021.3 LTS or newer, Unity UI 1.0.0 or the version bundled with your Editor, and Git 2.14 or newer for Git URL installation.

The SpriteLess UI Pro Asset Store package includes Core. If you use Pro, do not install this Git package alongside it.

SpriteLessImage

  1. Create a shape from GameObject → UI (Canvas) → SpriteLess, or add SpriteLessImage to a UI GameObject.
  2. Choose Shape and set Fill Color.
  3. Adjust its RectTransform to position, resize or rotate the shape.
  4. Use the settings shown for that shape to change corners, thickness or other details.
SpriteLessImage Inspector with the Shape menu open, listing the available shapes.
Choose a shape, then adjust the settings for that shape. Open full-size image.

You do not need to swap components to change shapes. The Inspector displays the controls that apply to the selected shape.

Examples of rectangles, circles, quadrilaterals, triangles, chevrons and arcs with different appearances.

SpriteLessLine

Create straight lines and open polylines from GameObject → UI (Canvas) → SpriteLess → Line. Like SpriteLessImage, the line draws directly at runtime without baking.

  1. Set Color and Thickness, then choose flat or round Cap ends and miter or round Join corners.
  2. Drag points in the Scene view. Shift-drag either endpoint to add a point and extend the line. Escape cancels the extension; Undo reverses it.
  3. Click a segment midpoint to insert a point. Select a point and click Remove Selected Point to remove it, keeping at least two points.
  4. Edit Normalized Points in the Inspector when you need precise positions.
Normalized Points
Coordinates are relative to the RectTransform: (0, 0) is bottom-left and (1, 1) is top-right. Resizing the rectangle moves the points with it.
Thickness
Width is measured in UI units and does not change when you resize the RectTransform. The stroke is centered on its path; leave room for its width and end caps.
Anti Aliasing
Soften the stroke edges and inspect the result at the intended display size.
Material & masks
Use a uGUI-compatible material. Parent Mask and RectMask2D components can clip the line.
Raycast Target
Off on newly created lines. When enabled, the hit area is the RectTransform rectangle, not just the visible stroke.

Lines use straight segments. Bézier curves, closed paths, dashed lines and variable width are not included. Overlapping segments can darken a translucent line.

To bake a line into a PNG with Pro, place it under a SpriteLessGroup.

Choose a shape

Rounded Rectangle
Use Radius for rounded corners. Set it to 0 for a rectangle, or increase it for a pill. Enable Individual to give each corner a different radius.
Circle
Use a square RectTransform for a circle. Change its width and height independently for an ellipse.
Quadrilateral
Adjust each corner's X/Y values in Corner Offsets to make a trapezoid or parallelogram. Keep the outline convex and avoid crossing the edges.
Triangle
Choose Type: Isosceles fills the rectangle, Equilateral keeps equal sides, and Right uses Right Angle Corner. Use Direction where available.
Chevron
Choose Stretch or Equilateral proportions. Adjust Direction, Thickness, Spread, Cap and Join. Equilateral keeps the proportions of two sides of an equilateral triangle.
Arc / Ring
Adjust Thickness, Start Angle and Sweep Angle. Start Angle 0 is at the top. Positive sweep moves clockwise; a sweep of 360 makes a ring. Use Cap for the ends of an open arc.
Regular Polygon
Choose 3–64 Sides, adjust clockwise Rotation, and use Radius to round the corners. The polygon keeps its proportions even in a non-square RectTransform.

Keep a polygon centered while rotating

Enable Center on Rect to keep the regular polygon's center at the RectTransform center. Its size stays constant as you rotate it, with some extra space around the edges. Leave it off to fit the polygon's bounds to the available rectangle.

Border and appearance

Fill Color
Set the shape's color and transparency.
Border
Enable it, then set Width and Color. The border is drawn inside the shape.
Edge Effect
Enable a directional edge tint for lightweight depth. Set Width, Color and Direction. A direction of (0, -1) shades the bottom edge.
Anti Aliasing
Enable it to soften the contour. Width controls the inset feather in UI units, not a fixed number of screen pixels. Start small and inspect it at the intended display size.

Arc and Chevron use stroke controls instead of the Border and Edge Effect settings.

Pointer input and UI controls

Leave Raycast Target on for a graphic that needs to receive pointer input. Turn it off for decoration that should not block controls behind it.

Raycast Area: Rect Transform
Use the full UI rectangle as the hit area, matching standard rectangular UI behavior.
Raycast Area: Shape
Make the hit area follow the generated shape. Useful for rings, arcs and other non-rectangular graphics.
Maskable
Keep this enabled when the graphic should be clipped by a parent Mask or RectMask2D.

Buttons, sliders and layouts

Assign SpriteLessImage to a Button's Target Graphic to use it as the button graphic. For a Slider, use it on the fill object and assign that object's RectTransform to Fill Rect. Size the fill with the Slider's RectTransform-based workflow.

Position and resize shapes with standard RectTransforms and layout groups. The component draws inside its assigned rectangle.

Materials

Leave Material empty to use the default UI material, or assign a uGUI-compatible material for a custom appearance. No custom shader or generated texture is required for the built-in shapes.

Test custom materials with any masks you use. A material that works on a 3D object is not necessarily suitable for uGUI. If you plan to bake it with Pro, check the Baker preview and output too.

Troubleshooting

My circle looks like an ellipse.

Set the RectTransform width and height to the same value for a circle.

The empty area around an arc still blocks clicks.

Use Raycast Area → Shape. If the whole graphic is decorative, turn off Raycast Target instead.

The polygon appears to shift when rotated.

Enable Center on Rect. This keeps the regular polygon's center and size fixed instead of refitting its bounds at each angle.

A custom material does not render correctly.

Clear the Material field to check the shape with the default UI material, then verify your custom material's uGUI and masking compatibility.

Support and license

SpriteLess UI is released under the MIT license on GitHub. For bug reports, open an issue with your Unity version, package version and steps to reproduce the problem.

You can also contact darknesstyranno@naver.com.

Back to top ↑