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

Pages: [1] 2
2
NGUI 3 Support / Re: How to drop atlas's file size?
« on: January 29, 2015, 01:49:30 AM »
There are few options:

- If your atlas only uses limited count of colors (e.g. 217 colors) you can use palette texturing (8 bit alpha texture for finding the color index and 32 bit color map for finding the color)
- If you can manage with 16 bit colors then use that option (better solution for this is that your artist can produce UI elements with 16 bit colors)
- Compress to ETC1 as you said (this option has the problem that ETC1 doesn't support alpha, so you have to do some extra shader work http://malideveloper.arm.com/develop-for-mali/sample-code/etcv1-texture-compression-and-alpha-channels/ and for upscaled elements the compression artifacts can be easily seen)
- In case the .apk size is the only issue (== no need to worry about runtime texture memory usage) you can use better image compression and decompression during runtime (like BPG http://bellard.org/bpg/ )

3
NGUI 3 Support / Re: UISprite: 1 pixel borders flicker when object is moved
« on: December 08, 2014, 02:20:23 AM »
Can you limit your sprite positions to integer values?
http://www.reddit.com/r/Unity2D/comments/2eeo4n/pixel_perfection_in_2d_xpost_from_unity3d/ (3. Sprite transforms)

4
NGUI 3 Support / Re: Best use of Atlases?
« on: October 16, 2014, 04:16:21 AM »
You shouldn't use atlases larger than 2048x2048 with iOS since they won't work with all devices. So don't try to put multiple 2048x1536 textures to atlas if you target iOS.

And if you have to use PVRTC texture compression, then add black/transparent borders to image manually. That way you can control the cropping better than when engine does forced square texture scaling.

5
This only happens if you have the "Truecolor" option toggled in the atlas maker. Otherwise it will keep whatever filter mode and texture format you chose.
With iOS as the platform the Truecolor must be chosen for PVRTC atlas during atlas texture adds/deletes if quality is set to best. If one tries to add/delete a texture when PVRTC with best quality is selected, Unity freezes (I assume Unity tries to compress it too many times during the atlas generation, since importing the game project to new Unity instance also causes 30 min wait time because of Atlas imports). I haven't tested with Unity cache server.

6
NGUI 3 Support / Re: atlas and iOS texture compression
« on: July 24, 2014, 06:19:01 AM »
As you suggested, adding long lines is the easiest solution to make atlas maker to always output square textures.

7
I included an scene and script that can be used to replicate the issue.

Just start the scene and press the Show button. Clipping should work incorrectly by default, and once you disable+enable Panel - Submenu it should work correctly.

8
The UiPanel changes didn't help. Disable+enable is still required to make soft clip work correctly.

9
Those panels shown in the image are the only soft clipped ones (I have one UIPanel without clipping as parent for that menu) for that hierarchy, and I am using Unlit - Transparent Colored as shader for all sprites in there.

10
@Agent: My guess is you used Instantiate to create your items instead of NGUITools.AddChild.
I am using NGUITools.AddChild (for both red UIGrid items and blue scrollviews).

11
I have soft clip scrollviews (B level, in image BLUE ones) inside of soft clip scrollview (A level, in image GREEN one) and there is one issue with clipping when I populate those B level scrollviews. A level scrollview doesn't clip those B level scrollviews unless I disable and enable A level scrollview after populating.


Problem with disable+enable is that on mobile devices that is too slow operation because there are so many gameobjects inside the A level scrollview. Is there some method in UIScrollView or in UIPanel that I can call to recheck those soft clips instead of disable+enable?

12
The only solution that i can think about is to place the buttons in its own Panel and give it a grater depth then the ScrollView. I think it should be alright to use one panel for both buttons as well.
Thanks. It worked.

13
As the topic says, I need to create a button that is over two different panels. But I don't have a clue how to do that.


as the image shows:
* Window is first panel, and scroll list inside of it is the second panel.
* And (next/prev) button should be drawn over both of them.
* But since scroll list must have higher depth than Window, I cannot put the buttons to Window panel since then scroll list is drawn over them.
* If I put the buttons to scroll list panel, then scroll list panel clipping hides parts that are outside of it.

If someone has some sort of tips, I would be grateful.

14
NGUI 3 Support / Re: UISprite will be reset on apply and save
« on: April 17, 2014, 06:08:28 AM »
I tested out that, but it didn't help. Then I noticed it might have something to do with Sprites part of UIButton. It seems that Normal of Sprites returns to old value when Apple is pressed, but Hover, Pressed and Disabled keep their new sprite.

15
NGUI 3 Support / Re: UISprite will be reset on apply and save
« on: April 16, 2014, 07:04:25 AM »
We have same issue with 3.5.6

In our case it saves the correct prefab on Apply (so if we reload scene it shows what it should be), but for some reasons in current scene it reverts the UISprite to previous one.

Pages: [1] 2