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

Pages: [1]
1
NGUI 3 Support / UIInput Modifiers
« on: January 09, 2017, 09:18:22 AM »
Hi,

In order for us to achieve proper Arabic text support in Unity, we use the ArabicSupport library, which just maps the arabic characters into the proper glyphs based on their positioning.

Now, instead of handling OnChange events on all UIInput instances, it would be great to have some sort of plugin system with modifiers (something like: delegate string Process(string s)).

For now, I have simply modified UIInput.cs and changed line 1378 to:
label.text = ArabicSupport.ArabicFixer.Fix(processed);

While thinking of a generalized use case, I realized that this feature could be extremely useful to handle text input, dealing with Emoji input and whatnot.

2
NGUI 3 Support / Can't build on Unity 5.5.0
« on: December 01, 2016, 11:04:16 AM »
Hi,

I think you need to add using using UnityEngine.Profiling; whenever you use Profile class. See here:
http://forum.photonengine.com/discussion/8327/unity-5-5-0b3-gives-errors

Thanks,
Maz

3
NGUI 3 Support / NGUI 3.10.0 Bugs
« on: August 01, 2016, 03:16:57 AM »
Hi,

I've just upgraded to the latest NGUI, and was doing a quick code review.. I'll list my findings here:

1. BlackBerry bug:
The original implementation was using #else, so the if statement was always executed. With the new implementation, non of the if statements are compiled on unity 5.4, so the assignment code "value = ..." is always executed, which doesn't seem right.

      // BB10's implementation has a bug in Unity
#if UNITY_4_3
      if (Application.platform == RuntimePlatform.BB10Player)
#elif UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3
      if (Application.platform == RuntimePlatform.BlackBerryPlayer)
#endif
         value = value.Replace("\\b", "\b");

To fix this, you can do:

      // BB10's implementation has a bug in Unity
#if UNITY_4_3
      if (Application.platform == RuntimePlatform.BB10Player)
         value = value.Replace("\\b", "\b");
#elif UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2 || UNITY_5_3
      if (Application.platform == RuntimePlatform.BlackBerryPlayer)
         value = value.Replace("\\b", "\b");
#endif

Incidentally, this is why I never write if statements without braces. It would be good practice if you always include braces in your code.


... Well, that was it, really. Just one issue.

Thanks,
Maz

4
NGUI 3 Support / Re: Physics.processing high CPU usage on iPad
« on: July 30, 2016, 09:40:12 AM »
@Aren In the game, we had the clipping feature enabled because we needed it to implement a certain animation, but that animation was replaced recently with a simpler one. So, while cleaning up the project today, I turned off the clipping feature, and I am finally seeing my game run at 60 FPS without the tiniest of lags!

I'm not interested in finding a solution for the clipping performance issues, since we removed it, but please do keep that in mind as a reference point, in case you or one of your users faces a similar issue.

5
NGUI 3 Support / Re: Physics.processing high CPU usage on iPad
« on: June 28, 2016, 12:25:50 PM »
Assuming you didn't get rid of the rigidbody on the UIRoot's game object, there shouldn't be any performance hits coming from moving widgets with colliders around. Worst NGUI does is performs a Physics.Raycast when touches are active. Nothing at all chances if there are no widgets with colliders moving around.

Lastly, make sure your UI's layer isn't set to collide with anything.

Thanks ArenMook. I assume from your response that this is not a known issue as far as you guys know.
I will look closer into the GUI hierarchy and try building a new project on the iPad and see, perhaps on of the sample projects. If that performs poorly, I'm guessing there is something wrong.

6
NGUI 3 Support / Re: I2 Localization now supports NGUI!!!
« on: June 27, 2016, 09:41:54 PM »
Definitely buying this for the RTL Arabic support ... Great work!

7
NGUI 3 Support / Re: Physics.processing high CPU usage on iPad
« on: June 27, 2016, 07:07:02 PM »
I understand that I am not providing sufficient information about the issue, it's because we really aren't doing anything special with the game. It's just super simple game scene with the UIRoot holding a UICamera and two UIPanels. UIPanels have buttons and labels, and that's it.

I am guessing someone must've stumbled across this before, but my search didn't lead me to any practical solution. The post I reference suggests "removing NGUI", but we are already invested in it and love the features it provides.

Thanks in advance,
Maz

8
NGUI 3 Support / Physics.processing high CPU usage on iPad
« on: June 27, 2016, 11:28:49 AM »
Hello,

We started profiling our game recently on the iPad, and realized there are intervals where physics takes tons of CPU cycles, and causes frame rate to drop to 30 FPS.

According to my research, this is an NGUI issue. People have complained about this on the Unity Store reviews, as well as over here for example:
http://answers.unity3d.com/answers/1162136/view.html

Can you please advise us how to resolve this? Our game doesn't use Physics at all...

NGUI: 3.9.9
Unity: 5.4.0b18
Xcode: 7.3.1
iOS: 9.1
iPad: Mini RD 2
macOS: 10.11.4

Pages: [1]