poco.drivers.unity3d.unity3d_poco module

class UnityPoco(addr=('localhost', 5001), unity_editor=False, connect_default_device=True, device=None, **options)[源代码]


Poco Unity3D implementation.

  • 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. device (Device): airtest.core.device.Device instance provided by airtest. leave the parameter default and the default device will be chosen. more details refer to airtest doc
  • options – see poco.pocofw.Poco


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))