Version: 2020.1
public static void ClearLabels (Object obj);

描述

删除附加到资源的所有标签。

using UnityEngine;
using UnityEditor;
public class AssetDatabaseExamples : MonoBehaviour
{
    [MenuItem("AssetDatabase/ClearLabels")]
    static void ClearAssetLabels()
    {
        for (var i = 0; i < 10; i++)
        {
            var prefabPath = $"Assets/Prefabs/Litter/Litter{i}.prefab";
            var asset = AssetDatabase.LoadMainAssetAtPath(prefabPath);
            AssetDatabase.ClearLabels(asset);
        }
    }
}