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

Pages: [1] 2
1
NGUI 3 Support / Strange discrepancy between SceneView and GameView
« on: July 28, 2014, 08:36:18 AM »
I have a strange problem using NGUI. My SceneView shows a different result than the GameView. I attached a screenshot, showing a ScollBar with a button on top and bottom. In the scene view, they connect fairly nice, but in the GameView, the sprite for the ScrollBar is too short. The effect disappears, when I zoom closer into the GUI or change my Atlas texture's filter mode to Bilinear or Trilinear. However, I need to make a pixelperfect UI using slices sprites with very thin borders. Therefore, I need to change my Atlas to be point filtered instead (which gets overwritten each time I change the Atlas. Would also be awesome to be able to set it in the Atlas Maker).

I have a second problem that may have the same cause. I have a dynamic list of WarpPoints that are displayed using a UIGrid. They are also not on the same position in the SceneView and the GameView which makes the UIDesign a painful process.

2
NGUI 3 Support / [Solution] Using NGUI in linear lighting
« on: July 25, 2014, 10:04:51 AM »
Hi folks!

I once had the problem using NGUI in combination with linear lighting. The result was: It does not really work.
For my new project, I need to use complex effects (Skyshop IBL, etc.) and need to use linear lighting. The problem with linear lighting is that NGUI (and DFGUI or Noesis) get their atlas textures and color tints washed out (due to gamme correction).
With to changes, I could do a small workaround. It's only half-automatic, because I have not yet found a method to detect the colorSpace within shaders.

First, I made a small change to the "Unlit/Transparent Colored" shader. Just change
  1. fixed4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
  2. return col;
into
  1. fixed4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
  2. col.rgb = pow(col.rgb,2.2); // This is the gamma correction
  3. return col;
which removes all "washed out" effects on your sprites from this atlas. However, if you use UILabel with dynamic fonts, you will get the same problem for the text color.

