コード例 #1
0
 void OnGUI()
 {
     GUILayout.Label("Build Asset Bundle from Model Prefab");
     GUILayout.BeginVertical();
     if (GUILayout.Button("Build for MacOS"))
     {
         Debug.Log("Building");
         if (BuildAssetBundles.BuildForTargetOS(BuildAssetBundles.OS.MacOS, BuildTarget.StandaloneOSX, assetPath, assetName))
         {
             Debug.Log("Success");
         }
         else
         {
             Debug.Log("Failed");
         }
         EditorWindow window = GetWindow(typeof(BuildAssetBundleWindow)) as BuildAssetBundleWindow;
         window.Close();
     }
     if (GUILayout.Button("Build for iOS"))
     {
         BuildAssetBundles.BuildAllForTargetOS(BuildAssetBundles.OS.iOS);
     }
     if (GUILayout.Button("Build for Windows"))
     {
         BuildAssetBundles.BuildAllForTargetOS(BuildAssetBundles.OS.Windows);
     }
     GUILayout.EndVertical();
 }
コード例 #2
0
 void OnGUI()
 {
     GUILayout.Label("Build Asset Bundles from Model Prefabs");
     GUILayout.BeginVertical();
     if (GUILayout.Button("Build for MacOS"))
     {
         BuildAssetBundles.BuildAllForTargetOS(BuildAssetBundles.OS.MacOS);
     }
     if (GUILayout.Button("Build for iOS"))
     {
         BuildAssetBundles.BuildAllForTargetOS(BuildAssetBundles.OS.iOS);
     }
     if (GUILayout.Button("Build for Windows"))
     {
         BuildAssetBundles.BuildAllForTargetOS(BuildAssetBundles.OS.Windows);
     }
     GUILayout.EndVertical();
 }