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

Pages: 1 2 3 [4] 5 6 ... 1447
46
TNet 3 Support / Re: upload image to server
« on: November 06, 2017, 07:42:46 AM »
In Sightseer I let server admins upload their own flag textures, and I've seen fairly large ones (>700 kb) being used without issues. Can't say I've ran into the "malformed data packet" error. Maybe the SaveFile didn't have a chance to complete?

47
TNet 3 Support / Re: TNet 3 and Unity 2017
« on: November 06, 2017, 07:38:13 AM »
TNet doesn't have a deep integration with the editor like NGUI does, so I don't think there should be any issues. I haven't heard of anything either, but I'm using 5.6 for the current project myself.

48
NGUI 3 Support / Re: UIWrapContent ItemHeight (itemSize)
« on: November 06, 2017, 07:29:12 AM »
UIWrapContent will change the widget's size to envelop the specified root object and all of its children. UIWrapContent should be on that object's sibling. It shouldn't be used with scroll views, however. It's meant to resize widgets. The only way to use it to adjust the scroll view's dimensions is to make the scroll view a child of the UIWrapContent's widget, anchored to it. Just make sure you aren't trying to envelop the object's own children. Only siblings' children can be used, otherwise the script will count its own dimensions, resulting in an undefined behaviour.

49
NGUI 3 Support / Re: Set UI Scroll View position
« on: November 06, 2017, 07:24:41 AM »
If you look at UICenterOnChild, line 252:
  1. #if UNITY_EDITOR
  2.                         if (!Application.isPlaying)
  3.                         {
  4.                                 panelTrans.localPosition = panelTrans.localPosition - localOffset;
  5.  
  6.                                 Vector4 co = mScrollView.panel.clipOffset;
  7.                                 co.x += localOffset.x;
  8.                                 co.y += localOffset.y;
  9.                                 mScrollView.panel.clipOffset = co;
  10.                         }
  11.                         else
  12. #endif
  13.                         {
  14.                                 SpringPanel.Begin(mScrollView.panel.cachedGameObject,
  15.                                         panelTrans.localPosition - localOffset, springStrength).onFinished = onFinished;
  16.                         }
Note how on top it does it immediately, while at the bottom it does it smoothly.

Just use the top code.

50
NGUI 3 Support / Re: UILabel high GC Alloc and Time Ms
« on: November 06, 2017, 07:18:03 AM »
I'm going to venture a guess and say you're doing a deep profile, which is notoriously unreliable for accurate timings. You also don't need to ask what NGUI does. You have the code -- just look at it. My guess is you are assigning the same string value to the label without checking to see if it's already assigned to that. Looking at the code it does an inequality check, but then still adjusts the collider regardless. You can probably address by moving the collider adjustments:
  1.         public string text
  2.         {
  3.                 get
  4.                 {
  5.                         return mText;
  6.                 }
  7.                 set
  8.                 {
  9.                         if (mText == value) return;
  10.  
  11.                         if (string.IsNullOrEmpty(value))
  12.                         {
  13.                                 if (!string.IsNullOrEmpty(mText))
  14.                                 {
  15.                                         mText = "";
  16.                                         MarkAsChanged();
  17.                                         ProcessAndRequest();
  18.                                         if (autoResizeBoxCollider) ResizeCollider();
  19.                                 }
  20.                         }
  21.                         else if (mText != value)
  22.                         {
  23.                                 mText = value;
  24.                                 MarkAsChanged();
  25.                                 ProcessAndRequest();
  26.  
  27.                                 if (autoResizeBoxCollider) ResizeCollider();
  28.                         }
  29.                 }
  30.         }
Although looking some more at your call stack I see it calling ProcessText and WrapText implying the text does, in fact, change. In which case, those few bytes are likely due to text assignment.

I advise you add a few profiler lines to NGUIText.WrapText to track it down if you're still curious -- but considering how few bytes it is, I wouldn't worry about it.

51
NGUI 3 Support / Re: Occlusion Culling on NGUI UI Root Camera ?
« on: November 06, 2017, 07:13:21 AM »
Occlusion culling option on the camera was added in Unity 5 I think? NGUI's functionality long predates it. There is no need to have it on. Turn it off.

52
Not sure about this one... I always used InControl to have a consistent key binding setup regardless of the controller. This post may help: http://www.tasharen.com/forum/index.php?topic=13047.0

UIPopupList itself doesn't listen to specific keys. You can just search for "OnClick" in it to see what it does -- the event comes from the UICamera (around line 2471).

53
NGUI 3 Support / Re: MiniMap circle mask
« on: November 06, 2017, 07:01:27 AM »
I gave this a brief test -- new scene, ALT+SHIFT+S, right click to make a new panel, changed it to use a texture mask for clipping and dragged the sprite underneath it. I then saved the scene, went to another scene and returned to the test one -- still clipped fine. Can you explain what you're doing differently?

54
Are you using controller-exclusive input, or are you accepting input from other sources as well? If only controller input is allowed, then it shouldn't be possible to not have something selected at all times. Have you checked the controller input example scene to see how it behaves for you? And last but not least, did you make sure your button's collider is actually enabled? UIKeyNavigation will not select an object with a disabled collider.

The Explicit constraint has no effect on the initial selection.

55
NGUI 3 Support / Re: MiniMap circle mask
« on: October 19, 2017, 02:39:28 AM »
UIPanel can accept a clipping mask. Just specify a circular mask there, and it will clip everything below it. You don't need a shader for this, assuming you're going to be using the default NGUI shaders for the sprites within.

56
NGUI 3 Support / Re: Scroll view and cell snap Problem
« on: October 19, 2017, 02:36:08 AM »
Did you check what is getting the OnDrop event? My guess is you're not dropping it on the object you think you are. Check what colliders are underneath the event. Also this seems like the very thing that's being done in the drag & drop example that comes with NGUI...

57
NGUI 3 Support / Re: iPhoneX safe area support
« on: October 19, 2017, 02:33:53 AM »
Assuming you're doing anchoring, seems like it would be a simple matter of adjusting the anchors. If you anchor everything to a UIWidget that's then anchored to the UIRoot, you can adjust that widget's offsets on iPhoneX to account for the restricted area. So basically all you need to do is adjust a single widget's dimensions to fix the problem.

58
NGUI 3 Support / Re: Animation with Sprite Sheets
« on: October 19, 2017, 02:31:44 AM »
Why don't you use Unity's sprite system, and use UI2DSprite to draw it?

59
NGUI 3 Support / Re: Circular bound for UIdragObject?
« on: October 19, 2017, 02:30:52 AM »
You'll need to write some code for that. Create a copy of the UIDragObject script, or edit the existing one.

Personally I wouldn't use it for an on-screen joystick. I'd write a custom script for it, as a joystick also needs to spring back to the center when released.

Something like this would be trivial to do -- custom script with an OnDrag function that moves some target sprite, keeping it within X distance of the desired center. When released, snap or SpringLerp back to center.

60
I didn't get any emails regarding this. Maybe try PMing me the download link here?

Pages: 1 2 3 [4] 5 6 ... 1447