Skip to content

Eldoir/FolderAttribute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FolderAttribute

And NOW you can reference folders into Unity's Inspector.

That's what I've been waiting for years, until I decided to code it myself! Enjoy :D

Getting Started

For a quick import into an existing project, just get the UnityPackage.

The FolderAttribute folder is an empty project with only the plugin imported and some examples! :)

See the Code Usage for details on how to use it in your project.

Code Usage

using Folder; // Don't forget this.

[Folder]
public string materialsFolder; // A variable with [Folder] must be a string.

void Start()
{
    // Get the content of the folder!
    Material[] materials = materialsFolder.LoadFolder<Material>();
}

Screenshots

Example 1

Warning

If you've made some changes to folders that are referenced in the inspector via FolderAttribute (like moving/renaming/deleting folders), it's always a good practice to enter Play mode to check you've not broken anything. Plus, it will update some references under-the-hood to ensure that your project can be shared with others without any broken reference.

Notes

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Now you can reference folders into Unity's Inspector! :D

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages