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

Pages: [1]
Hi, I have updated NGUI from 3.6.0 to 3.9.4 in a project I am working and today I ended up with a NullReferenceException in Android platform, where the UI2DSprite was not being rendered in the device, but in Unity Editor the NullReferenceException does not happen.

So, I have reverted the modifications inner "UIDrawCall.Create(string name)" method and the problem was fixed.

Fix in UIDrawCall.cs (v3.9.4), line 714:
  1.                 if (mInactiveList.size > 0)
  2.                 {
  3.                         UIDrawCall dc = mInactiveList.Pop();
  4.                         if (dc!=null && dc.gameObject != null) // -> this line is present in version 3.6.0
  5.                         {
  6.                                 mActiveList.Add(dc);
  8.                                 if (name != null) = name;
  9.                                 NGUITools.SetActive(dc.gameObject, true);
  10.                                 return dc;
  11.                         }
  12.                 }

This is what I got from adb logcat:
  1. I/Unity   ( 5425): NullReferenceException
  2. I/Unity   ( 5425):   at UIDrawCall.Create (System.String name) [0x00033] in C:\Users\...\Assets\Third Parties\NGUI\Scripts\Internal\UIDrawCall.cs:778
  3. I/Unity   ( 5425):   at UIDrawCall.Create (System.String name, .UIPanel pan, UnityEngine.Material mat, UnityEngine.Texture tex, UnityEngine.Shader shader) [0x00000] in C:\Users\...\Assets\Third Parties\NGUI\Scripts\Internal\UIDrawCall.cs:753
  4. I/Unity   ( 5425):   at UIDrawCall.Create (.UIPanel panel, UnityEngine.Material mat, UnityEngine.Texture tex, UnityEngine.Shader shader) [0x00000] in C:\Users\...\Assets\Third Parties\NGUI\Scripts\Internal\UIDrawCall.cs:743
  5. I/Unity   ( 5425):   at UIPanel.FillAllDrawCalls () [0x0014e] in C:\Users\...\Assets\NGUI\Scripts\UI\UIPanel.cs:1248

NGUI 3 Support / Change UILabel Material in Real-time
« on: September 06, 2014, 12:22:22 AM »
Hello ArenMook,

I'm trying to change the Material of my UILabel in real-time. The Material is changed but the effect does not happen.

The effect happens when I set the Material Manually via Inspector, so I can't understand my mistake :(

I'm setting it like this:
  1. this.GetComponent<UILabel>().material = newMaterial;

NGUI 3 Support / [UILabel] Snap and Make Pixel Perfect.
« on: February 07, 2014, 12:12:32 PM »
Hi ArenMook,

I've noticed that in the 3.4.8 version, the Snap and Make Pixel Perfect are Resizing the Widget.Dimensions to match with Font Size. This is happening even when Overflow is ShrinkContent, but this was not happening in 3.3.3 (previously 3.0.8 f4) version.

Is this intentional?

And also, the Sprite using "Sprite Type: Simple", happens the same thing. This already happens with Sprite since I started to use NGUI.

I don't know about other developers, but I think it would be a good thing not resize Dimensions of Sprite/UILabel when using Snap or Make Pixel Perfect.  :P

Pages: [1]