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. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UI Sprite Generation from Points

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

  1. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,091
    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.