1
Support / Re: Layout and SetBounds
« on: March 08, 2014, 06:07:41 pm »
For what it's worth, it would be a nice feature to be able to change the pivot of the layout.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
//Resize layout
tk2dUILayout layout = GetComponent<tk2dUILayout>();
//Assumes a parent in the screen center.
Vector3 min = new Vector3(tk2dCamera.Instance.ScreenExtents.xMin, tk2dCamera.Instance.ScreenExtents.yMin, 0);
Vector3 max = new Vector3(tk2dCamera.Instance.ScreenExtents.xMax, tk2dCamera.Instance.ScreenExtents.yMax, 0);
layout.SetBounds(min, max);