public void Save() { inspectedPoser.SavePoseAsScriptablObject(PoseName); // Close the window GetWindow <HandPoseSaveAs>().Close(); // Update the inspector object's properties HandPose newPose = Resources.Load <HandPose>(PoseName); if (newPose) { inspectedPoser.CurrentPose = newPose; } // Highlight the newly created Objects // Selection.activeObject = AssetDatabase.LoadMainAssetAtPath(assetsDirectory + fileName); }