ClearImporterOverride(string)
Clears the importer override for the asset.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEditor
- Assembly: UnityEditor
public static void ClearImporterOverride(string path)
Parameters
Project relative path for the asset.
Examples
using UnityEngine;using UnityEditor;using UnityEditor.AssetImporters;using UnityEngine.Assertions;public class AssetDatabaseExamples : MonoBehaviour{ [MenuItem("AssetDatabase/Example Importer Actions")] static void AllImporterActions() { //This sets CubeImporter to be used for the asset AssetDatabase.SetImporterOverride<CubeImporter>("Assets/CompanionCube.cube"); Debug.Log("New importer: " + AssetDatabase.GetImporterOverride("Assets/CompanionCube.cube")); //This clears importer override and sets it to null AssetDatabase.ClearImporterOverride("Assets/CompanionCube.cube"); Assert.IsNull(AssetDatabase.GetImporterOverride("Assets/CompanionCube.cube")); }}