There is a vertical scrollbar from TK2D to Unity. It should reach with its lower edge to the lower button, top - to the top. When changing the resolution should adjust automatically.
If you just need to drag an object after another object, this works
Object for which we drag - topAnchor,
The object that we are dragging is bar
void Start() { Align(); } void Align() { bar.transform.position = new Vector3(bar.transform.position.x, topAnchor.GetComponent<Renderer>().bounds.min.y, bar.transform.position.z); } void LateUpdate() { if ((int)Tk2dGuiCamera.ScreenExtents.yMin != lastCamHeight) { lastCamHeight = Tk2dGuiCamera.ScreenExtents.yMin; Align(); } } But in this case, the task is somewhat different, we must not drag the object after another, but stretch it between the other two. How to do it?