private void SaveSceneCanvasPanel() { GUILayout.Label("Save Canvas To Scene"); GUILayout.BeginHorizontal(); sceneCanvasName = GUILayout.TextField(sceneCanvasName, GUILayout.ExpandWidth(true)); bool overwrite = NodeEditorSaveManager.HasSceneSave(sceneCanvasName); if (overwrite) { GUILayout.Label(new GUIContent("!!!", "A canvas with the specified name already exists. It will be overwritten!"), GUILayout.ExpandWidth(false)); } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); if (GUILayout.Button("Cancel")) { showModalPanel = false; } if (GUILayout.Button(new GUIContent(overwrite ? "Overwrite" : "Save", "Save the canvas to the Scene"))) { showModalPanel = false; if (!string.IsNullOrEmpty(sceneCanvasName)) { canvasCache.SaveSceneNodeCanvas(sceneCanvasName); } } GUILayout.EndHorizontal(); }