Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

UI Sprite Generation from Points

Discussion in '2D Experimental Preview' started by MaskedMouse, Feb 21, 2019.

  1. MaskedMouse


    Jul 8, 2014
    I am kind of new to the Vector Graphics API. I've searched around quite a bit but I am having trouble finding a solution to a problem I have.

    I want to create a runtime tool that a user can use to create their own shapes with an X amount of points and dragging those around.
    So basically a list of Vector2 point and generate a sprite out of that to be used in Unity UI Image component.

    Is this possible? if so, could someone help me into the right direction of what API methods to use?
    I've read through the documentation but it is quite overwhelming... not even sure where to start.

    So TLDR; what I am asking is Vector2 Points to Sprite conversion at runtime. Change the points and it changes the sprite.