Skip to content

Commit ed1f5fd

Browse files
committed
Merge branch 'pr607' into v1.0.94
2 parents d2008f7 + f3523bc commit ed1f5fd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

poco/drivers/unity3d/unity3d_poco.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,16 @@ def __init__(self, addr=DEFAULT_ADDR, unity_editor=False, connect_default_device
8080
super(UnityPoco, self).__init__(addr[1], dev, ip=addr[0], **options)
8181
# If some devices fail to initialize, the UI tree cannot be obtained
8282
# self.vr = UnityVRSupport(self.agent.rpc)
83+
84+
def send_message(self, message):
85+
self.agent.rpc.call("SendMessage", message)
86+
87+
def invoke(self, listener, **kwargs):
88+
callback = self.agent.rpc.call("Invoke", listener=listener, data=kwargs)
89+
90+
value, error = callback.wait()
91+
92+
if error is not None:
93+
raise Exception(error)
94+
95+
return value

0 commit comments

Comments
 (0)