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

Pages: [1]
Hi there.

Accessing the asset store and tnet home page I had the impression for a long time that TNet was abandoned over UNet. After a angry rage against UNet I decide to enter in the foruns and found the post "Where I am taking TNet", that say that opposite. TNet is going to a new holy level.

You are losing sales dude!!

1) You should update your TNet home front asset link. If possible, add a custom message into asset store. That give a very bad impression.

2) This statement "TNet does not support iOS Basic and Android Basic due to Unity’s license" in home is limitation removed at a long time. That enforces the abandoned impression.

3) It should have a clear declaration on site or forum where is the proper way to buy it now. Or if possible, the expected release date for the new TNet license release. I can wait months to evaluating a library, but I have to know if will be still inside my deadlines.


I use UILocalize in every label because it make things very easy to see in editor. For those that I set dynamically I simple disable it. The current implementation could override you dynamic value if executes before your code.

NGUI 3.6.4b

NGUI 3 Support / UIKeyBinding works with UIButton.isEnabled == false
« on: June 12, 2014, 04:20:33 PM »
I don't know if works as intend or a missing feature. But in NGUI 3.6.1 it is possible to "click" in a button/toggle with UIKeyBinding even when its collider is disable with UIButton.isEnabled == false.

I will disabile it manually with the button, but could be nice if he knows that the widget is "disabled" and ignore the key event.

NGUI 3 Support / Dialogs and UIKeyNavigation
« on: May 28, 2014, 08:11:59 AM »
I am having a little problem to find a good solution for UIKeyNavigation with overlay interface, like a dialog or popup.

It works but I am not very confortable with the solution. Any tips?

Show dialog:

  • set selected object to null
  • add/enable dialog gameobject
  • apply and wait for fade in effect
  • disable all UIKeyNavigation and UIKeyBinder that not belongs to dialog gameobject and its children (ExclusiveNavigation)

Hide dialog:

  • apply and wait fade out effect
  • disable/remove dialog gameobject
  • enable all UIKeyNavigation and UIKeyBinder (FreeNavigation)

Code for exclusive and free navigation.

  1. public static void ExclusiveNavigation(GameObject gameObject) {
  2.                 var navs = GameObject.FindObjectsOfType<UIKeyNavigation>();
  3.                 var binds = GameObject.FindObjectsOfType<UIKeyBinding>();
  4.                 var currentNav = gameObject.GetComponentsInChildren<UIKeyNavigation>();
  5.                 foreach (var i in navs) {
  6.                         var index = System.Array.IndexOf(currentNav, i);
  7.                         var enabled = index >= 0;
  8.                         i.enabled = enabled;
  9.                 }
  11.                 var currentBinds = gameObject.GetComponentsInChildren<UIKeyBinding>();
  12.                 foreach (var i in binds) {
  13.                         var index = System.Array.IndexOf(currentBinds, i);
  14.                         i.enabled = index >= 0;
  15.                 }
  16.         }
  18.         public static void FreeNavigation() {
  19.                 var navs = GameObject.FindObjectsOfType<UIKeyNavigation>();
  20.                 var binds = GameObject.FindObjectsOfType<UIKeyBinding>();
  21.                 foreach (var i in navs) i.enabled = true;
  22.                 foreach (var i in binds) i.enabled = true;
  23.         }

Hi Guys.

I think that NGui Widget are serializing a directly reference to the atlas texture that cause Unity3d load in memory the unused HD texture.

