Skip to content

An attribute tag to speed up finding and selecting prefabs in Unity

Notifications You must be signed in to change notification settings

cale-bradbury/PrefabDropdown

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

PrefabDropdown

An attribute tag to speed up finding and selecting prefabs in Unity

Just add the tag above a variable to have it display in the editor as a dropdown consisting of any prefabs that contain a component of the same type as the attributed variable

[PrefabDropdown]  //displays all corresponding prefabs in "Assets/Prefabs"
public Level levelToLoad;

You can also pass a string argument to limit the search to a specific subfolder

[PrefabDropdown("Levels/Subfolder")]  //displays all corresponding prefabs in "Assets/Prefabs/Levels/Subfolder"
public Level levelToLoad;

Read the full article on Medium

About

An attribute tag to speed up finding and selecting prefabs in Unity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%