示例#1
0
 // DESTRUCTOR
 public void OnDestroy()
 {
     skinDependedSettings      = null;
     defaultSettings           = null;
     settingsObject            = null;
     settingChangedHandlerList = null;
     instance = null;
 }
示例#2
0
        // CONSTRUCTOR
        private QSettings()
        {
            string[] paths = AssetDatabase.FindAssets(SETTINGS_FILE_NAME);
            for (int i = 0; i < paths.Length; i++)
            {
                settingsObject = (QSettingsObject)AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(paths[i]), typeof(QSettingsObject));
                if (settingsObject != null)
                {
                    break;
                }
            }
            if (settingsObject == null)
            {
                settingsObject = ScriptableObject.CreateInstance <QSettingsObject>();
                string path = AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(settingsObject));
                path = path.Substring(0, path.LastIndexOf("/"));
                AssetDatabase.CreateAsset(settingsObject, path + "/" + SETTINGS_FILE_NAME + ".asset");
                AssetDatabase.SaveAssets();
            }

            initSetting(QSetting.TreeMapShow, true);
            initSetting(QSetting.TreeMapColor, "39FFFFFF", "905D5D5D");
            initSetting(QSetting.TreeMapEnhanced, true);
            initSetting(QSetting.TreeMapTransparentBackground, true);

            initSetting(QSetting.MonoBehaviourIconShow, true);
            initSetting(QSetting.MonoBehaviourIconShowDuringPlayMode, true);
            initSetting(QSetting.MonoBehaviourIconIgnoreUnityMonobehaviour, true);
            initSetting(QSetting.MonoBehaviourIconColor, "A01B6DBB");

            initSetting(QSetting.SeparatorShow, true);
            initSetting(QSetting.SeparatorShowRowShading, true);
            initSetting(QSetting.SeparatorColor, "FF303030", "48666666");
            initSetting(QSetting.SeparatorEvenRowShadingColor, "13000000", "08000000");
            initSetting(QSetting.SeparatorOddRowShadingColor, "00000000", "00FFFFFF");

            initSetting(QSetting.VisibilityShow, true);
            initSetting(QSetting.VisibilityShowDuringPlayMode, true);

            initSetting(QSetting.LockShow, true);
            initSetting(QSetting.LockShowDuringPlayMode, false);
            initSetting(QSetting.LockPreventSelectionOfLockedObjects, false);

            initSetting(QSetting.StaticShow, true);
            initSetting(QSetting.StaticShowDuringPlayMode, false);

            initSetting(QSetting.ErrorShow, true);
            initSetting(QSetting.ErrorShowDuringPlayMode, false);
            initSetting(QSetting.ErrorShowIconOnParent, false);
            initSetting(QSetting.ErrorShowScriptIsMissing, true);
            initSetting(QSetting.ErrorShowReferenceIsNull, false);
            initSetting(QSetting.ErrorShowReferenceIsMissing, true);
            initSetting(QSetting.ErrorShowStringIsEmpty, false);
            initSetting(QSetting.ErrorShowMissingEventMethod, true);
            initSetting(QSetting.ErrorShowWhenTagOrLayerIsUndefined, true);
            initSetting(QSetting.ErrorIgnoreString, "");
            initSetting(QSetting.ErrorShowForDisabledComponents, true);
            initSetting(QSetting.ErrorShowForDisabledGameObjects, true);

            initSetting(QSetting.RendererShow, false);
            initSetting(QSetting.RendererShowDuringPlayMode, false);

            initSetting(QSetting.PrefabShow, false);
            initSetting(QSetting.PrefabShowBreakedPrefabsOnly, true);

            initSetting(QSetting.TagAndLayerShow, true);
            initSetting(QSetting.TagAndLayerShowDuringPlayMode, true);
            initSetting(QSetting.TagAndLayerSizeShowType, (int)QHierarchyTagAndLayerShowType.TagAndLayer);
            initSetting(QSetting.TagAndLayerType, (int)QHierarchyTagAndLayerType.OnlyIfNotDefault);
            initSetting(QSetting.TagAndLayerAligment, (int)QHierarchyTagAndLayerAligment.Left);
            initSetting(QSetting.TagAndLayerSizeValueType, (int)QHierarchyTagAndLayerSizeType.Pixel);
            initSetting(QSetting.TagAndLayerSizeValuePercent, 0.25f);
            initSetting(QSetting.TagAndLayerSizeValuePixel, 75);
            initSetting(QSetting.TagAndLayerLabelSize, (int)QHierarchyTagAndLayerLabelSize.Normal);
            initSetting(QSetting.TagAndLayerTagLabelColor, "FFCCCCCC", "FF333333");
            initSetting(QSetting.TagAndLayerLayerLabelColor, "FFCCCCCC", "FF333333");
            initSetting(QSetting.TagAndLayerLabelAlpha, 0.35f);

            initSetting(QSetting.ColorShow, true);
            initSetting(QSetting.ColorShowDuringPlayMode, true);

            initSetting(QSetting.GameObjectIconShow, false);
            initSetting(QSetting.GameObjectIconShowDuringPlayMode, true);
            initSetting(QSetting.GameObjectIconSize, (int)QHierarchySizeAll.Small);

            initSetting(QSetting.TagIconShow, false);
            initSetting(QSetting.TagIconShowDuringPlayMode, true);
            initSetting(QSetting.TagIconListFoldout, false);
            initSetting(QSetting.TagIconList, "");
            initSetting(QSetting.TagIconSize, (int)QHierarchySizeAll.Small);

            initSetting(QSetting.LayerIconShow, false);
            initSetting(QSetting.LayerIconShowDuringPlayMode, true);
            initSetting(QSetting.LayerIconListFoldout, false);
            initSetting(QSetting.LayerIconList, "");
            initSetting(QSetting.LayerIconSize, (int)QHierarchySizeAll.Small);

            initSetting(QSetting.ChildrenCountShow, false);
            initSetting(QSetting.ChildrenCountShowDuringPlayMode, true);
            initSetting(QSetting.ChildrenCountLabelSize, (int)QHierarchySize.Normal);
            initSetting(QSetting.ChildrenCountLabelColor, "FFCCCCCC", "FF333333");

            initSetting(QSetting.VerticesAndTrianglesShow, false);
            initSetting(QSetting.VerticesAndTrianglesShowDuringPlayMode, false);
            initSetting(QSetting.VerticesAndTrianglesCalculateTotalCount, false);
            initSetting(QSetting.VerticesAndTrianglesShowTriangles, false);
            initSetting(QSetting.VerticesAndTrianglesShowVertices, true);
            initSetting(QSetting.VerticesAndTrianglesLabelSize, (int)QHierarchySize.Normal);
            initSetting(QSetting.VerticesAndTrianglesVerticesLabelColor, "FFCCCCCC", "FF333333");
            initSetting(QSetting.VerticesAndTrianglesTrianglesLabelColor, "FFCCCCCC", "FF333333");

            initSetting(QSetting.ComponentsShow, false);
            initSetting(QSetting.ComponentsShowDuringPlayMode, false);
            initSetting(QSetting.ComponentsIconSize, (int)QHierarchySizeAll.Small);
            initSetting(QSetting.ComponentsIgnore, "");

            initSetting(QSetting.ComponentsOrder, DEFAULT_ORDER);

            initSetting(QSetting.AdditionalShowObjectListContent, false);
            initSetting(QSetting.AdditionalShowHiddenQHierarchyObjectList, true);
            initSetting(QSetting.AdditionalHideIconsIfNotFit, true);
            initSetting(QSetting.AdditionalIdentation, 0);
            initSetting(QSetting.AdditionalShowModifierWarning, true);

            #if UNITY_2019_1_OR_NEWER
            initSetting(QSetting.AdditionalBackgroundColor, "00383838", "00CFCFCF");
            #else
            initSetting(QSetting.AdditionalBackgroundColor, "00383838", "00C2C2C2");
            #endif
            initSetting(QSetting.AdditionalActiveColor, "FFFFFF80", "CF363636");
            initSetting(QSetting.AdditionalInactiveColor, "FF4F4F4F", "1E000000");
            initSetting(QSetting.AdditionalSpecialColor, "FF2CA8CA", "FF1D78D5");
        }