{"id":14960602,"url":"https://github.com/smidgens/unity-attributes","last_synced_at":"2026-01-20T04:32:39.034Z","repository":{"id":171395827,"uuid":"513983304","full_name":"Smidgens/unity-attributes","owner":"Smidgens","description":"Inspector attributes for Unity","archived":false,"fork":false,"pushed_at":"2022-12-06T16:35:01.000Z","size":389,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T20:12:41.037Z","etag":null,"topics":["attributes","not-affiliated-with-david-bowie","smidgenomics","unity","unity-attributes","unity-plugin"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smidgens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-14T17:02:40.000Z","updated_at":"2024-01-30T09:47:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"5cd14305-a525-41e7-80b3-799ba4615b4f","html_url":"https://github.com/Smidgens/unity-attributes","commit_stats":{"total_commits":84,"total_committers":1,"mean_commits":84.0,"dds":0.0,"last_synced_commit":"cef8c6aee2e99aaea39bd3d4f10aea4427a0e8d8"},"previous_names":["smidgens/unity-attributes"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smidgens%2Funity-attributes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smidgens%2Funity-attributes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smidgens%2Funity-attributes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smidgens%2Funity-attributes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smidgens","download_url":"https://codeload.github.com/Smidgens/unity-attributes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247721899,"owners_count":20985084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attributes","not-affiliated-with-david-bowie","smidgenomics","unity","unity-attributes","unity-plugin"],"created_at":"2024-09-24T13:22:35.557Z","updated_at":"2026-01-20T04:32:39.027Z","avatar_url":"https://github.com/Smidgens.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/Smidgenomics/unity.plugins/master/attributes/banner.png\" width=\"100%\"/\u003e\n\n\u003c!--\nsnippets\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003eTITLE\u003c/b\u003e\u003c/summary\u003e\n    \u003cimg src=\"/.github/preview/IMAGE.png\" /\u003e\n    \u003cp\u003e\u003c/p\u003e\n\n```cs\n\n```\n\n\u003c/details\u003e\n\n--\u003e\n\n\n# ℹ️ Features\n\n* Collection of general use drawer and decorator attributes.\n* Stripped in production: `[Conditional(\"UNITY_EDITOR\")]`\n* 🤞 Reasonably lightweight.\n\n\n\u003cbr/\u003e\n\n\u003cbr/\u003e\n\n# 📦 Install\n\n1. Open Package Manager\n2. Paste GitHub URL:\\\n`https://github.com/Smidgens/unity-attributes.git#\u003cversion_tag\u003e`\n\n\n\u003cbr/\u003e\n\n# 🚀 Usage\n\n\u003c!--======================================================--\u003e\n\u003c!--#################### DECORATORS ######################--\u003e\n\u003c!--======================================================--\u003e\n\n### 🟢 Decorators\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003c!-- BOX HEADER --\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e📝 BoxHeader\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/boxheader.png\" /\u003e\n\n```cs\n[BoxHeader(\"Example Header\")]\n[TextArea]\npublic string documentedField;\n```\n\n\u003c/details\u003e\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003c!-- BOX COMMENT --\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e📝 BoxComment\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/boxcomment.png\" /\u003e\n\n```cs\n[BoxComment(\"Some information about bla\")]\n[TextArea]\npublic string documentedField;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003c!-- BOX LINK --\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e📝 BoxLink\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/boxlink.png\" /\u003e\n\n```cs\n[BoxLink(\"Documentation\", \"https://en.wikipedia.org/wiki/Slartibartfast\")]\n[TextArea]\npublic string documentedField;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔳 StaticAction\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/staticaction.png\" /\u003e\n\n```cs\nclass StaticGreets\n{\n    public static void SayHi()\n    {\n        Debug.Log(\"Hello, wurst!\");\n    }\n\n    public static void LogValue(int v)\n    {\n        Debug.Log(\"Your value is: \" + v);\n    }\n}\n\n[StaticAction(\"Say Hi\", \"SayHi\", typeof(StaticGreets))]\n[StaticAction(\"Log 10\", \"LogValue\", typeof(StaticGreets), 10)]\npublic string staticActionField;\n\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--###################### DRAWERS #######################--\u003e\n\u003c!--======================================================--\u003e\n\n\n### 🟠 Property Drawers\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e📏 Inline\u003c/b\u003e\u003c/summary\u003e\n    \n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/inline.png\" /\u003e\n\n```cs\n\n[System.Serializable]\npublic struct T1\n{\n    public string name;\n    public Texture2D icon;\n}\n\n[Inline]\npublic Vector3 inlinedVector;\n\n[FieldSize(\"name\", 40f)]\n[Inline]\npublic T1 inlinedCustom;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e📏 Expand\u003c/b\u003e\u003c/summary\u003e\n    \n\n\u003cbr/\u003e\n\n\n\u003cimg src=\"/.github/preview/expand.png\" /\u003e\n\n```cs\n\n[Serializable]\npublic struct T1\n{\n    public string name;\n    public Texture2D icon;\n}\n\n[Serializable]\npublic struct T2\n{\n    public int someValue;\n    public T1 nested;\n}\n\n[Expand]\npublic T1 expanded1;\n\n[Expand]\npublic T2 expanded2;\n```\n\n\u003c/details\u003e\n\n\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔘 Tabs\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\n\u003cimg src=\"/.github/preview/tabs.png\" /\u003e\n\n```cs\n\n[System.Serializable]\nstruct ToggleData\n{\n    public bool v1,v2,v3;\n}\n\n[Tabs]\npublic ToggleData options;\n\n```\n\n```cs\n[System.Flags]\nenum Options\n{\n    Item1 = 1,\n    Item2 = 2,\n    Item3 = 4,\n}\n\n[Tabs]\npublic Options options;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔘 Switch\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/switch.png\" /\u003e\n\n```cs\n[Switch]\npublic bool switch1;\n\n[Switch(\"Off\", \"On\")]\npublic bool switch2;\n\n[Switch(\"Disabled\", \"Enabled\")]\npublic bool switch3;\n```\n```cs\n[System.Flags]\nenum Options\n{\n    Item1 = 1,\n    Item2 = 2,\n    Item3 = 4,\n}\n\n[Switch]\npublic Options options;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🎚️ Slider\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/slider.png\" /\u003e\n\n\n```cs\n[Slider(1f,10f,1)]\npublic float sliderPrecision;\n\n[Slider(1f,10f,0.5f)]\npublic float sliderStep;\n\n[Slider(1,10)]\npublic int sliderInt;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🎚️ Slider01\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/slider01.png\" /\u003e\n\n\n```cs\n[Slider01]\npublic float slider01;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🎨 HexColor\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/hexcolor.png\" /\u003e\n\n\n```cs\n\n[HexColor]\npublic string hexColor = \"#f00\";\n\n```\n\n\u003c/details\u003e\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔎 SearchType\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/searchtype.png\" /\u003e\n\u003cbr/\u003e\n\u003cimg src=\"/.github/preview/typefind.png\" /\u003e\n\n\n```cs\n[SearchType]\npublic string anyType;\n    \n// only show component types\n[SearchType(baseTypes = new Type[]{ typeof(Component) })]\npublic string componentType;\n\n// only show static classes\n[SearchType(onlyStatic = true)]\npublic string staticType;\n\n// only show system types\n[SearchType(assemblies = new string[]{ \"mscorlib\" })]\npublic string systemType;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔻 Dropdown__\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/dropdown.png\" /\u003e\n\n\n```cs\n[DropdownString(\"option1\", \"option2\")]\npublic string _string;\n\n[DropdownFloat(0.5f, 1.2f, 2.4f)]\npublic float _float;\n\n[DropdownColor(\"red\", \"blue\", \"cyan\")]\npublic Color _color;\n\n[DropdownBool(\"Off\", \"On\")]\npublic bool _bool;\n\n[DropdownInt(0, 10)]\npublic int _int;\n\n[DropdownAsset(\"Assets/Demo/\")]\npublic Texture2D _texture;\n```\n\n\u003c/details\u003e\n\n\n\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔻 Layer\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/layer.png\" /\u003e\n\n\n```cs\n[Layer]\npublic int _layer;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔻 SortLayer\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/sortlayer.png\" /\u003e\n\n\n```cs\n[SortLayer]\npublic int _sortingLayer;\n```\n\n\u003c/details\u003e\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔻 Tag\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/tag.png\" /\u003e\n\n\n```cs\n[Tag]\npublic string _tag;\n```\n\n\u003c/details\u003e\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔻 BuildScene\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/buildscene.png\" /\u003e\n\n\n```cs\n[BuildScene]\npublic string scenePath;\n\n[BuildScene]\npublic int sceneIndex;\n```\n\n\u003c/details\u003e\n\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔻 AnimatorParameter\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/animatorparameter.png\" /\u003e\n\n\n```cs\n\npublic Animator myAnimator;\n\n[AnimatorParameter(\"myAnimator\")]\npublic string parameterName;\n\n[AnimatorParameter(\"myAnimator\")]\npublic int parameterIndex;\n```\n\n\u003c/details\u003e\n\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔻 RendererMaterial\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/renderermaterial.png\" /\u003e\n\n\n```cs\npublic Renderer myRenderer;\n\n[AnimatorParameter(\"myRenderer\")]\npublic int materialIndex\n```\n\n\u003c/details\u003e\n\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔻 BlendShape\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/blendshape.png\" /\u003e\n\n\n```cs\npublic SkinnedMeshRenderer myRenderer;\n\n[AnimatorParameter(\"myRenderer\")]\npublic string blendShapeName\n\n[AnimatorParameter(\"myRenderer\")]\npublic int blendShapeIndex\n```\n\n\u003c/details\u003e\n\n\u003c!--======================================================--\u003e\n\u003c!--##################### MODIFIERS ######################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\n### 🔵 Modifiers\n\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e🔳 FieldAction\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/fieldaction.png\" /\u003e\n\n\n```cs\n[System.Serializable]\ninternal class OwnerOfFunctions\n{\n    public int myValue = 10;\n\n    public void SetMyValue(int v)\n    {\n        myValue = v;\n    }\n\n    public void CallMe()\n    {\n        Debug.Log(\"Yay!\");\n    }\n\n    public void CallMeAsWell()\n    {\n        Debug.Log(\"OMG YAY\");\n    }\n}\n\n\nclass MyScript : MonoBehaviour\n{\n    [FieldAction(\"Action 1\", \"CallMe\")]\n    [FieldAction(\"Action 2\", \"CallMeAsWell\")]\n    [FieldAction(\"Set value: 100\", \"SetMyValue\", 100, onlyPlayMode = true)]\n    [FieldAction(\"Call Target\", \"ScriptMethod\", callRoot = true)]\n    [Expand]\n    public OwnerOfFunctions fieldWithActions;\n\n    private void ScriptMethod()\n    {\n        Debug.Log(\"Script method called!\");\n    }\n}\n\n```\n\n\u003c/details\u003e\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cb\u003e📏 Indent\u003c/b\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/.github/preview/indent.png\" /\u003e\n\n\n```cs\n\n[Indent(1)]\n[DefaultDrawer]\npublic int iAmIndented;\n\n[Indent(2)]\n[DefaultDrawer]\npublic int iAmMoreSo;\n\n```\n\n\u003c/details\u003e\n\n\u003c!--======================================================--\u003e\n\u003c!--######################################################--\u003e\n\u003c!--======================================================--\u003e\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmidgens%2Funity-attributes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmidgens%2Funity-attributes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmidgens%2Funity-attributes/lists"}