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

Pages: [1] 2
1
Oh, good to know. Thanks! RGBA seems to work for now, perhaps I will change it before our next release though. Thanks!

2
Ahh, RGBA32 was mentioned in another post. Is that ok or should I reimport the textures?

3
I do set it to Advanced, perhaps I didn't mention that. Thanks!

4
Ahh, that's got to be frustrating! It's not terribly consistent and it seems to have sorted itself out at the moment. If it happens again, I will try to see if I can at least come up with consistent repro steps and perhaps the Console log.

It definitely seems to have something to do with the texture import settings of the source textures. I don't believe it has ever happened when I set the texture type to advanced/max size 2048/RGBA 32 Bit.

The other thing that I have found is that it happens every time when the textures are too big to fit in the atlas but that is not the only time I have gotten the error.

I know it is tough to diagnose without the actual project but, unfortunately, I cannot send that.

I am using Unity Pro and SVN (separate client).

5
Sorry, I should have provided more details...

Quote
You get a crash? Nothing should crash. Are you using some versioning system that requires manually checking out files prior to modification, thus preventing NGUI from altering the texture settings?

I suppose crash is the wrong word. I get an error and I can no longer use the Atlas Maker. Unity functions properly but I have to quit and restart.

It is pretty much as described here:
http://www.tasharen.com/forum/index.php?topic=8480.msg40069#msg40069

Quote
Changing the settings is only needed if your platform overrides the default import settings.

I have no idea why it would but apparently it is somehow. I have all of my quality settings as high as possible.

Quote
What version of NGUI are you using, and what version of Unity? 2D Mode was added in Unity 4.3.

NGUI 3.5.0b
Unity 4.3.4f1

6
NGUI 3 Support / Update textures in all atlases
« on: March 26, 2014, 02:53:24 PM »
I apologize if this has been answered somewhere already but I couldn't find anything.

I just received a boatload of new graphics and I need to update them all. The way I am doing it now is insanely time-consuming considering the number of GFX in my app. Am I missing something here? Is there an easier way to do this?

Right now, every time I have to update a graphic I do the following:
1. Reset import settings (I was told I don't have to in a previous post but it crashes when I don't)
2. Open atlas in Atlas Maker
3. Select all GFX in Project
4. Click Update
5. For every instance of the graphic in the scene:
         a) On the UISprite script, click the Snap button to resize the image if it is a different size
         b) If there is a collider, make sure the item is active and then click "Auto-adjust to match" or resize it manually if need be

Thanks!

EDIT: Strange, it seemed to automatically replace some assets with the new ones and not others. I can't seem to find a pattern. Any idea why this might happen?

Nevermind, these were Unity sprites. I forgot that I had done that for a few graphics.

7
Quote
2. Doesn't matter. NGUI overrides texture settings when you attempt to add something to the atlas.

I am a bit confused about this because if I don't change the settings before I add to the atlas, I get a crash. I have reproduced this several times (i.e. -- I import a new graphic and try to add it to the atlas. If I don't change the import settings to Advanced/Max Size 2048/Format ARGB 32 bit I get a crash).

Also, if I do not set the max size manually, I get a crash. This is reproducible as well. I don't have the quality set to Fastest but I will check the build target.

