Closed Vroonsh closed 2 years ago
Good stuff. Sorry for the delayed response, was busy drawing plastics this weekend. ;)
I'd go for option 2. It's how Unity works, if you rename or move files outside of Unity, you're usually in trouble. Most obvious example are textures, where you typically adapt the import settings, which are reflected in the .meta
file.
You can duplicate assets in the editor with Ctrl+D
. It should copy the meta data as well.
Yup agreed,
Just validated that userData is transfered when duplicating an asset (was quite confident on that :))
Was still wondering if the userData approach is the only valid one for extending already existing asset types or if extending importers could also works, will dig a little further.
Was also wondering if the multi-extension pinballmetadata i was planning wasn't quite overpowered, especially if we don't plan to mix several together in the same userData.
I've just the TagsMetadataExtension in mind for now, don't know if it could be mixed with another type of VPE specific metadata and also if it could be used on other asset types than prefabs, if not maybe it's too complicated, but well...it's upgradable :).
This issue shows up while starting to work on the Prefab Library Editor.
Here's a view of a really early draft of the Prefab Library.
This library works by looking for all PrefabLibrarySettingsAsset into the AssetDatabase and populate all prefabs from the directories pointed by all those settings assets.
For now i thought about 3 solutions which could match those requests :
The tags are stored as Unity labels into the .meta file.
Pros :
already editable through the asset properties editor, still didn't found a way to edit those outside from the Assets base directory (like in the HDRP package)
stored as labels in the .meta file, already handled by Unity
should also be viewable in the Unity Asset Store (tbc)
I'm not really found of the first solution (it was my first thought, the lazy one :)) I like the second one, maybe not easily traceable, could lead to data loss in case of weird assets manipulation, will probably need some heavy custom edition effort. The third one is kinda integrated into the Unity ecosystem but will have to be heavily customized (UnityEditor classes duplication) if we want to have a slightly different user experience while dealing with VPE assets.
While thinking about this particular topic I thought that it could be a wider discussion about VPE asset's metadata. What's your opinion on that ?
Cheers !