Ejemplo n.º 1
0
        /** ExportPackage
         */
        public static void ExportPackage(Fee.File.Path a_assets_path, string a_package_name, UnityEditor.ExportPackageOptions a_option)
        {
            try{
                string t_path = "Assets/" + a_assets_path.GetPathCutLastSeparator();

                Tool.EditorLog("ExportPackage : " + t_path + " : " + a_package_name);
                UnityEditor.AssetDatabase.ExportPackage(t_path, a_package_name, a_option);
            }catch (System.Exception t_exception) {
                Tool.EditorLogError(t_exception.Message);
            }
        }
Ejemplo n.º 2
0
        /** SavePrefab
         */
        public static void SavePrefab(UnityEngine.GameObject a_prefab, Fee.File.Path a_assets_path)
        {
            try{
                string t_path = "Assets/" + a_assets_path.GetPathCutLastSeparator();

                bool t_ret;
                UnityEditor.PrefabUtility.SaveAsPrefabAsset(a_prefab, t_path, out t_ret);
                if (t_ret == false)
                {
                    Tool.EditorLogError("SavePrefab : error");
                }
                else
                {
                    Tool.EditorLog("SavePrefab : " + t_path);
                }
            }catch (System.Exception t_exception) {
                Tool.EditorLogError(t_exception.Message);
            }
        }