From c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 19 Apr 2020 17:19:32 -0400 Subject: Inital commit --- .../Runtime/TMP_SpriteAssetImportFormats.cs | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs (limited to 'Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs') diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs new file mode 100644 index 0000000..c9dd075 --- /dev/null +++ b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs @@ -0,0 +1,61 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro.SpriteAssetUtilities +{ + public enum SpriteAssetImportFormats { None = 0, TexturePacker = 0x1 }; + + public class TexturePacker + { + [System.Serializable] + public struct SpriteFrame + { + public float x; + public float y; + public float w; + public float h; + + public override string ToString() + { + string s = "x: " + x.ToString("f2") + " y: " + y.ToString("f2") + " h: " + h.ToString("f2") + " w: " + w.ToString("f2"); + return s; + } + } + + [System.Serializable] + public struct SpriteSize + { + public float w; + public float h; + + public override string ToString() + { + string s = "w: " + w.ToString("f2") + " h: " + h.ToString("f2"); + return s; + } + } + + [System.Serializable] + public struct SpriteData + { + public string filename; + public SpriteFrame frame; + public bool rotated; + public bool trimmed; + public SpriteFrame spriteSourceSize; + public SpriteSize sourceSize; + public Vector2 pivot; + + } + + [System.Serializable] + public class SpriteDataObject + { + public List frames; + } + + + } +} \ No newline at end of file -- cgit v1.2.3