Version: 2022.1
언어: 한국어
public static void ClearLabels (Object obj);

설명

Removes all labels attached to an asset.

using UnityEngine;
using UnityEditor;
public class AssetDatabaseExamples : MonoBehaviour
{
    [MenuItem("AssetDatabase/Clear Labels")]
    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);
        }
    }
}