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