using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class CreateAssetBundle : Editor {
[MenuItem("Assets/BuildBundle")]
static void BuildBundle()
{
string path = EditorUtility.SaveFilePanel("Save Resoruce", "", "파일네임", "확장자");
if (path.Length != 0)
{
Object[] selection = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets);
BuildPipeline.BuildAssetBundle(Selection.activeObject, selection, path,
BuildAssetBundleOptions.CompleteAssets |
BuildAssetBundleOptions.CollectDependencies,
BuildTarget.Android);
Selection.objects = selection;
}
}
}
'Unity' 카테고리의 다른 글
다른 응용프로그램 실행 및 종료 (0) | 2017.07.06 |
---|---|
유니티 개발자로서 내가 배웠던 최고의 5가지 (0) | 2017.06.14 |
out web link (0) | 2017.01.08 |
Camera 게임오브젝트에서 Blur 컴포넌트 접근법. (0) | 2016.02.09 |
Transform.TransformDirection(Vector3 Direction) (3) | 2016.01.06 |