Author Topic: Can't move object  (Read 2107 times)

Medico

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Can't move object
« on: December 29, 2014, 03:21:54 PM »
Hi,

I just downloaded the latest version Unity so that's probably what has caused this problem.

The problem is that when I try and move a sprite in the scene, it won't budge at all and as long as I'm trying to move it a long slew of errors show up on my console.

Error the first:
NullReferenceException: Object reference not set to an instance of an object
UIPanel.get_worldCorners () (at Assets/Function/NGUI/Scripts/UI/UIPanel.cs:623)
UIPanel.get_localCorners () (at Assets/Function/NGUI/Scripts/UI/UIPanel.cs:554)
NGUISnap.Add (UnityEngine.Transform root, UnityEngine.Transform child) (at Assets/Function/NGUI/Scripts/Editor/NGUISnap.cs:101)
NGUISnap.Recalculate (UnityEngine.Transform t) (at Assets/Function/NGUI/Scripts/Editor/NGUISnap.cs:81)
NGUISnap.Recalculate (UnityEngine.Object obj) (at Assets/Function/NGUI/Scripts/Editor/NGUISnap.cs:59)
UIWidgetInspector.OnSceneGUI () (at Assets/Function/NGUI/Scripts/Editor/UIWidgetInspector.cs:608)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.SceneView.CallOnSceneGUI ()
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI ()
UnityEditor.SceneView.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

Error the second:
The targets array should not be used inside OnSceneGUI or OnPreviewGUI. Use the single target property instead.
UnityEditor.DockArea:OnGUI()

As these errors repeat themselves on the console hundreds of times.

Another error I just noticed whilst typing this, selecting any NUGI item in my scene like a label seems to create hundreds of these errors and stop me from being able to scroll through the scene or move at all until I open the console.

Any ideas?
Thanks
Jack Lewis

Medico

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 10
    • View Profile
Re: Can't move object
« Reply #1 on: December 29, 2014, 09:48:14 PM »
As I just updated Unity and am using an out of date version of NGUI, shall I update it to see if that fixes the issue?

Doyu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
  • I love games ;)
    • View Profile
    • Mascotas
Re: Can't move object
« Reply #2 on: December 30, 2014, 04:11:06 AM »
You should always update your NGUI version. It's always backwards compatible, so you don't have to worry about it.
Game developer on [Doyu Games.