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

Pages: 1 [2] 3 4 ... 14
NGUI 3 Support / Re: UiCenterOnChild -- Did something change?
« on: June 21, 2014, 04:40:30 AM »
A couple more issues:

1. In the inspector, the CenterOnChild comp is enabled and the items in the SV are populated dynamically.  After populating, the the CenterOnChild doesn't work, I have to manually deactivate and activate it then it starts working.

2. When the user drags the SV to a new child, I would like to be able to get an event ASAP when the CenterOn() is finished.  ATM,  the available methods of getting the new child is not working fast enough.  I'm using onFinished event which is quite bit of time after the CenterOn finishes.   I added :

   public delegate void OnCenteredObjectCallBack (GameObject centeredObject);
   public static event OnCenteredObjectCallBack OnCenteredObject;

and to the bottom of the CenterOn() method:

      else mCenteredObject = null;
                if(OnCenteredObject != null)

This gives the desired result.  Can you add this functionality in a future version so that I don't have to add the changes to NGUI with each new version. 


NGUI 3 Support / UiCenterOnChild -- Did something change?
« on: June 21, 2014, 01:23:11 AM »
I have a SV with a grid that has a CenterOnChild comp.

It has been working fine before but with the recent updates it's not centering anymore.  I checked my setup and it's fine but still not working.  Has something changed besides the detection of disabled items?  I don't have the code for UIcenterOnChild from the previous version so I cannot do a diff.

Yes, a kind of lock. 

On the phone, if the "General Direction" of the swipe is vertical, then it will scroll vertically and if the "General Direction" of the swipe is horizontal then it will go horizontal.  This way, the feeling of the interaction is much more solid and purposeful.

Have a look at some of these types of nested kinds of scrollViews on your phone and you'll see what I mean.

I ended up taking out the toggle and rolling my own way of managing the highlighting.

NGUI 3 Support / Re: UIInput in ScrollView and dragging.
« on: June 14, 2014, 04:34:21 AM »
Thanks, this is the solution.

Ah that was it.  I didn't quite get the idea to attach 2 draging comp to the same item. 

It works but the interaction is a bit wonky.  I mean, when dragging vertically, the items are also moving horizontally.  Is there an offset that can be applied so that it can better detect the "General" drag direction in order to give a more solid feel to the Vertical or Horizontal scrolling?

This video shows the wobbling nature of the dragging.

NGUI 3 Support / Re: GC Alloc sky-rocketing.
« on: June 13, 2014, 02:13:08 AM »
Are you seeing this on the profiler on the device or the profile in-editor?


Can you give some suggestions to make this work, the Daikon Accordion works on mobile perfectly.  It would be nice to wrap up the NGUI accordion so that it looks and also works like how an accordion should be.

"@wallabie: If I understand you correctly you are saying you have a bunch of toggles all in the same group, and you show some of them while hiding others? The toggle groups only work for enabled toggles. Meaning if some are disabled at the time of you changing the state, those disabled toggles will not be "unset" because as far as NGUI is concerned disabled objects don't actually exist as a part of the UI.

You need to use different groups. Choose a unique group ID for each of your accordion."

I cannot do this because the items in the accordion are thumbnails of photos, each accordion header is a category.  So clicking on one photo thumbnail highlights it and should unhighlight the previously selected photo thumbnail that is in the other categories.

NGUI 3 Support / Re: will Ngui become obsolete?
« on: June 13, 2014, 02:02:50 AM »
"i watched the speech by ArenMook and he said 'himself' (and on this forum) that he practically wrote the entire Unity gui, its 'his'. and he says himself it is way better than Ngui "

I believe that ArenMook has stated in this thread that he was " Part of the Unity GUI team" and not written the entire thing.

I'm getting:

Assets/NGUI/Scripts/Editor/UIToggleInspector.cs(34,46): error CS0103: The name `sp' does not exist in the current context

NGUI 3 Support / UIInput in ScrollView and dragging.
« on: June 12, 2014, 01:37:01 PM »
I have an item in a horizontal ScrollView that is essentially an UIinput.
On mobile, when I try to drag the item, the input keyboard immediately pops up and I cannot drag the item. 

I tried your suggestion but it doesn't seem to work so well for me.

NGUI 3 Support / Re: Bug report in Toggle Set().
« on: June 12, 2014, 01:30:20 PM »
I need to set this to false to get around the bug in the Accordion nested scrollView problem.   

The problem is that NGUI BetterList only works for enabled children, so when one of the child toggle is not active, it will not change the state of that child. 

This is what happens when the accordion header is collapsed, the child inside is not visible to the BetterList.  If you could fix the bug then I will not need to set the toggle to false.

NGUI 3 Support / Re: will Ngui become obsolete?
« on: June 12, 2014, 01:04:06 PM »
Please correct again if I'm wrong.

I cannot speak for ArenMook but I think that when Unity was rebooting their GUI system, they looked at the most popular option at that time and it happened to be NGUI.   It then makes sense to make the new Gui system so that it's something that most people are used to using.  This way the migration process is smoother. 

At that time, NGUI was very different then it is today.  It was a different animal, much inferior to what it is today.  The architecture is not nearly as mature.  When ArenMook joined the Unity Gui team, many GUI systems were analyzed and the best features were taken into account in order to design the new GUI.  One can also see that the brainstorming and contributions from the Unity GUI team has positively affected how NGUI has grown.  One can say that NGUI today is a result of the contributions from Unity.  So to say that ArenMook helped Unity to make NGUI obsolete is not quite right.   

It's more like, Unity got some ideas from NGUI and in return, NGUI got lots of ideas from Unity. 

Furthermore, if NGUI didn't contribute the initial ideas, it would not have made such a big difference because Unity's Gui team was determined to create an awesome GUI system anyways because they lost face with the series of Gui reboots.  They really want to get this one right this time.  It's a matter of personal pride with the unity founders.   

Pages: 1 [2] 3 4 ... 14