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 - wangzy_88

Pages: [1] 2 3
1
NGUI 3 Support / UIInput bug
« on: September 13, 2015, 12:51:31 AM »
If two inputs in screen,click them alternately will crash on ios,use example scene can reproduce this bug.
I use ugui's input field to test,it's ok.
My unity is 5.1.2 and test ngui 3.9.0b,3.9.1,3.9.2.

2
NGUI 3 Support / Re: ScorllView problems
« on: August 04, 2015, 04:16:13 AM »
It's a very useful solution.

3
NGUI 3 Support / Re: ScorllView problems
« on: August 01, 2015, 06:53:30 AM »
Thx,I will try.

4
NGUI 3 Support / Re: ScorllView problems
« on: July 29, 2015, 06:45:59 AM »
Thx for reply,I change UIRoot scale but have no help.

I understand the second problem,it's because of the parent of scrollview which I add UIDragScrollView don't have a UIComponent,so NGUI can't handle it's collider's depth.
I decide to use collider3D and change it's center's Z to solve this problem.But I still don't understand why UITable is ok.

5
NGUI 3 Support / Re: ScorllView problems
« on: July 25, 2015, 04:13:52 AM »
1.Check position when items create,change it if deviation is small enough.

2.How to change UIRoot's size?I see it's scale will check on Update.

6
NGUI 3 Support / Re: ScorllView problems
« on: July 24, 2015, 12:11:46 AM »
Sorry for my bad english...

1"Cancel Drag If Fits" is for scrollview can't be filled with items solution,but sometimes scrollview still can drag one time,I print log show panel's clip in shouldMove param is different.For example,it's y may be 0.99999 or 1.00001.

2 If I use UIGrid,the first item can't click sometimes,change UITable will be ok.If can't click, change BoxCollider2D on item will fix it,seem like UIDrag ScrollView's collider cover item's collider.

Thank you very much.

7
NGUI 3 Support / Re: ScorllView problems
« on: July 09, 2015, 07:24:13 AM »
Why ignore my post...

8
NGUI 3 Support / ScorllView problems
« on: July 08, 2015, 07:30:42 AM »
1"Cancel Drag If Fits" is useless sometimes,Log show is float precision problem.

2 If use ScrollView+Grid,the first item can't click, change ScrollView+Table will fix it.
I use BoxCollider2D and UICamera's Event Type set "2D UI".UIDrag ScrollView and its BoxCollider2D is ScrollView's parent.3.7.x has no problem,now I use 3.9.0b.

9
1.My script is wrong,"if (widget == null)" should be "if (widget != null)". :P
2.The wrong script worked well on ngui3.7.4 but can't work on ngui3.8.0,both Unity5.
3.I change my fault and test again on ngui3.8.0,find it can't work very well still,mesh and UIWidget depth only decided by position,particle and UIWidget depth decided by position and renderQueue.Maybe is Unity standard shader's business.

10
I change script in "Topic: Useful stuff" like this:
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. [ExecuteInEditMode]
  5. public class RenderQueueModifier : MonoBehaviour
  6. {
  7.  
  8.     #region VARIABLE
  9.     public enum renderType
  10.     {
  11.         front,
  12.         back
  13.     }
  14.     public GameObject target;
  15.     public renderType type = renderType.front;
  16.  
  17.     Renderer[] _renderers;
  18.     int _lastQueue;
  19.     #endregion
  20.  
  21.     #region FUNCTION
  22.  
  23.     #endregion
  24.  
  25.     #region MONOBEHAVIOUR
  26.     void Start()
  27.     {
  28.         _renderers = GetComponentsInChildren<Renderer>();
  29.     }
  30.  
  31.     void Update()
  32.     {
  33.         if (target == null)
  34.         {
  35.             return;
  36.         }
  37.         UIWidget widget = target.GetComponent<UIWidget>();
  38.         int queue = 0;
  39.         if (widget == null)
  40.         {
  41.             if (widget.drawCall == null)
  42.             {
  43.                 return;
  44.             }
  45.             queue = widget.drawCall.renderQueue;
  46.         }
  47.         else
  48.         {
  49.             Material m = target.GetComponentInChildren<Renderer>().sharedMaterial;
  50.             if (m == null)
  51.             {
  52.                 return;
  53.             }
  54.             queue = m.renderQueue;
  55.         }
  56.         queue += type == renderType.front ? 1 : -1;
  57.         if (_lastQueue != queue)
  58.         {
  59.             _lastQueue = queue;
  60.             foreach (Renderer r in _renderers)
  61.             {
  62.                 r.material.renderQueue = _lastQueue;
  63.             }
  64.         }
  65.     }
  66.     #endregion
  67. }
  68.  
I use this to control mesh/particle and UIComponent depth.It works very well before,but now it can't work.

11
I use RenderQueueModifier to control gameObject(model and paticle) and UIWidget depth.But I find can't get renderer on UIWidget now,I use unity5.0.4 and NGUI3.8.0.

12
NGUI 3 Support / Re: button in scrollView click bug
« on: March 25, 2015, 01:12:21 AM »
Thank you very much.EveryThing is right now.

13
NGUI 3 Support / Re: button in scrollView click bug
« on: March 23, 2015, 12:27:15 AM »
I find a way to solve this problem,add UIWidget script to GameObjectA,even disable this component,click function will be called.

14
NGUI 3 Support / button in scrollView click bug
« on: March 22, 2015, 10:19:35 PM »
I use scrollView like this:
GameObjectA has UIDragScrollView and boxCollider.
GameObjectB under A has UIScrollView and UIPanel.
GameObjectC under B has UIGrid.
Two buttons under C has boxCollider,UIDragScrollView and MyClickFunction.

When buttons scroll to top,can drag but can't click,when scroll below panel's middle,can drag and click.
I change one button's boxCollider center's z to -1,two button can click.

I really don't know why,is positions error?

15
NGUI 3 Support / Re: Use UIAtlasMaker.AddOrUpdate() and get stuck
« on: March 22, 2015, 08:21:16 PM »
Thank you very much,I will post on unity forum.

Pages: [1] 2 3