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

Pages: [1]
1
NGUI 3 Support / NullReferenceException - UIPanel cachedTransform
« on: May 26, 2017, 11:43:20 AM »
Hi,

We are getting a NullReferenceException when the UIPanel attempts to get the cached transform. This only happens under certain conditions. This is the Exception:

  1. NullReferenceException
  2.   at UnityEngine.Component.get_transform () [0x00000] in <filename unknown>:0
  3.   at UIPanel.LateUpdate () [0x00000] in <filename unknown>:0

The only way I can get the issue to happen is if I show UIPanel A in Scene 1, destroy UIPanel A and then load Scene 2 (via additive), it will trigger the exception on another UIPanel in Scene 2 (always the same UIPanel, perhaps because it's first child of UIRoot). I have confirmed that UIPanel A is destroyed before Scene 2 is loaded, and that there are no objects referencing it (or it's  children). I see nothing wrong with UIPanel A, I can display it within Scene 2 and destroy it without any issue, likewise in Scene 1 (before loading Scene 2). There is no relation between the UIPanels involved in this scene either.

Once Scene 2 is loaded, Scene 1 is unloaded and both scenes have their own UIRoot, so that means for a short while, both scenes are active, and thus there are 2 active UIRoots. Is there a potential issue with having 2 UIRoots present (all be it in different scenes) at the same time? This problem is a bit of a headache, because the exception is thrown every update after it occurs and essentially breaks everything NGUI related.

We are using NGUI 3.11.1 (we can't upgrade due to the sorting changes which breaks stuff for us) and Unity 5.5.1.p1.

Thanks

2
NGUI 3 Support / New TexturePacker feature
« on: December 02, 2015, 05:57:54 AM »
Hey,

TexturePacker have released a new polygon packing mode which is fantastic for creating tightly packed sprite sheets and actually optimizes the sprite meshes resulting in better performance. You can read their post on the Unity forums about it. This works for SpriteRenderers, but obviously not for UI2DSprite. I think it'd be great if NGUI could support this, it would probably require having a sprite rendered similarly to how SpriteRenderers are.

I understand this isn't a trivial task, nor am I suggesting you do it now, but just thought I'd bring your attention to it and maybe it could be something to consider for NGUI 4 or NGUI 5 :D

3
NGUI 3 Support / UILabel text not resetting
« on: November 17, 2014, 09:29:21 AM »
Hi,

As part of our custom localisation system, we specify a string id which is then converted to it's localised form. So for our UI, we enter the string id as the text for UILabel and then localise this when the scene is loaded. The problem we are encountering is, that once we exit play mode in the editor, the current value for the label remains, in this case the localised string. It does not reset back to it's original value set in the editor before entering play mode.

This seems like a bug to me but maybe it is by design. Is there any way to prevent this from happening?

Pages: [1]