Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 void OnEnable() => resources = target as HierarchyResources;