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

Pages: [1]
1
NGUI 3 Support / Re: Font Word Wrapping Chopping up Words
« on: May 02, 2014, 08:21:59 AM »
That's interesting, mine did not, but I am glad that I've reached the same solution :)
Perhaps some of the other guys that have complained could look into it as well.

2
NGUI 3 Support / Re: Font Word Wrapping Chopping up Words
« on: May 01, 2014, 11:29:52 AM »
I am having the same problem and am using NGUI 3.5.8 and Unity 4.3.4f1.
After debugging the NGUIText script a bit I noticed that the following method:
static void ReplaceSpaceWithNewline (ref StringBuilder s)
is only adding the end line character if the last character in the StringBuilder is an empty space character.
And that was not the case because when a new word was added to the builder it contained a space in front of it, not in the back. Thus at the end of the builder, when there was no more space on the respective line, the last character was a letter and not an empty space character.
So, as a quick fix I have shifted the start and end indexes when creating the substring used to put into the builder by 1 through the offset. And therefore had a space at the end always, which in turn could be replaced by a new line character when needed.
In short, I added 1 to the "offset" at line 861 and 868.
My post is not meant to be a final solution to the problem, just a suggestion to where to dig in a bit.


3
Thanks for the tip, but that doesn't really work because the in-game music and other sounds are not controlled through NGUI, it's just the buttons.
Having to also control the NGUITools.soundVolume everywhere besides the AudioListener.volume is not exactly what I am looking for.
Do you have any idea what might cause the sound to be played when it should be muted?

4
All the buttons in my project have the UIButtonSound script on them and after the update to Unity 4.2 the sound is played even though the AudioListener volume is set to 0.
There is only one AudioListener in the scene.
I can add an extra flag to the if condition checking that the audio listener is not null and enabled for the audio listener volume inside the PlaySound method, but I would rather not change an NGUI script.
Does anyone else have a better solution?

5
NGUI 3 Support / Re: NullReferenceException inside UILabel.OnFill
« on: April 25, 2013, 10:11:29 AM »
Hi, I have just updated to version 2.5.1 from 2.2.7 and I am still getting the null reference exception

NullReferenceException: Object reference not set to an instance of an object
UILabel.OnFill (.BetterList`1 verts, .BetterList`1 uvs, .BetterList`1 cols) (at Assets/NGUI/Scripts/UI/UILabel.cs:635)
UIWidget.UpdateGeometry (UnityEngine.Matrix4x4& worldToPanel, Boolean parentMoved, Boolean generateNormals) (at Assets/NGUI/Scripts/Internal/UIWidget.cs:497)
UIPanel.UpdateWidgets () (at Assets/NGUI/Scripts/UI/UIPanel.cs:848)
UIPanel.LateUpdate () (at Assets/NGUI/Scripts/UI/UIPanel.cs:983)

Pages: [1]