Search Unity

Feedback [fixed] Please Make the selection area of the UI Anchor bigger as the visible triangle icon

Discussion in 'UGUI & TextMesh Pro' started by AlanMattano, May 2, 2018.

  1. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    This was fixed in Unity 2019.1 and other Unity vr.

    ----------------------------------------
    Dear Unity UI Team, @Tim-C @Stephan_B
    Please expand the UI selection area.

    I wish that the selection area of the anchor is coherent as big as is the visual triangle feedback.

    upload_2018-5-3_1-3-19.png

    The Unity UI transform anchor has small visible triangle icon. What is small is the clickable area that is smaller than the visible triangle. Difficult to select using 2k 4k etc. If you miss the selection are, you finish rotating that UI. Please expand the selection square area at least as big as the triangle.

    Related: question
     
    Last edited: Mar 8, 2019
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    these Anchor gizmos are total crap. That is why I created a tool for it which makes them pretty obsolete (Better UI -- see my signature). Most of the time you want to snap the anchors to the border of your object. The gizmos don't even have a snap function... Better UI solves this even for multiple objects with one click.
     
  3. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    No @Hosnkobf I do not like the word "total crap". You probably put a lot of effort. But in my personal opinion to much code in assets makes Unity slower.
    Sometimes I wish Unity to continue to improve what it has done.
     
    Last edited: Mar 8, 2019
  4. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    Hi AlanMattano,
    I am happy that you tried out Better UI, but not so happy that you had problems with it. As already posted here, the reason for the problem you experience is a rotated canvas.
    As a developer I always test my code and also in different scenarios. But it is hard to think of any possible scenario. But detailed bug reports like you posted help improving the asset, so I have to thank you for that.

    Regarding performance: When it comes to compiling code it might be a bit slower. But C# compiles pretty smart it should not affect the compile time much after the first time compiling the code.
    Of course the build time will be a bit longer, especially if you build with IL2CPP. But I never experienced that unity itself gets slower because of more code.
     
  5. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    I'm happy that my help helps!!
    About [smart] compiling improvement, it was mention as an idea at GDC (roadmap?). I think you need to use "[" ...something... "]" at the top of the script.
     
  6. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    Aha, you mean an Attribute.

    Couldn't find an attribute like this in the current Unity documentation, so it is not there yet.
    But such an attribute which excludes parts of the script from a build could be dangerous. If you use components marked with that attribute and you exclude it the app would crash or not even build. But I guess Unity is aware of that and can automatically decide what to include and what not.
     
  7. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Yes, it will be an attribute that is not there yet that will let you, in a simple way, optimise compiling time.
    I'm still looking for the video where I saw that. If I find it I will post a link.

    Please, how can I reduce your tool to have only "Snap To All Borders" button in simple one button?
    What do I need to take out?
     
  8. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    Before I answer this question I would like to highlight that Better UI is very valuable for every project (In my opinion). Not only the snap anchors window.
    For example the Better Text (or Better Text Mesh Pro UGUI) which scales the font size according to the screen size. Or the images with sliced or tiled mode where the borders are also scaled with the screen size. It simply helps to have the same appearance on any screen.
    In addition I also use the multiple Transitions very often. The Materials for Images I don't use often but sometimes they are very handy to have.
    And as I told you before: Unity or the app doesn't slow down because of some script files. Only the time for creating a build is a little bit longer.

    So I really would recommend you to try out the other features of Better UI first. I am sure you will need some of them.

    Anyways, here is what you need if you really only want the snap anchors window:
    Delete everything inside
    TheraBytes/BetterUI/
    except the following:
    • Scripts/Editor/Windows/SnapAnchorsWindow.cs
    • Scripts/Extensions/RectTransformExtensions.cs
    • Resources/Editor
      (here are the images... you will see which one you can delete, I guess)
     
  9. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
  10. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    Ah, yeah... I found this asset also a while ago after I had already implemented my tool. But I think the User Experience of that asset is not so good because you always have to right click and select the function in the drop down... Also, it offers less functionality.
     
  11. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Solved at least in Unity 2019.1
     
    Last edited: Mar 8, 2019