暫無描述
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.

InternalEditorBridge.cs 1.2KB

123456789101112131415161718192021222324252627282930313233343536
  1. using UnityEngine;
  2. namespace UnityEditor.U2D.Aseprite.Common
  3. {
  4. internal static class InternalEditorBridge
  5. {
  6. public static bool DoesHardwareSupportsFullNPOT()
  7. {
  8. return ShaderUtil.hardwareSupportsFullNPOT;
  9. }
  10. public static Texture2D CreateTemporaryDuplicate(Texture2D tex, int width, int height)
  11. {
  12. return SpriteUtility.CreateTemporaryDuplicate(tex, width, height);
  13. }
  14. public static void ShowSpriteEditorWindow(Object obj = null)
  15. {
  16. SpriteUtilityWindow.ShowSpriteEditorWindow(obj);
  17. }
  18. public static void ApplySpriteEditorWindow()
  19. {
  20. SpriteUtilityWindow.ApplySpriteEditorWindow();
  21. }
  22. public static void AddManagedGameObject(this PreviewRenderUtility scene, GameObject go) => scene.AddManagedGO(go);
  23. public static void RefreshInspectors() => InspectorWindow.RefreshInspectors();
  24. public static void GenerateOutlineFromSprite(Sprite sprite, float detail, byte alphaTolerance, bool holeDetection, out Vector2[][] paths)
  25. {
  26. UnityEditor.Sprites.SpriteUtility.GenerateOutlineFromSprite(sprite, detail, alphaTolerance, holeDetection, out paths);
  27. }
  28. }
  29. }