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

Pages: [1]
NGUI 3 Support / UIAtlas not unloaded after LoadLevel
« on: August 15, 2014, 05:18:11 PM »
NGUI Version: 3.6.9
Unity version: 4.5.0f6 Pro

Hi Guys, we've been having memory leak problems with our project lately so we've decided to take a closer look at the Profiler. That's when we noticed that some UIAtlas are not unloaded. We've found this post: and decided to update NGUI in the hopes that this fix was added. It was but it didn't completely fixed our problem.

It would remove the UIAtlas only if the UIRoot was not a prefab. Since we instantiate the UIRoot at the loading of the scene, all our UI is made up of prefabs.

I thought it could be our project so I've re-created a new project from scratch using the NGUI example textures. This new project loop through 3 scenes and behaves the exact same way as our project. If you save the UIRoot as a prefab (blue) the UIAtlas is not unloaded. If the UIRoot prefab is gray, it gets removed at loading.

ArenMook: I have a testProject if you want it. PM me and I'll forward a download link.

NGUI 3 Support / UISprite not displayed over Widget
« on: August 08, 2014, 10:58:15 AM »
Hi Guys, I don't know if any of you experienced this problem but I really need a solution.

I have a panel that I hide and move out of the way when it's not needed. Within that panel is a grid where I generate prefabs. These prefabs are updated every time I display the panel. The first time the panel is displayed, every sprite is in the right spot but if I popup the panel again, the sprites texture is not aligned with the widget (see attached picture)

The only way to display the sprite properly is to update some value that will force it to refresh (scale, position, etc.)

Any help would be appreciated.

NGUI 3 Support / Fixed Size vs Pixel Perfect
« on: July 23, 2014, 07:55:23 AM »
Hi guys,

I'm doing a project and we've been wondering how to setup the UI: Fixed size or Pixel perfect. I understand the difference between the 2 and I know that pixel perfect might be a little fuzzy. But I encountered something strange with the fixed size:

Step 1 - While my uiRoot is in fixed size, I make it pixel perfect to properly align every asset underneath it. I looked at the appearance of the ui and it has a little fuzziness, even in the base resolution. I take a screenshot.
Step 2 - I then switch my uiRoot to pixel perfect and make it pixel perfect. Everything become neat and crispy. I take a screenshot.
Step 3 - I switch my uiRoot back to fixed size but I don't touch a thing. I take a screenshot.

I then compared all 3 screenshots and this is the weird part, screenshot 3 is less fuzzy than screenshot 1. Is there any reason to this?

NGUI 3 Support / UIPanel softclipping bug
« on: May 29, 2014, 11:27:28 AM »
Hi, I've got a problem where my UIPanel will not display the sprites within it. If I change my sprite (position, size,etc.) it will display or if I change any setting on my UIPanel the sprites will display. I'm using a UIPanel with the clipping setting set to soft clipping, the softness is set to 4. All Advanced options are off.

I tried a force refresh but it didn't work. Yet when I turn off the softclipping everything is fine. Is there any reason why a UIPanel with softslipping would not render the sprites in it?

running NGUI 3.6.1

NGUI 3 Support / Anchoring bug in 3.5.8
« on: May 08, 2014, 04:37:26 PM »
I've just upgraded to 3.5.8 and discovered the execute feature with the UIAnchor, and also a bug.

I have map that is anchored to the main panel so that it can scale to the window size. Just under it I have map icons that are anchored to the map itself. If I move the map to the side and then bring it back to the center of the screen, the map icons do not follow.

But if I remove the anchor from the map, the icons positions work fine.

NGUI 3 Support / Moving object with Center on child
« on: April 30, 2014, 02:52:32 PM »
I'm attempting to move the parent of a uitable while it's performing a Center on child. For some reason the tween within the Center on child stops if the objects parent is moved or tweened.

Is this a normal behavior? Is there a workaround for this?

Edit 1: Here is what I noticed:
The Spring Panel's Target XYZ usually matches the x,y,z position of the UIPanel. But if I move the parent of the panel doing the Center on child, the UIPanels X position (the one being tween by the Center on child) changes to a different value. It basically un-syncs with the Spring Panel if it's moved and the Center on child simply stop centering the panel.

NGUI 3 Support / How to Search an Atlas at Runtime
« on: April 17, 2014, 12:55:58 PM »

I'm wondering if it's possible to search, at runtime, an atlas to know if a sprite is within this atlas?

The reason I want to do this is because I concatenate the name of the sprite together and I want to default back to a sprite when the concatenated sprite is missing from the atlas.

Is there any way to do this?

NGUI 3 Support / UITable within UITable
« on: January 20, 2014, 04:32:55 PM »
Hi Guys,