You also mentioned in another post that you need to change the import settings. Did something change in the most recent version?
(http://www.tasharen.com/forum/index.php?topic=8480.msg40090#msg40090)

Quote
Also... why is your "Tester" texture set to 16 bit? It must be RGBA 32 bit.

Edit: You seem to have the texture type set to "Sprite", when it should be "Advanced". The texture import settings are wrong... Turn off the "2D" mode.

(also, what do you mean by "Turn off the 2D Mode"?)

Thanks!

8
NGUI 3 Support / Texture Import Settings and Atlas Creation/Updating
« on: March 24, 2014, 08:12:10 PM »
I have been encountering various errors and strange behavior with my atlases and I was wondering if there is one place that I could find the info for properly setting up my atlases.

I have encountered a few things along the way that has solved a lot of problems but having this info would have saved me hours. I am still encountering issues that are most likely the result of improper settings.

Here is what I have found so far:
1. If you use a PMA shader (Premultiplied Alpha), do not check Alpha is Transparency in the Texture Import Settings
2. What should my Import Settings be for PNGs? (I was using Sprites but I read that I should be using Advanced -- a coworked noticed a degradation in image quality when we used a Texture but perhaps there was another setting that was incorrect)
3. After I create an atlas, I have to set the Max Size to 2048 and the Format to Truecolor. I also have to uncheck "Override for iPhone" because the Max Size gets set to 1024 and I get all sorts of errors.
4. Should the Import Settings be changed to Advanced for the atlas as well?

Are there any other settings? I am still getting errors and banding on my graphics and it is getting incredibly frustrating. Thanks!

9
NGUI 3 Support / Re: UIButtons inside ScrollView work randomly
« on: March 19, 2014, 10:35:47 AM »
Great, thanks! Enjoy the conference!

10
NGUI 3 Support / Re: UIButtons inside ScrollView work randomly
« on: March 18, 2014, 08:37:10 PM »
Ahh, sorry. That works!

One other question. For various reasons I would rather use UIEventTrigger than UIButton. When I use UIButton, it ignores the click when I am scrolling. Not so with UIEventTrigger. I couldn't find an easy fix. Do you know of anything?

Thanks!

- Jacky

11
NGUI 3 Support / Re: UIButtons inside ScrollView work randomly
« on: March 18, 2014, 02:36:10 PM »
So, I narrowed down the problem a bit.

It works fine with the following hierarchy:
- UIScrollView
-- UIGrid (similar behavior with or without this)
--- Item_01
--- Item_02
--- Item_03...

This, however does not work:

- UIScrollView
-- UIGrid (similar behavior with or without this)
--- Page_01
---- Item_01
---- Item_02
---- Item_03...
--- Page_02
---- Item_03
---- Item_04
---- Item_05...

Would you be able to let me know how to arrange things below the UIGrid so that it will work?

12
NGUI 3 Support / Re: UIButtons inside ScrollView work randomly
« on: March 17, 2014, 11:43:06 AM »
Debug mode is very helpful! Thank you!

It still doesn't work though :(

1. The camera has been set to UI mode
2. I enabled Debug and it looks like the parent GameObject (level 2 in the hierarchy below) is intercepting the events. I can't get rid of that collider if I want the menu to scroll though.

It looks like something is going on with the colliders but I don't think I quite understand how the colliders work with the UISprite.

I saw in this post that you should use an invisible collider. Does this also apply to items within a ScrollView?
http://www.tasharen.com/forum/index.php?topic=7292.msg34506#msg34506

I added a collider and then checked auto-adjust to match. In the editor, the coordinates of the collider on all of my sprites are exactly the same for every button. They are somehow in the correct place in the Scene View but I have no way of checking the z-depth because the values in the inspector don't seem to mean anything. I tried changing it manually during play mode and that made no difference.

I also tried changing the z-depth of the parent GameObject to +20 and the buttons to -5. I also changed the clipping planes on the camera but that seemed to make no difference.

Also, on the one button that does work, it gets BOTH clicks (the ScrollView click and the button click). I need to find a way to disable that as well.

13
NGUI 3 Support / Re: UIButtons inside ScrollView work randomly
« on: March 14, 2014, 07:14:30 PM »
jeffpk,

I looked into that but the strange thing is that ONE button is working. If it was a depth problem I would think that NONE of them should work.

Also, scrolling does not make a difference. It's when I scroll to the other menu and activate/deactivate the other "page" that it stops working.

The fact that activating/deactivating the GameObjects has an effect on it makes me think it could be something in the NGUI code that my scene doesn't like. Not necessarily a bug in the code but something I might have attached and/or in the wrong place.

I looked briefly at the depths but I do need to look more into it so I will update if that makes a difference.

Thanks!

14
NGUI 3 Support / Re: UIButtons inside ScrollView work randomly
« on: March 14, 2014, 06:57:41 PM »
Also, I noticed that the UICenterOnChild.onFinished is being called every click...

15
NGUI 3 Support / UIButtons inside ScrollView work randomly
« on: March 14, 2014, 05:05:02 PM »
I have an incredibly maddening issue. I have a UIScrollView with two pages of buttons inside it. All but one of the buttons don't work.

This is the behavior I am experiencing. The numbers in the parentheses are the levels in the hierarchy (see below).

Scenario 1:
* Deactivate and reactivate the gameobject (1) that is the parent of the buttons, all of the child buttons (2) work (page A).
* Scroll to the next page (page B) and back (page A), the buttons (2) continue to work.
* Scroll to the next page (page B) and deactivate/reactivate the buttons, the ones on that page work (page B) and the SOME of the buttons on the previous page (page A) stop working.
* Go back and forth and the behavior is the same

Scenario 2:
* Deactivate the Box Collider on the parents of the buttons (1) and the buttons work but the menu does not scroll

Here is my hierarchy:

(0)--ScrollView, UIPanel, UIScrollView, UICenterOnChild
(1)----UIDragScrollView, Box Collider w/depth -20
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification
(0)----UIDragScrollView, Box Collider w/depth -20
(1)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification <---- this one works
(2)------UISprite, UIDragScrollView, Box Collider w/depth 3, UIButton w/OnClick notification

EVERYTHING is exactly the same on all of the objects. When I run the scene, the only difference between the one that works and the one that doesn't is the length of the color tween. On all of the broken ones it's .15, the one that works it's .2. I don't know what that could possibly do but it's the only difference I could see.

Any help would be very much appreciated. I can't find ANYTHING that could be causing this seemingly random behavior. If ALL of the buttons did not work it would make a lot more sense but this really doesn't make any sense. Thanks!

Pages: [1] 2