Author Topic: Does NGUI still support unity 4.7.0f1 or above ?  (Read 4181 times)

Tomleung

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 44
    • View Profile
Does NGUI still support unity 4.7.0f1 or above ?
« on: January 12, 2016, 10:44:25 AM »
Does NGUI still support unity 4.7.0f1 or above?

I use NGUI 3.9.3 or 3.9.4b, it would show an error:

Assets/NGUI/Scripts/Interaction/UIPopupList.cs(1004,45): error CS1061: Type `UnityEngine.BoxCollider2D' does not contain a definition for `offset' and no extension method `offset' of type `UnityEngine.BoxCollider2D' could be found (are you missing a using directive or an assembly reference?)

If I use NGUI 3.9.6d, it would even unsuccessfully decompile the package.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Does NGUI still support unity 4.7.0f1 or above ?
« Reply #1 on: January 13, 2016, 07:13:05 PM »
Yes, it should support it as-is. What issue are you getting in 3.9.6d with 4.7.0?

Tomleung

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 44
    • View Profile
Re: Does NGUI still support unity 4.7.0f1 or above ?
« Reply #2 on: January 14, 2016, 09:30:07 AM »
Yes, it should support it as-is. What issue are you getting in 3.9.6d with 4.7.0?

it immediately showed an error:

"Error while importing package: Package has unknown format"

larrykirschner

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Does NGUI still support unity 4.7.0f1 or above ?
« Reply #3 on: January 14, 2016, 03:25:52 PM »
Just starting to upgrade now, but I would guess anywhere there's a

#if UNITY_4_6

...it now needs to be...

#if (UNITY_4_6 || UNITY_4_7)

I wonder why they couldn't just make the version 4.6.10?

larrykirschner

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Does NGUI still support unity 4.7.0f1 or above ?
« Reply #4 on: January 14, 2016, 03:29:26 PM »
I ran the following search/replace on my project which has NGUI 3.9.6

find Assets -name "*.cs" -exec perl -pi -e "s/UNITY_4_6/(UNITY_4_6 || UNITY_4_7)/g" {} \; -print

...and it modified these NGUI files:

M       Assets/NGUI/Examples/Scripts/InventorySystem/Game/UICursor.cs
M       Assets/NGUI/Scripts/Editor/FreeType.cs
M       Assets/NGUI/Scripts/Editor/NGUIEditorExtensions.cs
M       Assets/NGUI/Scripts/Editor/UIPrefabTool.cs
M       Assets/NGUI/Scripts/Interaction/UIButton.cs
M       Assets/NGUI/Scripts/Interaction/UIButtonColor.cs
M       Assets/NGUI/Scripts/Interaction/UIDragDropItem.cs
M       Assets/NGUI/Scripts/Interaction/UIImageButton.cs
M       Assets/NGUI/Scripts/Interaction/UIPopupList.cs
M       Assets/NGUI/Scripts/Interaction/UIProgressBar.cs
M       Assets/NGUI/Scripts/Interaction/UIScrollBar.cs
M       Assets/NGUI/Scripts/Interaction/UISlider.cs
M       Assets/NGUI/Scripts/Internal/EventDelegate.cs
M       Assets/NGUI/Scripts/Internal/NGUIText.cs
M       Assets/NGUI/Scripts/Internal/NGUITools.cs
M       Assets/NGUI/Scripts/Internal/UIRect.cs
M       Assets/NGUI/Scripts/Internal/UIWidget.cs
M       Assets/NGUI/Scripts/Tweening/TweenColor.cs
M       Assets/NGUI/Scripts/Tweening/TweenFOV.cs
M       Assets/NGUI/Scripts/Tweening/TweenOrthoSize.cs
M       Assets/NGUI/Scripts/UI/UIAnchor.cs
M       Assets/NGUI/Scripts/UI/UICamera.cs
M       Assets/NGUI/Scripts/UI/UILabel.cs
M       Assets/NGUI/Scripts/UI/UIPanel.cs
M       Assets/NGUI/Scripts/UI/UIStretch.cs
M       Assets/NGUI/Scripts/UI/UIViewport.cs

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Does NGUI still support unity 4.7.0f1 or above ?
« Reply #5 on: January 16, 2016, 01:34:32 PM »
I am using Unity 4.7.0f1, and there are no warnings of any kind on the latest version of NGUI. Make sure your on the "d" revision of 3.9.6.

As for "Error while importing package", my guess is you are importing a Unity 5 package with Unity 4. You should grab the correct version from the Asset Store.