Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Unity UI Selection troubles with rect transform component.

Discussion in 'UGUI & TextMesh Pro' started by petey, Jun 22, 2018.

  1. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,770
    Hi all,

    I'm just trying to get into canvas, for some reason the rect transform makes these big boxes around every object with a rect transform component -

    It makes selecting anything in the viewport impossible
    Has anyone come across this?

    Thanks,
    Pete
     
  2. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,076
    These boxes are showing the actual size of the RectTransform.
    If you have non-UI stuff which you cannot edit properly because of the huge UI, I would recommend to put the UI into a dedicated scene and load it on runtime additionally to the other scene(s).
     
  3. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,770
    Hey thanks for that @Hosnkobf , I went and changed the size of every rectTransform to 1 x 1 and it works great now.

     
  4. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,076
    aha, but for what do you need the Canvas then? It is supposed to display things in certain sizes at certain positions... It doesn't really make sense to make them small just to be able to select something.
    Maybe I am wrong and you can explain why it is okay in your case.
     
  5. FernandoHC

    FernandoHC

    Joined:
    Feb 6, 2018
    Posts:
    333
    That's actually something I have always wanted to know, if there is a way to disable canvas on the scene edit window.
    What I usually do, if I'm not working with it I just disable the root canvas in the scene for a while, then enable back again.
    But @Hosnkobf has a valid point, canvas objects use their rect as base to function properly.
    Also, if you are resizing the canvas resolution to a tiny size and using for the entire screen, this might result in deeper issues in the future.
     
  6. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,770
    I use a lot of 3d meshes I my UI, I think that’s why it’s taken a while to jump on board. But the screen alignment and rescale could be really useful.
     
  7. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,076
    most important to get it running properly: Understand how anchors work and use them excessively.
     
  8. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,770
    That's one of the main reasons I started using it, I have had a number of projects that need to run on different platforms and it gets to be a hassle otherwise.
    One thing I wasn't totally sure about is that in order to use the anchors, the UI item must be parented directly under a node with a Canvas Component and sometimes I have nodes that I use purely to organise things, So they now need to have another canvas on them. It's getting a little out of hand.
     
  9. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,076
    you can still do that. just make sure that you make the size and anchors filling the parent of your organize-object.
    to do so, open the anchor preset box, press alt+shift and click the one in the lower right.
     
  10. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,770