SpriteSkinCompositeDebugWindow.cs 991 B

1234567891011121314151617181920212223242526272829303132333435
  1. #if ENABLE_ANIMATION_COLLECTION && ENABLE_ANIMATION_BURST
  2. using UnityEngine;
  3. using UnityEngine.U2D.Animation;
  4. namespace UnityEditor.U2D.Animation
  5. {
  6. internal class SpriteSkinCompositeDebugWindow : EditorWindow
  7. {
  8. [MenuItem("internal:Window/2D/SpritSkinCompositeDebug")]
  9. static void Launch()
  10. {
  11. EditorWindow.GetWindow<SpriteSkinCompositeDebugWindow>().Show();
  12. }
  13. Vector2 m_ScrollPos = Vector2.zero;
  14. string m_DebugLog = "";
  15. void OnGUI()
  16. {
  17. if (GUILayout.Button("Reset Sprite SkinComposite"))
  18. SpriteSkinComposite.instance.ResetComposite();
  19. if (GUILayout.Button("Show Debug"))
  20. {
  21. m_DebugLog = SpriteSkinComposite.instance.GetDebugLog();
  22. }
  23. m_ScrollPos = EditorGUILayout.BeginScrollView(m_ScrollPos);
  24. GUILayout.TextArea(m_DebugLog);
  25. EditorGUILayout.EndScrollView();
  26. }
  27. }
  28. }
  29. #endif