Minor patchfix on HSS/VSS - Starting screen validation failed on new scenes?
--HG-- branch : develop_5.3pull/413/head
parent
9718cb3f98
commit
21ad76580e
|
@ -340,9 +340,10 @@ namespace UnityEngine.UI.Extensions
|
|||
|
||||
private void OnValidate()
|
||||
{
|
||||
if (_screensContainer || ChildObjects != null)
|
||||
var children = gameObject.GetComponent<ScrollRect>().content.childCount;
|
||||
if (children != 0 || ChildObjects != null)
|
||||
{
|
||||
var childCount = ChildObjects == null ? _screensContainer.childCount : ChildObjects.Length;
|
||||
var childCount = ChildObjects == null || ChildObjects.Length == 0 ? children : ChildObjects.Length;
|
||||
if (StartingScreen > childCount - 1)
|
||||
{
|
||||
StartingScreen = childCount - 1;
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue