Change the zAutogenerated asset prefix to directory-like:
- Change the zAutogenerated__ prefix to zAutogenerated/ - This allows the zAutogenerated/ assets to display in a dedicated menu in the animation editor when the animator is selected. - For legacy compatibility, the old prefix is still matched for the invocation of ClearPreviousAssets() in addition to the new.
This commit is contained in:
@@ -553,7 +553,12 @@ namespace AnimatorAsCode.V1
|
||||
var allSubAssets = AssetDatabase.LoadAllAssetsAtPath(AssetDatabase.GetAssetPath(_configuration.AsPersistentContainerRequired()));
|
||||
foreach (var subAsset in allSubAssets)
|
||||
{
|
||||
if (subAsset.name.StartsWith($"zAutogenerated__{_configuration.AssetKey}__")
|
||||
if (
|
||||
(
|
||||
subAsset.name.StartsWith($"{AacInternals.AutoGeneratedPrefix}{_configuration.AssetKey}__")
|
||||
|| subAsset.name.StartsWith($"{AacInternals.AutoGeneratedLegacyPrefix}{_configuration.AssetKey}__")
|
||||
)
|
||||
|
||||
&& (subAsset is AnimationClip || subAsset is BlendTree || subAsset is AvatarMask))
|
||||
{
|
||||
AssetDatabase.RemoveObjectFromAsset(subAsset);
|
||||
|
||||
Reference in New Issue
Block a user