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

Pages: [1] 2
1
NGUI 3 Support / Re: UIinput.value.Insert doesn't seem to work!
« on: September 26, 2015, 01:50:23 PM »
This is because string.Insert returns the new string you are editing, it doesn't edit the existing one: https://msdn.microsoft.com/en-us/library/system.string.insert(v=vs.110).aspx

betodeoliveira's suggestion will do what you're looking for, the main bit is that he's setting the UIinput.value

2
NGUI 3 Support / Re: Not releasing Atlases on Scene Change
« on: September 23, 2015, 10:00:00 AM »
I've changed the topic to hopefully get the attention of ArenMook, and hopefully describe the problem I'm facing right now.

3
NGUI 3 Support / Re: Optimizing Memory Usage
« on: September 22, 2015, 12:46:59 PM »
Yes, currently the only thing that we're doing to unload those objects are changing scenes. Our UnloadUnusedAssets is on a coroutine that doesn't get destroyed between loads.

One small tidbit, it's suggested to never use Object.DestroyImmediate at runtime, ever.


4
NGUI 3 Support / Not releasing Atlases/Textures on Scene Change
« on: September 22, 2015, 07:23:54 AM »
We're in the process of trying to optimize our memory usage, and some of the textures that are being reported in the memory profiler in 5.2 are making me wonder if I'm misunderstanding something.

We have a couple textures in our MainMenu scene that are either NGUI Atlases, or textures referenced by UITexture.

Thing is, after we switch scenes to our Game scene (which is a combination of a LoadLevelAsync for our environment, and a LoadLevelAdditiveAsync for our main game logic) some of those textures are still sticking around when we do another memory profiler sample well into that scene.

Here's a screenshot of the profiler:



The highlighted texture, DeckBuilderAtlas, is *only* ever referenced in the MainMenu. Same goes for changelog_background, whats_new_board_game, upgrade_screen_congrats, and a few others listed on there. This is adding up to a significant memory usage on our end.

Interestingly, this doesn't always seem to happen, but often enough to the point where I'm worried that I'm doing something wrong here.

For what it's worth, at the end of our loading coroutine, we are waiting on UnloadUnusedAssets before we consider ourselves done loading.

  1.                 AsyncOperation unload = Resources.UnloadUnusedAssets();
  2.                 while (!unload.isDone) {
  3.                         yield return null;
  4.                 }
  5.  

Any direction in this would be greatly appreciated!

5
NGUI 3 Support / Localization Bug
« on: March 12, 2014, 11:19:30 AM »
Just a small Localization bug to report:

We're using the old localization method, where you have different languages in separate text files, rather than one CSV. Even with you moving the Localization CSV to a deeper folder, the CSV in the examples will be picked up before the individual text files are. I had to rename the CSV in order to use our old files.

(edit: this is in 3.5.3)

6
Just to keep this conversation in the same thread -- has this been added yet? I searched through the >= 3.1 changelogs and didn't see anything in the forum about this being available, but I'm curious if it somehow flew under the radar and was implemented.

7
NGUI 3 Support / Re: 3D UI Anchor Question/Problem
« on: January 21, 2014, 02:03:11 PM »
I'd like to resurrect this thread to keep this information together.

I would like to anchor a sprite to another GameObject that is on my Game Camera (another perspective camera) when I mouse over it.

The effect I'm looking to achieve is the following: http://d.pr/i/Hg7w

Anchoring a sprite in a 3D UI to a transform on another camera simply doesn't work. If I create a 2D UI, it works like a charm. (For various reasons and UI effects we need to keep a 3D UI.)

Can you go into a bit of detail as to why this isn't working, and how we might overcome it without creating a separate 2D UI?

EDIT: One more small bug, if you change an anchor via script, it does not update the Inspector for that object.

8
NGUI 3 Support / New Anchor System: empty parent anchor possible?
« on: December 23, 2013, 10:10:04 AM »
I'm curious if there is some easier way to handle this that I'm not considering --

I sometimes have sets of buttons, like this: http://d.pr/i/jNia

They need to be specifically placed to achieve the look that the artist is going for, but if we want that "set" of images to all be anchored to the bottom right area of the screen despite resolution, I need to anchor each individual widget. In the prior system, I could have had a parent anchor itself to the bottom right, and simply have all these images just hand placed within the editor.

Is there a way to handle this that doesn't require me anchoring four separate widgets? UIGrid wouldn't work, as we need the actual images to overlap a little bit.

I've watched both of your videos on the anchoring system, and messed around a bit with the new anchoring system to no avail.

