Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Position elements from 2 screen size scaled canvases relative to each other with screen space camera

Discussion in 'UGUI & TextMesh Pro' started by E-Reg, Sep 11, 2021.

  1. E-Reg


    Nov 9, 2016

    I am trying to show UI tutorial popups next to various UI elements within the game.
    The tutorial popups canvas is scaled with screen size and the camera is set to screen space camera.
    The target elements to put the popup next to are in different canvases as root gameobjects in the scene but are scaled equally.
    There are two things I want to achieve but could not get to work at all after hours:
    First, I want to set the popup relative to the target game object (given a enum, I want to place it a little bit above, below, left or right to the target object).
    Next, I want to draw a line between the two elements to make clear which element the tutorial popup referes to.
    A workaround I tried was to set the dialog as a child of the target element when instantiating. However, I ran into other problems regarding the scaling of the popup window with this approach..
    Can someone point me into the right direction?
    Thanks in advance!
    Last edited: Sep 12, 2021