public override void OnNodeGUI()
        {
            GUILayout.Space(EditorGUIUtility.singleLineHeight);
            node.outputMesh = EditorGUILayout.ObjectField(node.outputMesh, typeof(Mesh), false) as Mesh;

            node.displayPreview = EditorGUILayout.Foldout(node.displayPreview, "preview");

            if (node.displayPreview)
            {
                EditorGUIUtility.labelWidth = 75;

                previewMaterial = EditorGUILayout.ObjectField("preview Mat", previewMaterial, typeof(Material), false) as Material;

                meshPreview.Render(node.outputMesh, previewMaterial);
            }
        }
 public void Render(Material mat)
 {
     objectPreview.Render(previewMesh, mat);
 }