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. Dismiss Notice

Question Button interaction area does not match (possibly related to canvas/camera?)

Discussion in '2D' started by cbfunky, Sep 17, 2020.

  1. cbfunky

    cbfunky

    Joined:
    Sep 11, 2020
    Posts:
    24
    I'm still fighting with the 2D camera, it just doesn't show what I want it to show.

    Now, to add insult to injury, as I was trying the different canvas/camera modes I think I might have done something like scale the Canvas (which is somehow tied to the camera?) or something similar and I've ended up with a user interface that doesn't match the graphics (see screenshot: when you mouseover a button, it lights up, I scribbled in the areas where the buttons _actually_ light up)

    interactionarea.PNG

    I selected the elements in the scene and their bounding boxes look normal, any sort of scale value is set to 1.

    I set up the entire UI with the canvas in World Space, but now if I set it to either Screen Space mode it distorts the canvas to a really strange dimension and then the camera is locked in a super zoomed in setting.

    ist.PNG

    So two questions really:
    1) What's going on with the interaction space on the buttons?
    2) (regarding the second screenshot) how to I make my camera match my canvas? (I tried every camera option, the only one that does anything at all is the "size" field and only in with the canvas World Space)
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,511
    Please note that the 2D forums are not related to UI. If you want UI help then there's dedicated forums here.
     
  3. cbfunky

    cbfunky

    Joined:
    Sep 11, 2020
    Posts:
    24
    Well, I'm saying UI, but it's a 2D game.
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,511
    Your post and questions are about the UI system. The forum isn't related to the type of game you're making but the subject/systems in your questions. Maybe someone will have an answer here for you but the UI forums have devs who are more likely to have an answer for you.

    The 2D team monitor this forum for 2D features which don't include the UI system, particles, 2D audio etc.