0
\$\begingroup\$

I am currently working on a game that is drawn completely by 2d vector graphics operations like e.g.

  • drawRoundedRectangle
  • drawPolygon
  • fillRect withBlur

How can I perform such vector graphics operations in Unity?

(The well documented things are bitmaps/sprites. For vector graphics operations, however, I don't have a clue)

\$\endgroup\$
0
1
\$\begingroup\$

As far as Unity goes, it depends, & you may want to check out some 3rd Party assets to add the functionality you are looking for.

Vectrosity has been around for ages, it handles all kinds of line drawing and is easy to get going, very versatile, and robust.

For drawing vector-based scalable UI elements (like round rectangles and circles and so on) I have had good results with Modern Procedural UI Kit.

Both are on the Asset Store; not affiliated with either developer in any way.

MPUIKit on Asset Store Vectrosity on Asset Store

\$\endgroup\$
4
  • \$\begingroup\$ Oh -- another 3rd party product for Unity that may be of interest is Proto2D -- simple and quick editor for 2D Vector objects that support colliders. You can check out the docs / see a demo here: \$\endgroup\$ Sep 25 '21 at 21:36
  • 3
    \$\begingroup\$ The Shapes library by Freya Holmér may also be worth a look. \$\endgroup\$
    – DMGregory
    Sep 26 '21 at 1:49
  • \$\begingroup\$ So, the simple but effective answer is: "check out some 3rd party assets" because Unity does not seem to really support sophisticated 2d vector drawing.. I must say, "Shapes", "Vectorizer", "ALINE" and "AltSDK" look the most promising. \$\endgroup\$
    – eikuh
    Sep 30 '21 at 12:38
  • \$\begingroup\$ That's fair! Aside from the built-in Line Renderer Component, everything else you'll have to code yourself or rely on somebody else's solution (i.e. 3rd party asset.) That said, it still might be worth checking out porting your project to Unity for all the other stuff it brings to the table... Good luck! \$\endgroup\$ Oct 1 '21 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .