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

Pages: [1]
1
NGUI 3 Support / TweenRotation not Lerping correctly
« on: July 02, 2014, 08:30:43 AM »
Seems like this behaviour is wrong. If you're going from 5˚ to 355˚ it should be a difference of 10˚, not 350˚ as it is now, causing the objects to swivel around frantically.

TweenRotation.cs should use LerpAngle instead of Lerp for lines 38-40

2
NGUI 3 Documentation / Re: UILabel
« on: December 19, 2013, 04:28:36 PM »
Is there a way to set the font size independently of font resolution?

Right now I'm using a 3D GUI and often moving text elements right up to the camera. In such a case the fonts look horribly pixelated if the font size is low. The only way to fix this is to set the font size up, but setting the font size up also increases the actual size of the text.

The only workaround I've found now is to crank up the font size, then reduce the dimensions while using "ShinkContent", but this is an ugly hack and results in unpredictable text sizes in multiline labels.

3
NGUI 3 Support / Re: Camera depth and loading screen
« on: June 13, 2013, 09:21:17 AM »
You're totally right! It wasn't that the UI was showing through, it was that the splash camera was also rendering the game UI because it could see it! :) And since both cameras were at 0,0,0 the two draws lined up.

Thanks!

4
NGUI 3 Support / Camera depth and loading screen
« on: June 12, 2013, 09:18:39 AM »
Hey there

I have a loading screen in a separate scene that I bring in with LoadSceneAdditive in between level loading transitions.

Now the loading screen should cover all in-game elements for obvious reasons.

In that scene the GUI camera is set to a depth of 100. In the actual game the GUI camera is at depth 10.

However it seems like the GUI in the game is still being drawn on top of the splash screen even though Unity should be drawing the splash screen last according to the camera depth.

Is there something I'm missing here?

Thanks!

5
NGUI 3 Support / OnHover and child UI elements
« on: April 23, 2013, 05:22:02 AM »
I do a lot of tweening On Hover and I've repeatedly come across a problem:
If OnHover changes the UI in any way (eg. show a child button on the panel by moving or fading it in), there is no way to access the newly visible elements without moving hover focus off the parent button and thereby sending the parent the OnHover(false) event which would make the child buttons disappear again.

Now it seems like right now the only solution that stays within the bounds of how NGUI is meant to work is to create another larger collider *behind* the original and use that to do the "hiding" work instead of doing the hiding with the OnHover(false) event. The problems with this though:
1. I have a lot of these kinds of elements and this approach starts getting messy really quickly.
2. It is not foolproof. If the user manages to move the mouse very quickly, it is possible to pass over the larger "hide elements" collider altogether and the child elements then won't get hidden properly.

Ideally there should be an option somewhere to have the OnHover events ignore child objects that are in front of the main element. For example doing a collider.Raycast to do raycast checks instead of Physics.Raycast to see if the mouse is over the element, but at the same time ignore all other colliders that might be in the way.

What do you think?

Thanks :)

Pages: [1]