To correct this, change the following lines in UILabel.cs
  1. public override void OnFill (BetterList<Vector3> verts, BetterList<Vector2> uvs, BetterList<Color32> cols)
  2. {
  3.         // NGUI-code
  4.         NGUIText.tint = col;
  5.  

into the following:

  1. public override void OnFill (BetterList<Vector3> verts, BetterList<Vector2> uvs, BetterList<Color32> cols)
  2. {
  3.         // NGUI-code
  4.             if (QualitySettings.activeColorSpace == ColorSpace.Linear)
  5.             {
  6.                 col.r = Mathf.Pow(col.r, 2.2f);
  7.             col.g = Mathf.Pow(col.g, 2.2f);
  8.             col.b = Mathf.Pow(col.b, 2.2f);
  9.             }
  10.         NGUIText.tint = col;
  11.  

This worked for me (so far). I think it is still improvable (especially the half-automatic shader), but at least I can used my beloved NGUI for my project.
Let me know, if it helped anyone.

3
Other Packages / [HUDText] Improve screen clamping
« on: April 28, 2014, 12:20:24 PM »
I want to use the UIFollowTarget script to make some target indicators (in 3D). When the target is visible, everything works fine. Any idea how to extend the script, to make correct offscreen indicators? (correct = not clamping but really targeting in the correct direction)

4
NGUI 3 Support / 3D GUI lagging behind
« on: April 25, 2014, 03:31:09 AM »
Hello.

In my project I have attached a NGUI 3D GUI to a fast moving object (a spaceship). The main camera is also attached to the spaceship. When not moving, the 3D GUI works as expected, but as soon as I start moving (starting at a velocity of ~20) I cannot use any controls, no hover effects are triggered etc. . As soon as I stop, the GUI works fine again. The ship is moved via a rigidbody and I use 50 physics updates per second. How can I get rid of this lag and use my GUI in flight?

Regards
Thomas

5
NGUI 3 Support / Re: NGUIEditorTools for other assets
« on: January 19, 2014, 04:36:31 AM »
 :) thats awesome, thank you.

I will strip the NGUIEditorTools to the necessary methods (DrawHeader, BeginContents and EndContents) - especially to remove dependencies to UIAtlas, etc. - but of course I will keep the name.

6
NGUI 3 Support / NGUIEditorTools for other assets
« on: January 18, 2014, 08:29:46 AM »
Hello Michael,

I really like your new Inspector design for NGUI 3.x . It create a much clearer design than the default inspector.
Would you allow to use your NGUIEditorTools (or to be more precise: NGUIEditorTools.DrawHeader(..)) to be used in other asset packages?

7
NGUI 3 Support / Keep draggable windows visible
« on: September 30, 2013, 02:30:23 PM »
I created an interface where I have several "windows" (panels with widgets) that are draggable (just like in one of the NGUI-Demos). However, the user can drag the window almost out of sight. I'd like to limit the dragging to keep the complete window with it's full extents inside of the screen (and to force move windows that are out of these bounds back into the screen).

Does anyone have a clue or even a solution how to solve this?

8
NGUI 3 Support / [Feature Proposal] TP Import Postprocessor
« on: September 24, 2013, 10:53:10 AM »
I am using Texture Packer for creating my atlasses with smart folders outside of Unity. The "TP Import" - Feature of UIAtlas is awesome, but it always needs manual work done. Wouldn't it be possible to check with a PostProcessor if there's a TextAsset within the same path of the atlas that has the same name as the Atlas-Prefab and AutoImport it?
Would save a lot of time!

9
NGUI 3 Support / Changing texture resolution
« on: May 13, 2013, 12:02:35 PM »
I want to offer players to reduce the texture resolution (QualitySettings.masterTextureLimit) to improve performance on low-end systems. However, if all textures are rendered with half resolution this also applies to NGUI atlasses. That makes all GUIs almost unusable, they are totally blurred and font are not readable anymore.
Is there any method to exclude the NGUI atlasses from being reduced?

10
Other Packages / Tasharen Water with ortographic camera
« on: March 21, 2013, 07:07:24 AM »
I am currently making a 2,5D game with an orthographic camera. Unfortunately, the Unity water looks .. let's say .. "usable". Has anyone tested Tasharen Water with an orthographic camera? Does it look suitable?

11
NGUI 3 Support / [Request] PieMenu
« on: August 22, 2012, 09:47:17 AM »
A great addition to NGUI would be components to create animated pie menus (like in this Video http://www.youtube.com/watch?v=AvvCenLdbT8).

(or if anyone knows, how to do this with NGUI more or less easily, I'd be all ears)

12
NGUI 3 Support / Sprites are not drawn
« on: July 11, 2012, 08:12:35 AM »
I use NGUI to make some notification windows in my game. I use the 3D-GUI and have several panels attached, that are centered and displayed via NGUITools.SetActive . To make it more fancy, I use an animation of the Scaling.
For most notifications, it works. But sometimes, I only get to see my label with text text, but no other sprite (background, etc.). In the Scene View I can see the bounding boxes, but nothing is painted. Where is my mistake?

13
NGUI 3 Support / Re: Assign Atlas by name
« on: June 29, 2012, 03:22:28 AM »
No, I have a UISprite (regurlarly designed and placed in the Unity Editor) that should get a (not randomly chosen but) different texture. However, these textures may be part of several atlasses. So I have not only to change the sprite name (a string that I set via script), but also the atlas. And it seems, I can't set an atlas just by it's name. Hope, this makes it clearer.

14
NGUI 3 Support / Assign Atlas by name
« on: June 28, 2012, 11:51:30 AM »
I have a UISprite and want to assign an atlas by using the name (i.e. a string). Does NGUI has a useful function for this? (I could not find one in the documentation)

15
NGUI 3 Support / UILabel: Blend in char by char
« on: June 28, 2012, 06:36:14 AM »
I want to "animate" a UILabel to make the complete text be (preferably) faded in char by char.
Does anyone has a suggestion how to achieve this?

Pages: [1] 2