Calculate the panel dimensions in Start to avoid scale issues
parent
603d85126f
commit
700cbc34b9
|
@ -16,6 +16,7 @@ namespace UnityEngine.UI.Extensions
|
|||
_isVertical = false;
|
||||
_childAnchorPoint = new Vector2(0, 0.5f);
|
||||
_currentPage = StartingScreen;
|
||||
panelDimensions = gameObject.GetComponent<RectTransform>().rect;
|
||||
UpdateLayout();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace UnityEngine.UI.Extensions
|
|||
_isVertical = true;
|
||||
_childAnchorPoint = new Vector2(0.5f,0);
|
||||
_currentPage = StartingScreen;
|
||||
panelDimensions = gameObject.GetComponent<RectTransform>().rect;
|
||||
UpdateLayout();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue