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 / NGUI and Unity 5
« on: September 12, 2014, 04:34:18 AM »
Unity 5 is coming. My games are 2D and fully developed in NGUI.
Will NGUI keep working with Unity 5 (or it's not possible to know yet?)?
Will I have to change my code to adapt my games with NGUI to Unity 5?

NGUI 3 Support / On adding events
« on: September 11, 2014, 04:58:47 AM »
I need to be sure about one point.
  1. UIEventListener.Get(gameObject).onHover = OnHoverNGUI;
  1. UIEventListener.Get(gameObject).onHover += OnHoverNGUI;
(which is just the "+" symbol), please, tell me if I am right:
The second ADD a new method/function to be execute on a click and the first set the ONLY method/function, so it there were a previous one, the previous will be never execute.

Is it correct?

NGUI 3 Support / UI Camera events vs UI Event Trigger
« on: September 11, 2014, 04:22:28 AM »
I have been using UI Event Trigger to handle events on my sprites, but I am starting to guess I'm doing it wrong.
Why should I use UI Event Trigger (or even UI Button) if UI Camera is sending events and can get them on my scritps?

NGUI 3 Support / Animations modifying images (spriteName)
« on: September 08, 2014, 05:50:23 AM »
I want to make an animation and modify the png with NGUI within the animation.
With pure Unity, I could add a SpriteRenderer script and then modify the sprites in the animation.
How should I procced with NGUI (and Unity 4.5)? In the Animation Window, I don't see any field to modify the spriteName. I'm using UI2Dsprites with Atlases and I want to make the typical animation based on an Atlas with 10 pngs moving my character.

Thank you.

NGUI 3 Support / Scroll View doubts
« on: July 14, 2014, 05:13:32 AM »
After having read carefully the video tutorials of this component, I can make several things, but still have 2 doubts. I'll try to be as detailed as possible.
  • I have a scroll view and inside some buttons. If I use unified anchors with the buttons, the scroll view stops to drag, since positions of the buttons seem to be fixed. In this case I used anchors related to UIRoot. However, if I don't use unified anchors, when I move from 16:9 to 4:3 the buttons are no longer aligned to the left as I wish.
    How should I proceed?
  • If I add the UICenterOnChild script to my scroll view, the buttons are auto-centered. What I need is to autoalign to the left (with a little separation to the left) like in many games.How should I proceed?
Thank you.

NGUI 3 Support / HD and SD atlas - Pizel size
« on: July 12, 2014, 11:47:57 AM »
I am making games for 2 resolutiones: HD por iPad Retina and any device with more than 1024 px of width and SD for devices below 1024 px of width.
I am using Reference Atlas and my doubt is:
Which is the difference between those 2 options?
  • HD atlas with pixel size = 0.5 and SD atlas with pixel size = 1
  • HD atlas with pixel size = 1 and SD atlas with pixel size = 2
I just want to sure if I understand.
In first case I put UIRoot with FixedSize and height = 1536.
In the second case I put UIRoot with FixedSize and height = 728.
All that is exactly the same or are there differences?

Thank you.

NGUI 3 Support / Snap button is not giving exact pixels
« on: July 11, 2014, 11:37:03 AM »
When I use this button it sometimes gives me not the exact pixels of the sprite
If my sprites (png) is 110x107 it gives me 110x108.

If, moreover, I have used a unified anchor then sometimes I can't even fix it, ie, it's like the anchor forces you the pixels somehow.

How should I proceed?

NGUI 3 Support / Problems with texture packer
« on: July 03, 2014, 12:27:39 PM »
I employ the last versions of NGUI, Unity and TexturePacker. I have an TexturePacker atlas that I want to import/convert into a NGUI atlas. I follow the steps, drag the .txt JSON file and more or less it works, but some sprites are "moved", ie, they are not taken as expected.

Any solution?

Thank you.

NGUI 3 Support / Is UI Root necessary? or How to start an interface?
« on: July 02, 2014, 02:54:07 AM »
Every time (or it seems to me) I add a new NGUI element to my scene, either by NGUI tab in the menu or by draggin a prefab a sprite is create which is named "UI Root" and contains a UI Root script.
I have many troubles with the autoscaling of that component.
In it's said "If you don't need the auto-scaling functionality of the UIRoot, you can get rid of this component altogether." so I'd like to remove that element.
But I can't completely remove the UI Root. And then I don't know how to proceed. My concern is:

1.- With a so weird autoscaling (let's say scaleX = 0.003333333) it's not easy to position my UI Camera, so: May I set the UI Root scale to (1, 1, 1)? Should I or may I remove the UIRoot script from the UI Root sprite to have remove that autoscale?
2.- Which is the structure of a NGUI user interface?, ie, how should I proceed? Do I need to have a main UI Root to place of my NGUI elements? I am quite a bit lost about how to start.

I have watched several of your video tutorials and it's clear how to make advanced things, but the initial basic setup is my main doubt.

Thank you.

Pages: 1 2 [3]