{"id":13661826,"url":"https://github.com/Guillemsc/ImplementationSelector","last_synced_at":"2025-04-25T03:31:31.401Z","repository":{"id":40507788,"uuid":"442792051","full_name":"Guillemsc/ImplementationSelector","owner":"Guillemsc","description":"Open-source unity editor extension that allows you to automatically select inherited implementations of a base class directly on the editor.","archived":false,"fork":false,"pushed_at":"2023-10-03T09:06:46.000Z","size":150,"stargazers_count":44,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T08:00:24.644Z","etag":null,"topics":["editor","juce","tool","unity"],"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/Guillemsc.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":"2021-12-29T14:07:30.000Z","updated_at":"2024-08-09T17:44:48.000Z","dependencies_parsed_at":"2024-08-02T05:11:32.770Z","dependency_job_id":null,"html_url":"https://github.com/Guillemsc/ImplementationSelector","commit_stats":null,"previous_names":["juce-assets/juce-implementationselector"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guillemsc%2FImplementationSelector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guillemsc%2FImplementationSelector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guillemsc%2FImplementationSelector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guillemsc%2FImplementationSelector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Guillemsc","download_url":"https://codeload.github.com/Guillemsc/ImplementationSelector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250747821,"owners_count":21480724,"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":["editor","juce","tool","unity"],"created_at":"2024-08-02T05:01:42.362Z","updated_at":"2025-04-25T03:31:30.945Z","avatar_url":"https://github.com/Guillemsc.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# Welcome to Implementation Selector\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/Juce-Assets/Juce-ImplementationSelector/issues)\n[![Twitter Follow](https://img.shields.io/badge/twitter-%406uillem-blue.svg?style=flat\u0026label=Follow)](https://twitter.com/6uillem)\n[![Release](https://img.shields.io/github/release/Juce-Assets/Juce-ImplementationSelector.svg)](https://github.com/Juce-Assets/Juce-ImplementationSelector/releases/latest)\n\n**Welcome to [Implementation Selector](https://github.com/Juce-Assets/Juce-ImplementationSelector):** a small Unity editor extension that allows you to automatically select an interface/base class's implementations directly on the editor. This is very useful for rapdily create configuration files for your applications.\n\n\u003cimg title=\"\" src=\"https://github.com/Juce-Assets/Juce-ImplementationSelector/blob/main/Misc/HowTo4.png\" alt=\"Logo\" data-align=\"inline\"\u003e\n\n# Contents\n\n- [Installing](https://github.com/Juce-Assets/Juce-ImplementationSelector#installing)\n- [Basic Usage](https://github.com/Juce-Assets/Juce-ImplementationSelector#basic-usage)\n- [Want to contribute?](https://github.com/Juce-Assets/Juce-ImplementationSelector#want-to-contribute)\n- [Contributors](https://github.com/Juce-Assets/Juce-ImplementationSelector#contributors)\n\n## Installing\n### - Via Github\nDownload the full repositories, and then place it under the Assets folder of your Unity project.\n\nAnd that's all, with that you should be ready to go!\n\n### - Via UPM\nAdd the following line to your [manifest.json](https://docs.unity3d.com/Manual/upm-manifestPrj.html).\n```\n\"dependencies\": {\n   \"com.juce.implementationselector\": \"git+https://github.com/Juce-Assets/Juce-ImplementationSelector\",\n},\n```\n\n## Basic Usage\n### - SelectImplementationAttribute\nYou can turn an interface/base class to a selectable one using the attribute SelectImplementationAttribute.\nYou also need to use the SerializeReference Unity attribute.\n```csharp\n[SelectImplementation(typeof(IFood))]\n[SerializeField, SerializeReference] private IFood food = default;\n```\n\n\u003cimg title=\"\" src=\"https://github.com/Juce-Assets/Juce-ImplementationSelector/blob/main/Misc/HowTo1.png\" alt=\"Logo\" data-align=\"inline\"\u003e\n\n\u003cimg title=\"\" src=\"https://github.com/Juce-Assets/Juce-ImplementationSelector/blob/main/Misc/HowTo4.png\" alt=\"Logo\" data-align=\"inline\"\u003e\n\n\u003cimg title=\"\" src=\"https://github.com/Juce-Assets/Juce-ImplementationSelector/blob/main/Misc/HowTo5.png\" alt=\"Logo\" data-align=\"inline\"\u003e\n\nIt works with lists too!\n```csharp\n[SelectImplementation(typeof(IFood))]\n[SerializeField, SerializeReference] private List\u003cIFood\u003e food = default;\n```\n\u003cimg title=\"\" src=\"https://github.com/Juce-Assets/Juce-ImplementationSelector/blob/main/Misc/HowTo6.png\" alt=\"Logo\" data-align=\"inline\"\u003e\n\nSelectImplementation has two default values that can be changed: \n- DisplayLabel: determines if the variable name is shown on the inspector. It's enabled by default.\n- ForceExpanded: determines if the properties of the class can be collapsed with a dropdown, or ar shown all the time. It's disabled by default.\n```csharp\n[SelectImplementation(typeof(IFood), displayLabel: true, forceExpanded: false)]\n[SerializeField, SerializeReference] private IFood food = default;\n```\n\nThe classes that inherit from the base one need to be marked as serializable with the System.Serializable attribute.\nThey also need to have the default constructor, or a public parameterless one.\n```csharp\n[System.Serializable]\npublic class AppleFood : IFood\n{\n    [SerializeField] private string appleName = default;\n}\n```\n\n\u0026nbsp; \n\n### - SelectImplementationTrimDisplayName\nYou can use the attribute SelectImplementationTrimDisplayName, on the base interface/class, to define a string that will always be trimmed from the name displayed of the classes that implement this interface.\n\nFor example, if you have a base interface named IFood, and classes that inherit from it, like AppleFood, GrapesFood, PizzaFood, by using the SelectImplementationTrimDisplayName(\"Food\"), the class names will be desplayed as Apple, Grapes, Pizza.\n```csharp\n[SelectImplementationTrimDisplayName(\"Food\")]\npublic interface IFood\n{\n   \n}\n```\n\n\u0026nbsp; \n\n### - SelectImplementationDefaultType\nYou can use the attribute SelectImplementationDefaultType, on one of the classes that inherits from the base interface/class, to mark it as the default one that's going to appear on the editor the first time the user sees it.\n```csharp\n[System.Serializable]\n[SelectImplementationDefaultType]\npublic class AppleFood : IFood\n{\n    [SerializeField] private string appleName = default;\n}\n```\n\n\u0026nbsp; \n\n### - SelectImplementationTooltip\nYou can use the attribute SelectImplementationTooltip, on one of the classes that inherits from the base interface/class, to show a tooltip when the user hovers this specific type with the mouse\n```csharp\n[System.Serializable]\n[SelectImplementationTooltip(\"Apple tooltip\")]\npublic class AppleFood : IFood\n{\n    [SerializeField] private string appleName = default;\n}\n```\n\u003cimg title=\"\" src=\"https://github.com/Juce-Assets/Juce-ImplementationSelector/blob/main/Misc/HowTo2.png\" alt=\"Logo\" data-align=\"inline\"\u003e\n\n\u0026nbsp; \n\n### - SelectImplementationCustomDisplayName\nYou can use the attribute SelectImplementationCustomDisplayName, on one of the classes that inherits from the base interface/class, to show a specific name on the selection dropdown.\n```csharp\n[System.Serializable]\n[SelectImplementationCustomDisplayName(\"Custom Apple display\")]\npublic class AppleFood : IFood\n{\n    [SerializeField] private string appleName = default;\n}\n```\n\u003cimg title=\"\" src=\"https://github.com/Juce-Assets/Juce-ImplementationSelector/blob/main/Misc/HowTo3.png\" alt=\"Logo\" data-align=\"inline\"\u003e\n\n\n#### We are always aiming to improve this tool. You can always leave suggestions [here](https://github.com/Juce-Assets/Juce-ImplementationSelector/issues).\n\n## Want to contribute?\n\n**Please follow these steps to get your work merged in.**\n\n0. Clone the repo and make a new branch: `$ git checkout https://github.com/Juce-Assets/Juce-ImplementationSelector/tree/main -b [name_of_new_branch]`.\n\n1. Add a feature, fix a bug, or refactor some code :)\n\n2. Update `README.md` contributors, if necessary.\n\n3. Open a Pull Request with a comprehensive description of changes.\n\n### \n\n## Contributors\n\n- Guillem SC - [@Guillemsc](https://github.com/Guillemsc)\n- Pere Viader - [@PereViader](https://github.com/PereViader)\n- Balázs K - [@BallerJColt](https://github.com/BallerJColt)\n- IvanPolovyi - [@IvanPolovyi](https://github.com/IvanPolovyi)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGuillemsc%2FImplementationSelector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGuillemsc%2FImplementationSelector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGuillemsc%2FImplementationSelector/lists"}