sabresaurus/Sidekick

My first experience with Sidekick

Closed this issue · 2 comments

  • I wanted to download just Sidekick to add it to a project but got an entire project instead.
  • I got hundreds of inconsistent line ending warnings on all sorts of scripts in 2017.3.0f3.
  • Slightly confusing that I see Old Sidekick and Sidekick in the Tools menu.
  • First time opening the window I was confused as it was empty until I selected a different game object.
  • Ah "Display" shows me methods! Should have used several checkbox toolbar icons to make it more obvious, like the C# intellisense ones.
  • Tried clicking on a method AddComponent with an argument, got a NullReferenceException, didn't see the arrow on the right because my inspector window was too small, did notice a scrollbar at the bottom later.
  • Oh well doesn't actually allow me to set the argument using the Fire button either and got an InvalidOperationException instead. So... can I at all?
  • So decided to create a new script called it "Test" it seemed quite appropriate, since it's a test... for testing things.
public void DoSomething(bool value)
{
	if (value)
	{
		transform.position += Vector3.up;
	}
	else
	{
		transform.position -= Vector3.up;
	}
}
  • Tried to add "Test" to my cube using the Sidekick inspector, didn't work, got quite sad.
  • DoSomething (1) turns up in the list.
  • I click on it and the cube moves down so the value is false..
  • Oh expanded it and it shows a checkbox for "value" what a surprise!
  • Have to click the Fire button can't use the original button, seems a bit, duplicated.
  • Search feature works incredibly well, totally intuitive.
  • At this point I feel like I have seen it all and can totally work with it.
  • But suddenly after exiting play mode and pressing the down arrow I am getting a lot of console errors.
NullReferenceException: Object reference not set to an instance of an object
VariableDrawer.Draw (Sabresaurus.Sidekick.ComponentDescription componentDescription, Sabresaurus.Sidekick.WrappedVariable variable, System.Action`2 onObjectPicker) (at Assets/Sidekick/Editor/VariableDrawer.cs:74)
Sabresaurus.Sidekick.SidekickInspectorWindow.OnGUI () (at Assets/Sidekick/Editor/SidekickInspectorWindow.cs:466)
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/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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
  • I click on another object and back it makes no difference. I tried expanding "BroadcastMessage (2)" of "GameObject".
  • Getting a lot of errors now, expanding "GetComponents (2)".
NullReferenceException: Object reference not set to an instance of an object
Sabresaurus.Sidekick.TypeUtility.GetDefaultValue (System.Type type) (at Assets/Sidekick/Helpers/TypeUtility.cs:12)
Sabresaurus.Sidekick.WrappedParameter.get_DefaultValue () (at Assets/Sidekick/API/Data/WrappedParameter.cs:70)
Sabresaurus.Sidekick.WrappedVariable..ctor (Sabresaurus.Sidekick.WrappedParameter parameter) (at Assets/Sidekick/API/Data/WrappedVariable.cs:165)
Sabresaurus.Sidekick.SidekickInspectorWindow.OnGUI () (at Assets/Sidekick/Editor/SidekickInspectorWindow.cs:452)
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/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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)
  • Can no longer click on DoSomething either.
MissingReferenceException: The object of type 'Test' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Test.DoSomething (Boolean value) (at Assets/Test.cs:25)
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/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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
Sabresaurus.Sidekick.Requests.InvokeMethodRequest.GenerateResponse () (at Assets/Sidekick/API/Requests/InvokeMethodRequest.cs:72)
Sabresaurus.Sidekick.APIManager.SendToPlayers (Sabresaurus.Sidekick.Requests.BaseRequest request) (at Assets/Sidekick/Editor/Common Interfaces/APIManager.cs:37)
Sabresaurus.Sidekick.SidekickInspectorWindow.OnGUI () (at Assets/Sidekick/Editor/SidekickInspectorWindow.cs:430)
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/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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)
  • Starting to give up and tell you my experience, a bit of a sad ending.
  • I only noticed just now making this issue that I forgot to review the Old Sidekick.
  • After clicking around some I noticed it's way too difficult and not nearly as user friendly. Do love the Copy JSON concept but I see no way to paste it back.
  • Got more errors and gave up quickly.
NullReferenceException: Object reference not set to an instance of an object
Sabresaurus.Sidekick.OldInspectorSidekick.OnGUI () (at Assets/Sidekick/Editor/LegacyInspector/OldInspectorSidekick.cs:264)
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/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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)

So I'd say if you manage to prevent these errors it's pretty great indeed! Love calling methods on the fly both in editor and during runtime. Once you get errors this is what it looks like, stuff just goes missing:

image

Hope it helps. :)

Most of this feedback has now been addressed, descoping this issue for 1.0.0 so that it can be reviewed and closed later

Line endings are now normalised, closing