public override void OnInspectorGUI() { base.OnInspectorGUI(); NetworkStatus status = (NetworkStatus)target; status.IpInput = GUILayout.TextField(status.IpInput, 3); if (GUILayout.Button("Reconnect") && Application.isPlaying) { status.OnReconnectClick(); } }
void OnEnable() { _status = GetComponent <NetworkStatus>(); }