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

Pages: [1]
1
NGUI 3 Support / Panel not rendering after animation
« on: September 08, 2014, 07:06:59 AM »
Hey,

I have some panels that are instantiated and have animations played (translation and alpha 0-1) as part of a window management system.

Everything works fine the first time, and the panel is created, and animated in. Animation out also works fine.

However when the panel is activated again and the animation plays, the panel remains invisible.

The animation plays correctly, and the panel alpha is animated to 1 and the transform is moved, but nothing is drawn.

Upon changing any property of the panel (nudging the alpha for example) , it becomes visible and everything works as expected.

There are no draw calls present, despite the pane and every widget below it being turned on.

Any help here would be great thanks :)

2
NGUI 3 Support / Sprites in prefab reverting
« on: May 13, 2014, 11:27:36 PM »
Hey,

Recently I have been experiencing an issue with buttons in a prefab.

Whenever I change the sprite that they use, upon applying the prefab, the sprite reverts back to what was originally in the prefab.
I haven't experienced this before, so I'm not sure if I'm doing something silly or there is an issue with the new version, but any help would be great!

3
NGUI 3 Support / UISprite Viewport distance to pixel width
« on: February 23, 2014, 07:08:11 PM »
Hey,

Im currently trying to create a simple line renderer that connects two transforms (two other widgets), but I cant seem to get the conversion to the pixels correct.

Currently, I am doing the following:

// Setting the width of the sprite to be the distance between the two transforms
float width = Vector3.Distance(nguicamera.ViewportToScreenPoint(widgetTransform1.position),nguicamera.ViewportToScreenPoint(widgetTransform2.position));
lineSegmentSprite.SetDimensions((int)(width) , 32);

// Setting the sprite to be between the two transforms
lineSegment.transform.position = (transform1.position+transform2.position )/2.0f;

// Rotate the sprite

Using this method, the sprite is placed in the correct position between the widgets and rotated correctly, but the width is not correct (its sort of close, but off)

Any help with this would be great. Im probably doing something silly, but thanks :)

Pages: [1]