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

Pages: [1] 2
1
NGUI 3 Support / Atlas save Filter and Format after update?
« on: June 12, 2014, 12:49:13 PM »
Whenever I update my atlas, it changes the filtering to trilinear and format to true color.  I am using point filter and 16 bit color for a very specific use on pixel art.  Any way I can not have to fix this everytime I update the atlas?

2
NGUI 3 Support / Anchors acting strange 3.5.9
« on: May 12, 2014, 05:36:53 PM »
It seems that if I don't have the Game & Scene tabs both visible at the same time, the coordinates are not correct at all when I drag around an anchored object in my Scene view.  I usually just switch between those views like tabs, so I have larger working area for each.

I haven't used NGUI since the new anchor system, so I don't know if this is expected behavior but it had me stumped for awhile.

3
NGUI 3 Support / UISpriteAnimation with UIStretch
« on: October 24, 2013, 01:06:27 PM »
This is causing flicker as it fights between pixel perfect & stretching it looks.  Any solution for this?  I tried parenting with empty game object and putting the Stretch on that, but doesn't work right I think because it has no dimensions.

4
NGUI 3 Support / Determine where text is on screen?
« on: October 09, 2013, 03:37:05 PM »
In our app, I am displaying a lyrics of a song on the screen using a UILabel, and am highlighting a word or two in each line of lyrics with color codes.  How can I determine where the highlighted words actually end up rendering on screen so I can position a sprite pointing at them?  I am using dynamic fonts and NGUI3 if that matters.

Thanks for any help!

5
NGUI 3 Support / NGUI3 / Unity4.3 / Dynamic Fonts
« on: September 25, 2013, 12:13:13 PM »
Few questions..

1) Does NGUI 3.0 on current Unity 4.2.1 address any of the myriad of dynamic font issues, or are we still waiting for Unity to fix stuff?  Any word on this?

2) Do we know yet if 4.3 fixes any of these issues?

3) Will future revisions of NGUI be utilizing 4.3's 2D framework when it releases or stay it's own entity?

Thanks!

6
NGUI 3 Support / dynamic font corruption on Galaxy S3
« on: August 17, 2013, 11:36:37 AM »
I am seeing this intermittent issue with dynamic fonts on Samsung Galaxy S3 (Attached screenshot).  I have noticed some other devices will look corrupted for a millisecond and then fix themselves, but on this device, it seems like often it can get stuck like this until something else eventually triggers a font rebuild.  Is there anything I can do about this or are we stuck waiting for Unity to fix stuff?  I am calling RequestChars as much as I can which did seem to help in some cases.


7
NGUI 3 Support / Dynamic Font Size Question
« on: July 20, 2013, 01:24:06 PM »
I am a little confused on the proper way to do multiple sizes using same TTF.  I notice that when using NGUI font maker and pointing to a TTF, it then uses the material/texture of the TTF.  If I need multiple sizes though of same font, do I need to import multiple TTF's with different names or can I point them all to the same TTF & Material?  Or do I need to make separate materials for each NGUI Font but still point to same TTF?

Thanks!

8
NGUI 3 Support / UIInput iOS Keyboard & Auto Camera Movement
« on: March 17, 2013, 01:02:31 AM »
Hello.  I have a simple 3 field signup form on my iOS app.  I'd like to detect when the user is entering data into a specific field and then adjust the camera (or something) so that the each field is still visible to the user when the iOS keyboard pops up, like most iOS apps seem to do.  What's the best way to accomplish this?  Secondly, but not as important, is there any way to show the "next" button on the iOS keyboard and have it move to the next field.  Thanks!

9
NGUI 3 Support / Losing sprite references using Atlas reference
« on: February 15, 2013, 05:31:54 PM »
I have written an editor script to set all my Atlas References to null before building to devices to ensure that it won't load the wrong atlas that I had set in the editor, then switch to the right one.  If I don't do this, my app will crash on some lower memory devices, and of course takes longer to load on others.

The problem is, that if the atlas reference is set to null, any sprites pointing to that atlas reference can lose their sprite setting in the editor if I am not super careful.  This is quite troubling when you have 100 objects that all lost their sprites and have to go reset them each to what they are supposed to be, if I didn't have a recent .scene backup.  I have had to do this many times now.  Is there anything I am doing wrong or possibly a patch that would make NGUI not reset the sprite reference even when the atlas reference is null?

Much appreciate some help on this, as it's driving me nuts.  ;D

10
Ok so I have one Main Atlas set as a reference atlas.  And setting the reference to an SD, HD, 4X atlas depending on screen resolution.  It all works great, except for one problem.  For some reason, ALL 3 textures are loading into memory even though I only have 1 being pointed to by the Reference Atlas, and I even clear that before building.  I have written an editor script to iterate through all sprites in my scene to be sure none are referencing the non-reference atlases.

I am stumped, the only way I can get my memory to free up, is to physically remove the atlas's from the project, but as soon as I put them back in, memory is used up again.  This is obviously bad because the 4X atlas alone takes up 64MB of RAM, unacceptable on low end devices.  I have no idea what is referencing the other 2 atlases to cause unity to load them.  The app is definitely using the right atlas as far as what sprites are visibly shown, so the other textures are loading but not being used for anything.

