UI Api seems to be broken in KSP 1.9
florius0 opened this issue ยท 4 comments
canvas.add_panel throws this
panel = canvas.add_panel() # container for our button File "<string>", line 1, in <lambda> File "/usr/local/lib/python3.7/site-packages/krpc/client.py", line 163, in _invoke raise self._build_error(response.results[0].error) krpc.error.RPCError: Object reference not set to an instance of an object Server stack trace: at KRPC.UI.Addon.Instantiate (UnityEngine.GameObject parent, System.String prefabName) [0x00046] in <ce8c06d53613479eb37c113b7d1a2571>:0 at KRPC.UI.Panel..ctor (UnityEngine.GameObject parent, System.Boolean visible) [0x00000] in <ce8c06d53613479eb37c113b7d1a2571>:0 at KRPC.UI.Canvas.AddPanel (System.Boolean visible) [0x00006] in <ce8c06d53613479eb37c113b7d1a2571>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <ad04dee02e7e4a85a1299c7ee81c79f6>:0
Still doesn't work, how can i update the telemetry using awt or swing ?
output /
Exception in thread "main" krpc.client.RPCException: Object reference not set to an instance of an object
Server stack trace:
at KRPC.UI.Addon.Instantiate (UnityEngine.GameObject parent, System.String prefabName) [0x00046] in :0
at KRPC.UI.Panel..ctor (UnityEngine.GameObject parent, System.Boolean visible) [0x00000] in :0
at KRPC.UI.Canvas.AddPanel (System.Boolean visible) [0x00006] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in :0
at krpc.client.Connection.throwException(Connection.java:312)
at krpc.client.Connection.invoke(Connection.java:204)
at krpc.client.Connection.invoke(Connection.java:197)
at krpc.client.services.UI$Canvas.addPanel(UI.java:486)
at testar.main(testar.java:31)
i'm having the exact same issue. cc @djungelorm
I'm having this issue too. Looks like KSP 1.8.0 updated the Unity version. Confirmed that this error doesn't show up in KSP 1.7.3 and 1.5.1, but does show up >= 1.8.0 (Using kRPC 0.4.8). I bet if the Unity version that kRPC uses is updated this error would go away.
Still doesn't work as of July 2021, @bradAnders is there an easy way of doing that, my programming knowledge does not extend to Unity?