{"id":19135875,"url":"https://github.com/glasstoestudio/unitymethodbuttonattribute","last_synced_at":"2026-02-27T07:31:59.992Z","repository":{"id":209875790,"uuid":"171175242","full_name":"GlassToeStudio/UnityMethodButtonAttribute","owner":"GlassToeStudio","description":"Add this attribute to your class to create buttons in the inspector for selected methods. No need for a custom editor.","archived":false,"fork":false,"pushed_at":"2019-06-07T01:36:06.000Z","size":137,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T20:12:50.665Z","etag":null,"topics":["unity","unity-asset","unity-editor","unity-scripts","unity2018","unity2d","unity3d","unity3d-plugin"],"latest_commit_sha":null,"homepage":null,"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/GlassToeStudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-02-17T21:36:19.000Z","updated_at":"2023-09-28T11:49:36.000Z","dependencies_parsed_at":"2023-11-29T16:30:57.464Z","dependency_job_id":"eb12f2f2-ac28-4549-a551-85718c012542","html_url":"https://github.com/GlassToeStudio/UnityMethodButtonAttribute","commit_stats":null,"previous_names":["glasstoestudio/unitymethodbuttonattribute"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/GlassToeStudio/UnityMethodButtonAttribute","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FUnityMethodButtonAttribute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FUnityMethodButtonAttribute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FUnityMethodButtonAttribute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FUnityMethodButtonAttribute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GlassToeStudio","download_url":"https://codeload.github.com/GlassToeStudio/UnityMethodButtonAttribute/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GlassToeStudio%2FUnityMethodButtonAttribute/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29887533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T05:38:26.446Z","status":"ssl_error","status_checked_at":"2026-02-27T05:38:25.235Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-asset","unity-editor","unity-scripts","unity2018","unity2d","unity3d","unity3d-plugin"],"created_at":"2024-11-09T06:32:28.862Z","updated_at":"2026-02-27T07:31:59.963Z","avatar_url":"https://github.com/GlassToeStudio.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity MethodButton Attribute \n\nAdd this attribute to your class to create buttons in the inspector for selected methods. No need for a custom editor.\n\n\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://github.com/GlassToeStudio/UnityMethodButtonAttribute/blob/master/Images/MethodButtonAttribute.gif\"\u003e\n\u003c/p\u003e\n\n# Usage:\n```cs\nusing UnityEngine;\n\npublic class ExampleClass : MonoBehaviour\n{\n    public int ExampleInt;\n    public bool ExampleBool;\n\n    internal void ExampleInternalMethod()\n    {\n        Debug.Log(\"Invoking: ExampleClass.ExampleInternalMethod\");\n    }\n    public void ExamplePublicMethod()\n    {\n        Debug.Log(\"Invoking: ExampleClass.ExamplePublicMethod\");\n    }\n    private void ExamplePrivateMethod()\n    {\n        Debug.Log(\"Invoking: ExampleClass.ExamplePrivateMethod\");\n    }\n    protected void ExampleProtectedMethod()\n    {\n        Debug.Log(\"Invoking: ExampleClass.ExampleProtectedMethod\");\n    }\n\n\n    /* Add these four lines of code to your class.\n     * Edit, add/remove, method names to the attribute.\n     * Names must match the method name passed into the attribute.\n     * \n     * The bool \"editorFoldout\" is used not only as the property that Unity will use to find the attribute,\n     * but also as the bool for the foldout in the editor.\n     * \n     * The #if UNITY_EDITOR preprocessor directive is so that this code is not compiled into the finished build.\n     * So no need to remvoe it prior to building.\n     */\n\n#if UNITY_EDITOR\n    [MethodButton(\"ExampleInternalMethod\", \"ExamplePublicMethod\", \"ExamplePrivateMethod\", \"ExampleProtectedMethod\")]\n    [SerializeField] private bool editorFoldout;\n#endif\n}\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cbr\u003e\n  \u003cimg src=\"https://github.com/GlassToeStudio/UnityMethodButtonAttribute/blob/master/Images/MethodButtonAttribute2.gif\"\u003e\n\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglasstoestudio%2Funitymethodbuttonattribute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglasstoestudio%2Funitymethodbuttonattribute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglasstoestudio%2Funitymethodbuttonattribute/lists"}