I added in UIWidget:

  1. // Awake
  2.                 Debug.Log(gameObject ": " (mMat == null ? "no material":;
  3.                 Debug.Log(gameObject ": " (mTex == null ? "no texture":;
  5. // Start
  6.                 Debug.Log("START: " gameObject ": " (mMat == null ? "no material":;
  7.                 Debug.Log("START: " gameObject ": " (mTex == null ? "no texture":;
And receive these logs in editor:

  1. FadingSprite (UnityEngine.GameObject): no material
  2. FadingSprite (UnityEngine.GameObject): MenuAtlasHd
  4. START: FadingSprite (UnityEngine.GameObject): MenuAtlasSD
  5. START: FadingSprite (UnityEngine.GameObject): MenuAtlasSD
I was debug why some HD textures from atlas/font are being loading in memory. Showed by Resources.FindObjectsOfTypeAll(typeof(Texture). These texture are being loaded even if I delete the AtlasHD.prefab or AtlasHD.mat.

Some considerations:

- this test I execute in Editor
- I using classic solution for multiples atlas resolution in same build: AtlasRef, AtlasHd, AtlasSD.
- AtlasRef have replacement and material cleared before build.
- AtlasRef is pointed from AtlasHD/SD loaded from resource at first scene.
- Every widget is pointing to AtlasRef
- Some time in the past I think that some widgets pointed directly to HD version (could be cached that time?)
- many of theses widgets are stored in prefabs

NGUI master, could you give a look if it really could happens? Or can give me a direction for what I probably is doing wrong?

--  Added

In editor if I select the atlas texture and use contextual menu "Find References in Scene", the unity select the widgets where Awake show HD texture.

NGUI 3 Support / Steps to switch HD/SD at runtime. Approved?
« on: August 22, 2013, 02:47:41 PM »
After reading around what I need to do to switch the HD/SD at runtime, I finished with this steps:

1.  Instead create the reference atlas as prefab like video tutorial, you need to create the reference atlas in each scene, this will allow you to do changes in runtime.
2.  The script that load the atlas from resources must execute before any ngui stuff. Use awake and script execution order.
3. Before a build, you update each scene the reference atlas to point to null, so the default is loaded in memory.
4. For prefabs with sprites (like popups). You must point to null atlas and resolve when instantiated.

Any advice or better solution? A simple "ok, you are not crazy" is a good answer to me :P

Hi there,

It is an expected behavior that UITweener didn't respect the "delay" parameter when you call a Play(true) more that one time?

I am using Reset() followed by Play(true) to play again some effects.



I am trying to change atlas texture max size but it is broken the labels. These was my steps:

1 - I have everything working nice, sprites, labels, fonts and atlas.
2 - I selected atla texture and changed its max size to 512px
3 -  Every sprites has broken
4 - I reverted the atlas texture max size
5 - Changed atlas to use Text Coords
6 - Resize atlas texture again to 512
7 - Everything works fine, but, when I play and change some scenes every label get broken, but sprites didn't.

If I select the Font prefab, in the preview its show the full atlas, even with Prevew->Font selected.

I haved tryied to change Font sprite to something and get back without success.

If I reimport the font, the importer changes automatically the atlas to pixel coords and max size, but when I did steps 5-7 again, the labels got broken.

If a make changes 5-7 and restart the unity3d it always start with labels broken, I didn't need to play to mess things up.

I am doing something wrong?

Bug in persist stuff?


Sometimes I need to change some Widget by a 3D model. Most of cases is ok, but some like DraggablePanels restrictions didn't work because it didn't know about 3D bounds.

I was thinking about a UI3dModel computes the bounds my model renderer or by a UIFixedSize where you define your bounds manually.

I understand that some features like shader clipping will not work, but NGUI there is a lot of functionallity and behavior that will be easy to use without duplicate my code.

I am in the correct way?

NGUI 3 Support / Easy way to have access to all touches
« on: April 16, 2013, 10:30:15 AM »

There is some algorithms that is better to have access to all touches instead receive separate events.

Because I didn't found any easy way, I hacked UICamera with the following function:

EDITED > The code below didn't work in some situations in android. It is better to create  your own centralized input.

  1. static public MouseOrTouch[] GetTouches() {
  2.                 var list = new List<MouseOrTouch>();
  3.                 for (int i = 0; i < mMouse.Length; ++i)
  4.                         if (mMouse[i].pressed != null)
  5.                                 list.Add(mMouse[i]);
  7.                 for (int i = 0; i < mTouches.Count; ++i)
  8.                         if (mTouches[i].pressed != null)
  9.                                 list.Add(mTouches[i]);
  11.                 return list.ToArray();
  12.         }


1) There is another way to access this information without change NGUI code?

2) This information could not be provided by I reason, so, I could have problem in use it in "Update"/"LateUpdate" methods?

3) We could have something like it in next release?


NGUI 3 Support / Pattern to create tabs with ngui?
« on: April 10, 2013, 04:40:44 PM »
Hi there,

I am having alot of problems to create a UI with 2 tabs with enabled/disabled content.

Today I am using NGUI.SetActive to enable/disable tabs and content. Like:

  1. # Tabs.js
  2. function SetActiveTab(current: int) {
  3.         for (var i = 0 ; i < tabs.length ; i++)
  4.                 NGUITools.SetActive(tabs[i], i == current);
  5. }
  7. # Tab0.js
  8. functoin Start() {
  9.     NGUITools.SetActive(button, false);
  10. }

When I activate a tab, its activate the disabled button too. OnEnable don't work because parent are enabled before its children.

I can only see some not to good solutions:

1) I must change the hidden content to disable Components instead GameObjects. Like:

  1. # Tab0.js
  2. function Start() {
  3.     for (var c: UIWidgetd in button.GetComponentsInChildren(UIWidgetd)) c.enabled = false;
  4. }

It works, but don't scale, in situations where you create tabs of tabs (or popups with tabs) we will have this problema again.

2) Instead disable, move it offscrean. Smells bad and I will have some problem enabling/disabling Anchors.

3) Broadcast some message after Active to allow any object to disabled again.

  1. NGUITools.SetActive(tab, true);
  2. parent.BroadcastMessage("EnabledAgainHa");
Can someone see a better solution for the problem?

Pages: [1]