/// <summary> /// 创建函数 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="sTitle"></param> /// <returns></returns> public static BuildingAssetsAnt Create <T>(string sTitle) { BuildingAssetsAnt result = new BuildingAssetsAnt(); result.typeName = typeof(T).FullName; result.typeAssembly = typeof(T).Assembly.FullName; result.functionName = null; result.title = sTitle; return(result); }
/// <summary> /// 创建 /// </summary> /// <param name="path"></param> /// <returns></returns> internal static BuildingAssets Create(string path) { BuildingAssets profile = ScriptableObject.CreateInstance <BuildingAssets>(); profile.name = Path.GetFileName(path); profile.ants = new BuildingAssetsAnt[] { BuildingAssetsAnt.Create <EditorExportVersion>("设置版本号"), BuildingAssetsAnt.Create <EditorExportConfig>("导出 CSV 文件"), BuildingAssetsAnt.Create <EditorExportAssets>("导出 AB 文件"), BuildingAssetsAnt.Create <EditorExportCopy>("拷贝 AB 文件"), BuildingAssetsAnt.Create <EditorExportPlayer>("创建包体") }; AssetDatabase.CreateAsset(profile, path); return(profile); }