Exemple #1
0
        public override void OnDefaultGUI()
        {
            if (singleton.instance.reload)
            {
                singleton.treeViewAsmdef.RegisterAll();
                singleton.treeViewAsmdef.Show(m_selectIndex);
                singleton.instance.reload = false;
            }
            if (singleton.instance.reloadNodeClick)
            {
                singleton.treeViewAsmdef.Show(m_selectIndex);
                singleton.instance.reload = false;
            }

            HGUIToolbar.Begin();
            if (HGUIToolbar.Toggle(m_selectIndex == 0, "All"))
            {
                m_selectIndex = 0;
            }
            if (HGUIToolbar.Toggle(m_selectIndex == 1, "Ref By"))
            {
                m_selectIndex = 1;
            }
            if (HGUIToolbar.Toggle(m_selectIndex == 2, "Ref To"))
            {
                m_selectIndex = 2;
            }
            HGUIToolbar.End();

            singleton.treeViewAsmdef.DrawLayoutGUI();
        }
Exemple #2
0
        /////////////////////////////////////////
        void DrawRightPane()
        {
            HGUIToolbar.Begin();
            if (HGUIToolbar.Toggle(m_installType == InstallType.通常, S._Installablepackages))
            {
                m_installType = InstallType.通常;
                m_treeViewR.RegisterFiles(m_installType);
            }
            if (HGUIToolbar.Toggle(m_installType == InstallType.データベースに直インストール, S._Unitypackage))
            {
                m_installType = InstallType.データベースに直インストール;
                m_treeViewR.RegisterFiles(m_installType);
            }
            HGUIToolbar.End();

            GUILayout.Box("", HEditorStyles.treeViweArea, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true));

            var dropRc = GUILayoutUtility.GetLastRect();

            m_treeViewR.OnGUI(dropRc.AlignR(dropRc.width - 1));
        }
