Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - doncarlos91

Pages: [1] 2
1
NGUI 3 Support / Re: Sorting order issue
« on: May 19, 2017, 06:15:26 AM »
Hi Aren ,  thanks for your reply, we`ve tried with have pushed each widget  in different panels (with 0 and 2 depths), but when we adding particle in panel with 1 depth , no results (.

What do you thinks what we are doing wrong, we have reviewed all codes , but unfortunately not results.

Thanks

2
NGUI 3 Support / Sorting order issue
« on: May 16, 2017, 04:40:55 AM »
Hi Aren, guys, i`m creating particle system, and just want put it between two widgets, which located in the same UIPanel, but have the different depths.


Any suggestions?

Thanks in Advance

3
NGUI 3 Support / Add Game object with animation
« on: April 14, 2017, 03:11:42 AM »
Hi all, i just want to know is it possible to add game objects with tween, to get that cards deck effect?
I want to add game objects with smooth animation - to get "cards deck opening"  effect.
i have researched a lot, but unfortunately with no result, will be glad for any suggestions.

Thanks in Advance.


4
NGUI 3 Support / Re: UIScrollView swap issue
« on: January 30, 2017, 08:37:38 AM »
Thanks for your answer Aren, i have tried to make as you said, and when im touching to screen slowly it wrks perfectly, but when m trying to swipe with finger very fast , the scrollview not moving at all.

5
NGUI 3 Support / UIScrollView swap issue
« on: January 24, 2017, 05:48:42 AM »
Hi All, i have a scrollview functionality with default settings, and all works  great , except one thing:
when i run game on the device and when i`m swap my finger on the scrollview on short distance - the scrollview doesn`t moves at all.
Any suggestions? (maybe there are some settings - i missed)

Thanks in advance

6
NGUI 3 Support / Re: UIButton onclick delay issue
« on: January 20, 2017, 04:17:32 AM »
Hi Aren , thanks for you reply, i have fixed that issue by setting the transition = 0 and it solved my visual effect problem :)

7
NGUI 3 Support / Re: UIButton onclick delay issue
« on: January 16, 2017, 07:01:15 AM »
Hi Guys,

i have a some problem with my button onclick method (maybe)

#1 In Unity Editor , when im attaching the pressedSprite to UIbutton -  touch effect works perfect, but when i`m trying to set the tween colour to pressed state of button , and when i`m running it to my Android device , the pressed view touch effect appears after 1 second approximately

Any Suggestions?

8
NGUI 3 Support / UIButton onclick delay issue
« on: January 16, 2017, 05:20:05 AM »
Hi Guys,

i have a some problem with my button onclick method (maybe)

#1 In Unity Editor , when im attaching the pressedSprite to UIbutton -  touch effect works perfect, but when i`m trying to set the tween colour to pressed state of button , and when i`m running it to my Android device , the pressed view touch effect appears after 1 second approximately

 here is my screenshot with my button settings

Any Suggestions?

9
NGUI 3 Support / Re: UIWrapContent - Multiple Lines?
« on: November 02, 2016, 02:57:11 AM »
Thanks  Aren, it works !!

10
NGUI 3 Support / UIWrapContent - Multiple Lines?
« on: October 25, 2016, 05:36:22 AM »
I have organized my content like this :

UIWrapContent
-- Item 1
-- Item 2
-- Item 3
-- Item 4
-- Item 5
-- Item 6

and i just want to make it like this horizontal grid :

UIWrapContent
-- Item 1   -- Item 2   -- Item 3
-- Item 4   -- Item 5   -- Item 6

there are some ways to do it with UIWrapContent ?
before i have used UIGrid component , but performance was    awful with a lot of data :)

Thanks

11
NGUI 3 Support / Re: NGUI Inflate Looping issue
« on: May 20, 2016, 05:16:14 AM »
I have tried like that and it loads perfect the items in grid , Thanks a lot
For now there is one issue regarding repositions items , because for now they loading on the same position , as i see there is now some Repositon method in UIWrapContent class, what do you think?

Thanks

12
NGUI 3 Support / UIWrapContent with dynamic data
« on: May 20, 2016, 03:13:17 AM »
Hi all, i have a shop functionality  with 100+ items , here is my structure

UIScrollView
   UIWrapContent
      Item
      Item
      Item
      etc.
