기술 자료

Unity Engine

Unity Engine

ClearLabels(Object)

Removes all labels attached to an asset.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static void ClearLabels(Object obj)

Parameters

The asset object to remove labels from.

Remarks

The following example removes all labels from the assets selected in the Project window:

Examples

using UnityEditor;using UnityEngine;static class AssetLabelCleanup{ [MenuItem("Tools/Clear Labels On Selected Assets")] static void ClearLabelsOnSelection() { foreach (string guid in Selection.assetGUIDs) { string path = AssetDatabase.GUIDToAssetPath(guid); Object asset = AssetDatabase.LoadMainAssetAtPath(path); AssetDatabase.ClearLabels(asset); } }}