Beispiel #1
0
    // ========================================================================== //

    /* public - [Do~Somthing] Function          */

    public AssetBundleBrowserWrapper()
    {
        _pBrowser     = AssetBundleBrowserMain.GetWindow <AssetBundleBrowserMain>();
        _pBrowserType = _pBrowser.GetType();

        _pField_BuildTab      = _pBrowserType.GetField("m_BuildTab", BindingFlags.NonPublic | BindingFlags.Instance);
        _pAssetBundleBuildTab = _pField_BuildTab.FieldType;

        _pMethod_Build = _pAssetBundleBuildTab.GetMethod("ExecuteBuild", BindingFlags.NonPublic | BindingFlags.Instance);
    }
Beispiel #2
0
        // ========================================================================== //

        /* public - [Do~Something] Function             */

        public AssetBundleBrowserWrapper()
        {
#if ASSET_BUNDLE_BROWSER
            _bundleBrowser = AssetBundleBrowserMain.GetWindow <AssetBundleBrowserMain>();
            browserType    = _bundleBrowser.GetType();

            _buildtabField      = browserType.GetField("m_BuildTab", BindingFlags.NonPublic | BindingFlags.Instance);
            _pInstance_BuildTab = _buildtabField.GetValue(_pBrowser);

            _buildtabField_UserData = _buildtabField.FieldType.GetField("m_UserData", BindingFlags.NonPublic | BindingFlags.Instance);
            _pInstance_UserData     = _buildtabField_UserData.GetValue(_pInstance_BuildTab);

            _buildtabField_UserData_BuildTarget = _buildtabField_UserData.FieldType.GetField("m_BuildTarget", BindingFlags.NonPublic | BindingFlags.Instance);

            _pMethod_Build = _buildtabField.FieldType.GetMethod("ExecuteBuild", BindingFlags.NonPublic | BindingFlags.Instance);
#endif
        }
Beispiel #3
0
        protected override void OnBodyGUI()
        {
            base.OnBodyGUI();

            if (EditorBuildSettings.scenes != null && EditorBuildSettings.scenes.Length > 0)
            {
                EditorBuildSettings.scenes = null;
                Log.Warning("只允许构建包含框架主体的场景!如有多场景切换的需求,请将其他场景打入AB包!");
            }

            if (!_isCanBuild)
            {
                BuildButtonMaskGUI();
            }

            _onGUIMethod.Invoke(_buildPlayerWindow, null);

            if (!_isCanBuild)
            {
                BuildButtonMaskGUI();
            }

            GUI.enabled = true;

            if (_isShowBuildABButton)
            {
                if (GUI.Button(new Rect(position.width - 422, position.height - 31, 123, 18), "Build AssetBundles"))
                {
                    AssetBundleBrowserMain.ShowWindow();
                }
            }
            if (GUI.Button(new Rect(position.width - 294, position.height - 31, 52, 18), "Check"))
            {
                CheckResourceMode();
                Check();
            }
            if (GUI.Button(new Rect(position.width - 170, 3, 160, 18), "HTFramework Settings..."))
            {
                Setter setter = GetWindow <Setter>();
                setter.titleContent.image = EditorGUIUtility.IconContent("SettingsIcon").image;
                setter.titleContent.text  = "HTFramework Setter";
                setter.minSize            = new Vector2(640, 580);
                setter.Show();
            }
        }
Beispiel #4
0
        protected override void OnBodyGUI()
        {
            base.OnBodyGUI();

            if (EditorBuildSettings.scenes != null && EditorBuildSettings.scenes.Length > 0)
            {
                EditorBuildSettings.scenes = null;
                GlobalTools.LogWarning("只允许构建包含框架主体的场景!如有多场景切换的需求,请将其他场景打入AB包!");
            }

            if (!_isCanBuild)
            {
                BuildButtonMaskGUI();
            }

            _onGUIMethod.Invoke(_buildPlayerWindow, null);

            if (!_isCanBuild)
            {
                BuildButtonMaskGUI();
            }

            GUI.enabled = true;

            if (_isShowBuildABButton)
            {
                if (GUI.Button(new Rect(position.width - 422, position.height - 31, 123, 18), "Build AssetBundles"))
                {
                    AssetBundleBrowserMain.ShowWindow();
                }
            }
            if (GUI.Button(new Rect(position.width - 294, position.height - 31, 52, 18), "Check"))
            {
                CheckResourceMode();
                Check();
            }
        }
Beispiel #5
0
        protected override void OnBodyGUI()
        {
            base.OnBodyGUI();

            if (EditorBuildSettings.scenes != null)
            {
                EditorBuildSettings.scenes = null;
            }

            if (!_isCanBuild)
            {
                BuildButtonMaskGUI();
            }

            _onGUIMethod.Invoke(_buildPlayerWindow, null);

            if (!_isCanBuild)
            {
                BuildButtonMaskGUI();
            }

            GUI.enabled = true;

            if (_isShowBuildABButton)
            {
                if (GUI.Button(new Rect(position.width - 422, position.height - 31, 123, 18), "Build AssetBundles"))
                {
                    AssetBundleBrowserMain.ShowWindow();
                }
            }
            if (GUI.Button(new Rect(position.width - 294, position.height - 31, 52, 18), "Check"))
            {
                CheckResourceMode();
                Check();
            }
        }
Beispiel #6
0
 static void showPanel()
 {
     AssetBundleBrowserMain.ShowWindow();
 }