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

Pages: [1]
1
Yep, clamped, if it was set to repeat it would tile over the screen with this setup. We think it was a shader problem. Anyhoo, fixed now.

2
We managed to fix it Friday. Coder has this in the changelist if anyone else has a similar problem:

Fixed focus hole alpha sampling problem in shader for switch.
I am not entirely sure whether it is SwitchSDK for Unity problem or NGUI but the problem seems to be on
the alpha value that gets sampled using clipUV on _ClipTex. The solution I have proposed is to manually limit
sampling range for alpha value between 0 and 1 on both u and v texture coordinates. This is because original alpha
sampling returns correct value on the centre but incorrect from the edge pixel.

3
Hi,

We're doing a switch version of Vostok Inc. (http://www.eurogamer.net/articles/2017-07-25-vostok-inc-review) and we have a strange bug that only occurs on the Switch version.

As part of our tutorial flow we have a UI Panel with a circular texture mask that 'cuts out' a hole in a semi transparent black UI sprite and tweens to show the player specific points of interest. On all other platforms and in the editor it appears correct, however on Switch hardware there appears to be an issue with it. I've pasted some images of how it should look and how it looks.

Any ideas on what might be wrong and how we can fix it?


4
NGUI 3 Support / Re: NGUI for iOS, Texture Atlas compression
« on: March 20, 2017, 12:47:37 PM »
Hi,

We're struggling to keep the Vita version of the game in memory so we need to downrez quite a few NGUI atlases. We can't rebuild the atlases as we're multi-platform and we can't use lookup atlases as it would break way too much in the game. Wondering if there's a way to use unity's texture size overrides so that NGUI doesn't break?

5
I don't think the problem is framerate dependent on further investigation. We run a script on some NGUI tweens that resets them OnEnable. For the most part these work, however they occasionally go wrong. I've noticed the transforms and rotations are correct for the objects themselves, however the UISprite isn't always updating correctly (to the correct position/scale). Below is the script we use that calls the reset function. Just wondering if this looks right to you, or if we're missing something?


  1. using UnityEngine;
  2. using System.Collections;
  3. /// <summary>
  4. /// Reset tween children on enable.
  5. /// </summary>
  6. public class ResetChildrenTweensOnEnable : MonoBehaviour {
  7.         [SerializeField]
  8.         bool m_ResetChildren = true;
  9.  
  10.         [SerializeField]
  11.         public bool m_AutoPlayOnEnable = true;
  12.         //tweens
  13.         private UITweener[] m_tweens;
  14.  
  15.         /// <summary>
  16.         /// Gets all the tweeners.
  17.         /// </summary>
  18.         void Start () {
  19.                 if (m_tweens == null)
  20.                 {
  21.                         if(m_ResetChildren)
  22.                                 m_tweens = GetComponentsInChildren<UITweener>();
  23.                         else
  24.                                 m_tweens = GetComponents<UITweener>();
  25.                 }
  26.         }
  27.        
  28.         /// <summary>
  29.         /// Reset all the tweens.  Made this function public so other script could call this function manually to reset all the tweeners.
  30.         /// </summary>
  31.         public void OnEnable () {
  32.                 if (m_tweens == null)
  33.                 {
  34.                         Start();
  35.                 }
  36.                 for (int i = 0; i < m_tweens.Length; i++)
  37.                 {
  38.                         if(m_AutoPlayOnEnable)
  39.                         {
  40.                                 m_tweens [i].ResetToBeginning();
  41.                                 m_tweens [i].enabled = true;
  42.                                 m_tweens [i].PlayForward();
  43.                         }
  44.                 }
  45.         }
  46.  
  47.         /// <summary>
  48.         /// Resets the tween.
  49.         /// </summary>
  50.         public void ResetTween()
  51.         {
  52.                 if (m_tweens == null)
  53.                 {
  54.                         Start();
  55.                 }
  56.  
  57.                 for (int i = 0; i < m_tweens.Length; i++)
  58.                 {
  59.                         m_tweens [i].ResetToBeginning();
  60.                         m_tweens [i].enabled = true;
  61.                         m_tweens [i].PlayForward();
  62.                 }
  63.         }
  64. }
  65.  

6
Will do. Just getting ready for Gamescom, but will do one when I get back.

7
Hi,

