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

Pages: [1]
1
NGUI 3 Support / Re: Positioning Scroll View off screen
« on: October 20, 2014, 03:20:26 PM »
I'm not 100% if I understand your issue, but it sounds like you need to position your NGUI Scroll view relative to your main camera view and update that position when your main camera view changes.

So, off the top of my head:

Vector3 nguiPos = nguiCamera.ViewportToWorldPoint(Camera.main.WorldToViewportPoint(worldPosition));

You can place a dummyObject in the main scene where you want the scroll view to appear and then use that position as worldPosition above.

2
NGUI 3 Support / Dynamic Font Issue - Delay When First Displayed
« on: October 20, 2014, 01:40:03 PM »
Hello,

Unity Pro v. 4.5.5.
NGUI v. 3.7.4.

I've read a lot about Unity issues with dynamic fonts, but haven't found any posts relating to my specific issue, so I thought I'd ask here.


I have a panel with 6 labels, a couple of buttons and a collection of sprites, which is shown when a user selects a level.

The first time the panel is shown, there is a pause / delay before it appears.  This can be anything from 2 frames, to 20 frames (at 60fps).

If I take out all the labels (but keep the buttons, sprites and effects), there is no pause.  Put the labels back in, the pause occurs.

The labels all fit - ProcessText in UILabel is getting called once per label, as you would expect, so there is no re-sizing going on or any anything else untoward.

This happens on all my other message panels also (e.g. Level Success, Level Failure, Quit Game).  If there is no text, there is no delay, and the delay only occurs the first time each panel is shown.


I have tried many things.  Instantiate replaced with SetActive.  Small font size.  Pre-loading the font.  No real-time text updating (i.e. just use the labels as they were created in the editor).  No joy.


I haven't got Android Pro....yet, otherwise I'd be able to profile and give more information.  I am hoping someone has seen this before and be able to explain what it going on such that I can (a) fix the issue, or (b) put in a work-around in.

Thanks for reading, and for any assistance you can offer.

Pages: [1]