IAssetDatabase.cs 530 B

1234567891011121314151617181920212223
  1. using UnityEngine;
  2. namespace UnityEditor.U2D.Sprites
  3. {
  4. internal interface IAssetDatabase
  5. {
  6. string GetAssetPath(Object o);
  7. AssetImporter GetAssetImporterFromPath(string path);
  8. }
  9. internal class AssetDatabaseSystem : IAssetDatabase
  10. {
  11. public string GetAssetPath(Object o)
  12. {
  13. return AssetDatabase.GetAssetPath(o);
  14. }
  15. public AssetImporter GetAssetImporterFromPath(string path)
  16. {
  17. return AssetImporter.GetAtPath(path);
  18. }
  19. }
  20. }