1
NGUI 3 Support / Why this scrollview's inside child contents does not shown until click?
« on: June 24, 2017, 06:27:22 AM »
https://youtu.be/u5afNmQtwkI
So like above video, below's cards does not shown. Until I click with mouse left inside that scrollview area.
How can I make it shown at first without the need of mouse click?
Here is code.
So like above video, below's cards does not shown. Until I click with mouse left inside that scrollview area.
How can I make it shown at first without the need of mouse click?
Here is code.
- public void MakeBattleHand()
- { //Make user's hand's card when battle mode
- foreach (CardBase cd in HandCardClass)
- {
- AddCardToBattleHand(cd);
- }
- }
- public void AddCardToBattleHand(CardBase cd)
- {
- GameObject go = Instantiate(cardPref);
- AdvenUI.Instance.MoveObjToNGUITransform(go, handGridBat);
- go.GetComponent<CardPreScript>().thisCard = cd;
- go.name = cd.name;
- MakeCardInfo(go, cd);
- handScrollBat.UpdateScrollbars(true);
- }
- ............
- public void MoveObjToNGUITransform(GameObject go, UIGrid grid)
- {
- if (go == null)
- return;
- go.transform.parent = grid.transform;
- go.transform.position = CardManager.Instance.Tf_UI_Root.transform.position;
- go.transform.localRotation = Quaternion.identity;
- grid.Reposition();
- grid.repositionNow = true;
- grid.transform.parent.GetComponent<UIScrollView>().ResetPosition();
- NGUITools.MarkParentAsChanged(go);
- SetCard.Instance.ShowDeckNum();
- }