G
G
Georgy Pelageykin2017-06-21 18:45:44
Unity
Georgy Pelageykin, 2017-06-21 18:45:44

Scaling elements without distortion in Unity UI?

The problem is rather banal: if we add information to the panel on the left, we get what is on the right.
380e962847f943d5b3628cb2359c9817.png
I'm not talking about user-resizable panels. It seems that there are many similar questions, but so far we have not been able to find commonly used solutions. Pain:

$ ls
PanelRectangle_322x242.png
PanelRectangle_500x860.png
PanelRectangle_512x256.png
PanelRectangle_802x102.png
...

Unfortunately, I am not yet able to purchase plugins like SVGAssets or SVGImporter (besides, I'm not sure if they can be used in an open project).
I see the following solutions:
  • Composite panel of five elements (four-sided stroke and fill). Creepy crutch.
  • Auto-generate the above files from svg. Those. organize automatization of resizing and exporting the panel with some inkscape. Doesn't solve the dynamic scaling problem in any way.
  • Create UI elements as models in blender and drag them into Unity UI somehow. I'm not sure about the suitability of blender for this task and the ability to make an element like Sprite that draws these elements.

All these options seem very crooked to me. I like how the UI is made in EVE Online ( example ), but I still don’t really understand how to create something like this in unity.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2017-06-21
@ArXen42

wow. and for whom they made 9SliceSprites
"Composite panel of five elements (four sides of the stroke and fill). Creepy crutch."
the same creepy crutch, only not creepy, but generally accepted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question