기술 자료

Unity Engine

Unity Engine

importPackageCancelled

Callback raised whenever a package import is cancelled by the user.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Event
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
public static event AssetDatabase.ImportPackageCallback importPackageCancelled

Examples

using UnityEditor;using UnityEngine;[InitializeOnLoad]public class AssetDatabaseExamples{ static AssetDatabaseExamples() { AssetDatabase.importPackageStarted += OnImportPackageStarted; AssetDatabase.importPackageCompleted += OnImportPackageCompleted; AssetDatabase.importPackageFailed += OnImportPackageFailed; AssetDatabase.importPackageCancelled += OnImportPackageCancelled; } private static void OnImportPackageCancelled(string packageName) { Debug.Log($"Cancelled the import of package: {packageName}"); } private static void OnImportPackageCompleted(string packagename) { Debug.Log($"Imported package: {packagename}"); } private static void OnImportPackageFailed(string packagename, string errormessage) { Debug.Log($"Failed importing package: {packagename} with error: {errormessage}"); } private static void OnImportPackageStarted(string packagename) { Debug.Log($"Started importing package: {packagename}"); }}