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.


Topics - Markov

Pages: [1]
1
NGUI 3 Support / All NGUI objects isn't rendering after scene switching
« on: September 07, 2014, 10:19:33 PM »
Hello. I randomly run into a bug after switching scenes. And when it occurs - nothing's rendering in bugged UIPanel.
After a little investigation I find out that it's happening because one of the UIPanels receives UIPanel.LateUpdate() after it's been destroyed.
  1. MissingReferenceException: The object of type 'UIPanel' has been destroyed but you are still trying to access it.
  2. Your script should either check if it is null or you should not destroy the object.
  3. UnityEngine.Component.get_transform ()
  4. UIRect.get_cachedTransform () (at Assets/NGUI/Scripts/Internal/UIRect.cs:198)
  5. UIPanel.UpdateTransformMatrix () (at Assets/NGUI/Scripts/UI/UIPanel.cs:982)
  6. UIPanel.UpdateSelf () (at Assets/NGUI/Scripts/UI/UIPanel.cs:1183)
  7. UIPanel.LateUpdate () (at Assets/NGUI/Scripts/UI/UIPanel.cs:1144)

2
NGUI 3 Support / Calculate actual progress bar's foreground width
« on: August 03, 2014, 02:00:51 AM »
Hello.
I'm trying to calculate width of progress bar foreground with NGUIMath.CalculateRelativeWidgetBounds, but it returns original size of this texture. So how to calculate actual size?
UPD: this foreground is a sliced texture so i can't just multiply original size of texture by progressBar.value.

3
NGUI 3 Support / Center on child issue
« on: June 13, 2014, 09:42:52 AM »
Hello. I'm trying to add gamepad in our game. I need to make menu with lots of selectable elements. When user selects object which is out of screen bounds - elements scroll to this object. So it's very similar to scene Example 7 - Scroll View (Panel)
Is it possible make menu like in this scene, but without this gap when user selects first element?

I used to select middle object when selected first object, but I've got another gap:

SO the first object is little out of screen. And if I have 2 items on screen I event don't have this middle object.

4
NGUI 3 Support / UICenterOnChild feature request
« on: December 06, 2013, 08:26:00 AM »
Hi!
I'm using UICenterOnChild to swipe between map lists in our game. This objects are big and if I want to see the next list I have to slide too much range (red arrow on picture). This is very invonvinient on tablets and PC.


May I ask you to add functionality in UICenterOnChild to set this range?(like on blue arrow)

5
NGUI 3 Support / UIDragScrollView resets scrollView
« on: December 03, 2013, 12:16:14 PM »
Hi!
after last update, if I set UIDragScrollView.scrollView manually:
  1. outlinesObject.scrollView = gameObject.GetComponent<UIScrollView>();

and if there is no UIScrollView in parents, the UIDragScrollView script resets scrollView paremeter to null.
in this line of UIDragScrollView.Press function:
  1. if (!pressed && mAutoFind) scrollView = NGUITools.FindInParents<UIScrollView>(mTrans);

can you fix it and add scrollView!= null in this condition?

if (!pressed && mAutoFind && scrollView!= null) scrollView = NGUITools.FindInParents<UIScrollView>(mTrans);

6
NGUI 3 Support / UIPopupList questions
« on: November 09, 2013, 11:59:57 PM »
Hi.
1st question - how can I set popupList background width?
from this:


to this:


and the 2nd - how can I fix this?

it occurs after localization in a few languages

7
NGUI 3 Support / UIButton.isEnabled strage behaviour
« on: October 15, 2013, 05:33:59 AM »
How do disable and enable UIButtons now? I need btn color to be disabled color, but now it's still normal.
I'm used to disabling them like this(in 2.7x):
nextButton.GetComponent<UIButton>().isEnabled = false;

And what I see now:


Button switched off, but button's color still normal(not grey)

8
NGUI 3 Support / UIStretch problems after migrating to 3.0.2
« on: October 11, 2013, 03:00:21 PM »
http://www.youtube.com/watch?v=ECFzVpIYXwM&feature=youtu.be

UIStretch doesn't work now. I tried to put it on the same GameObject with widget and on a parent of widget.
If I put UIStretch on parent - it multiplies scale of transform on every OnValidate event(i guess).
If I put it on the same object it doesn't do anything.

9
NGUI 3 Support / Widget size in pixels
« on: October 10, 2013, 03:05:11 PM »
Hello. In new NGUI I can't get widget size in pixels.
I tried myWidget.localScale, all reloads of NGUIMath.CalculateRelativeWidgetBounds(), myWidget.width/height, all corners of myWidget...
I changed resolution of screen so the size of widget changed too(from very little to very big). And problem is that in code shows me that myWidget.width = 150 and height = 150 in ANY resolution and size of myWidget (all in editor mode)
How can I get actual size in pixels now?

10
NGUI 3 Support / Set UISprite type in new NGUI?
« on: October 09, 2013, 07:06:43 PM »
I used lots of UIFilledSprite in old NGUI.
But now there is only UISprite. How can I change type of it? I know that I can change it in code by using type parameter, so what about inspector?

11
NGUI 3 Support / change spriteName problem in ngui 3
« on: October 09, 2013, 07:01:47 PM »
Hello!
I used to change sprites in this way:
sprite.spriteName = "spriteName";
sprite.MarkAsChanged();
But now in new NGUI this isn't working. What should I do?
A little clues:
- new sprite changes and appears, but doesn't show. If I set alpha to non 1, I see my changed sprite.
- also, if I click on sprite in editor it's staeting showing too.

Pages: [1]