public override void OnInspectorGUI()
    {
        serializedObject.Update();
        initializeIfNecessary();


        var centeredStyleLabel = GUI.skin.GetStyle("Label");

        centeredStyleLabel.alignment = TextAnchor.UpperCenter;
        var centeredStyleIntField = GUI.skin.GetStyle("textField");

        centeredStyleIntField.alignment = TextAnchor.UpperCenter;

        var centeredStyleButton = GUI.skin.GetStyle("Button");

        centeredStyleButton.alignment = TextAnchor.UpperCenter;

        Texture myTexture = (Texture)Resources.Load("CYInspector_string");

        GUILayout.Label(myTexture);

        if (showPreProp.boolValue)
        {
            visualizeNetwork();
            GUILayout.Label("", centeredStyleLabel);
        }

        showPreProp.boolValue = GUILayout.Toggle(showPreProp.boolValue, "Show Preview");
        nnidProp.intValue     = EditorGUILayout.IntField("NN ID: ", nnidProp.intValue);

        if (GUILayout.Button(new GUIContent("Open in CY-Editor", "Opens a new window for editing the Neural Network Node, where you can specify the number of nodes, layers, etc."), centeredStyleButton))
        {
            CY_NN_Window.Init(serializedObject);
        }

        //CY_NeuralNetworkNode cynnn = (CY_NeuralNetworkNode)target;


        serializedObject.ApplyModifiedProperties();
    }
    // Add menu named "My Window" to the Window menu
    //[MenuItem("Window/ChallengeYourself")]
    public static void Init(SerializedObject serializedObject)
    {
        // Get existing open window or if none, make a new one:
        CY_NN_Window window = (CY_NN_Window)EditorWindow.GetWindow(typeof(CY_NN_Window));

        window.Show();

        window.showFunctions     = false;
        window.showStatistics    = true;
        window.showVisualization = true;

        window.serializedObject = serializedObject;
        window.nnidProp         = serializedObject.FindProperty("NeuralNetworkID");
        window.showPreProp      = serializedObject.FindProperty("showPreview");

        window.initialized        = serializedObject.FindProperty("initialized");
        window.nrInputs           = serializedObject.FindProperty("nrInputs");
        window.nrHiddenLayers     = serializedObject.FindProperty("nrHiddenLayers");
        window.nrOutputs          = serializedObject.FindProperty("nrOutputs");
        window.nrHiddenLayerNodes = serializedObject.FindProperty("nrHiddenLayerNodes");
        window.nrCalls            = serializedObject.FindProperty("nrCalls");
        window.nrTrainings        = serializedObject.FindProperty("nrTrainings");
        window.performance        = serializedObject.FindProperty("performance");
    }