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

Pages: [1]
NGUI 3 Support / UIInput
« on: August 08, 2014, 09:47:52 AM »
 is it possible to limit input field with latin letters only ?

NGUI 3 Support / Get Relative size UIWidget
« on: June 25, 2014, 11:48:02 AM »
I'm trying to calculate the size of a Label with NGUIMath.CalculateRelativeWidgetBounds, but this only works if CalculateRelativeWidgetBounds used on next frame.

I'm looking for a way to get the size of a Label in the current frame immediately after I change it.

NGUI 3 Support / Re: UIRect.OnEnable mega Lag
« on: June 19, 2014, 06:15:31 AM »
You create 2000 widgets on the fly and it takes 200 milliseconds to create them, then conclude that NGUI 3 is not suitable for mobile games? Interesting logic there.

If you get lag when showing your shop window, then reduce the amount of content you show on your mobile device. Seems logical, doesn't it? How many thousand widgets do you have there? It's a mobile device. Limited resources. This is why most mobile games separate content into pages or at the very least -- tabs.


I'm attaching screenshots to all my comments to prove I'm not making it up.

As you can see, there are only 68 sprites on my scene.

Here's another screenshot: instantiating 68 sprites takes about 100mc on my core i7 PC 0o!!
On ipad the same amount of work takes more than 3 seconds!

Also just after the sprites are activated, the garbage collector is started and it consumes lots of time

NGUI 3 Support / Re: UIRect.OnEnable mega Lag
« on: June 18, 2014, 03:50:04 PM »
I gave your script a try. 227 ms to instantiate, 192 ms to enable, which makes sense. Whenever you instantiate something, it will still run its OnEnable. For my test I created a sprite, saved it as a prefab, and that's what I was instantiating. If I was instantiating panels, results would likely be quite different.

judging by, this is a problem v3
roughly since version 3 ngui not suitable for mobile games

NGUI 3 Support / UIRect.OnEnable mega Lag
« on: June 11, 2014, 06:16:57 AM »
Does anybody know how to optimize UIRect.OnEnable in NGUI?
when I show the shop window I have a big lag, for example on IPad 3 the window opens for 2 seconds

In Unity profiler i see that method UIRect.OnEnable eat 85% of CPU.

And for now it seems that useing UIRect.OnEnable for disappears it have more CPU then for showing

And for now to hide panels need more CPU work than for instantiate its.

 :-\  :-\ :-\ :-\ :-\

downlod new ngui 3.6.3

run test

using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class testbtn : MonoBehaviour {
    public GameObject pref;

    List<UISprite> gos = new List<UISprite>();

    public  void OnClick() {
        if (gos.Count == 0) {
            for (int i = 0; i < 2000; i++) {
                GameObject go = NGUITools.AddChild(gameObject, pref);
                int ix = Random.Range(-400, 400);
                int iy = Random.Range(-400, 400);
                go.transform.localPosition = new Vector3(go.transform.localPosition.x + ix, go.transform.localPosition.y + iy, go.transform.localPosition.z);

        else {

            foreach (var v in gos) {
                v.enabled = !v.enabled;


TURNS instantiation FASTER THAN JUST EVEN hide objects, it is planned to do something or not?

NGUI 3 Support / Re: bug uiinput 3.5.7
« on: June 11, 2014, 06:00:08 AM »
Looks to me like your font is in a scroll view, and your shaders aren't working. This can be due to targeting GLES 1.1 / ARMv6, choosing Fastest quality setting, or not having the shaders in the Resources folder where they should be. Check the FAQ.

Yeah, it was cause of shaders.
ArenMook thx a lot, your post was useful for me.

NGUI 3 Support / Re: bug uiinput 3.5.7
« on: June 10, 2014, 03:19:02 PM »
I haven't used UIInput yet, but the first screenshot looks like you're missing the font, or the font's material is wrong. That's what happens when the quads for the letters get rendered without the material. I've seen this happen with the Unity Text Mesh component when the material is changed at runtime from the special dynamic 'Font Material'. Hopefully that helps?

Unfortunately i didn't miss the font and the font material is not wrong.

As i wrote before - text crapped out only when i starting to type and it is a small part of the problem, actually it seems like NGUI crashing i mean when input cursor is appear some sprites that didn't active is appear on the screen or text material changing e.t.c.

I think it maybe couse of iutexture or its depth, but i'm not sure

NGUI 3 Support / bug uiinput 3.5.7
« on: June 10, 2014, 01:10:11 PM »

I use one of last version of NGUI  3.5.7 and trying to implement chat.

When i use Input component and trying to type some words i see that text is crapped with a lot of artefacts.

I don't know if this is a bug of NGUI 3.5.7 version or this is a new bug that present in any new version NGUI ?

Maybe somebody had the same problem and found workaround ?
Or i need to update my project to last NGUI version? (it really pain in the ass) :-[

NGUI 3 Support / how to scroll without using uipanel?
« on: May 23, 2014, 08:48:13 AM »

i trying to make shop in my project, all cell will be show on the bottom of the screen

how to make scrolling in NGUI without truncation?

And plz keep in mind - i can't use camera and panel for it . panel slows .

NGUI 3 Support / soft clip panel error
« on: May 23, 2014, 07:30:52 AM »
 in my shop panel is used. i get error -  Unlit/Transparent Cutout shader doesn't have a clipped shader version for 1 clip regions

what is the reason?

NGUI 3 Support / how to get UITable width / height
« on: April 30, 2014, 03:45:50 PM »
a i'm align uitable/uigrig to center ? how to get width / height for it? :o

NGUI 3 Support / UIInput not support Encoding smilies
« on: April 28, 2014, 11:37:01 AM »
Hi I create a chat.
I need support Encoding smilies.  :(
Is there such a possibility in NGUI UIInput? :-\ :-\

   protected void Init ()
      if (mDoInit && label != null)
         mDoInit = false;
         mDefaultText = label.text;
         mDefaultColor = label.color;
         label.supportEncoding = false;

         if (label.alignment == NGUIText.Alignment.Justified)
            label.alignment = NGUIText.Alignment.Left;
            Debug.LogWarning("Input fields using labels with justified alignment are not supported at this time", this);

         mPivot = label.pivot;
         mPosition = label.cachedTransform.localPosition.x;

Pages: [1]