9
NGUI 3 Support / Re: UIScrollView/UIScrollBar visibility bug
« on: December 17, 2013, 10:01:41 AM »
Thanks for the pointer -- what about the dragging issue, do you not consider that a bug?

10
NGUI 3 Support / UIScrollView/UIScrollBar visibility bug
« on: December 17, 2013, 08:21:38 AM »
Small bug: If you set the show condition to WhenDragging on a UIScrollView, the UIScrollBar is visible when you scroll with the mousewheel, when you drag the contents, but it does not show when you click on the actual scrollbar itself to scrub around in that manner.

While I'm at it -- a small request -- it seems that this NGUI implementation fades the scrollbar out immediately after any drag event completes, whereas the Apple implementation delays a second or so before it fades out. Is there any way you could lengthen that by default, or simply show a float to control the delay before the fade out?

11
NGUI 3 Support / UILabel giving too much space to dynamic fonts?
« on: July 03, 2013, 01:26:33 PM »
Not quite sure how to describe this properly, but it seems that the mesh that is being generated for UILabels for certain fonts is too large.

http://d.pr/i/kA4f

This is just using a pretty basic dynamic font: http://d.pr/i/PIxW

Anything I can debug to find out more information as to why this is occurring? Mesh generation with other fonts seem to do quite a bit better than this: http://d.pr/i/S0cz, so it doesn't seem to be every font.

Thanks for any insight.

12
NGUI 3 Support / Re: Max Lines for UILabel is ignored?
« on: June 22, 2013, 09:45:19 AM »
In UILabel::ProcessText(), if the label isn't a password, this is the next if statement that would hit:

  1.  
  2. else if (mMaxLineWidth > 0)
  3. {
  4.         mProcessedText = mFont.WrapText(mText, mMaxLineWidth / scale, mShrinkToFit ? 0 : mMaxLineCount, mEncoding, mSymbols);
  5. }
  6.  
  7.  

Since I've got ShrinkToFit set to true, this will force me to 0 regardless of what I put in, and will force the linebreaks, causing the long column of text I showed. Perhaps I'm not explaining myself correctly -- it just seems like there's a discrepancy in the UI, or what's being made available to the user that makes controlling how we want the text to wrap / fit to an area very error prone on the user side.

13
NGUI 3 Support / Re: Max Lines for UILabel is ignored?
« on: June 21, 2013, 02:32:43 PM »
This seems to be fixed when I change line 513 on UILabel.cs from this:

  1. else if (mMaxLineWidth > 0)
  2. {
  3.         mProcessedText = mFont.WrapText(mText, mMaxLineWidth / scale, mShrinkToFit ? 0 : mMaxLineCount, mEncoding, mSymbols);
  4. }
  5.  

to this:

  1. else if (!mShrinkToFit && mMaxLineWidth > 0)
  2. {
  3.         mProcessedText = mFont.WrapText(mText, mMaxLineWidth / scale, mShrinkToFit ? 0 : mMaxLineCount, mEncoding, mSymbols);
  4. }

Also, somewhat unrelated: there's somewhat of a bug with the MaxWidth. I had a large font that, due to the scale of it's parent, ended up having a very small max width: I noticed that I was changing the max width between 8-10px and there was no change in the actual size of the font.

Ultimately, the scale for the font was 1.7, which due to line 544 on UILabel.cs:

  1. scale = Mathf.Round(scale);

It was being kicked up to 2.0, and thus, appearing outside of the maxWidth that I desired. Changing Round to Floor fixed that discrepancy in that it will always make the font smaller than my max width, and never larger.

This seems like a much more attractive position to be in, if you definitely don't want any fonts jumping outside any UI.

14
NGUI 3 Support / Re: Max Lines for UILabel is ignored?
« on: June 21, 2013, 02:06:12 PM »
Reviving this thread: Just wanted to say I've now tested both 2.6.2 and 2.6.3 and the current implementation breaks much of our text.

It seems like the max width is being supported by scaling the X, but aggressively adding line breaks whenever it can.

So if you have a font that is otherwise large, it will put a line break after every single character, and then scale that down to fit the max width.

It makes sense that getting Max Lines and Shrink To Fit to work together, but if I have shrink to fit on, you should be displaying the text as I formatted it to fit in the given area.

Example of the issue: http://d.pr/i/F139

15
Searched around and could not find something for this.

I have a font that supports most languages, but doesn't have support for kanji, arabic, and a few other languages. Is there a way to detect whether or not a font supports a certain set of characters? I want to generally keep our main font in the game for aesthetics, and only switch out to other dynamic fonts for labels when it's required.

Pages: [1] 2