vexe / VFW

MIT License
492 stars 67 forks source link

Updated ResourcePathAttribute #56

Closed james7132 closed 9 years ago

james7132 commented 9 years ago

Changed the ResourcePathAttribute to show a more intuitive Object field instead.

Changed the drawer to use Regex to detect whether the path is a valid Resource path. It works much better and with less code than the previous solution.

The "Clear Resource" clear button was reading "Clear Clear Resource", fixed that.

With that addition, I also added a parameter to the attribute that allows a filtering of exactly what kinds of Resources are accepted.

Instead of showing a dubious (missing resource) or (null) output. The field displays a seperate debug line underneath the object field.

If a scene object is somehow dragged into the object field (it shouldn't), it will say that only Assets are allowed.

If a non-Resource asset is dragged in, it will instead say that is is not a Resource, and ask for it to be moved to a Resource Folder.

I also updated the Examples file accordingly.

james7132 commented 9 years ago

Oh I seem to have duplicated a variable in the example by accident.