The problem is that , when i`m clicking on the category button , it displays the items in 2-3 seconds and then when it is loads - the UIWrapContent performance works perfectly.

I`m creating items like this
  1.                for (int i = 0; i < dataList.Count; i++) {
  2.                     GameObject item = NGUITools.AddChild(gameObject, prefab);  
  3.                 }
  4.  

Question - how can i prevent this heavy items loading and what is the best way to do this?
Maybe the load prefabs partially , when user scrolls horizontally .
Will be glad for you suggestions and useful code snippets as well.

Thanks in advance

13
NGUI 3 Support / Re: NGUI Inflate Looping issue
« on: May 19, 2016, 06:06:38 AM »
thanks for you answer r.pedra, do you mean something like this ?

  1.  
  2. public IEnumerator CreateShopItems() {
  3.        
  4.         for (int i = 0; i < dataList.Count; i++) {
  5.                 yield return new WaitForSeconds(0.1f);                                 
  6.                 GameObject item = NGUITools.AddChild(uiGrid.gameObject, flingerItemPrefab);
  7.                 Debug.Log(Time.deltaTime);
  8.         }
  9. }
  10.  
  11.  

14
NGUI 3 Support / Re: NGUI Inflate Looping issue
« on: May 18, 2016, 08:53:38 AM »
Thanks for your reply Aren, i have found the easiest way to do my endless scroll using UIWrapContent script :)
for now this is my structure :
UIScrollView
      UIGrid (attached UIWrapContent script)
                 item
                 item
                 item
                 etc.

and i have about 100 items in grid - the performance and functionality works perfect, but i have one issue and want solve it , When im click on button to open that list of items it takes about 2 seconds to open it :(  - and then it works perfect . Do you have any idea to make items load a little bit quick ?

Thanks in advance

15
NGUI 3 Support / NGUI Inflate Looping issue
« on: May 17, 2016, 09:08:20 AM »
Hi Guys, I have an issue with my grid items  -  located in UIScrollView -> UIGrid .I have a shop view with dotted buttons (pagination) there are all works good, except one thig - when i`m trying to scroll a little bit fast  - the x positions if items in grid becoming broken and offest becomes very big. but when im touching on scrollpanel area - the positions issue are solving automatically. I have no idea what im doing wrong, any suggestions?

Thanks in advance


here is my snippet of code

  1.  
  2. private bool isUpdatingList = false;
  3.         private float gridCellWidth = -1f;
  4.         private int invisibleCount = 0;
  5.         private readonly int SKIP_COUNT = 3;
  6.         public IEnumerator ItemIsInvisible(int itemNumber) {
  7.                 bool skip = false;
  8.                 if(invisibleCount > 0) {
  9.                         if(invisibleCount < SKIP_COUNT) {
  10.                                 skip = true;
  11.                         }
  12.                         if(scrollPanel.currentMomentum.x < 0) {
  13.                                 invisibleCount = 0;
  14.                         }
  15.                 }
  16.                 else if(invisibleCount < 0) {
  17.                         if(-invisibleCount < SKIP_COUNT) {
  18.                                 skip = true;
  19.                         }
  20.                         if(scrollPanel.currentMomentum.x > 0) {
  21.                                 invisibleCount = 0;
  22.                         }
  23.                 }
  24.                 if(scrollPanel.currentMomentum.x > 0) {
  25.                         invisibleCount++;
  26.                 }
  27.                 else if(scrollPanel.currentMomentum.x < 0) {
  28.                         invisibleCount--;
  29.                 }
  30.                 if(!skipItemIsInvisibleCall && !skip) {
  31.                         if(isUpdatingList) yield return null;
  32.                         isUpdatingList = true;
  33.                         if(dataList.Count > poolSize) {
  34.                                 scrollPanel.UpdatePosition();
  35.                                 if(gridCellWidth == -1f) {
  36.                                         GameObject firstObject = itemsPool[0];
  37.                                         GameObject secondObject = itemsPool[1];
  38.                                         gridCellWidth = secondObject.transform.position.x - firstObject.transform.position.x;
  39.                                 }
  40.                                 if(scrollPanel.currentMomentum.x > 0) {
  41.                                         GameObject firstItem = itemsPool[0];
  42.                                         FlingerItem flingerItem = firstItem.GetComponent<FlingerItem>();
  43.                                         int itemDataIndex = flingerItem.itemDataIndex;
  44.                                         if(itemDataIndex == 0) {
  45.                                                 isUpdatingList = false;
  46.                                                 return false;
  47.                                                 itemDataIndex = dataList.Count;
  48.                                         }
  49.  
  50.                                         int dotIndex = 0;
  51.                                         int j = 0;
  52.                                         while(j < itemDataIndex && dotIndex < dotCount - 1) {
  53.                                                 j+=itemsPerDot;
  54.                                                 if(j < itemDataIndex) {
  55.                                                         dotIndex++;
  56.                                                 }
  57.                                         }
  58.                                         if(dotIndex != curDotIndex) {
  59.                                                 curDotIndex = dotIndex;
  60.                                                 for(int i = 0; i < pagingDots.Count; i++) {
  61.                                                         bool value = (i == curDotIndex);
  62.                                                         pagingDots[i].GetComponent<DotItem>().dotToggleBtn.value = value;
  63.                                                 }
  64.                                         }
  65.  
  66.                                         GameObject lastItem = itemsPool[itemsPool.Count - 1];
  67.                                         Vector2 newPos = firstItem.transform.position;
  68.                                         newPos.x -= gridCellWidth;
  69.                                         lastItem.transform.position = newPos;
  70.                                         lastItem.GetComponent<FlingerItem>().InitFlingerItem(dataList[itemDataIndex - 1]);
  71.                                         lastItem.GetComponent<FlingerItem>().itemDataIndex = itemDataIndex - 1;
  72.  
  73.                                         for(int i = poolSize - 2; i >= 0; i--) {
  74.                                                 itemsPool[i].GetComponent<FlingerItem>().itemNumber++;
  75.                                                 itemsPool[i+1] = itemsPool[i];
  76.                                         }
  77.                                         itemsPool[0] = lastItem;
  78.                                         lastItem.GetComponent<FlingerItem>().itemNumber = 0;
  79.  
  80.                                 }
  81.                                 else if(scrollPanel.currentMomentum.x < 0) {
  82.                                         GameObject lastItem = itemsPool[poolSize - 1];
  83.                                         FlingerItem flingerItem = lastItem.GetComponent<FlingerItem>();
  84.                                         int itemDataIndex = flingerItem.itemDataIndex;
  85.                                         if(itemDataIndex == dataList.Count - 1) {
  86.                                                 isUpdatingList = false;
  87.                                                 return false;
  88.                                                 itemDataIndex = -1;
  89.                                         }
  90.  
  91.                                         int dotIndex = 0;
  92.                                         int j = 0;
  93.                                         while(j < itemDataIndex && dotIndex < dotCount - 1) {
  94.                                                 j+=itemsPerDot;
  95.                                                 if(j < itemDataIndex) {
  96.                                                         dotIndex++;
  97.                                                 }
  98.                                         }
  99.                                         if(dotIndex != curDotIndex) {
  100.                                                 curDotIndex = dotIndex;
  101.                                                 for(int i = 0; i < pagingDots.Count; i++) {
  102.                                                         bool value = (i == curDotIndex);
  103.                                                         pagingDots[i].GetComponent<DotItem>().dotToggleBtn.value = value;
  104.                                                 }
  105.                                         }
  106.  
  107.                                         GameObject firstItem = itemsPool[0];
  108.                                         Vector2 newPos = lastItem.transform.position;
  109.                                         newPos.x += gridCellWidth;
  110.  
  111.                                         firstItem.transform.position = newPos;
  112.                                        
  113.                                         firstItem.GetComponent<FlingerItem>().InitFlingerItem(dataList[itemDataIndex + 1]);
  114.                                         firstItem.GetComponent<FlingerItem>().itemDataIndex = itemDataIndex + 1;
  115.  
  116.                                         for(int i = 1; i < poolSize; i++) {
  117.                                                 itemsPool[i].GetComponent<FlingerItem>().itemNumber--;
  118.                                                 itemsPool[i-1] = itemsPool[i];
  119.                                         }
  120.                                         itemsPool[poolSize - 1] = firstItem;
  121.                                         firstItem.GetComponent<FlingerItem>().itemNumber = poolSize - 1;
  122.                                 }
  123. //                              scrollPanel.ResetPosition();
  124.                                 scrollPanel.UpdatePosition();
  125.                         }
  126.                         isUpdatingList = false;
  127.                 }
  128.         }
  129.  
  130.  

Pages: [1] 2