Search Unity

Placing 2 Sprites from the centre of the screen

Discussion in '2D' started by tonycsharks, Mar 12, 2018.

  1. tonycsharks

    tonycsharks

    Joined:
    Dec 31, 2015
    Posts:
    27
    I have 2 sprite game objects as shown in the image


    I need to know how can I place these 2 objects from the center of the screen without overlapping each other. Since I'm relatively new to these, can someone please explain it to me.
     
  2. Varishaa

    Varishaa

    Joined:
    Feb 19, 2018
    Posts:
    16
    Are they created and placed at runtime or do you set them up in the scene editor before build?
    I am quite new too, but on option could be to anchor the left one to the center left of the screen, the other one to the center right of the screen and then its just a question to set half width dynamically (Pixels per units setting of the sprite).

    Not sure if this is a good and working approach but at least this is the first thing that came in my mind :)

    Just 1 approach, but suggestions may change if we know more about creation time of these sprites and maybe other relations and dependecies of these.
     
  3. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Sorry but I don't understand the question. Can you elaborate a bit more?