override public void OnInspectorGUI()
        {
            GUILayout.Space(5);
            if (tex_logo != null)
            {
                UniOSCUtils.DrawClickableTextureHorizontal(tex_logo, () => { EditorApplication.ExecuteMenuItem(UniOSCUtils.MENUITEM_EDITOR); });
            }

            serializedObject.Update();


            EditorGUI.BeginChangeCheck();


            FoldoutOSCInProp.boolValue = EditorGUILayout.Foldout(FoldoutOSCInProp.boolValue, "OSC IN");
            if (FoldoutOSCInProp.boolValue)
            {
                GUILayout.BeginVertical("box");
                EditorGUILayout.PropertyField(AutoConnectOSCInProp, new GUIContent("Auto connect on start", ""));
                EditorGUILayout.PropertyField(OSCPortProp, new GUIContent("Port:"));
                OSCPortProp.intValue = Mathf.Min(UniOSCUtils.MAXPORT, OSCPortProp.intValue);

                _TransmissionTypeIndex = TransmissionTypeInProp.enumValueIndex;
                _TransmissionTypeIndex = EditorGUILayout.Popup("TransmissionType", _TransmissionTypeIndex, _TransmissionTypes);
                TransmissionTypeInProp.enumValueIndex = _TransmissionTypeIndex;

                GUI.backgroundColor = _target.hasValidOscIPAddress ? Color.green : Color.red;

                if (TransmissionTypeInProp.enumValueIndex == (int)OSCsharp.Net.TransmissionType.Multicast)
                {
                    EditorGUI.BeginChangeCheck();
                    EditorGUILayout.PropertyField(OSCMulticastIPAddressProp, new GUIContent("Multicast IP address", ""));
                    EditorGUILayout.HelpBox("A valid multicast IP address is in the range between 224.0.0.0 and 239.255.255.255 !", MessageType.Warning);
                    if (EditorGUI.EndChangeCheck())
                    {
                        serializedObject.ApplyModifiedProperties();
                        _target.ValidateOscInIPAddress();
                    }
                }
                else
                {
                    GUI.backgroundColor = Color.white;
                    GUILayout.BeginHorizontal("box");
                    EditorGUILayout.LabelField(new GUIContent("Local IP address     ", ""), GUILayout.MaxWidth(115));         //
                    GUILayout.FlexibleSpace();
                    EditorGUILayout.LabelField(new GUIContent(UniOSCConnection.localIPAddress, ""), GUILayout.MaxWidth(100)); //
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                }

                GUI.backgroundColor = Color.white;

                GUILayout.EndVertical();
            }

            if (EditorGUI.EndChangeCheck())
            {
                // Debug.Log("CHANGE");
                serializedObject.ApplyModifiedProperties();
                UniOSCConnection.Update_AvailableOSCSettings();
                _target.Force_SetupChanged_IN();
            }

            EditorGUI.BeginChangeCheck();

            FoldoutOSCOutProp.boolValue = EditorGUILayout.Foldout(FoldoutOSCOutProp.boolValue, "OSC OUT");
            if (FoldoutOSCOutProp.boolValue)
            {
                GUILayout.BeginVertical("box");
                EditorGUILayout.PropertyField(AutoConnectOSCOutProp, new GUIContent("Auto connect on start", ""));
                EditorGUILayout.PropertyField(OSCOutPortProp, new GUIContent("Port", ""));
                OSCOutPortProp.intValue = Mathf.Min(UniOSCUtils.MAXPORT, OSCOutPortProp.intValue);

                // _TransmissionTypes = TransmissionTypeOutProp.enumNames;
                _TransmissionTypeIndexOut = TransmissionTypeOutProp.enumValueIndex;
                _TransmissionTypeIndexOut = EditorGUILayout.Popup("TransmissionType", _TransmissionTypeIndexOut, _TransmissionTypesOut);
                TransmissionTypeOutProp.enumValueIndex = _TransmissionTypeIndexOut;


                GUI.backgroundColor = _target.hasValidOscOutIPAddress ? Color.green : Color.red;
                EditorGUI.BeginChangeCheck();
                switch (TransmissionTypeOutProp.enumValueIndex)
                {
                case (int)OSCsharp.Net.TransmissionType.Unicast:
                    EditorGUILayout.PropertyField(OSCOutIPAddressProp, new GUIContent("Target IP address", ""));
                    break;

                case (int)OSCsharp.Net.TransmissionType.Multicast:
                    EditorGUILayout.PropertyField(OSCOutMulticastIPAddressProp, new GUIContent("Multicast IP address", ""));
                    EditorGUILayout.HelpBox("A valid multicast IP address is in the range between 224.0.0.0 and 239.255.255.255 !", MessageType.Warning);
                    break;

                case (int)OSCsharp.Net.TransmissionType.Broadcast:
                case (int)OSCsharp.Net.TransmissionType.LocalBroadcast:
                    GUI.backgroundColor = Color.white;
                    GUILayout.BeginHorizontal("box");
                    EditorGUILayout.LabelField(new GUIContent("Target IP address", ""), GUILayout.MaxWidth(115));
                    GUILayout.FlexibleSpace();
                    EditorGUILayout.LabelField(new GUIContent(IPAddress.Broadcast.ToString(), ""), GUILayout.MaxWidth(100));
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                    break;
                }

                if (EditorGUI.EndChangeCheck())
                {
                    serializedObject.ApplyModifiedProperties();
                    _target.ValidateOscOutIPAddress();
                }

                GUI.backgroundColor = Color.white;

                GUILayout.EndVertical();
            }

            GUILayout.Space(10);

            if (EditorGUI.EndChangeCheck())
            {
                // Debug.Log("CHANGE");
                serializedObject.ApplyModifiedProperties();
                UniOSCConnection.Update_AvailableOSCSettings();
                _target.Force_SetupChanged_OUT();
            }


            ShowOSCReciverStatus(_target);
            Show("Mapping Files", OSCMappingFileObjListProp);
            Show("Session Files", OSCSessionFileObjListProp);

            if (_target.hasOSCSessionFileAttached)
            {
                //EditorGUILayout.PropertyField(AutoConnectOSCInProp,new GUIContent("Auto connect on start","") );
                if (GUILayout.Button(new GUIContent("Send Session Data", "Send the last OSC data that are recorded with your session files."), GUILayout.Width(150f)))
                {
                    _target.SendSessionData();
                }
                if (!_target.isConnectedOut)
                {
                    EditorGUILayout.HelpBox("To send the session data you have to turn on OSC OUT!", MessageType.Warning);
                }
            }

            serializedObject.ApplyModifiedProperties();

            if (GUI.changed)
            {
                EditorUtility.SetDirty(_target);
            }
        }
        override public void OnInspectorGUI()
        {
            GUILayout.Space(5);
            if (tex_logo != null)
            {
                UniOSCUtils.DrawClickableTextureHorizontal(tex_logo, () => { EditorApplication.ExecuteMenuItem(UniOSCUtils.MENUITEM_EDITOR); });
            }

            serializedObject.Update();

            EditorGUI.BeginChangeCheck();

            FoldoutOSCInProp.boolValue = EditorGUILayout.Foldout(FoldoutOSCInProp.boolValue, "OSC IN");
            if (FoldoutOSCInProp.boolValue)
            {
                GUILayout.BeginVertical("box");
                EditorGUILayout.PropertyField(AutoConnectOSCInProp, new GUIContent("Auto connect on start", ""));
                EditorGUILayout.PropertyField(OSCPortProp, new GUIContent("Port:"));
                OSCPortProp.intValue = Mathf.Min(UniOSCUtils.MAXPORT, OSCPortProp.intValue);
                GUILayout.EndVertical();
            }


            FoldoutOSCOutProp.boolValue = EditorGUILayout.Foldout(FoldoutOSCOutProp.boolValue, "OSC OUT");
            if (FoldoutOSCOutProp.boolValue)
            {
                GUILayout.BeginVertical("box");
                EditorGUILayout.PropertyField(AutoConnectOSCOutProp, new GUIContent("Auto connect on start", ""));
                EditorGUILayout.PropertyField(OSCOutPortProp, new GUIContent("Port", ""));
                OSCOutPortProp.intValue = Mathf.Min(UniOSCUtils.MAXPORT, OSCOutPortProp.intValue);
                EditorGUILayout.PropertyField(OSCOutIPAddressProp, new GUIContent("Target IPAddress", ""));
                GUILayout.EndVertical();
            }

            GUILayout.Space(10);

            if (EditorGUI.EndChangeCheck())
            {
                serializedObject.ApplyModifiedProperties();
                UniOSCConnection.Update_AvailablePorts();
            }
            ShowOSCReciverStatus(_target);
            Show("Mapping Files", OSCMappingFileObjListProp);
            Show("Session Files", OSCSessionFileObjListProp);

            if (_target.hasOSCSessionFileAttached)
            {
                //EditorGUILayout.PropertyField(AutoConnectOSCInProp,new GUIContent("Auto connect on start","") );
                if (GUILayout.Button(new GUIContent("Send Session Data", "Send the last OSC data that are recorded with your session files."), GUILayout.Width(150f)))
                {
                    _target.SendSessionData();
                }
                if (!_target.isConnectedOut)
                {
                    EditorGUILayout.HelpBox("To send the session data you have to turn on OSC OUT!", MessageType.Warning);
                    //EditorGUI.HelpBox(area,"OSC IN: "+UniOSCConnection.localIPAddress+"\nPort: "+oscConnection.oscPort+"\nListening", MessageType.Info);
                }
            }

            serializedObject.ApplyModifiedProperties();

            if (GUI.changed)
            {
                EditorUtility.SetDirty(_target);
            }
        }