Author Topic: 2.6.1e bug in Unity 4.0.x  (Read 2954 times)

indyocean

  • Guest
2.6.1e bug in Unity 4.0.x
« on: May 09, 2013, 11:31:55 PM »
I got a error message in 2.6.1e version.

Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs(116,42): error CS0117: `UnityEngine.SystemInfo' does not contain a definition for `maxTextureSize'


'SystemInfo.maxTextureSize' in UIAtlasMaker.cs was added from Unity 4.1

------------------------------------------------------------
#if UNITY_3_5
      int maxSize = 4096;
#else
      int maxSize = SystemInfo.maxTextureSize;       // Error in Unity 4.0.x
#endif
------------------------------------------------------------
« Last Edit: May 09, 2013, 11:57:33 PM by indyocean »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 2.6.1e bug in Unity 4.0.x
« Reply #1 on: May 09, 2013, 11:58:19 PM »
Yes, you need to update your Unity. There is really no reason to stay at 4.0 considering the variety of issues that were fixed in 4.1.

rover7

  • Guest
Re: 2.6.1e bug in Unity 4.0.x
« Reply #2 on: May 13, 2013, 07:38:59 AM »
What is the last commit/version that works with Unity 4.0.x?

sloopernine

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 47
    • View Profile
Re: 2.6.1e bug in Unity 4.0.x
« Reply #3 on: June 03, 2013, 02:09:19 PM »
I dont know if it will make new errors, but if you dont want to upgrade unity for some reason, try edit the code where you get error...

  1. #if UNITY_3_5
  2.       int maxSize = 4096;
  3. #else
  4.       int maxSize = SystemInfo.maxTextureSize;       // Error in Unity 4.0.x
  5. #endif
  6.  

to something like this? ( On your own risk )

  1. #if UNITY_3_5
  2.       int maxSize = 4096;
  3. #else
  4.       int maxSize = 4096; //SystemInfo.maxTextureSize;       // Error in Unity 4.0.x
  5. #endif
  6.