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 - ett.ufo

Pages: [1]
1
Is there any way to use UILabels without a UIPanel for ingame texts instead of a normal TextMesh?
I'm doing a math game and have text on moving 3d-objects.

Since I have already created a custom font used in the GUI I would like to reuse it in the game.
If I place UILabels w panel on 3d-gameobjects they wont be batched since they belong to different panels and the draw call number will rise. And since they are plentiful the UIpanel scripting overhead is also a bit to high.

I'm having a hard time recreating the font (with a good looking result) with Unitys horrible custom font support.

I know this is not really the intended use of NGUI, but it would make my day...

2
NGUI 3 Support / UISlider foreground and sliced sprite issue
« on: January 27, 2014, 06:39:20 AM »
It seems like there is an issue with using sliced sprites on a UISlider foreground.
When the slider is at value 0 the auto scaled foreground is not set to width 0 but rather -sliced Border amount.

The result is the border part sticking out to the left of the sliders 0 point (see screen shot).

Is this fixed in later releases or does someone have a good work around?

Unity 4.3.1f1 + NGUI 3.0.7f3

Thanks!

3
NGUI 3 Support / Re: Faded sprite edge darker in player than in editor
« on: December 13, 2013, 04:29:28 PM »
Which version is this in? Check the triangle count in the stats window. Is there a difference between play and edit mode? There was a bug in one of the earlier versions.. Early 3.0.6 or 3.0.5, I don't remember.

Ok, solved it.

It was my screwing up, but how I did it can be good for you to know.

I was trying to switch out old test graphics on a NGUI image button, and instead of switching the sprite in the container I only switched on the Background.
*
This has the effect of only showing the background sprite in the editor view but showing the sprite selected in the image button container during runtime. It is reproducible.
*
Without Murphys law I would of course have noticed this immediately, but in this case the test graphics was a version of the round background with the triangle baked in. So in the editor with only the new background without a triangle everything was looking fine. But in the player during runtime the old baked background was used resulting in a double triangle...
 :o

Thanks!
/ufot


4
NGUI 3 Support / Faded sprite edge darker in player than in editor
« on: December 13, 2013, 11:32:34 AM »
This is probably a really stupid question so I apologize on before hand.

Why does the black faded edge (shadow like) of the TRIANGLE (a separate sprite above the round bg) get so much darker in the player.
It looks just fine in the Unity editor view.
It also looks fine as a texture on a quad.

My guess is that it has to do with the black background of the atlas.

But how do i fix it?

Thanks!

5
Hmm. Actually I was not even aware of that static property. In that post I was talking about AudioSource.volume.

I believe AudioListener.volume is the global sound, so if it didn't affect NGUI sounds before then it was bugged and likely fixed in a recent update to Unity itself.

Yes, I dove into the NGUI code while debugging and compared Unity 4.2 to 4.3 and can confirm that AudioListener.volume == 0 does not affect added audio source volume (added by NGUI) in 4.2 but it indeed does in 4.3...
Since it does affect already playing sounds I guess they had missed to apply the master volume to sounds dynamically added later (seems a bit strange, but who knows).

Hehe, funny, I actually used that Unity bug thinking it was some kind of "automagical" feature of NGUI to separate the GUI from the game.

"It's not a bug it's a feature" FTW

Thank you for your quick responses and for a great product!
/ufot

6
My god, you're fast...

But, hmm, now I'm not understanding you. Sorry.

I am led to believe that AudioListener indeed has a volume:
http://docs.unity3d.com/Documentation/ScriptReference/AudioListener-volume.html

Also see your answer in the other post where you explain (to my understanding) that AudioListener.volume and NGUITools.volume are two different settings.
http://www.tasharen.com/forum/index.php?topic=5273.0

My setup that was working before the upgrade was to set AudioListener.volume (and timescale) to 0 when in menus and let NGUI's very handy independent timescale and volume handle the interface.

I know it maybe was a bit lazy approach, but it worked.



7
Everything was working perfectly before upgrading to Unity 4.3 and NGUI 3.0.7 ( from 4.2 and 3.0.2)

Now, gui sounds are no longer played (with other than 0 volume) when AudioListener.volume is set to 0.

According to this post, it still should be played with its own NGUI volume setting:
http://www.tasharen.com/forum/index.php?topic=5273.0

Is the functionality broken broken in 3.0.7?

Thanks
/Ufot

Pages: [1]