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

Pages: 1 [2] 3
16
NGUI 3 Support / Re: Multiple widgets on one gameobject possible bug
« on: October 19, 2013, 01:15:53 PM »
hmmm, bump

17
@ArenMook
Thank you for your answer. It is good to know that this is issue is being adressed.
Looking forward for the release containing this feature !

18
NGUI 3 Support / Re: Depth and colliders (NGUI 3_0_0)
« on: October 16, 2013, 01:53:41 AM »
@JeremyBurgess
Thanks!

19
NGUI 3 Support / Depth and colliders (NGUI 3_0_0)
« on: October 15, 2013, 07:04:41 AM »
As i understand depth now works for different panels, but what about colliders?
But colliders depend on Z level for ordering.
So, is it true that now we should set both depth and Z level to get draw ordering and Input right?

20
NGUI 3 Support / The 'right' NGUI 3.x.x way to manage dynamic font sizes
« on: October 15, 2013, 05:54:18 AM »
What is the recommended way to resolve the following cituation:
two UILabels with dynamic font on it
one should be small, the other one is big

my options:
1. Create two fonts with different size - which is awful
2. Change Label scale to big and small respectevly - which is not too great either as it as i'd  like to avoid using scale for GUI

So what is considered to be the best way to do it?

21
NGUI 3 Support / Re: Multiple widgets on one gameobject possible bug
« on: October 15, 2013, 02:16:11 AM »
It's under menu [NGUI] => [Attach] => [Collider].

Or you can use the hotkey by pressing  [Alt]+[Shift]+[C]

I know about this feature, but i need to do it automaticaly, meaning when widget size changes collider automatically changes its size to cover it.

About the bug:
I found that during update Widget.HasTransformChanged() is being called
inside there is the following code
  1.                 if (cachedTransform.hasChanged)
  2.                 {
  3.                     mTrans.hasChanged = false;
  4.                     return true;
  5.                 }
  6.  

it won't work in case of multiple widget on one gameobject, because in that case two widget share the same cached transform(at least it seems that way), and what widget is the first to render sets cachedTransform.hasChanged to false. Preventing update of all the other widgets.

22
NGUI 3 Support / Multiple widgets on one gameobject possible bug
« on: October 15, 2013, 01:56:28 AM »
Hello, I'm trying to do a button that is contained inside one gameobject.
Among other problems i've encountered an issue when trying to change gameobject position only one of the widgets actually moves(see attached images)
I think its a bug :/

Loosely related question - is it possible to set collider to automagically scale to cover whole widget?



23
NGUI 3 Support / Re: Bug in UICamera in case of perspective camera
« on: September 13, 2013, 11:23:21 AM »
Good point, but my users have a problem with not hitting visible UI elements, so why not calculate precise ray lenght like this:
  1. dist = (farPlane - nearPlane)/Vector3.Dot(ray.direction, cam.camera.transform.forward);
  2.  
?

24
NGUI 3 Support / Bug in UICamera in case of perspective camera
« on: September 13, 2013, 10:42:59 AM »
I'm currently using NGUI 2.7.0 and there is a problem with hit test for perspective UICamera
in Raycast function max ray lenght  is calculated like this^
  1. float dist = (cam.rangeDistance > 0f) ? cam.rangeDistance : currentCamera.farClipPlane - currentCamera.nearClipPlane;
But in case of perspective camera this is not correct as distance between point on near plane and corresponding point on far plane can be bigger that distance between planes( in fact it is always bigger than distance between planes except for the case of ray orthogonal to both planes )
correct value would be (if i am not mistaken)
  1. //pseudocode
  2. dist = (farPlane - nearPlane)/cos(max(fovX, fovY)/2);
  3.  

25
Weird, it works for me. try calling MarkAsChanged() on it

26
i can be wrong, but UILabel is derived from UIWindget which is derivative of MonoBehavior, so it is safe to assume that you can use label.transform

27
NGUI 3 Support / Re: Dynamic font randomly don't show properly
« on: August 30, 2013, 12:47:33 AM »
Unstable was not the right word my current issue is that dynamic fonts blinking on texture resize has resurfaced, possibly due to removing callbacks on texture change of dynamic fonts and removing line:
  1. if (mHasChanged) MarkAsDirty();
  2.  
from mFont.Request function

Also there are few lines in mFont like this
  1. #if DYNAMIC_FONT
  2.                 if (mDynamicFont != null) mDynamicFont.RequestCharactersInTexture(text);
  3. #endif
  4.  
It causes font generation with wrong character sizes, and the following condition fails
  1. if (mDynamicFont.GetCharacterInfo(c, out mChar, mDynamicFontSize, mDynamicFontStyle))
  2.  
In my opinion this.Request should be called instead or at least mDynamicFont.RequestCharactersInTexture with all 3 arguments specified.


Or i may be completely wrong, sorry if it is the case, i'm kinda new to NGUI codebase =)
Currently i've reverted to intitial 2.6.5 BETA it least text doesn't blink on this version =\

28
NGUI 3 Support / Re: Dynamic font randomly don't show properly
« on: August 29, 2013, 03:06:06 AM »
@dkozlovtsev

Are you using NGUI 2.6.5 on iPad mini?

Randomly disappearing fonts bug is only being on several Android devices as I know.

I'm using Unity 4.1.5 with NGUI 2.6.3 and 2.6.4. (not tested with the latest version of Unity and NGUI 2.6.5)

Cheers,

-Kim

Yep i'm using 2.6.5 but the problem was present even before 2.6.5, it was the reason i've updated NGUI.
Actually current NGUI from Pro repository is kinda unstable, i'm reverting it for now.

29
NGUI 3 Support / Re: Dynamic font randomly don't show properly
« on: August 28, 2013, 05:27:11 AM »
I have a fix for this problem in 2.6.5 version(PRO)

I've replaced the following lines in UIFont.Print function
  1. if (!mDynamicFont.GetCharacterInfo(c, out mChar, mDynamicFontSize, mDynamicFontStyle))
  2.         continue;
  3.  

with these lines

  1. if (!mDynamicFont.GetCharacterInfo(c, out mChar, mDynamicFontSize, mDynamicFontStyle))
  2. {
  3.         mDynamicFont.RequestCharactersInTexture(c.ToString(), mDynamicFontSize, mDynamicFontStyle);
  4.         if (!mDynamicFont.GetCharacterInfo(c, out mChar, mDynamicFontSize, mDynamicFontStyle))
  5.         {
  6.                 Debug.LogError(string.Format("Character {0} could not be found in font texture!", c));
  7.                         continue;
  8.         }
  9. }
  10.  

I don't think it is the right way to fix it, but it works for now

30
NGUI 3 Support / Re: Dynamic font randomly don't show properly
« on: August 27, 2013, 09:56:29 AM »
Bug is still present =(
Reproducible on IPad mini

Pages: 1 [2] 3