Would appreciate any help on nailing down why this is happening or how I can debug this.  Thanks!

11
NGUI 3 Support / Font SD/HD/SHD switching with Make Pixel Perfect
« on: December 27, 2012, 07:55:46 PM »
So I have this all working, but I am running into a problem with trying to use "Make Pixel Perfect" on these fonts.  It is not using the relative pixel size like it does for UIAtlas references.  I am using 3 fonts without atlas's and there is no setting for pixel size like there is for using UIAtlas with a reference.  Is there any solution for this?

12
NGUI 3 Support / Alternative to Solidify (Premultiply Alpha)
« on: December 27, 2012, 03:50:30 PM »
So I was not happy with the 'Solidify' photoshop filter approach to cleaning up interior sprite edges and found another solution for anyone interested.  This involves using Texture Packer to create your textures with "Premultiply Alpha" checked and then using this shader:

  1. // unlit, vertex colour, premultiplied alpha blend
  2.  
  3. Shader "PremulVertexColor"
  4. {
  5.         Properties
  6.         {
  7.                 _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
  8.         }
  9.  
  10.         SubShader
  11.         {
  12.                 Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
  13.                 ZWrite Off Lighting Off Cull Off Fog { Mode Off } Blend One OneMinusSrcAlpha
  14.                 LOD 110
  15.                
  16.                 Pass
  17.                 {
  18.                         CGPROGRAM
  19.                         #pragma vertex vert_vct
  20.                         #pragma fragment frag_mult
  21.                         #pragma fragmentoption ARB_precision_hint_fastest
  22.                         #include "UnityCG.cginc"
  23.  
  24.                         sampler2D _MainTex;
  25.                         float4 _MainTex_ST;
  26.  
  27.                         struct vin_vct
  28.                         {
  29.                                 float4 vertex : POSITION;
  30.                                 float4 color : COLOR;
  31.                                 float2 texcoord : TEXCOORD0;
  32.                         };
  33.  
  34.                         struct v2f_vct
  35.                         {
  36.                                 float4 vertex : POSITION;
  37.                                 fixed4 color : COLOR;
  38.                                 half2 texcoord : TEXCOORD0;
  39.                         };
  40.  
  41.                         v2f_vct vert_vct(vin_vct v)
  42.                         {
  43.                                 v2f_vct o;
  44.                                 o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
  45.                                 o.color = v.color;
  46.                                 o.texcoord = v.texcoord;
  47.                                 return o;
  48.                         }
  49.  
  50.                         fixed4 frag_mult(v2f_vct i) : COLOR
  51.                         {
  52.                                 fixed4 col = tex2D(_MainTex, i.texcoord) * i.color;
  53.                                 return col;
  54.                         }
  55.                
  56.                         ENDCG
  57.                 }
  58.         }
  59.  
  60.         SubShader
  61.         {
  62.                 Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
  63.                 ZWrite Off Blend One OneMinusSrcAlpha Cull Off Fog { Mode Off }
  64.                 LOD 100
  65.                
  66.                 BindChannels
  67.                 {
  68.                         Bind "Vertex", vertex
  69.                         Bind "TexCoord", texcoord
  70.                         Bind "Color", color
  71.                 }
  72.  
  73.                 Pass
  74.                 {
  75.                         Lighting Off
  76.                         SetTexture [_MainTex] { combine texture * primary }
  77.                 }
  78.         }
  79. }
  80.  

This works fantastic, but I would love to see this functionality native to NGUI at some point.

13
NGUI 3 Support / Can't see GUIText & UILabel crispness
« on: December 24, 2012, 02:11:25 PM »
I am trying to use a GUIText for an FPS counter like I usually do on my projects.  I prefer GUIText over UILabel for this purpose, because it produces a very crisp tiny font that I can't seem to replicate with Bitmap Fonts.

So my question is two fold

1) Why can't I see my GUI Text, I have tried adjusting Z coords and anything else I could think of, but I cannot make it visible in game. I can see it in my 'scene' view though.  I am using 2D NGUI settings.

2) How can I create a font that appears as crisp as the default GUIText font using UILabel at the same size?  I am using Glyph Designer, and even just looking at the raw texture, it's too heavily anti-aliased or something, but turning off AA, makes it unusable.

Thanks!

14
NGUI 3 Support / UILabel keeps changing Z back to 0
« on: December 18, 2012, 11:27:17 PM »
My UILabels are using fonts on separate atlas's and when I change Z to anything and "Play", it changes back to 0.  Also happens if I modify the Color or any other properties.  Bug?

15
NGUI 3 Support / Sprite Edges
« on: December 14, 2012, 08:16:37 PM »
The edges of some sprites seem to have some extra dark lines that are not in the original.  I recall having this issue in the past with other sprite systems and it had something to do with using premultiply alpha to fix it.  Is there a way to address this with NGUI, I am not even sure if it's the same issue.

Here's a picture on the left of what this sprite looks like in Unity.  All four edges have extra darkness that shouldn't be there.  I have noticed this on most of my sprites, but some are a lot worse than others.  I am open to other solutions like changes in how we master the artwork if need be.

Edit: I am also using 8 pixel padding to be sure its not bleed from other sprites.



Thanks for any help!

Pages: [1] 2