{"id":26338726,"url":"https://github.com/phanphantz/unity-quick-dropdown","last_synced_at":"2025-08-19T18:41:45.672Z","repository":{"id":280884147,"uuid":"943492858","full_name":"phanphantz/Unity-Quick-Dropdown","owner":"phanphantz","description":"C# Attributes that allow you to quickly assign Unity assets from a Dropdown on the Inspector.","archived":false,"fork":false,"pushed_at":"2025-03-13T21:08:57.000Z","size":77,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T21:29:23.738Z","etag":null,"topics":["dropdown-menu","inspector-unity3d","unity","unity-editor","unity-package","unity-plugin","unity-tool","unity-ugui","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phanphantz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"buy_me_a_coffee":"phanphantz","github":"phanphantz"}},"created_at":"2025-03-05T19:47:31.000Z","updated_at":"2025-03-13T02:31:45.000Z","dependencies_parsed_at":"2025-03-05T20:52:44.903Z","dependency_job_id":"6201e889-9ef8-4be5-901b-17eb32271709","html_url":"https://github.com/phanphantz/Unity-Quick-Dropdown","commit_stats":null,"previous_names":["phanphantz/unity-quick-dropdown"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phanphantz%2FUnity-Quick-Dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phanphantz%2FUnity-Quick-Dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phanphantz%2FUnity-Quick-Dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phanphantz%2FUnity-Quick-Dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phanphantz","download_url":"https://codeload.github.com/phanphantz/Unity-Quick-Dropdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243818199,"owners_count":20352629,"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":["dropdown-menu","inspector-unity3d","unity","unity-editor","unity-package","unity-plugin","unity-tool","unity-ugui","unity3d-plugin"],"created_at":"2025-03-16T03:14:46.251Z","updated_at":"2025-08-19T18:41:45.635Z","avatar_url":"https://github.com/phanphantz.png","language":"C#","readme":"# ⚡Unity Quick Dropdown\n\nC# Attributes that allow you to quickly assign Unity assets from a Dropdown on the Inspector. Support any `UnityEngine.Object` types. Help save time and reduce human errors by letting you pick an object from your desired location.\n\n\u003cimg src=https://github.com/phanphantz/GameDevSecretSauce/blob/main/Assets/QuickDropdown/QuickDropdownExample_GIF.gif width=100%\u003e\n\n\u003e [!NOTE]\n\u003e This Library is not an Official Library from Unity.\n\n# Overview\n\n- **[FromFolder]** - Display a Dropdown of Unity Assets from a specific **Folder**.\n- **[FromGroup]** - Display a Dropdown of Unity Assets from the `ScriptableGroup` with a matching name.\n  - Using `ScriptableGroups` allows you to move the assets in the project around without losing their group organization.\n  - You can nest ScriptableGroup inside each other. Cyclic references are also prevented and filtered out.\n- **[FromConfig]** - Display a Dropdown of Unity Assets from a first found `ScriptableContainer` with a specified type.\n  - This is useful for looking up objects from a ScriptableObject that is meant to be a singular \"Config\" or \"Setting\" (a Singleton if you will)\n- **[FromAddressable]** - Display a Dropdown of Addressable Assets from a specific Addressable Group.\n- Supported **List \u0026 Array** (Both direct usage \u0026 nested elements)\n- **QoL Features**:\n  - Select \u0026 Jump to the assigned asset or its enclosing location.\n  - You get a **Fix** button for creating a new source if it does not exist.\n  - An **Inspect** button allows you to quickly open a floating property window of the assigned asset.\n  - Warn user if the assigned object does not belong to the specified location.\n  - Warn about invalid locations.\n  - Supports nested dropdown.\n  - Easily customize how the Dropdown look using attribute parameters.\n  - Supports Multi-Edit.\n  - Undo-Friendly.\n\n- For **ScriptableObjects**:\n  - Quickly create new instances of `ScriptableObject` and add them into the specified location from a `+` button. When creating a new asset this way, the enclosing Folder / ScriptableGroup are also **created automatically** if they didn't exist.\n\n## **Installation**\nThere are 2 options to install the package:\n  - A) Download source code and put them into the Unity's Assets folder\n  - B) Install from the **Package Manager** using this git URL: https://github.com/phanphantz/Unity-Quick-Dropdown.git\n \n# Quick Example\n\n```csharp\nusing PhEngine.QuickDropdown;\nusing UnityEngine;\n\npublic class QuickDropdownExample : MonoBehaviour\n{\n    public float health;\n\n    //Let user pick 'ElementConfig' asset from the ScriptableGroup named 'TestGroup' in the asset folder.\n    //By default, This also display Inspect button, Create button (Only for ScriptableObjects), and a mini button to jump to the enclosing group.\n    [FromGroup(\"TestGroup\"), SerializeField]\n    ElementConfig element;\n    \n    //Let user pick 'ElementConfig' from a first found ScriptableObject with the type of 'SampleConfig'\n    [FromConfig(typeof(SampleConfig)), SerializeField]\n    ElementConfig sampleConfigItem;\n\n    public float attack;\n    public float stamina;\n\n    //Let user pick Sprite from the folder 'Assets/Sprites' and all the subfolders below.\n    //The folder information is hidden from 'isHideInfo' flag\n    //These path variations also work: 'Assets/Sprites', 'Assets/Sprites/', 'Sprites/'\n    [FromFolder(\"Sprites\", isHideInfo: true), SerializeField]\n    Sprite sprite;\n    \n    //By default, Inspect button will open the assigned asset as a floating window.\n    //You can change the button behaviour using different InpsectModes\n    [FromFolder(\"Prefabs\", inspectMode: InspectMode.Select), SerializeField]\n    GameObject prefab;\n}\n```\n### Result:\n\u003cimg src=https://github.com/phanphantz/GameDevSecretSauce/blob/main/Assets/QuickDropdown/QuickDropdownExample_1.jpeg width=80%\u003e\n\n# List \u0026 Array Support\n```csharp\n//Quick Dropdown now directly supports List \u0026 Array\n[FromGroup(\"TestGroup\"), SerializeField]\nList\u003cElementConfig\u003e directList = new List\u003cElementConfig\u003e();\n    \n[FromGroup(\"TestGroup\"), SerializeField]\nElementConfig[] directArray = new ElementConfig[] {};\n    \n//Nested List \u0026 Array also works\n[SerializeField] List\u003cElementConfigData\u003e nestedDropdownList = new List\u003cElementConfigData\u003e();\n[SerializeField] ElementConfigData[] nestedDropdownArray = new ElementConfigData[] {};\n```\n\n# Addressables Support\nIf you have the **Addressables** package installed in the project, you can use **[FromAddressable]** attribute on **Unity Object fields** and **string fields** to display a dropdown of Addressable assets from a desired group.\n- When you specify an Addressable group name that does not exist. You also get the **Fix** button on the inspector to quickly create it.\n- Creating **ScriptableObjects** using **Create** button from the inspector will also add the created asset to the target Addressable Group.\n\n```csharp\nusing PhEngine.QuickDropdown.Addressables;\nusing UnityEngine;\n\npublic class AddressableDropdownExample : MonoBehaviour\n{\n    [FromAddressable(\"PackedAddressableGroup\"), SerializeField]\n    ElementConfig addressableConfig;\n    \n    [FromAddressable(\"PackedAddressableGroup\"), SerializeField]\n    string addressableAddress;\n}\n```\n\u003e [!NOTE]\n\u003e Unfortunately **[FromAddressable]** does not work with **AssetReference** at the moment. Since it is drawn by its own property drawer.\n\n# Future Plans\n- **[FromScene]** attribute.\n- **[FromStringList]** attribute.\n- A way to bind Create functions for creating non-ScriptableObject assets.\n- A Popup UGUI to specify the name of the asset upon creation.\n\nPlease feel free to Contribute and send me Pull requests.\nYou can also [**Buy me a coffee!**](https://buymeacoffee.com/phanphantz)☕\n\n**Phun,**\\\nphun.peeticharoenthum@gmail.com\n","funding_links":["https://buymeacoffee.com/phanphantz","https://github.com/sponsors/phanphantz"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphanphantz%2Funity-quick-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphanphantz%2Funity-quick-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphanphantz%2Funity-quick-dropdown/lists"}