【Unity3D】自制小工具批量设置AB包名

         最近一个项目要用到批量的设置AB包名,由于同一类的资源在一个文件夹内,所以就查着资料写了一个小工具,以文件夹为单位批量修改内部的资源包名,方便打包,话不多说直接上代码吧:

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;

public class SetAssetBundleName : EditorWindow
{
    //******系统设置
    //一种系统样式,使用他可以使控件周围表现为一个BOX的模样
    private GUIStyle _box = new GUIStyle("Box");

    //******窗口参数
    private Vector2 _FilesScrollValue;//当前文件滚动的位置

    //******资源参数
    static List<stru_FileInfo> list_Files;//文件列表

    string assetBundleName;
    string assetBundleVariant = "";
    //int indentation;//缩进等级
    struct stru_FileInfo
    {
        public string fileName;
        public string filePath;//绝对路径
        public string assetPath;//U3D内部路径
        public Type assetType;
    }
    
    [MenuItem("Assets/AssetBundle工具箱/设置AB包名")]
    private static void OpenSetAssetBundleNameWindow()
    {
        list_Files = new List<stru_FileInfo>();
        //indentation = 1;
        CheckFileSystemInfo();
        SetAssetBundleName ABNameWin = GetWindow<SetAssetBundleName>("设置AssetBundlesName");
        ABNameWin.position = new Rect(300, 100, 300,500);
        ABNameWin.minSize = new Vector2(300, 500);
        ABNameWin.Show();
    }
    pri
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值