You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.3 KiB

  1. using UnityEngine.Experimental.UIElements;
  2. namespace UnityEditor.PackageManager.UI
  3. {
  4. /// <summary>
  5. /// Interface for Package Manager UI Extension
  6. /// </summary>
  7. public interface IPackageManagerExtension
  8. {
  9. /// <summary>
  10. /// Creates the extension UI visual element.
  11. /// </summary>
  12. /// <returns>A visual element that represents the UI or null if none</returns>
  13. VisualElement CreateExtensionUI();
  14. /// <summary>
  15. /// Called by the Package Manager UI when the package selection changed.
  16. /// </summary>
  17. /// <param name="packageInfo">The newly selected package information (can be null)</param>
  18. void OnPackageSelectionChange(PackageManager.PackageInfo packageInfo);
  19. /// <summary>
  20. /// Called by the Package Manager UI when a package is added or updated.
  21. /// </summary>
  22. /// <param name="packageInfo">The package information</param>
  23. void OnPackageAddedOrUpdated(PackageManager.PackageInfo packageInfo);
  24. /// <summary>
  25. /// Called by the Package Manager UI when a package is removed.
  26. /// </summary>
  27. /// <param name="packageInfo">The package information</param>
  28. void OnPackageRemoved(PackageManager.PackageInfo packageInfo);
  29. }
  30. }