We're having problems with some tweens not playing correctly or ending in odd places at low framerates. None of our tweens scale to or from 0, and some of the problems happen on tween position as well as tween scale, where a sprite/game object won't end in it's intended resting position. It's a similar bug to the one seen in Fallout Shelter where sliding UI elements sometimes finish before being in the correct "To" position so appear over the top of one another.

Most are set to ignore TimeScale (though we've seen the same issue happen with or without TimeScale being ignored). Any help or pointers to the cause would be great.

8
NGUI 3 Support / Re: Overflow auto switching back to Shrink Content
« on: June 08, 2016, 07:33:47 AM »
NVM, was having a moment of confusion late yesterday... looked at it today and it made perfect sense. Just needed an advanced anchor set to the bottom of the target.

9
NGUI 3 Support / Overflow auto switching back to Shrink Content
« on: June 07, 2016, 12:26:47 PM »
Hi,

I'm probably doing something wrong in the anchors, but I can't seem to get something working. I have 2 text boxes. The top one (title) has its overflow set to resize height. The bottom one has a unified anchor with the target set to the top one (title) and execute set on update. I'm trying to set it to also use resize height. In the editor it's behaving itself, but as soon as I save or hit play it reverts back to using Shrink Content. Any ideas. It's been a while since I used anchors so it might be me getting muddled up.

Cheers

10
NGUI 3 Support / Re: Fonts always rendering black
« on: June 07, 2016, 10:53:54 AM »
Seems... It's either a bug in NGUI 3.9.8. or a botched shader import when I started the project. Either way, I deleted the NGUI folder and imported an older version and it's now working perfectly.

11
NGUI 3 Support / Fonts always rendering black
« on: June 07, 2016, 10:45:12 AM »
Hey,

I've just started a new project an run into a bug where Dynamic fonts always appear black. Now I know there are various problems with Unity and dynamic fonts but we're doing nothing outside the ordinary and we've completed several projects using exactly the same system and had zero problems. Right now The scene is empty but for a camera, an NGUI texture and a dynamic font UI Label. Unfortunately we can't create font sheets and use NGUI font system for this project or I would, but either way I'm wondering if anyone has seen this before or knows a workaround. NGUI version is 3.9.8 and actually that's the only thing that's been updated between a project where the same system worked flawlessly and now.

Cheers
Dre

12
NGUI 3 Support / Re: NGUI for iOS, Texture Atlas compression
« on: January 11, 2016, 12:30:30 PM »
"You'd have to resize the textures manually before adding them to an atlas. Atlas accepts final textures in the size that they're meant to be in."

Just wondering if there's a Q&D workaround for this at all?

We have a large atlas for one particularly art heavy menu. The game is being developed for console and handheld and at full rez the handheld has a tendency to run out of VRAM on this particular menu (the main UI atlas is in memory permanently, but this one is loaded and binned as needed).

Because we're work in progress I'm loathed to keep 2 completely separate sets of textures and atlases in the project (given they are likely to get tweaks). I assume the reason scaling the atlas in unity breaks the UI is because coordinates are set by pixel. Just wondering what the implications would be of offering an option to convert the coords to a UV scale 0 to 1? If you know what I mean

Bump :)

13
NGUI 3 Support / Re: NGUI for iOS, Texture Atlas compression
« on: August 11, 2015, 05:13:57 AM »
You'd have to resize the textures manually before adding them to an atlas. Atlas accepts final textures in the size that they're meant to be in.

Just wondering if there's a Q&D workaround for this at all?

We have a large atlas for one particularly art heavy menu. The game is being developed for console and handheld and at full rez the handheld has a tendency to run out of VRAM on this particular menu (the main UI atlas is in memory permanently, but this one is loaded and binned as needed).

Because we're work in progress I'm loathed to keep 2 completely separate sets of textures and atlases in the project (given they are likely to get tweaks). I assume the reason scaling the atlas in unity breaks the UI is because coordinates are set by pixel. Just wondering what the implications would be of offering an option to convert the coords to a UV scale 0 to 1? If you know what I mean

14
NGUI 3 Documentation / Re: UILabel
« on: July 30, 2015, 07:57:42 AM »
What are the chances of getting functionality for changing font within a label? (if it's within the same atlas). I'm assuming they're low :)

Pages: [1]