Exemple #3
0
        //public void DrawGUI_AssetBundle() {
        //	if( !PB.i.enableAssetBundleBuild ) return;

        //	var currentParams = P.GetCurrentParams();
        //	int opt = currentParams.assetBundleOption;

        //	EditorGUI.BeginChangeCheck();
        //	using( new GUILayout.VerticalScope( EditorStyles.helpBox ) ) {
        //		bool fold;
        //		using( new GUILayout.HorizontalScope() ) {
        //			fold = HEditorGUILayout.Foldout( E.i.fold.Has( E.FoldAssetBundle ), "Asset Bundle" );
        //			E.i.fold.Toggle( E.FoldAssetBundle, fold );

        //			GUILayout.FlexibleSpace();
        //			bool b7 = HEditorGUILayout.ToggleLeft( S._ClearFiles, opt.Has( P.BUNDLE_OPTION_CLEAR_FILES ) );
        //			opt.Toggle( P.BUNDLE_OPTION_CLEAR_FILES, b7 );

        //			var rc = EditorHelper.GetLayout( EditorIcon.settings, Styles.dropDownButton, GUILayout.Width( 80 ), GUILayout.Height( 16 ) );

        //			HEditorGUI.DropDown( rc, S._Build, Styles.dropDownButton, 18,
        //				() => {
        //					if( Utils.IsSwitchPlatformAbort() ) return;
        //					ExecuteBuildBundle();
        //				},
        //				() => {
        //					var m = new GenericMenu();
        //					if( Directory.Exists( P.i.outputAssetBundleDirectory ) ) {
        //						m.AddItem( new GUIContent( SS._OpenOutputFolder ), false, () => { ShellUtils.OpenDirectory( P.i.outputAssetBundleDirectory ); } );
        //					}
        //					else {
        //						m.AddDisabledItem( new GUIContent( $"{notDirectory}{P.i.outputAssetBundleDirectory.Replace( "/", "." )}" ) );
        //					}
        //					m.DropDown( HEditorGUI.lastRect.PopupRect() );
        //				} );


        //			if( _enableAssetBundle ) {
        //				var r = EditorHelper.GetLayout( EditorIcon.settings, HEditorStyles.iconButton );
        //				if( HEditorGUI.IconButton( r, EditorIcon.settings, 2 ) ) {
        //					EditorApplication.ExecuteMenuItem( Window_AssetBundle_Browser );
        //					Event.current.Use();
        //				}
        //			}

        //			rc = HEditorGUI.lastRect;
        //			GUI.Label( rc.AddH( -3 ), GUIContent.none, HEditorStyles.dopesheetBackground );

        //		}
        //		GUILayout.Space( 2 );
        //		if( fold ) {
        //			EditorGUI.indentLevel++;
        //			bool bst = HEditorGUILayout.ToggleLeft( S._CopyingthebuildresultstoStreamingAssets, opt.Has( P.BUNDLE_OPTION_COPY_STREAMINGASSETS ) );
        //			currentParams.assetBundleCompressionMode = EditorGUILayout.Popup( S._Compression, currentParams.assetBundleCompressionMode, s_CompressionMode, Styles.miniPopup );
        //			bool b1 = HEditorGUILayout.ToggleLeft( s_BundleOptions[ 0 ], opt.Has( P.BUNDLE_OPTION_EXCLUDETYPEINFORMATION ) );
        //			bool b2 = HEditorGUILayout.ToggleLeft( s_BundleOptions[ 1 ], opt.Has( P.BUNDLE_OPTION_FORCEREBUILD ) );
        //			bool b3 = HEditorGUILayout.ToggleLeft( s_BundleOptions[ 2 ], opt.Has( P.BUNDLE_OPTION_IGNORETYPETREECHANGES ) );
        //			bool b4 = HEditorGUILayout.ToggleLeft( s_BundleOptions[ 3 ], opt.Has( P.BUNDLE_OPTION_APPENDHASH ) );
        //			bool b5 = HEditorGUILayout.ToggleLeft( s_BundleOptions[ 4 ], opt.Has( P.BUNDLE_OPTION_STRICTMODE ) );
        //			bool b6 = HEditorGUILayout.ToggleLeft( s_BundleOptions[ 5 ], opt.Has( P.BUNDLE_OPTION_DRYRUNBUILD ) );

        //			opt.Toggle( P.BUNDLE_OPTION_COPY_STREAMINGASSETS, bst );
        //			opt.Toggle( P.BUNDLE_OPTION_EXCLUDETYPEINFORMATION, b1 );
        //			opt.Toggle( P.BUNDLE_OPTION_FORCEREBUILD, b2 );
        //			opt.Toggle( P.BUNDLE_OPTION_IGNORETYPETREECHANGES, b3 );
        //			opt.Toggle( P.BUNDLE_OPTION_APPENDHASH, b4 );
        //			opt.Toggle( P.BUNDLE_OPTION_STRICTMODE, b5 );
        //			opt.Toggle( P.BUNDLE_OPTION_DRYRUNBUILD, b6 );
        //			GUILayout.Space( 2 );

        //			EditorGUI.indentLevel--;
        //		}
        //	}
        //	if( EditorGUI.EndChangeCheck() ) {
        //		currentParams.assetBundleOption = opt;
        //		Utils.s_changed = true;
        //	}
        //}


        /////////////////////////////////////////

        void DrawToolBar()
        {
            HGUIToolbar.Begin();

            if (HGUIToolbar.Button(EditorIcon.settings))
            {
                SharedModule.SettingsWindow.OpenProject(Package.nameNicify);
            }

            if (HGUIToolbar.Toggle(P.i.selectScene, "Scenes in Build", EditorIcon.sceneasset))
            {
                P.i.selectScene = true;
                P.Save();
            }

            var lst = m_supportBuildTarget.Where(x => P.GetPlatform(x).enable).ToArray();

            var reo    = Styles.toolbarbutton.padding;
            var active = UnityEditorEditorUserBuildSettings.activeBuildTargetGroup;

            for (int i = 0; i < lst.Length; i++)
            {
                var s = lst[i];

                var style = active == s ? Styles.toolbarbuttonActive : Styles.toolbarbutton;

                var cont = EditorHelper.TempContent(s.GetShortName(), s.Icon());
                var size = style.CalcSize(cont);
                size.x -= 8;

                bool bb = P.i.selectScene || P.i.selectScene;

                ScopeChange.Begin();
                if (HGUIToolbar.Toggle(P.i.selectBuildTargetGroup == s && !bb, cont, style, GUILayout.Width(size.x)))
                {
                    P.i.selectScene = false;
                    P.Save();

                    P.i.selectBuildTargetGroup = s;
                    Utils.SelectItemUpdate();
                    ChangeActiveTarget();
                    m_Drawer_BuildPlatforms.SelectPlatform(Utils.s_currentPlatform, m_buildPlatformDrawer);
                }
                if (ScopeChange.End())
                {
                    P.Save();
                }

                if (active == s)
                {
                    var rc = GUILayoutUtility.GetLastRect();
                    EditorGUI.DrawRect(rc, new Color(0, 0, 1, 0.1f));

                    rc.x -= 4;
                    rc    = rc.AlignCenterH(16);
                    if (UnitySymbol.Has("UNITY_2019_3_OR_NEWER"))
                    {
                        rc.y += 1;
                    }
                    GUI.DrawTexture(rc.AlignR(16), EditorIcon.buildsettings_editor_small, ScaleMode.ScaleToFit);
                }
            }

            GUILayout.FlexibleSpace();
            if (_enableBuildReport)
            {
                if (HGUIToolbar.Button("Build Report"))
                {
                    EditorApplication.ExecuteMenuItem(Window_Show_Build_Report);
                }
            }


            HGUIToolbar.End();
        }