private void OnGUI()
        {
            float padding = 0;

            //command button bar
            GUILayout.BeginHorizontal(EditorStyles.toolbar);
            {
                if (GUILayout.Button("Save", EditorStyles.toolbarButton))
                {
                    AssetBundleConfig.SaveConfig();
                }
                if (GUILayout.Button("Apply", EditorStyles.toolbarButton))
                {
                    Apply();
                }
                if (GUILayout.Button("DebugManifest", EditorStyles.toolbarButton))
                {
                    AssetBundleBuilder.GenerateAssetBundle(BuildTarget.StandaloneWindows64, false);
                }
                //GUILayout.FlexibleSpace();
                if (GUILayout.Button("Build", EditorStyles.toolbarButton))
                {
                    Build();
                }
                padding += 18;
            }
            GUILayout.EndHorizontal();

            //filters context
            GUILayout.BeginVertical();
            {
                //Filter item list
                //float lstH = _filterList.count * 22;
                _scrollPosition = GUILayout.BeginScrollView(_scrollPosition);//, GUILayout.Height(2+position.height/2));
                {
                    _filterList.DoLayoutList();
                }
                GUILayout.EndScrollView();
                padding += 18 + 18 + (_filterList.count == 0 ? 1 : _filterList.count) * _filterList.elementHeight;
            }
            GUILayout.EndVertical();

            //preview
            _abPreviewTab.OnGUI(new Rect(0, padding, position.width, position.height - padding));

            //set dirty
            //if (GUI.changed)
            //    EditorUtility.SetDirty(_config);
        }
 void Apply()
 {
     AssetBundleBuilder.AutoSetAssetBundleNames();
 }
 void Build()
 {
     AssetBundleBuilder.AutoSetAssetBundleNames();
     AssetBundleBuilder.BuildAssetBundle(BuildTarget.StandaloneWindows64);
 }
Exemple #4
0
 public static void ResetAllAssetBundleNames()
 {
     AssetBundleBuilder.ResetAssetBundleNames();
     Debug.Log("Reset all asset bundle name done!");
 }