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.

Topics - wallabie

Pages: [1] 2 3 4
NGUI 3 Support / Best practice NGUI and Asset bundle
« on: July 16, 2014, 12:37:01 PM »
I'm at the stage in the project where I need to work with NGUI and asset bundles.

What is the recommended  workflow for do this.


NGUI 3 Support / How to scale for Web Player.
« on: June 28, 2014, 10:20:36 AM »
I've been working with mobile and was wondering how to publish to Web player so that the dimensions would automatically scale.

For example, I would like to vary the height and have the app automatically scale itself to fill fit the specified dimensions.  I tried in an ad-hoc way with the various scaling style settings but didn't get the right combo.


NGUI 3 Support / What is Supplied NxActorDesc is not valid.
« on: June 28, 2014, 09:55:59 AM »
I started to get this error in the project recently and wondering what it means:

Supplied NxActorDesc is not valid. createActor returns NULL.
NGUITools:SetActiveSelf(GameObject, Boolean) (at Assets/NGUI/Scripts/Internal/NGUITools.cs:1196)
NGUITools:Deactivate(Transform) (at Assets/NGUI/Scripts/Internal/NGUITools.cs:1085)
NGUITools:SetActive(GameObject, Boolean, Boolean) (at Assets/NGUI/Scripts/Internal/NGUITools.cs:1111)
NGUITools:SetActive(GameObject, Boolean) (at Assets/NGUI/Scripts/Internal/NGUITools.cs:1092)

NGUI 3 Support / Physics Simulate goes wild when localScale = 0
« on: June 26, 2014, 12:40:52 PM »
Very strange issue I'm having.

I have a bunch of NGUI panels that I am setting the scale to zero in order to keep them activated while "hiding" them from the user.  On the phone, when I ran the app, the FPS went from its normal 22-27 to 2-7 fps.  Using the profiler, found that Physics Simulate is eating up the FPS.  After testing,  I found that  having the panels at zero scale was the problem. 


1. Why is the physics simulate going wild when the scale is zero?
2. Is there another way to hide the panels without disabling them?  Reason is that I'm using PoolManager to populate SVs, if the SV is not active then PM doesn't see the already spawned items and keeps on spawning new ones. 

NGUI 3 Support / How to do a CenterOnChild with custom offset.
« on: June 24, 2014, 09:50:49 AM »
Use Case:

When the user clicks on an item that is half way out of the left boundary, the item should move so that it is just inside of the boundary and not to the center of the SV.  Perhaps there is another better way to do this instead of adding an offset to the CenterOnChild.

NGUI 3 Support / Accordion SV repopulation not detecting OnDrag
« on: June 23, 2014, 01:29:21 AM »
I'm using the accordion SV together with PoolManager.  Each accordion Item is a prefab.  When the accordion is populated the first 2 times, everything works fine.  Upon the third time clearing and repopulating the accordion, I cannot drag the items in the horizontal SV.

When I expand one of the Accordion Item header, the items in the horizontal SV are all there, but when I try to drag, I cannot.  After clicking a few times, then the dragging works.

In the SV, I added a debug.log and found that it's showing:

SV: OnDrag =Scroll View, mShouldMove =False, active =False

After trying to drag a few time, then it turns into:
SV: OnDrag =Scroll View, mShouldMove =True, active =True

I tried using NGUITools make the SV active but still doesn't work.

Edit:  I used this debug line:

Debug.Log("SV: OnDrag ="+ + ", mShouldMove ="+ mShouldMove + ", NGUIactive ="+ NGUITools.GetActive(gameObject)+ ", active ="+ gameObject.activeSelf);


SV: OnDrag =Scroll View, mShouldMove =False, NGUIactive =False, active =True

As a test, I made mShouldMove into a public and explicitly set it to True before attempting to drag.  Still, when I try to drag mShouldMove is False.

NGUI 3 Support / Clearing UITable immediately
« on: June 23, 2014, 12:27:36 AM »
I have a SV with a table that's being dynamically populated again and again with new info with fresh data.

I need a way to immediately clear out all of the data from the table when fresh data comes in.  Looking at the UiTable code, there's not an immediate way of clearing the mChildren list.  Seems only on the next update.

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.

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. 

NGUI 3 Support / Bug report in Toggle Set().
« on: June 12, 2014, 12:56:00 AM »
I lost a some time trying to figure out why the toggle wasn't being a set in code.

if (group == 0 || value || optionCanBeNone || !mStarted)

My situation is :

group = 5
value = false
optionCanBeNone = false
mStarted = true

UIToggle's optionCanBeNone cannot be set from the inspector.

I have a various prefabs with toggles on them and would like to be able to set this property in the inspector. 

This is a bug report.

Steps to replicate:

1. AccordionSV with 2 item.
2. Item 1  is a Horizontal SV with 3 buttons with toggle number of 10
3. Item 2  is a Horizontal SV with 3 buttons with toggle number of 10
4. Click button 1 in accordion Item 1.
5. Collapse accordion Item 1.
6. Open accordion Item 2.
7. Click button 1 in Item 2.
8. Open accordion item1. 
9. Both buttons are highlighted instead of only one button.

I just upgraded to Unity 4.5 and happy to report that NGUI's accordion nested scrollview is still working.

I have a question about how to do the following:

The accordion has nested horizontal scrollviews and when scrolling the accordion items vertically on the phone, if the user touches one of the horizontal items then it's not possible to scroll up and down, only horizontally.  This behaviour makes it quite difficult to use the accordion on mobile devices.

How to get the accordion to scroll up/down even when the user is dragging vertically on an item from the horizontal scrollview ?
To rephrase the question:  How to get the accordion to behave like most mobile accordions where when the the user drags up/down, the accordion pans up/down.  When dragging left/right on a horizontal scrollview item, then the item is paned left/right.

Edit: The situation is at its worse when all of the accordion's items are expanded.
Here's a video:

I noticed that in a scrollView with children that are not active, the code below doesn't take that into account and returns the incorrect item.  I added the following line and it seems to work.  Perhaps you can see a better to fix this problem.

for (int i = 0, imax = trans.childCount; i < imax; ++i)
         Transform t = trans.GetChild(i);
         if(!t.gameObject.activeSelf) continue; //Added this line.

         float sqrDist = Vector3.SqrMagnitude(t.position - pickingPoint);

         if (sqrDist < min)
            min = sqrDist;
            closest = t;
            index = i;

NGUI 3 Support / Testing NGUI for production project. GC issues
« on: June 07, 2014, 02:04:03 AM »
I'm at a very critical  testing stage of the project that I'm working on with NGUI and running into some serious GC issues.

Here's a screen shot of the deep profiler.

Edit: The setup is 3 panels that are toggled using 3 tabs.  Each panel contains 2-4 scrollViews and other basic UI controls like labels and buttons.

The screenshot doesn't show the rest of the 1.2mg of GC.  but essentially, UiPanel.Find seems to be the problem.

Pages: [1] 2 3 4