Support > NGUI 3 Support

FAQ: Frequently Asked Questions

(1/1)

ArenMook:

--- Quote ---How do I use NGUI with Javascript?
--- End quote ---




--- Quote ---What does this warning mean?
“Parent of “ABC” does not have a uniform absolute scale. Consider re-parenting to a uniformly-scaled game object instead.”
--- End quote ---

Scales of all parents leading up to your widgets must be (1, 1, 1), with the lone exception of UIRoot. If you do choose to scale something, do so uniformly — meaning all 3 scale dimensions (X, Y and Z) must have a matching value. For example: (0.25, 0.25, 0.25). This means you shouldn’t parent one widget to another. Parent them both to another game object instead.


--- Quote ---In my project none of the mouse events seem to affect the UI. Why?
--- End quote ---

Edit -> Project Settings -> Physics
Raycast Hit Triggers [X] -– must be checked.


--- Quote ---How to change the text of a label dynamically?
--- End quote ---
UILabel lbl = GetComponent<UILabel>();lbl.text = "Hello World!";
I will be expanding this post with more questions and answers in the future.

ArenMook:

--- Quote ---Why does my UI look so blurry when I hit Play?
--- End quote ---

Check the quality settings and make sure you're not on the "Fastest" setting. It reduces the texture size, resulting in blurriness.


--- Quote ---Why do all the examples with a scroll view look messed up? Everything inside the scroll view looks like it's made out of colored squares!
--- End quote ---

Turn off GLES 1.1 emulation. GLES 1.1 disables shaders. Clipped panel-based scroll views need shaders in order to work.

ArenMook:

--- Quote ---Why is my stuff not getting clipped by my clipped panel?
--- End quote ---
1. Check to make sure that you have shaders turned on. This means NOT targeting GLES 1.1, and NOT having your quality set to Fastest.
2. Make sure that the atlas used by your widgets is using the Unlit/Transparent Colored shader. If you have Simple Textures (UITextures) in there, make sure that they too use this shader.
3. Make sure the clipped panel uses uniform scale: (1, 1, 1).
4. Your widgets that you want clipped must not have an extra panel in between of them and the clipped panel. Open the Panel Tool, select one of your widgets that should be clipped, and note which panel gets highlighted in the Panel Tool. If it's not your clipped panel, then you have an extra panel in there that you should remove.
5. Make sure that the shaders can be loaded properly. Did you move the NGUI's Resources folder somewhere?

ArenMook:

--- Quote ---Destroying GameObjects immediately is not permitted during physics trigger/contact or animation event callbacks.
--- End quote ---
Don't disable/destroy anything in OnTriggerEnter() / OnCollisionEnter() functions. You can only do it in the main thread. Do this instead:
void OnTriggerEnter() { StartCoroutine(DelayedDisable()); } IEnumerator DelayedDisable() { <whatever you did in the OnTriggerEnter> }

ArenMook:

--- Quote ---I get crashed or weird behaviour on Android!
--- End quote ---
Turn off "Multi-threaded rendering". It's a Unity bug: http://forum.unity3d.com/threads/211913-4-3-Multithreaded-rendering-crashes-when-running-on-device

Navigation

[0] Message Index

Go to full version