I'm attempting something I'm not sure is supported and am experiencing some problems with. I'm attempting to place 2 UITable(child-table) within a main UITable. Here is how it works:

1. I start my scene with both child-table being empty.
2. I add elements to the bottom-most child-table and reposition that table with success.
3. At a click of a button I add elements to the upper-most child-table. I reposition but this time, all the elements stay bunched up over each other.

The only way to prevent them from overlapping is by putting a big offset, which comes down to using a UIGrid.

Any idea how to fix this? Is this even supported?

NGUI 3 Support / UIPlayTween called in code
« on: December 06, 2013, 10:35:51 AM »
Hi Guys,

I've got a question regarding the UIPlayTween function. We are developing a game that will be both controller and mouse/keyboard controlled so I need to call most functions through code (actually uScript). So far NGUI and uScript work very well together since I have access to all functions through reflection.

So here is my situation:
I want to be able to unfold an element in a table by calling UIPlayTween through uscript. I've created myself a collision object that will trigger the UIPlayTween using a mouse click. I've added 2 UIPlayTween to this object, each linked to 2 different objects containing tweens. Clicking on the collision box will play both tweens, but calling the function in uScript only plays the top tween component.

What I'm I doing wrong here.

Running NGUI 3.0.1 (planning to upgrade to the newest version of 3.0.7 upon release)

NGUI 3 Support / UISprite Dimension Set to 1,1 After Updgrade
« on: October 22, 2013, 03:23:56 PM »
Hi, I've just upgraded my project to NGUI 3.0.2.

I have followed the video for the upgrade and everything went smoothly except that all my UISprites have a 1x1 dimension. I wonder what I did anything wrong and if there is a fix for this?

Any help?

NGUI 3 Support / Broken Atlas after adding new sprites into it
« on: July 10, 2013, 04:25:13 PM »
Hi, I've been experiencing an important problem with the Atlas for the last 2 days.

It seems that since my atlas size changed from 1024x512 to 1024x1024, the atlas seems to be losing the references to the proper images. This result with sprites having the wrong icon.

The solution I've found so far is to update all sprites. Luckily, most of the original images are located in the same folder. But this is very frustrating since I have to update all images very often.

NGUI 3 Support / UIGrid get position of children
« on: June 20, 2013, 03:13:40 PM »
I'm using UIGrid to sort a list of icons. I trying to place an outline around one of the children without moving the whole list.

I started by getting the local position of the object, but they all have the same position.

Do you see any way to do this with UIGrid or will I have to build myself a function to place the icons themselves?

NGUI 3 Support / Overlapped button still works
« on: June 14, 2013, 10:22:23 AM »
Hi Guys,

I have an esc menu that pops up with multiple options. One of these options (quit game) should bring up a confirmation window asking to quit or cancel.

The problem I have is that once the confirm panel pops up, I can still click the button located under the confirmation panel!

How can I fix this?

NGUI 3 Support / How to Create a Toggle Image Button
« on: May 17, 2013, 08:21:20 AM »
Hi Guys, here's my second noob question!

Objective: Create an image button that has 2 states: not pressed and pressed. I want to click the button and have the pressed image stay there (this would open a menu for example). The I want to be able to click it again and have it display the not pressed image (and have the menu close).

What I did: I've read this post: but I noticed that I can't assign a "Check Sprite" from my imageButton since they are selected from a drop down box. So I created a new Sprite that I've put inside the imageButton. I've disabled the sprite and added a both UICheckbox and UICheckbox Controlled Object scripts. Seemed to work fine except that once the sprite appears, it hides the button and I can't see the "hover" state when the button is in the pressed state!

The other Idea I had was to create 2 different buttons and have them activate and deactivate when pressed, but that sounds sloppy...

Any idea how to do what I want without having to create a new script? Is there a function that allows me to inverse the normal and pressed sprite upon click?

NGUI 3 Support / Scaling a sprite while keeping Pixel Perfect
« on: May 15, 2013, 09:11:57 AM »
Hi Guys, before I submit my problem, I just want to point out that I'm fairly new at using both Unity and NGUI.

Here is my problem: I have a some sprites that I want to scale to different sizes but I would like to keep a Pixel Perfect setting for them. For example, the game has different phases that I list on the side of the screen. During phase 1, phase_1 icon has a size of 48x48 pixels but scales down to 32x32 in phase 2. We don't want to use 2 different images since it will take up space in the atlas, instead we want to scale the icon down to size 32x32

From what I understand, Pixel Perfect will automatically re-size the sprite to it's original size. Can I use an empty game object as a parent to scale this sprite? If not, is there a better solution for my problem?

Thanks for any help on this matter.

Pages: [1]