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

Pages: [1] 2
1
NGUI 3 Support / Re: Two TweenPosition problems
« on: March 04, 2014, 01:41:27 AM »
Thanks for taking a look at my project, ArenMook.

Just to close this out, the problem was I had two widgets attached to one object.  The problem went away, after I moved the UILabel to a child object.

2
NGUI 3 Support / Re: Fontsize no longer sets correctly
« on: March 04, 2014, 01:18:36 AM »
I have no problem believing that it's something I'm doing, it's just odd that it worked before and doesn't work now.  No doubt the case of this is the same as those other cause: two widgets on one object.


3
NGUI 3 Support / Re: Fontsize no longer sets correctly
« on: March 04, 2014, 12:34:02 AM »
At this point, I don't think I have any choice but to downgrade back to 3.4.8, when font sizes worked in every case.  Has anyone else seen a problem like this?  Any ideas?

4
NGUI 3 Support / Re: Two TweenPosition problems
« on: March 04, 2014, 12:31:19 AM »
Will do.  Thanks

5
NGUI 3 Support / Re: Fontsize no longer sets correctly
« on: March 03, 2014, 12:24:47 AM »
Sorry, I have been UNABLE to isolate a case outside my codebase.

6
NGUI 3 Support / Re: Two TweenPosition problems
« on: March 03, 2014, 12:23:23 AM »
In my sample project I am not doing anything funny.  I made two prefabs, and used the scripts out of the box.  I have one collider.  The entire project is 60 lines of code, including comments and white space.

If I send it to you, will you look at it?  I'll provide specific instructions to demonstrate the behavior I have described.

7
NGUI 3 Support / Re: Fontsize no longer sets correctly
« on: March 02, 2014, 08:05:02 PM »
Yeah, the problem is that it doesn't always work, like it used to in 3.4.8.  I have cases where it works and cases where it doesn't, and I was wondering if anything changed from 3.4.8 to 3.5.1 that might have caused this behavior.  As it is now, I don't even have a work around.  My best guess is to try rebuilding my prefabs and see if that makes a difference, but that seems like a long shot.

As yet, I have been able to isolate a case outside my codebase.

8
NGUI 3 Support / Re: Two TweenPosition problems
« on: March 02, 2014, 07:56:05 PM »
Because when I make things into a prefabs, the inspector removes the "depth" setting, so I no longer have access to it.

By the way, if I set the depths both to the same value, the text moves, but the imagebutton highlight behaves oddly.  If I mouse over it while it's moving, it freezes in place.  I have to move the mouse off and then back on again for the position to update.  If I set the depths to different values, the text freezes in place, but I can mouse over the imagebutton highlight while it moves just fine.

What is the advantage of NGUITools.AdjustDepth?  It looks like it operates on entire objects, not on components.  When I tried it, the label text disappeared entirely, and the imagebutton highlight froze when I moused over it, like I described above.


9
NGUI 3 Support / Re: Fontsize no longer sets correctly
« on: March 01, 2014, 10:08:53 PM »
But as I mentioned before, changing to any of the other settings makes no difference.  I just tried it again: resize freely produces the same result as before: the text is moved up and to the left on the button, as if the font were larger, but it displays in the size ~20 font.

10
NGUI 3 Support / Re: Two TweenPosition problems
« on: March 01, 2014, 10:04:48 PM »
I am changing the depth in Start in both cases, for the sprite and for the label.  If i don't change it for the sprite, i don't always see the different ImageButton states; if I don't change it for the label, i don't see it at all.

11
NGUI 3 Support / Re: Two TweenPosition problems
« on: February 28, 2014, 10:49:52 PM »
So, I decided to build the repro case anyway, since I have come up against the problem in a different part of the code... And I made an interesting discovery:

One again, I have a prefab: UISprite + Box Collider + UIImageButton + UILabel

When I first set it up, the text moved fine, but I couldn't see the button texture, but when I set the depth of the sprite to 2 so it would be visible, the text no longer moved.  The label is depth 4.  In fact, after further experimentation, setting the sprite's depth to *anything* (including 0) in code prevents the label text from moving.  So, there seems to be some weird interaction between a statement like this:

   ButtonSprite.depth = 2;

And the text moving along with the object in a TweenPosition.

This is the simplest possible setup, with a single script attached to an object, a background prefab, and the button prefab above.

It takes ten minutes to set up.  Do you still want me to send it to you?

12
NGUI 3 Support / Re: Two TweenPosition problems
« on: February 28, 2014, 09:36:53 PM »
Okay, thanks.  I'm up to my eyes right now, so it may take me a while.

Thanks

13
NGUI 3 Support / Re: Fontsize no longer sets correctly
« on: February 28, 2014, 09:34:14 PM »
No, I did not change it... I just tried each of the four settings, but none changes the result.

14
NGUI 3 Support / Fontsize no longer sets correctly
« on: February 27, 2014, 09:27:39 PM »
I recently upgraded from 3.4.8 to 3.5.1, and now...

  UILable label;
  lable.fontSize = N;   // where N can be any integer

no longer works in all cases.  I am using NGUI fonts (Arimo20 (UIFont).

In the simplest case, I have a UITexture + UILabel, and when I run the code, no matter the value I put in fontSize, it uses (I think) 20.  This occurs whether I change the value in code or in the inspector in the prefab.

In another case, I have a UISprite + Box Collider + UIImageButton + UILabel, and this also ignores new values in fontSize -- the text itself doesn't get bigger on screen -- but it does compute the position of the label relative to the button correctly: the larger I make the font, the more it moves the label up and to the left.  This sort of thing may be happening in the previous example, but i cannot easily tell by looking.

In a third case, also a UISprite + Box collider + UIImageButton + UIlabel, it works fine.  I can't see any difference in the setup between these last two cases.

These all worked correctly in 3.4.8.  Any ideas?

Thanks




15
NGUI 3 Support / Re: Two TweenPosition problems
« on: February 27, 2014, 08:03:36 PM »
Well, I upgraded to 3.5.1 and switched my instantiation to NGUITools.AddChild, but neither of these has fixed either problem.

Any other ideas?

Thanks

Pages: [1] 2