internal static HierarchyResources CreateAssets() { String path = EditorUtility.SaveFilePanelInProject("Save as...", "Resources", "asset", ""); if (path.Length > 0) { HierarchyResources settings = ScriptableObject.CreateInstance <HierarchyResources>(); AssetDatabase.CreateAsset(settings, path); AssetDatabase.SaveAssets(); AssetDatabase.Refresh(); EditorUtility.FocusProjectWindow(); Selection.activeObject = settings; return(settings); } return(null); }
void OnEnable() => resources = target as HierarchyResources;