uniity3d资源打包

[MenuItem(MenuPath + ObjectPath + "Android")]
    static void Build_Object_Android()
    {
        if(Selection.objects.Length != 0)
        {
            System.DateTime Start = System.DateTime.Now;
            Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets);
            foreach(Object ob in selection)    
            {
                BuildPipeline.BuildAssetBundle(ob, null, DownloadData.GetUpPath(DownloadData.platformType.Android, ob.name), BuildAssetBundleOptions.CollectDependencies, BuildTarget.Android);

                Debug.Log("=======================================================================");
                Debug.Log(DownloadData.GetUpPath(DownloadData.platformType.Android, ob.name));////192.168.1.10/www/AssetBundle/Android/Effect_ui_renwu.unity3d
                Debug.Log("end");

            }
            Debug.Log("Time Start: " + Start + "----------- End:" + System.DateTime.Now);
        }
    }

 

posted @ 2015-09-14 11:27  泥潭里的金鱼  阅读(169)  评论(0编辑  收藏  举报