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

Pages: [1] 2
1
NGUI 3 Support / Re: Moving sprites ignore colliders
« on: December 05, 2014, 06:07:30 AM »
As I said non-NGui objects collide properly. Simply adding a UIWidget breaks them forever.

2
NGUI 3 Support / Re: Moving sprites ignore colliders
« on: December 05, 2014, 04:51:59 AM »
The layers are set up properly. UI collides with UI.

3
NGUI 3 Support / Re: Moving sprites ignore colliders
« on: December 04, 2014, 05:27:48 AM »
The first thing I did is made the collider non-trigger, and made collider's Z-size equal to 50. Still no success.

Maybe the system internally somehow marks all of the attached colliders as trigger which doesn't show up in the inspector?

Thanks.

4
NGUI 3 Support / Moving sprites ignore colliders
« on: December 03, 2014, 03:57:37 AM »
Hi, I have the following setup:

3D scene

1. Non-NGUI static object with a box collider.
2. NGUI sprite with a box collider, and a rigidbody attached.

When I start the game the sprite falls right through the box collider. Collisions are set up properly in the layer collision mask. The layers are also set properly to they should collide.

If I make a regular cube, add a rigidbody to it and launch the game, the cube collides properly with the collider. However if I add a NGUI sprite component to the cube it stops colliding. If I then remove the sprite from the cube it won't collide as well.

As I understand, NGUI changes some physics settings internally (Collider/Rigidbody?). What can I do to make the sprites collide properly with other static colliders?

Thanks.

5
NGUI 3 Support / Re: Restrict UIScrollView movement
« on: July 03, 2014, 10:03:17 PM »
Found the issue - it turned out that one of the elements within the scroll view was anchored to the Root UiPanel. Thank you for your time.

6
NGUI 3 Support / Re: Restrict UIScrollView movement
« on: July 03, 2014, 09:53:32 PM »
After recreating the ScrollView from scratch the issue was resolved. Magic? :)

7
NGUI 3 Support / Re: Restrict UIScrollView movement
« on: July 03, 2014, 09:08:28 PM »
I don't need the scrollview to center on anything - I just need it to "bounce back to fit the edges", just like in the "Example 7 - Scroll View (Panel)" demo. But this isn't happening with my scene.

None of the following statements in ConstraintRect ever get called for me:
      if (minRect.x < minArea.x) offset.x += minArea.x - minRect.x;
      if (maxRect.x > maxArea.x) offset.x -= maxRect.x - maxArea.x;
      if (minRect.y < minArea.y) offset.y += minArea.y - minRect.y;
      if (maxRect.y > maxArea.y) offset.y -= maxRect.y - maxArea.y;

Maybe there's something wrong with the setup of my ScrollView?

Thanks.

8
NGUI 3 Support / Re: Restrict UIScrollView movement
« on: July 03, 2014, 09:35:54 AM »
My problem is that even with MomentumAndSpring enabled the scroll view doesn't spring back into place. "Restrict within panel" is on.

After doing some testing it turned out that the SpringPanel script never gets attached to my scroll view. In the RestrictWithinBounds method constraint.sqrMagnitude is always zero, therefore the if statement that creates the SpringPanel never gets called. Do you have any idea what might be wrong?

Thanks.

9
NGUI 3 Support / Re: Same depth value results in multiple dracalls?
« on: July 02, 2014, 08:10:25 PM »
Yeah, same thing for me - getting rid of dynamic fonts solved the issue.

10
NGUI 3 Support / Re: Restrict UIScrollView movement
« on: July 02, 2014, 06:30:35 AM »
None of the options seem to return the scrollview to the original position - it's still at the position where the user left it. I'd like the icons in the screenshot to return back to the top when user lets go of the mouse.

Thanks!

11
NGUI 3 Support / Restrict UIScrollView movement
« on: July 02, 2014, 04:40:33 AM »
Hi,

How can I make sure that the user won't be able to scroll outside of a panel? I would like the user to never be able seeing anything outside of the panel.



I'd like the scrollview to prevent user from scrolling up in this case.

Thanks!

12
NGUI 3 Support / Recommended font sizes
« on: May 20, 2014, 10:37:36 AM »
I'm creating bitmap fonts using the bitmap maker. Is it necessary to have a different font made for every possible font size that I'm going to have within my UI? Or can I make a larger font (size 50) and use it in all of my labels? Will there be any disadvantages in having a single larger font?

Thanks!

13
NGUI 3 Support / Same depth value results in multiple dracalls?
« on: May 19, 2014, 12:08:46 AM »
I'm trying to optimize the number of drawcalls using the drawcall tool.

The Panel itself has depth 0, and a few sprites within it also have a depth of 0. I expect all of them to get drawn at the same time however the drawcall tool shows that some of them are being batched and some of them are drawn separately. What is the reason and how can I make all of them get drawn at the same time?

Also I've noticed that widgets with different depth values are being grouped together. Is it the expected behaviour?

Thanks.

14
NGUI 3 Support / Child widget depth value
« on: May 18, 2014, 11:26:57 PM »
Hi,

I'm optimizing my UI to reduce the drawcalls. When changing the depth value of a widget, is it possible to update all of its child widgets accordingly? I.e. if decreasing a depth value of a widget it would be great to have all of its childs decrease accordingly.

Also, what does the "normalize depth hierarchy" do? I wasn't able to find any documentation on this feature.

Thanks!

15
NGUI 3 Support / Re: Anchoring bugs
« on: May 16, 2014, 06:01:28 AM »
Yes, the second issue is in the editor.

Pages: [1] 2