Version: 2018.1
public bool isConnected ;

Description

Returns true when Editor is connected to the player.