Skip to content

Instantly share code, notes, and snippets.

@capnslipp
Last active April 12, 2022 09:39
Show Gist options
  • Select an option

  • Save capnslipp/8138106 to your computer and use it in GitHub Desktop.

Select an option

Save capnslipp/8138106 to your computer and use it in GitHub Desktop.

Revisions

  1. capnslipp revised this gist Dec 5, 2019. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion HideInNormalInspectorAttribute.cs
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    /// @creator: Slipp Douglas Thompson
    /// @license: WTFPL
    /// @license: Public Domain per The Unlicense. See <http://unlicense.org/>.
    /// @purpose: HideInNormalInspector attribute, to hide fields in the normal Inspector but let them show in the debug Inspector.
    /// @why: Because this functionality should be built-into Unity.
    /// @usage: Add `[HideInNormalInspector]` as an attribute to public fields you'd like hidden when Unity's Inspector is in “Normal” mode, but visible when in “Debug” mode.
    2 changes: 1 addition & 1 deletion HideInNormalInspectorDrawer.cs
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    /// @creator: Slipp Douglas Thompson
    /// @license: WTFPL
    /// @license: Public Domain per The Unlicense. See <http://unlicense.org/>.
    /// @purpose: HideInNormalInspector attribute, to hide fields in the normal Inspector but let them show in the debug Inspector.
    /// @why: Because this functionality should be built-into Unity.
    /// @usage: Add `[HideInNormalInspector]` as an attribute to public fields you'd like hidden when Unity's Inspector is in “Normal” mode, but visible when in “Debug” mode.
  2. capnslipp revised this gist Oct 31, 2015. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion HideInNormalInspectorAttribute.cs
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    /// @purpose: HideInNormalInspector attribute, to hide fields in the normal Inspector but let them show in the debug Inspector.
    /// @why: Because this functionality should be built-into Unity.
    /// @usage: Add `[HideInNormalInspector]` as an attribute to public fields you'd like hidden when Unity's Inspector is in “Normal” mode, but visible when in “Debug” mode.
    /// @intended project path: Assets/Plugins/HideInNormalInspectorAttribute.cs
    /// @intended project path: Assets/Plugins/EditorUtils/HideInNormalInspectorAttribute.cs
    /// @interwebsouce: https://gist.github.com/capnslipp/8138106

    using UnityEngine;
    2 changes: 1 addition & 1 deletion HideInNormalInspectorDrawer.cs
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@
    /// @purpose: HideInNormalInspector attribute, to hide fields in the normal Inspector but let them show in the debug Inspector.
    /// @why: Because this functionality should be built-into Unity.
    /// @usage: Add `[HideInNormalInspector]` as an attribute to public fields you'd like hidden when Unity's Inspector is in “Normal” mode, but visible when in “Debug” mode.
    /// @intended project path: Assets/Plugins/Editor/HideInNormalInspectorDrawer.cs
    /// @intended project path: Assets/Plugins/Editor/EditorUtils/HideInNormalInspectorDrawer.cs
    /// @interwebsouce: https://gist.github.com/capnslipp/8138106

    using UnityEngine;
  3. capnslipp revised this gist Jul 1, 2015. 2 changed files with 16 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions HideInNormalInspectorAttribute.cs
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,11 @@
    /// @creator: Slipp Douglas Thompson
    /// @license: WTFPL
    /// @purpose: HideInNormalInspector attribute, to hide fields in the normal Inspector but let them show in the debug Inspector.
    /// @why: Because this functionality should be built-into Unity.
    /// @usage: Add `[HideInNormalInspector]` as an attribute to public fields you'd like hidden when Unity's Inspector is in “Normal” mode, but visible when in “Debug” mode.
    /// @intended project path: Assets/Plugins/HideInNormalInspectorAttribute.cs
    /// @interwebsouce: https://gist.github.com/capnslipp/8138106

    using UnityEngine;


    8 changes: 8 additions & 0 deletions HideInNormalInspectorDrawer.cs
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,11 @@
    /// @creator: Slipp Douglas Thompson
    /// @license: WTFPL
    /// @purpose: HideInNormalInspector attribute, to hide fields in the normal Inspector but let them show in the debug Inspector.
    /// @why: Because this functionality should be built-into Unity.
    /// @usage: Add `[HideInNormalInspector]` as an attribute to public fields you'd like hidden when Unity's Inspector is in “Normal” mode, but visible when in “Debug” mode.
    /// @intended project path: Assets/Plugins/Editor/HideInNormalInspectorDrawer.cs
    /// @interwebsouce: https://gist.github.com/capnslipp/8138106

    using UnityEngine;
    using UnityEditor;

  4. capnslipp revised this gist Jul 1, 2015. 1 changed file with 0 additions and 16 deletions.
    16 changes: 0 additions & 16 deletions HideInNormalInspector.cubespec
    Original file line number Diff line number Diff line change
    @@ -1,16 +0,0 @@
    name: HideInNormalInspector
    version: 1.0.0
    summary: "HideInNormalInspector attribute, to hide fields in the normal inspector but let them show in the debug inspector."
    homepage: "http://answers.unity3d.com/questions/157775/hide-from-inspector-interface-but-not-from-the-deb.html#answer-603532"
    author: Slipp Douglas Thompson
    files:
    - filename: "HideInNormalInspectorAttribute.cs"
    type: runtime
    install-path: "Assets/Plugins/HideInNormalInspectorAttribute.cs"
    - filename: "HideInNormalInspectorDrawer.cs"
    type: editor
    install-path: "Assets/Plugins/Editor/HideInNormalInspectorDrawer.cs"
    required-unity-version: >= 4.3
    runtime-dependencies: []
    editor-dependencies: []
    unitycubes-version: 0r1
  5. capnslipp renamed this gist Jan 12, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. capnslipp revised this gist Jan 12, 2014. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions .cubespec
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    name: HideInNormalInspector
    version: 1.0.0
    summary: "HideInNormalInspector attribute, to hide fields in the normal inspector but let them show in the debug inspector."
    homepage: "http://answers.unity3d.com/questions/157775/hide-from-inspector-interface-but-not-from-the-deb.html#answer-603532"
    author: Slipp Douglas Thompson
    files:
    - filename: "HideInNormalInspectorAttribute.cs"
    type: runtime
    install-path: "Assets/Plugins/HideInNormalInspectorAttribute.cs"
    - filename: "HideInNormalInspectorDrawer.cs"
    type: editor
    install-path: "Assets/Plugins/Editor/HideInNormalInspectorDrawer.cs"
    required-unity-version: >= 4.3
    runtime-dependencies: []
    editor-dependencies: []
    unitycubes-version: 0r1
  7. capnslipp created this gist Dec 26, 2013.
    5 changes: 5 additions & 0 deletions HideInNormalInspectorAttribute.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    using UnityEngine;



    public class HideInNormalInspectorAttribute : PropertyAttribute {}
    14 changes: 14 additions & 0 deletions HideInNormalInspectorDrawer.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    using UnityEngine;
    using UnityEditor;



    [CustomPropertyDrawer(typeof(HideInNormalInspectorAttribute))]
    class HideInNormalInspectorDrawer : PropertyDrawer
    {
    public override float GetPropertyHeight(SerializedProperty property, GUIContent label) {
    return 0f;
    }

    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {}
    }