Skip to content

Conversation

Eideren
Copy link

@Eideren Eideren commented Jun 21, 2025

Changed the button from being implemented as an editor to part of the inspector header to support any asset types out of the box
image
While the button is visible on most assets, adding metadata to some types is not fully supported; scenes, prefabs, textures and models remain unaffected or throw with the following:

Failed to load 'ASSET_PATH'. File may be corrupted or was serialized with a newer version of Unity.
UnityEditor.AssetDatabase:AddObjectToAsset (UnityEngine.Object,string)
AssetMetadataUtility:Add (UnityEngine.Object,System.Type) (at ./Packages/CustomAssetMetadata/Editor/Common/AssetMetadataUtility.cs:169)

@Eideren
Copy link
Author

Eideren commented Jul 14, 2025

Note that supporting all asset types is possible, but includes a fairly harsh workaround forcing us to append an id to the end of the name of all assets with metadata, it's done automatically on build, but it's still a bit too invasive for wide use I would think.
I could not find a better work around than this one sadly, if we had a fixed id we could retrieve for built assets this wouldn't need to exist.
See Eideren@881b928 for an example implementation of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant