Search Unity

ProtoShape 2D - Editor extension to easy create and edit 2D meshes

Discussion in 'Assets and Asset Store' started by Andrii, Apr 20, 2017.

  1. Sparkline

    Sparkline

    Joined:
    Feb 8, 2013
    Posts:
    121
    Hi Andrii. Does your asset have an ability to easy create primitives like circles or rectangles?
    I mean if I need a simple circle with specifiс radius, do i need to manually create points and build curves to match circle? Or maybe you have any tool to do it in few clicks?
     
  2. Andrii

    Andrii

    Joined:
    Sep 23, 2013
    Posts:
    136
    At this moment ProtoShape2D doesn't have tools to create primitives.

    I have another, much simpler asset that is not related with ProtoShape2D and stands on its own that lets you create some primitives.
     
  3. Sparkline

    Sparkline

    Joined:
    Feb 8, 2013
    Posts:
    121
    Ok. Does ProtoShape 2D also work in UI (Canvas) space?
     
  4. Andrii

    Andrii

    Joined:
    Sep 23, 2013
    Posts:
    136
    No, not at the moment. This feature may be added in the future but right now it only works in the scene space, since it was initially intented to prototype/make 2D game levels.
     
  5. Sparkline

    Sparkline

    Joined:
    Feb 8, 2013
    Posts:
    121
    Thanks for answers. I have another one) Does it interact with masks as SpriteRenderer do?
     
    Andrii likes this.
  6. Andrii

    Andrii

    Joined:
    Sep 23, 2013
    Posts:
    136
    No, not at the moment. I'll try to get this working in the future but I can't say when I'll be able to.
    But yeah, it would be super useful to implement this.
     
  7. Sparkline

    Sparkline

    Joined:
    Feb 8, 2013
    Posts:
    121
    Hi again. I have worked with your asset for a while. Here are some my notices:

    1. When I click (w/o shift) on one of currently selected points other selected points remain selected. That is something that never should exist anywhere) To select it alone I have disable selection by clicking any other point out of selection.
    2. Seems there is no full work with prefab system.
    a) When in prefab editor mode if you save it and want to see results in game view it wont show up. Need to reload scene to see changes.
    b) When you select prefab in inspector view and change any value of ProtoShape compenent it wont mark up as rewritten value, and you cant aplly it to prefab instance.
    3. When using gradient and changing alpha of color1 to zero, color2 also fades out to zero (but some polygons can be still shown)
    4. No multiselection editing
    5. Low scripting options. I had to write my own methods to set color, set gradient etc...

    Some things that would be great:
    1. Show a list of points with its coords in inspector with edit option
    2. Full work with canvas space. For ex. changing alpha with canvas group compenent
    3. Radial gradient option
    4. Working with masks
     
    Andrii likes this.
  8. Andrii

    Andrii

    Joined:
    Sep 23, 2013
    Posts:
    136
    Thank you for summing this up! This is really good! I'll try to address everything on this list as soon as possible.
     
  9. Andrii

    Andrii

    Joined:
    Sep 23, 2013
    Posts:
    136
    Version 1.28 is up.
    • Added sprite masks support (Beta).
    • Added a way to manually drag object's pivot (wanted to do this for a long time now).
    • I've also took your suggestion about clicking on selected point.
    This doesn't reproduce for me. I think I've fixed it in one of previous updates.

    I didn't add this but for some time now in ProtoShape2DEditor.cs there's a piece of code (search for pPositions var) that you can uncomment to expose the points in inspector. It's not a good solution but it's there at the moment. :)
     
  10. shelshok

    shelshok

    Joined:
    Feb 18, 2013
    Posts:
    10
    This is really great. Love that there is an outline feature, but would it also be possible to be able to set the outline to inside or outside the shape? And possibly also corner options?
     

    Attached Files:

  11. Andrii

    Andrii

    Joined:
    Sep 23, 2013
    Posts:
    136
    Thanks for choosing my asset!
    I will possibly add these features in the future but this won't be very soon.
     
  12. Sparkline

    Sparkline

    Joined:
    Feb 8, 2013
    Posts:
    121
    Is there any way to make shape corners round/bevel?
     
  13. Andrii

    Andrii

    Joined:
    Sep 23, 2013
    Posts:
    136
    I'm sorry but no, not at the moment.
     
  14. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    Hi Andrii,

    Is it easily possible to modify a shape at runtime? If YES, is it optimized? Are Tris and Verts calculation done on main thread or Job System/Threading?
     
  15. Andrii

    Andrii

    Joined:
    Sep 23, 2013
    Posts:
    136
    It is possible to modify points at runtime. The calculations are done in a regular Update(). So, in the main thread.
    It's an interesting idea to optimize this, even though the asset was not intended for such use.
     
  16. indie6

    indie6

    Joined:
    Dec 15, 2012
    Posts:
    101
    Hi Andrii,

    Is it possible to cut holes in a mesh.. for example, making a shape like donut or cutting a circle out of a big square mesh
     
    Last edited: Aug 29, 2021
  17. GordonWedge

    GordonWedge

    Joined:
    Jul 6, 2013
    Posts:
    23
    Hi Andrii,
    i've just bougth PhotoShape 2D and i've got this problem.
    When i add an object, it create the polygon on the scene, but i don't have the "handle point" to drag the vertex, neither i can add points.

    i'm using unity 2020.3.18

    Schermata 2021-09-21 alle 14.21.20.png
     
  18. GordonWedge

    GordonWedge

    Joined:
    Jul 6, 2013
    Posts:
    23
    just to know, on 2020.2.x it works, can you fix it for 2020.3.x?

    thanks so much
     
  19. GordonWedge

    GordonWedge

    Joined:
    Jul 6, 2013
    Posts:
    23
    Solved myself, that was something in my project, with a new one it works flawless, thanks for your great job
     
  20. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    upload_2021-12-9_11-29-6.png

    There's a problem in 2021.2.5 where the scene view control falls off the bottom.
    Thankfully I was able to fix this myself by editing ProtoShape2DEditor.cs (search for "//EditorWindow")

    Code (csharp):
    1.  
    2. change this on line 1452:
    3. Camera.current.pixelRect.height/EditorGUIUtility.pixelsPerPoint-45,
    4.  
    5. to this:
    6. Camera.current.pixelRect.height/EditorGUIUtility.pixelsPerPoint-65,
    7.  
    8. basically just change the -45 into -65
    @Andrii could you update your code to cope for newer unity versions please? thanks!
     
    son1cman likes this.
  21. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    I've had a lot of problems with pivot position with ProtoShape2D recently, and I wonder whether something changed with Unity 2021. The pivot seems to move after placing it manually. If I have the protoshape rotated 90 to be aligned with the floor, the lines will all move to a new location when the pivot is moved. It's very chaotic and pretty broken.
    @Andrii can you help?