poco.drivers.unity3d.unity3d_poco module

class UnityPoco(addr=('localhost', 5001), unity_editor=False, connect_default_device=True, **options)[source]

Bases: poco.drivers.std.StdPoco

Poco Unity3D implementation.

Parameters:
  • addr (tuple) – the endpoint of your Unity3D game, default to ("localhost", 5001)
  • unity_editor (bool) – whether your Unity3D game is running in UnityEditor or not. default to False
  • connect_default_device (bool) – whether connect to a default device if no devices selected manually. default to True.
  • options – see poco.pocofw.Poco

Examples

If your game is running on Android, you could initialize poco instance by using following snippet:

from poco.drivers.unity3d import UnityPoco

# your phone and your PC/mac should be inside the same sub-net.
ip = '<ip address of your phone>'
poco = UnityPoco((ip, 5001))
poco('button').click()
...