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

Pages: 1 [2] 3
NGUI 3 Support / Atlas Maker exceeding limits
« on: February 19, 2015, 04:29:32 AM »
I think there's a problem with the Atlas maker. I have 3 pngs that fit in 2048 x 2048 (including paddings), but the Atlas Maker creates an Atlas of 2048 x 4096, full all the first square (2048x2048) fully transparent.
Is there any way to fix it? I could send you the pngs if you need to be sure I'm not doing something wrong.


NGUI 3 Support / Panel depth vs widget depth vs camera depth
« on: February 17, 2015, 05:56:51 AM »
Which depth is more important: Panel depth, widget depth or camera depth?
Example: 2 sprites. Sprite 1 with panel depth 0 and widget depth 10 and sprite 2 with panel depth 1 and widget depth 0. Which one is shown if both are on the same position?

Thank you.

NGUI 3 Support / Mask with NGUI
« on: February 16, 2015, 06:34:54 AM »
Is there any way to make a mask with NGUI?
By "mask" I mean the mask Flash has, ie, an object which defines which part of another object is shown.

I already know that NGUI does have some kind of mask if you use a UISprite of type Filled. Then adjusting Fill Amount I can show more or less. But I wonder if I can make it better like I did it on Flash.
Example: cutting an image with a starred shape or so.

Thank you.

NGUI 3 Support / 2 UI Roots, 2 Panels and blur
« on: December 29, 2014, 12:40:20 PM »
I want to add blur to certain elements (and not to others) and my idea is to have 2 panels (so 2 UI Roots) on 2 different layers with 2 Cameras (so 2 UI Cameras) watching one layer and then being able to apply Blur effect.
May I have 2 UI Roots? Is it this the correct way?
Thank you.

NGUI 3 Support / Localization: commas and several files
« on: December 29, 2014, 10:05:06 AM »
2 doubts:
  • When you generate the csv file that NGUI use for handling translations, I see the different fields are separated by commas. May I then include commas in my texts? If so, how?
  • May I use several Localization.csv files? I've tried but NGUI only reads one of them.
Thank you.

NGUI 3 Support / UIRoot design width
« on: December 05, 2014, 07:02:04 AM »
After reading several topics in this forum about this, I am figuring out it's not too easy to get the DESIGN width of UI Root.
I mean:
Normally on any widget you just make:
  1. gameObject.GetComponent<UIWidget>().width
and you get the width. But it seems to me this doesn't work for UIRoot. If you make
  1. GameObject("UI Root").GetComponent<UIPanel>().width
you don't get the design width but the screen width (at least width the lastest NGUI version).
I have to multiply this value by
  1. GameObject.Find("UI Root").GetComponent<UIRoot>().manualHeight / Screen.height
So my doubt is:
Is this way to do it? Isn't there any value on UIRoot or UIPanel for the design width?

NGUI 3 Support / Unity 5
« on: November 26, 2014, 09:43:58 AM »
Is NGUI currently fully compatible with Unity 5 (Beta)?
I am working of Unity 5 and am receiving some alert about deprecated/obsolete code like
  1. Assets/NGUI/Scripts/UI/UILabel.cs(912,52): warning CS0618: `UnityEngine.Font.textureRebuildCallback' is obsolete: `Font.textureRebuildCallback has been deprecated. Use Font.textureChanged instead.'

By the way, yes, I have just download the newest NGUI version from the Assets Store.

Thank you

NGUI 3 Support / NGUI with Unity
« on: November 21, 2014, 01:03:25 PM »
I'll make my question with 1 example:
We're making a pool (billiards) game with NGUI. We'd like to use Unity real-3D balls, which are not allowed with pure NGUI.
How should we mix both NGUI with Unity in terms of depths?
Example: 3 layers: top-board layer, ball layer and bottom-board-layer.
Ball layer must be between top and bottom layer.
As far as I know, NGUI order layers by widget's depth, but Unity by ordering layers and z-index.
We are considering using 3 cameras since each camera may have different independent ordering depths.

NGUI 3 Support / Hiding sprites without active = false
« on: November 19, 2014, 07:11:17 AM »
  1. gameObject.SetActive (false);
  2. NGUITools.SetActive(gameObject, false);
hides an object but also disables certain methods.
If I just want to hide it, what should I do?
In pure Unity
  1. gameObject.renderer.enabled = false works
With NGUI UISprite, what should I do? Maybe
  1. gameObject.GetComponent<UISprite>().enabled = false

NGUI 3 Support / NGUI resorting depths
« on: November 14, 2014, 10:37:44 AM »
Does NGUI re-sort depths in some cases (like gaps between depths or negative depths?
Actually, it's not a question, I am seeing that indeed NGUI re-sort depths in some cases, so the question is

Thank you.

NGUI 3 Support / Script Execution Order
« on: November 10, 2014, 10:31:46 AM »
In the Script Execution Order settings panel I see you have set some order for your classes.
Is there any rule we have to follow to avoid problems?, ie, may I add my own order for my MonoBehaviour in any way or should I follow some rules like "don't put anything within certain values"?
I attack an image about what I mean. I have thought to add me classes between -20 and +9 to avoid bothering your scripts. Does it have sense?

NGUI 3 Support / Atlas sprites for cursor pointer
« on: November 10, 2014, 05:42:33 AM »
Usually, for having a custom cursor pointer in Web Player, Unity offers you the class Cursor as follows:
private Texture2D cursorTexture;
cursorTexture = MyResources.Load<Texture2D>("handCursor");
Cursor.SetCursor(cursorTexture, cursorPosition, CursorMode.Auto);
I need to have a texture in a Resources folder.
I'd like to create that Texture2D from a NGUI Atlas. Is it possible? May I create a Texture2D from an Atlas?

I know NGUI has something to handle cursor, but as far as I know, it's not really a cursos but a sprite following the pointer, which it's not exactly what I need (unless I'm wrong).

Thank you.

Just that.
Is is possible?
I'm seeing that, when I save a prefab, those anchors with respect to UI Root don't appears on other instances of this prefab.

NGUI 3 Support / Camera hidding my scene
« on: September 23, 2014, 02:28:31 AM »
When building my scene with NGUI, there's a weird issue for me.
The Camera is hidding part of my scene. I have to zoom in a lot to select objects behind the camera.
I am talking about a big image of a white camera.
Is it possible to hide it or something?

Thank you

NGUI 3 Support / 2D UI vs 3D UI UICamera
« on: September 18, 2014, 05:11:26 AM »
I usually work with UICamera with Event Type = 2D UI, since my game and interface are fully 2D.
However your default prefabs (like checkbox...) are not working to me with 2D UI. However, when switching to 3D UI, it start working.
Why? Which is the reason?


How should I set up the UI Camera?

Thank you.

Pages: 1 [2] 3