Author Topic: Two questions aobut 2.6.1  (Read 7461 times)

galuodo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 65
    • View Profile
Two questions aobut 2.6.1
« on: May 05, 2013, 10:01:07 PM »
Now, I updated my NGUI to 2.6.1 var, dynamic font seems very exciting!!!However, there is a problem when I import package: IN line 116 UIAtlasMaker.cs, SystemInfo.maxTextureSize cannot be find( and my unity version is 4.0.0), so I change that to
  1. int maxSize = 4096;
, and i don't if it may lead to  further problems.

And when I import a TTF file, I find the filter cannot change, the text, therefore, is a little blur, so Is there any method to change the filter mode?

Thanks~~

maoguo.zhang

  • Guest
Re: Two questions aobut 2.6.1
« Reply #1 on: May 05, 2013, 10:40:53 PM »
SystemInfo.maxTextureSize is supported in Unity4.1.2 API.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #2 on: May 06, 2013, 01:49:07 AM »
NGUI always supports the latest releases -- this means 4.1.2+ and 3.5.7.

iandunlop_oefun

  • Guest
Re: Two questions aobut 2.6.1
« Reply #3 on: May 06, 2013, 11:13:21 AM »
NGUI always supports the latest releases -- this means 4.1.2+ and 3.5.7.

UIAtlasMaker.cs / line 120:
  1. if (PlayerSettings.targetGlesGraphics == TargetGlesGraphics.OpenGLES_1_x)

This won't compile on 3.5.7f6.

iandunlop_oefun

  • Guest
Re: Two questions aobut 2.6.1
« Reply #4 on: May 06, 2013, 11:28:18 AM »
Here is another one:

UIPanelInspector.cs / line 186:

  1. if (PlayerSettings.targetGlesGraphics == TargetGlesGraphics.OpenGLES_1_x)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #5 on: May 06, 2013, 04:27:34 PM »
Guess I didn't spot those since they are ifdef'd for androd/ios only. I'll add in another #ifdef in there, thanks.

kayy

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #6 on: June 11, 2013, 11:00:18 AM »
I just updated from 2.3xx to 2.6.2 and got the above mentioned compiler error on Unity 3.5.7f6 target iOS:
  1. Assets/ImportedAssets/NGUI/Scripts/Editor/UIAtlasMaker.cs(121,36): error CS0117: `UnityEditor.PlayerSettings' does not contain a definition for `targetGlesGraphics'

Commenting out lines 120-126 makes the compiler happy so far, but I don't know about side effects.
What do you recommend?

Update:
After some testing I found out that commenting out has side effects on sliders. Their range is now limited to about 60% of the specified max value.
« Last Edit: June 11, 2013, 12:08:36 PM by kayy »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #7 on: June 11, 2013, 01:17:46 PM »
Sliders are not affected by this. Sliders were changed to use their foreground's starting size as the "size" parameter as that parameter was removed. You need to resize your sliders to be 100% in edit mode.

kayy

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #8 on: June 11, 2013, 01:31:05 PM »
Thanks for the slider hint, it's working.
What about the compiler error? Can you confirm (or rather do you think ;-) that commenting out is alright?

Preprocessor define UNITY_3_5 appears to be unset but if the code is just a fallback for old Unity versions running OpenGL 1.x, I don't care. That's how the code looks like now and it seems to work so far:

  1. #if UNITY_ANDROID || UNITY_IPHONE
  2. //#if !UNITY_3_5 || !UNITY_4_0
  3. //              if (PlayerSettings.targetGlesGraphics == TargetGlesGraphics.OpenGLES_1_x)
  4. //              {
  5. //                      maxSize = Mathf.Min(maxSize, 1024);
  6. //              }
  7. //              else
  8. //#endif
  9.                 {
  10.                         maxSize = Mathf.Min(maxSize, NGUISettings.allow4096 ? 4096 : 2048);
  11.                 }
  12. #endif
  13.  

Am I the only one having this problem??

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #9 on: June 11, 2013, 03:26:52 PM »
It's fine. Keep in mind, I can't support every version of Unity as doing so requires me to have every single version installed and test in -- a nightmare to begin with. I can only support the latest versions -- which means latest 3 and latest 4.

There is really no reason not to upgrade your version of Unity.

kayy

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #10 on: June 11, 2013, 03:42:44 PM »
OK that's what I wanted to hear. Thanks for the quick answer - and your famous product NGUI in general :-))

BTW 3.5.7f6 is the most recent version of Unity 3, I just ran an update check. Don't know why this error is showing up here and not at other places. However, as long as it works I don't need answers for all questions ;-)

casimps1

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #11 on: June 17, 2013, 08:59:59 PM »
I also just got the TargetGlesGraphics compile error on a fresh import of NGUI 2.6.2 (latest) into Unity 3.5.7 (latest) set to the Android platform.

Looks like a typo in the ifdef to me (line 121 of UIAtlasMaker.cs):

  1. #if !UNITY_3_5 || !UNITY_4_0

is always true. I'm guessing maybe you meant this to be:

  1. #if !UNITY_3_5 && !UNITY_4_0

I guess those properties weren't introduced until a later version of Unity 4?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #12 on: June 17, 2013, 09:17:47 PM »
Right you are! Typo there. I will fix it, thanks!

...come to think of it, why isn't this showing up on my 3.5.7? Odd.

LoonyBen

  • Guest
Re: Two questions aobut 2.6.1
« Reply #13 on: July 26, 2013, 04:29:27 AM »
Problem is back with newest version of Unity 4.1.2 and NGUI 2.6.3

Line 121 of UIAtlasMaker !UNITY_3_5 && !UNITY_4_0 (added && !UNITY_4_1)
Line 198 of UIPanelInspector !UNITY_3_5 && !UNITY_4_0 (added && !UNITY_4_1)

Should line 114 of UIAtlasMaker  UNITY_3_5 && UNITY_4_0 also need UNITY_4_1 as well?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Two questions aobut 2.6.1
« Reply #14 on: July 26, 2013, 04:42:14 AM »
The latest version of Unity is 4.2.0, not 4.1.2. This functionality exists in 4.1+, so why include UNITY_4_1?