• Stars
    star
    118
  • Rank 298,516 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created over 6 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Draw shapes (circle,line,arrow) with one line of code in Unity

UnityShapes

Draw anti-aliased, GPU-instance-supported, 0 allocation shapes (circle,line,arrow) with one line of code in Unity

Couldn'tยดt be simpler:

Circle.Draw(new CircleInfo{
				center = transform.position,
				forward = transform.forward,
				radius = 1f,
				fillColor = Color.Red
			});

Lots of customization options

public struct CircleInfo
{
  public float radius;
  public Vector3 center;
  public Vector3 forward;

  public Color fillColor;

  public bool bordered;
  public Color borderColor;
  public float borderWidth;

  public bool isSector;
  public float sectorInitialAngleInDegrees;
  public float sectorArcLengthInDegrees;
}
public struct LineInfo
{
  public Vector3 startPos;
  public Vector3 endPos;
  public Color fillColor;
  public Vector3 forward;
  public float width;

  public bool bordered;
  public Color borderColor;
  public float borderWidth;

  public bool dashed;
  public float distanceBetweenDashes;
  public float dashLength;

  public bool startArrow;
  public bool endArrow;

  public float arrowWidth;
  public float arrowLength;
}
 public struct PolygonInfo
 {
     public int sides;
     public Vector3 center;
     public float size;

     public Color color;

     public bool bordered;
     public float borderWidth;
     public Color borderColor;

     public Quaternion rotation;
 }

Tested on standalone and WebGL, but should work on mobile as well.

More Repositories

1

UnityWireframeRenderer

Get a beautiful cross-platform wireframe renderer for your meshes with one click
C#
182
star
2

EditorGUISplitView

A split view to be used in Unity Editor Windows
C#
91
star
3

UnityWebglResponsiveTemplate

A full-sized (with optional aspect ratio) responsive minimal webgl template for your Unity projects!
JavaScript
91
star
4

EditorButton

Turn your Unity methods into buttons just by adding an attribute
C#
82
star
5

UnityGradientBackground

Get a beautiful background gradient just by adding a simple script to your camera!
C#
63
star
6

TextFader

Unity - Add a beautiful char-by-char fade in animation to your texts by just adding a simple script.
C#
59
star
7

UnityTextDrawer

Draw beautiful 3D texts with one line of code.
C#
46
star
8

EditorGUIHierarchyView

Easily add a Hierarchy view (like Unity's scene view) to your Editor UI
C#
34
star
9

AnimatorControllerParameterPicker

Unity - Get a dropdown list to safely choose the animator param you want for your scripts
C#
25
star
10

EditorNetworkDeviceDiscovery

Unity - Don't ask the user for an IP adress. Get a list of devices running your app/game in the same network
C#
21
star
11

UnityFlatShading

Get a flat look for your models with one click, without touching your mesh!
C#
19
star
12

UnityTextureExporter

Export procedural or hidden textures to .png files with one click!
C#
14
star
13

VisionModes

C#
9
star
14

EnhancedColor

Playing with Unity Image Effects
C#
8
star
15

BRDFExplorer

Trying out different BRDF models
ShaderLab
1
star
16

ck3_mod_dynastic_relations

CK3 Mod: Dynastic Relations
Batchfile
1
star