Thanks for the fix, good catch.
Merged in david_gileadi/unity-ui-extensions/fix-panel-dimensions (pull request #13) Calculate the panel dimensions in Start to avoid scale issuesrelease
commit
b03f8065a5
|
@ -16,6 +16,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
_isVertical = false;
|
_isVertical = false;
|
||||||
_childAnchorPoint = new Vector2(0, 0.5f);
|
_childAnchorPoint = new Vector2(0, 0.5f);
|
||||||
_currentPage = StartingScreen;
|
_currentPage = StartingScreen;
|
||||||
|
panelDimensions = gameObject.GetComponent<RectTransform>().rect;
|
||||||
UpdateLayout();
|
UpdateLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace UnityEngine.UI.Extensions
|
||||||
_isVertical = true;
|
_isVertical = true;
|
||||||
_childAnchorPoint = new Vector2(0.5f,0);
|
_childAnchorPoint = new Vector2(0.5f,0);
|
||||||
_currentPage = StartingScreen;
|
_currentPage = StartingScreen;
|
||||||
|
panelDimensions = gameObject.GetComponent<RectTransform>().rect;
|
||||||
UpdateLayout();
|
UpdateLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue