Пример #1
0
        private void LoadEditorPrefs()
        {
            if (this.prefsAreLoaded)
            {
                return;
            }

            this.prefsAreLoaded = true;

            this.showIndexLabels        = EditorPrefs.GetBool("GeneralDrawerConfig.ShowIndexLabels", false);
            this.showMonoScriptInEditor = EditorPrefs.GetBool("GeneralDrawerConfig.ShowMonoScriptInEditor", this.showMonoScriptInEditor);
            this.showPrefabModificationsDisabledMessage = EditorPrefs.GetBool("GeneralDrawerConfig.ShowPrefabModificationsDisabledMessage", this.showPrefabModificationsDisabledMessage);
            this.expandFoldoutByDefault       = EditorPrefs.GetBool("GeneralDrawerConfig.ExpandFoldoutByDefault", this.expandFoldoutByDefault);
            this.hideFoldoutWhileEmpty        = EditorPrefs.GetBool("GeneralDrawerConfig.HideFoldoutWhileEmpty", this.hideFoldoutWhileEmpty);
            this.openListsByDefault           = EditorPrefs.GetBool("GeneralDrawerConfig.OpenListsByDefault", this.openListsByDefault);
            this.showItemCount                = EditorPrefs.GetBool("GeneralDrawerConfig.ShowItemCount", this.showItemCount);
            this.numberOfItemsPrPage          = EditorPrefs.GetInt("GeneralDrawerConfig.NumberOfItemsPrPage", this.numberOfItemsPrPage);
            this.hidePagingWhileCollapsed     = EditorPrefs.GetBool("GeneralDrawerConfig.HidePagingWhileCollapsed", this.hidePagingWhileCollapsed);
            this.hidePagingWhileOnlyOnePage   = EditorPrefs.GetBool("GeneralDrawerConfig.HidePagingWhileOnlyOnePage", this.hidePagingWhileOnlyOnePage);
            this.showExpandButton             = EditorPrefs.GetBool("GeneralDrawerConfig.ShowExpandButton", this.showExpandButton);
            this.quaternionDrawMode           = (QuaternionDrawMode)EditorPrefs.GetInt("GeneralDrawerConfig.QuaternionDrawMode", (int)this.quaternionDrawMode);
            this.maxRecursiveDrawDepth        = EditorPrefs.GetInt("GeneralDrawerConfig.MaxRecursiveDrawDepth", this.maxRecursiveDrawDepth);
            this.squareUnityObjectFieldHeight = EditorPrefs.GetFloat("GeneralDrawerConfig.squareUnityObjectFieldHeight", this.squareUnityObjectFieldHeight);
            this.squareUnityObjectAlignment   = (ObjectFieldAlignment)EditorPrefs.GetInt("GeneralDrawerConfig.squareUnityObjectAlignment", (int)this.squareUnityObjectAlignment);
            this.squareUnityObjectEnableFor   = (UnityObjectType)EditorPrefs.GetInt("GeneralDrawerConfig.squareUnityObjectEnableFor", (int)this.squareUnityObjectEnableFor);
        }
Пример #2
0
 /// <summary>
 /// Draws a square object field which renders a preview for UnityEngine.Object type objects.
 /// </summary>
 /// <param name="alignment">The alignment of the preview field.</param>
 public PreviewFieldAttribute(ObjectFieldAlignment alignment)
 {
     this.Alignment         = alignment;
     this.AlignmentHasValue = true;
 }
Пример #3
0
 /// <summary>
 /// Draws a square object field which renders a preview for UnityEngine.Object type objects.
 /// </summary>
 /// <param name="height">The height of the preview field.</param>
 /// <param name="alignment">The alignment of the preview field.</param>
 public PreviewFieldAttribute(float height, ObjectFieldAlignment alignment)
 {
     this.Height            = height;
     this.Alignment         = alignment;
     this.AlignmentHasValue = true;
 }