Search Unity

Gameobjects inside canvas

Discussion in 'UGUI & TextMesh Pro' started by misticini, Jul 30, 2015.

  1. misticini

    misticini

    Joined:
    Jul 29, 2015
    Posts:
    6
    Hi guys,

    It's a good idea put all the game object inside the canvas object? If i do this, all the game objects adjust width canvas when resolution of the device changes.

    Can i do that, or should i put onyl HUD objects inside Canvas?

    Regards
     
  2. ADIL KHITRAN

    ADIL KHITRAN

    Joined:
    Jun 29, 2015
    Posts:
    4
    Canvas Can only Adjust objects having rectTransform.
     
  3. misticini

    misticini

    Joined:
    Jul 29, 2015
    Posts:
    6

    Hi,

    Thank u for your answer ADIL KHITRAN :)

    My game will be a 2d platformer, so i only need sprites, animations and maybe particle effects, so i think that is fine right?

    My question is: is this the correct way to doing the 2d game? I've tried put a test game object outside canvas but the scale is not correct and i cant see the sprite on game tab. Even the coordinates were strange :(

    Can i do the game in the way i have refered? Or there are a better standard way to make the game and make him adapt to each aspect ratio with fixed width policy?

    Regards
     
  4. vakabaka

    vakabaka

    Joined:
    Jul 21, 2014
    Posts:
    1,153
    I think, Unity resize most of objects automatically. Visible background can be different, because of other aspect ratio.

    and in game-tab in editor you can set up the resolution, so you can see, how it will be on other displays.
     
    Last edited: Aug 1, 2015
  5. misticini

    misticini

    Joined:
    Jul 29, 2015
    Posts:
    6
    Hi,

    Thank u for your answer.

    I think that your comment don't answer to any of my questions :(

    Regards
     
    Last edited: Aug 1, 2015
  6. misticini

    misticini

    Joined:
    Jul 29, 2015
    Posts:
    6
    Any help here?

    Regards