public static void ExportCurrentUI() { var UIName = Path.GetFileNameWithoutExtension(EditorApplication.currentScene); var uiRoot = GameObject.Find("UI"); CBuildTools.BuildAssetBundle(uiRoot, GetBuildRelPath(UIName)); }
public void ExportCurrentUI() { CreateTempPrefab(); if (!CBuildTools.HookFunc(typeof(CBuild_UI), "Custom_ExportCurrentUI", this, UIScenePath, UIName, TempPanelObject)) { CBuildTools.BuildAssetBundle(TempPanelObject, GetBuildRelPath(UIName)); } DestroyTempPrefab(); }
public void ExportCurrentUI() { CreateTempPrefab(); if (ExportCurrentUIEvent != null) { ExportCurrentUIEvent(this, UIScenePath, UIName, TempPanelObject); } else { CBuildTools.BuildAssetBundle(TempPanelObject, GetBuildRelPath(UIName)); } DestroyTempPrefab(); }
public static uint BuildScriptableObject <T>(T scriptObject, string path, BuildTarget buildTarget) where T : ScriptableObject { const string tempAssetPath = "Assets/~Temp.asset"; AssetDatabase.CreateAsset(scriptObject, tempAssetPath); T tempObj = (T)AssetDatabase.LoadAssetAtPath(tempAssetPath, typeof(T)); if (tempObj == null) { throw new System.Exception(); } uint crc = CBuildTools.BuildAssetBundle(tempObj, path, buildTarget); AssetDatabase.DeleteAsset(tempAssetPath); return(crc); }
public bool BuildPkg(string file) { //if (!CBuildTools.CheckNeedBuild(file)) //{ // return false; //} AudioClip audioClip = AssetDatabase.LoadAssetAtPath(file, typeof(AudioClip)) as AudioClip; if (audioClip != null) { string subDirName = Path.GetFileName(Path.GetDirectoryName(file)); string exportFile = string.Format("Audio/{0}/{1}_Audio{2}", subDirName, Path.GetFileNameWithoutExtension(file), CCosmosEngine.GetConfig("AssetBundleExt")); CBuildTools.BuildAssetBundle(audioClip, exportFile); //CBuildTools.MarkBuildVersion(file); } return(true); }