private void OnEnable()
        {
            Rect subPos = GetSubWindowArea();

            if (m_ManageTab == null)
            {
                m_ManageTab = new AssetBundleManageTab();
            }
            m_ManageTab.OnEnable(subPos, this);
            if (m_BuildTab == null)
            {
                m_BuildTab = new AssetBundleBuildTab();
            }
            m_BuildTab.OnEnable(this);
            if (m_InspectTab == null)
            {
                m_InspectTab = new AssetBundleInspectTab();
            }
            m_InspectTab.OnEnable(subPos);

            m_RefreshTexture = EditorGUIUtility.FindTexture("Refresh");

            m_FileAddTexture = EditorGUIUtility.FindTexture("d_AlphabeticalSorting");

            InitDataSources();
        }
Example #2
0
        internal void SetBundle(AssetBundle bundle, string path = "", AssetBundleInspectTab.InspectTabData inspectTabData = null, AssetBundleInspectTab assetBundleInspectTab = null)
        {
            //static var...
            CurrentPath             = path;
            m_inspectTabData        = inspectTabData;
            m_assetBundleInspectTab = assetBundleInspectTab;

            //members
            m_Editor = null;
            if (bundle != null)
            {
                m_Editor = Editor.CreateEditor(bundle);
            }
        }
Example #3
0
        internal void OnEnable(EditorWindow parent)
        {
            m_InspectTab = (parent as AssetBundleBrowserMain).m_InspectTab;

            //LoadData...
            var dataPath = System.IO.Path.GetFullPath(".");

            dataPath  = dataPath.Replace("\\", "/");
            dataPath += "/Library/AssetBundleBrowserBuild.dat";

            if (File.Exists(dataPath))
            {
                BinaryFormatter bf   = new BinaryFormatter();
                FileStream      file = File.Open(dataPath, FileMode.Open);
                var             data = bf.Deserialize(file) as BuildTabData;
                if (data != null)
                {
                    m_UserData = data;
                }
                file.Close();
            }

            m_ToggleData = new List <ToggleData>();
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Exclude Type Information",
                                 "Do not include type information within the asset bundle (don't write type tree).",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.DisableWriteTypeTree));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Force Rebuild",
                                 "Force rebuild the asset bundles",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.ForceRebuildAssetBundle));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Ignore Type Tree Changes",
                                 "Ignore the type tree changes when doing the incremental build check.",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.IgnoreTypeTreeChanges));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Append Hash",
                                 "Append the hash to the assetBundle name.",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.AppendHashToAssetBundleName));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Strict Mode",
                                 "Do not allow the build to succeed if any errors are reporting during it.",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.StrictMode));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Dry Run Build",
                                 "Do a dry run build.",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.DryRunBuild));


            m_ForceRebuild = new ToggleData(
                false,
                "Clear Folders",
                "Will wipe out all contents of build directory as well as StreamingAssets/AssetBundles if you are choosing to copy build there.",
                m_UserData.m_OnToggles);
            m_CopyToStreaming = new ToggleData(
                false,
                "Copy to StreamingAssets",
                "After build completes, will copy all build content to " + m_streamingPath + " for use in stand-alone player.",
                m_UserData.m_OnToggles);

            m_TargetContent      = new GUIContent("Build Target", "Choose target platform to build for.");
            m_CompressionContent = new GUIContent("Compression", "Choose no compress, standard (LZMA), or chunk based (LZ4)");

            //if(m_UserData.m_UseDefaultPath)
            //{
            //    ResetPathToDefault();
            //}
        }
Example #4
0
        internal void OnEnable(EditorWindow parent)
        {
            m_InspectTab = (parent as AssetBundleBrowserMain).m_InspectTab;

            //LoadData...
            var dataPath = Path.GetFullPath(".");

            dataPath  = dataPath.Replace("\\", "/");
            dataPath += "/Library/AssetBundleBrowserBuild.dat";

            if (File.Exists(dataPath))
            {
                BinaryFormatter bf   = new BinaryFormatter();
                FileStream      file = File.Open(dataPath, FileMode.Open);
                var             data = bf.Deserialize(file) as BuildTabData;
                if (data != null)
                {
                    m_UserData = data;
                }
                file.Close();
            }

            m_ToggleData = new List <ToggleData>();
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Exclude Type Information",
                                 "Do not include type information within the asset bundle (don't write type tree).",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.DisableWriteTypeTree));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Force Rebuild",
                                 "Force rebuild the asset bundles",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.ForceRebuildAssetBundle));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Ignore Type Tree Changes",
                                 "Ignore the type tree changes when doing the incremental build check.",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.IgnoreTypeTreeChanges));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Strict Mode",
                                 "Do not allow the build to succeed if any errors are reporting during it.",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.StrictMode));
            m_ToggleData.Add(new ToggleData(
                                 false,
                                 "Dry Run Build",
                                 "Do a dry run build.",
                                 m_UserData.m_OnToggles,
                                 BuildAssetBundleOptions.DryRunBuild));


            m_ForceRebuild = new ToggleData(
                false,
                "Clear Folders",
                "Will wipe out all contents of build directory.",
                m_UserData.m_OnToggles);

            m_CompressionContent = new GUIContent("Compression", "Whether to build asset bundles uncompressed or with LZ4 compression. LZ4 takes longer to build but results in smaller file size with no performance impact. Use this for distributing mods.");
        }
 internal InspectBundleTree(TreeViewState s, AssetBundleInspectTab parent) : base(s)
 {
     m_InspectTab = parent;
     showBorder   = true;
 }