From 56640b3b096daa7c8a1fa99feb4ce08f18f20321 Mon Sep 17 00:00:00 2001 From: sushanta chakraborty Date: Tue, 27 Sep 2016 09:52:52 +0000 Subject: [PATCH] ScrollingCalendar.cs edited online with Bitbucket. previous script was not working, if you create a ScrollingCalendar you can't see the months-years and days ui nodes because previous coder passed only parent to SetParent function without passing second parameter which should be false for ui to appear on screen so i just edited 3 lines which had SetParent function, you can find the changes in line 61, 84, 143. Thanks --HG-- branch : sushanta1991/scrollingcalendarcs-edited-online-with-b-1474969966846 --- .../UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Examples/UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs b/Examples/UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs index 1c909a4..eb6c2ef 100644 --- a/Examples/UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs +++ b/Examples/UIVerticalScrollerDemo/Scripts/ScrollingCalendar.cs @@ -58,7 +58,7 @@ public class ScrollingCalendar : MonoBehaviour arrayYears[i] = 1900 + i; GameObject clone = (GameObject)Instantiate(yearsButtonPrefab, new Vector3(0, i*80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; - clone.transform.SetParent(yearsScrollingPanel); + clone.transform.SetParent(yearsScrollingPanel,false); clone.transform.localScale = new Vector3(1, 1, 1); clone.GetComponentInChildren().text = "" + arrayYears[i]; clone.name = "Year_" + arrayYears[i]; @@ -81,7 +81,7 @@ public class ScrollingCalendar : MonoBehaviour months[i] = i; GameObject clone = (GameObject)Instantiate(monthsButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; - clone.transform.SetParent(monthsScrollingPanel); + clone.transform.SetParent(monthsScrollingPanel,false); clone.transform.localScale = new Vector3(1, 1, 1); switch(i) @@ -140,7 +140,7 @@ public class ScrollingCalendar : MonoBehaviour { days[i] = i+1; GameObject clone = (GameObject)Instantiate(daysButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; - clone.transform.SetParent(daysScrollingPanel); + clone.transform.SetParent(daysScrollingPanel,false); clone.transform.localScale = new Vector3(1, 1, 1); clone.GetComponentInChildren().text = "" + days[i]; clone.name = "Day_" + days[i];