{"id":14960678,"url":"https://github.com/vasylromanets/handybuttons","last_synced_at":"2025-10-24T18:32:14.362Z","repository":{"id":241541141,"uuid":"125762577","full_name":"VasylRomanets/HandyButtons","owner":"VasylRomanets","description":"Attribute used to draw a button in the Unity Inspector","archived":false,"fork":false,"pushed_at":"2019-10-15T20:00:23.000Z","size":122,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-10T10:21:23.678Z","etag":null,"topics":["unity","unity-editor","unity-plugin","unity3d","unity3d-editor","unity3d-plugin"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VasylRomanets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-03-18T19:59:26.000Z","updated_at":"2024-03-01T12:11:40.000Z","dependencies_parsed_at":"2024-05-29T01:06:01.886Z","dependency_job_id":"6a0ed505-d4a6-4291-a64d-67860b668348","html_url":"https://github.com/VasylRomanets/HandyButtons","commit_stats":null,"previous_names":["vasylromanets/handybuttons"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VasylRomanets%2FHandyButtons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VasylRomanets%2FHandyButtons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VasylRomanets%2FHandyButtons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VasylRomanets%2FHandyButtons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VasylRomanets","download_url":"https://codeload.github.com/VasylRomanets/HandyButtons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219868059,"owners_count":16555878,"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":["unity","unity-editor","unity-plugin","unity3d","unity3d-editor","unity3d-plugin"],"created_at":"2024-09-24T13:22:44.099Z","updated_at":"2025-10-24T18:32:12.992Z","avatar_url":"https://github.com/VasylRomanets.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HandyButtons\nAttribute used to draw a button in the Unity Inspector.\n\nThe attribute was originally introduced in amazing [BitCake's repository](https://bitbucket.org/bitcake-studio/bitstrap). Then my colleague [dotsquid](https://github.com/dotsquid) took it one step further by implementing the optional \nbutton name feature. Finally, I put my two cents in and added the execution mode feature.\n\n### Usage\nPut the *[Button]* attribute above a method in your MonoBehaviour/ScriptableObject class.\n\nYou can specify a button name. By default, a button name corresponds to its method name.\nIn this example we explicitly specify the button name:\n```csharp\n[Button(\"Bar\")]\nprivate void Foo()\n{ }\n```\n\nAlso, you can specify when your button is clickable: only in play mode, only in edit mode or both.\nBy default, a button is clickable in both play mode and edit mode.\nIn this example the button is clickable only in play mode:\n```csharp\n[Button(ExecutionMode.PlayModeOnly)]\nprivate void Foo()\n{ }\n```\n\n### Limitations\nKeep in mind these limitations:\n* Method can't be generic\n* Method can't have parameters\n* Classes with custom editors should use helper methods of *ButtonUtility* or inherit from *MonoBehaviourButtonEditor/ScriptableObjectButtonEditor*\n\n### Installation\nTo add the attribute as a custom package open *YourProject/Packages/manifest.json* and add the following line to the *dependencies* object:\n```json\n\"com.vasylromanets.handybuttons\": \"https://github.com/VasylRomanets/HandyButtons.git#upm\"\n```\nOr you can simply download the source code and drop it into *YourProject/Assets* folder.\n\n### Example\n```csharp\n[Button]\nprivate void EditorAndRuntimeButton()\n{\n    Debug.Log(\"Editor and runtime!\");\n}\n\n[Button(ExecutionMode.EditModeOnly)]\nprivate void EditorOnlyButton()\n{\n    Debug.Log(\"Editor only!\");\n}\n\n[Button(ExecutionMode.PlayModeOnly)]\nprivate void RuntimeOnlyButton()\n{\n    Debug.Log(\"Runtime only!\");\n}\n```\n![Alt text](https://github.com/VasylRomanets/HandyButtons/blob/images/Buttons.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasylromanets%2Fhandybuttons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasylromanets%2Fhandybuttons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasylromanets%2Fhandybuttons/lists"}