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

Pages: [1]
1
NGUI 3 Support / Re: Something Wrong?
« on: August 06, 2014, 03:48:36 PM »
You have 2 cameras in your Hierarchy.

I'm betting that the main camera is not culling the layer that is assigned to the texture. I'm also betting that the UI Root camera's culling mask is also set to that layer. So you have 1 draw from the UI Root camera, 1 draw from main camera + 1 draw for the main camera's background. Total those up and you have 3 draw calls

2
NGUI 3 Support / Re: Using UISPrites outside UIRoot
« on: August 06, 2014, 03:38:17 PM »
Hi Caldofran,
That's not a workaround, that's the way you do it  ;D

You can put any UIWidget under a UIPanel that's anywhere in your hierarchy. (If you look at UIRoot, you'll see that it has a UIPanel component also.)

For my latest project (that's sitting at Apple waiting review), I have one UIPanel that holds the NGUI health indicator sprites for the 3d models. (the 3d models update their respective health sprite's transform so the sprite travels with them. The health sprites are rendered by the main camera (perspective) and not the HUD camera



3
NGUI 3 Support / Tween Rotation & start delay
« on: August 06, 2014, 02:51:39 PM »
Hello folks,
I have a set of 5 sprites where each sprite will rotate independently. I want each sprite to start rotating at a different time so that they aren't rotation in sync. I set each sprite's TweenRotate start delay to a different number however they all start at the same time. Here is a screencast: http://screencast.com/t/DEJgmSCACVO

I'm not sure how to get the delay to do what I want. Looking at the UITweener.cs code, it seems they all have the same mFactor value.


Also while grabbing the screenshot, I got the following to happen. 4 of the sprites started rotating at the same time, and one delayed.
http://screencast.com/t/MubV6pUsie


4
NGUI 3 Support / Re: UI Panel Management
« on: June 08, 2013, 03:07:55 PM »
Never mind, apparently I had updated but not imported the latest version

I can't seem to use this UIWindow class.

  • UIPanel doesn't have a definition for SetAlphaRecursive
  • UIPanel doesn't have a definition for alpha

Also it seems like its using the Generic List class but getting missing method errors; it looks like BetterList class is used, correct?

is there an extension class for UIPanel?

5
NGUI 3 Support / Re: Multiple atlases and atlas pixel size
« on: January 29, 2013, 06:29:16 PM »
Update your version of NGUI. "automatic" flag no longer exists.

There are a few atlas switching solutions that have been posted on this forum.

http://www.tasharen.com/forum/index.php?topic=832 for example.

Well upgrading fixed it up. How embarrassing.

And yep, I'm using that loading script - it works well.

Thanks for your time

6
NGUI 3 Support / Multiple atlases and atlas pixel size
« on: January 29, 2013, 07:45:17 AM »
Hey all,
I'm really confused :)

I've read all (I think) of the posts here about using multiple atlases. I'm supporting the iPad2 and iPad retina for this next project.  I have 2 atlases.  The pixel size of the non-retina atlas is set to 1.  The pixel size of the retina atlas is set to .5.

I have UIRoot automatic checked off and Manual Height set to 768.  I have a script that loads the correct atlas based on screen size (I put in a debug statement to verify).

When I run the game on the iPad, things look fine.  When I run the game on the iPad retina everything is 1/2 the size I expected. I've even changed the retina atlas pixel size to 2, but the size of the UI elements don't change - they are still 1/2 the size.

What am I doing wrong?

Thanks

7
NGUI 3 Support / Re: UISlider and FGWidget set to enabled
« on: July 03, 2012, 02:57:08 PM »
Doh, UISlider isn't a UIWidget.

I'm fixed now, thanks.

8
NGUI 3 Support / UISlider and FGWidget set to enabled
« on: July 03, 2012, 02:10:28 PM »
I'm having an issue with using UISliders as health bars. Each unit gets a UISlider attached when spawned.  However if the spawn point is out of the visible camera, then the foreground widget pops up in the middle of the screen. 

My code is an extension of http://www.tasharen.com/?topic=creating-a-ui-sprite-on-the-fly.

The cause is that the UISlider Start calls Set which in turn enables the FGWidget. 

Anyone know how to hook in and reset the enabled flag after the UISlider Start call?

9
NGUI 3 Support / Re: No labels on buttons with iPad
« on: May 01, 2012, 11:23:23 AM »
It was the scale of 0 that was causing the problem.  When I changed from (1,0,1) to (1, .0001, 1) the menu worked perfectly.

Thanks!


10
NGUI 3 Support / Re: No labels on buttons with iPad
« on: May 01, 2012, 10:52:35 AM »
It seems its how I'm using TweenScale.

The buttons make up a context sensitive menu.  When you tap the screen, the menu displays items applicable to the game object you tapped.

I use TweenScale to have the menu expand out.  I have the Tween scale from (1,1,1) to (1,0,1) since at startup the tween gets called automatically.  (I don't know how to have the tween not fire on startup). 

If I remove the TweenScale, everything displays fine other than the menu being fully displayed on a tap.

If I add the Tween scale back but change the from/to to (1,0,1) and (1,1,1), then everything displays fine other than, again, the menu being fully displayed on a tap.

Is there any way to not have a Tween fire off on start?

11
NGUI 3 Support / Re: No labels on buttons with iPad
« on: May 01, 2012, 10:09:06 AM »
For convenience, I'm using the Fantasy atlas and Fantasy font included for the examples (at least until final art has progressed).

I created a new project and created a new UI.  Added a button with the Fantasy atlas and font.  The button shows correctly on ipad.

Soooo, I'll start pulling out UI items until I find the culprit.

@Nicki: I did try changing both the depth and z position (separately) after reading the FAQ but before posting :P

12
NGUI 3 Support / No labels on buttons with iPad
« on: May 01, 2012, 09:41:31 AM »
Well I'm befuddled.  If I add a panel, then add buttons to that panel and run in the editor I see the buttons with their labels.

If I run it on the iPad, I just see the background (UISliced sprite); no labels.

The background has a depth of 0; the label has a depth of 1.

Changing the z settings does not have any effect.

I have another label (not a button, just a UILabel) on a different panel (that shows the frame rate) and it displays fine so I think that would rule out any issue with the font.

I have no idea how to debug this.  Any help would be appreciated.

Pages: [1]