Author Topic: 3.0.6 rc3 generates compiler error when doing javascript workaround  (Read 6268 times)

skullthug

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 37
    • View Profile
The project I'm working on is entrenched with javascript, so to make NGUI work with it I've been doing the workaround of moving the Interaction, Internal, Tweening, and UI folders to be in the Plugins folder so they compile in the right order. After upgrading to 3.0.6rc from 3.0.5 though I'm now getting the following:

Assets/Plugins/NGUI/Internal/NGUITools.cs(358,34): error CS0117: `UnityEditor.Undo' does not contain a definition for `RecordObject'


Any idea what to do?
(I deleted all NGUI scripts/folders and imported the package, as stated in the instructions)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3.0.6 rc3 generates compiler error when doing javascript workaround
« Reply #1 on: November 24, 2013, 04:38:46 PM »
What version of Unity? I'm guessing it's not the latest.

skullthug

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: 3.0.6 rc3 generates compiler error when doing javascript workaround
« Reply #2 on: November 24, 2013, 06:10:36 PM »
4.2.2f1

I'm guessing 4.3 is required?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: 3.0.6 rc3 generates compiler error when doing javascript workaround
« Reply #3 on: November 24, 2013, 06:24:43 PM »
No, just means I can only test it on the latest versions. You can fix that by changing the RegisterUndo function to the following:
  1.         static public void RegisterUndo (UnityEngine.Object obj, string name)
  2.         {
  3. #if UNITY_EDITOR
  4.  #if UNITY_3_5 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2
  5.                 UnityEditor.Undo.RegisterUndo(obj, name);
  6.  #else
  7.                 UnityEditor.Undo.RecordObject(obj, name);
  8.  #endif
  9.                 UnityEditor.EditorUtility.SetDirty(obj);
  10. #endif
  11.         }

skullthug

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 0
  • Posts: 37
    • View Profile
Re: 3.0.6 rc3 generates compiler error when doing javascript workaround
« Reply #4 on: November 24, 2013, 06:38:18 PM »
That fixed it. Awesome, thanks for responding so quickly!
Also, thank you so much for adding gradient text and x/y spacing. Ever since you put it in the version list I've been dying to get 3.0.6 :)