UnityPickers icon indicating copy to clipboard operation
UnityPickers copied to clipboard

Allow filtering by Monobehaviour Subtypes

Open mjholtzem opened this issue 8 years ago • 3 comments

Not sure if this is possible with Unity's APIs, but it would be awesome if you could filter a prefab search by a monobehaviour subtype

mjholtzem avatar Feb 07 '18 16:02 mjholtzem

Unfortunately, you would have to load and check every prefab in the project to do this. Unity search API doesn't allow such filters.

It is possible to implement such feature by preprocessing all prefabs at startup and collecting types information. That would cause long warmup time though.

vasyab avatar Feb 08 '18 12:02 vasyab

We are using [AssetPathFilter("Part/Of/Prefabs/Path")] attribute on fields as a workaround for this ;)

vasyab avatar Feb 08 '18 13:02 vasyab

yeah fair enough. I implemented it myself and it is quite slow when you have a lot of assets. Still is pretty useful though (at least to me) and could maybe be implemented as an optional "on demand" feature.

mjholtzem avatar Feb 08 '18 15:02 mjholtzem