diff --git a/CHANGELOG.md b/CHANGELOG.md index c2288c9..93476be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,25 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [2.0.2] - 2019-07-13 +### Changed +- Mark package to support Unity 2019.3.0a10 onwards. + +## [2.0.1] - 2019-06-12 +### Changed +- Update 2D Animation dependency + +## [2.0.0] - 2019-06-17 +### Changed +- Remove preview tag +- Remove experimental namespace + +## [1.2.0-preview.2] - 2019-06-07 +### Added +- Change API to internal access +- Only generate Sprite Library Asset if there is entry +- Do not reset Reslice checkbox after Inspector apply + ## [1.2.0-preview.1] - 2019-03-15 ### Added - Update support for 2019.2 diff --git a/Documentation~/PSDImporter.md b/Documentation~/PSDImporter.md index db913b1..8f0cf1e 100644 --- a/Documentation~/PSDImporter.md +++ b/Documentation~/PSDImporter.md @@ -1,7 +1,3 @@ ---- -typora-copy-images-to: images ---- - # PSD Importer ## Summary diff --git a/Editor/Analytics.cs b/Editor/Analytics.cs index e2711ec..0ee3ff0 100644 --- a/Editor/Analytics.cs +++ b/Editor/Analytics.cs @@ -3,7 +3,7 @@ using UnityEngine; using UnityEngine.Analytics; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { [Serializable] internal struct PSDApplyEvent diff --git a/Editor/AssemblyInfo.cs b/Editor/AssemblyInfo.cs index ca0b93d..9b1adea 100644 --- a/Editor/AssemblyInfo.cs +++ b/Editor/AssemblyInfo.cs @@ -1,2 +1,2 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("com.unity.2d.psdimporter.EditorTests")] +[assembly: InternalsVisibleTo("Unity.2D.Psdimporter.Tests.EditorTests")] diff --git a/Editor/PSDImportPostProcessor.cs b/Editor/PSDImportPostProcessor.cs index d4d08e9..b501fa3 100644 --- a/Editor/PSDImportPostProcessor.cs +++ b/Editor/PSDImportPostProcessor.cs @@ -1,12 +1,12 @@ -using System.Collections; using System.Collections.Generic; using System.Linq; +using UnityEditor.U2D; using UnityEditor.U2D.Sprites; using UnityEngine; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { - public class PSDImportPostProcessor : AssetPostprocessor + internal class PSDImportPostProcessor : AssetPostprocessor { static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { diff --git a/Editor/PSDImporter.cs b/Editor/PSDImporter.cs index 2d8635a..d90e5ef 100644 --- a/Editor/PSDImporter.cs +++ b/Editor/PSDImporter.cs @@ -2,21 +2,22 @@ using System.Collections.Generic; using System.IO; using PDNWrapper; -using UnityEditor.Experimental.AssetImporters; using UnityEngine; using Unity.Collections; using System.Linq; -using UnityEditor.Experimental.U2D.Animation; -using UnityEditor.Experimental.U2D.Common; +using UnityEditor.Experimental.AssetImporters; +using UnityEditor.U2D.Animation; +using UnityEditor.U2D.Common; using UnityEditor.U2D.Sprites; using UnityEngine.Assertions; -using UnityEngine.Experimental.U2D; using UnityEngine.Experimental.U2D.Animation; +using UnityEngine.U2D; +using UnityEngine.U2D.Animation; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { - [ScriptedImporter(2, "psb")] - public class PSDImporter : ScriptedImporter, ISpriteEditorDataProvider, IAnimationAssetPostProcess + [ScriptedImporter(4, "psb")] + internal class PSDImporter : ScriptedImporter, ISpriteEditorDataProvider, IAnimationAssetPostProcess { class GameObjectCreationFactory { @@ -66,10 +67,10 @@ struct BoneGO bool m_PaperDollMode = false; [SerializeField] - SpriteLibrary m_SpriteLibrary = new SpriteLibrary() {categories = new List()}; + SpriteCategoryList m_SpriteCategoryList = new SpriteCategoryList() {categories = new List()}; GameObjectCreationFactory m_GameObjectFactory = new GameObjectCreationFactory(); - internal SpriteLibrary spriteLibrary { get { return m_SpriteLibrary; } set { m_SpriteLibrary = value; } } + internal SpriteCategoryList spriteCategoryList { get { return m_SpriteCategoryList; } set { m_SpriteCategoryList = value; } } [SerializeField] int m_TextureActualWidth; @@ -484,7 +485,6 @@ void ImportFromLayers(AssetImportContext ctx, Document doc) } oldPsdLayers.Clear(); oldPsdLayers.AddRange(psdLayers); - m_ResliceFromLayer = false; m_ImportedTextureHeight = textureActualHeight = height; m_ImportedTextureWidth = textureActualWidth = width; var generatedTexture = ImportTexture(ctx, output, width, height, 0, spriteImportData.Count); @@ -590,11 +590,11 @@ void RegisterAssets(AssetImportContext ctx, TextureGenerationOutput output) bool SpriteIsMainFromSpriteLib(string spriteId, out string categoryName) { categoryName = ""; - if (m_SpriteLibrary.categories != null) + if (m_SpriteCategoryList.categories != null) { - foreach (var category in m_SpriteLibrary.categories) + foreach (var category in m_SpriteCategoryList.categories) { - var index = category.spriteIds.FindIndex(x => x == spriteId); + var index = category.labels.FindIndex(x => x.spriteId == spriteId); if (index == 0) { categoryName = category.name; @@ -735,16 +735,18 @@ BoneGO[] CreateBonesGO(Transform root) return new BoneGO[0]; } - void GetSpriteLibEntry(string spriteId, out string category, out int index) + void GetSpriteLiblabel(string spriteId, out string category, out string label) { category = ""; - index = -1; - foreach (var cat in m_SpriteLibrary.categories) + label = ""; + var index = -1; + foreach (var cat in m_SpriteCategoryList.categories) { - index = cat.spriteIds.FindIndex(x => x == spriteId); + index = cat.labels.FindIndex(x => x.spriteId == spriteId); if (index != -1) { category = cat.name; + label = cat.labels[index].name; break; } } @@ -762,7 +764,7 @@ GameObject OnProducePaperDollPrefab(string assetname, Sprite[] sprites, SpriteLi var psdLayers = GetPSDLayers(); m_BoneGOs = CreateBonesGO(root.transform); if (spriteLib != null) - root.AddComponent().spriteLib = spriteLib; + root.AddComponent().spriteLibraryAsset = spriteLib; for (int i = 0; i < sprites.Length; ++i) { string categoryName; @@ -791,14 +793,13 @@ GameObject OnProducePaperDollPrefab(string assetname, Sprite[] sprites, SpriteLi srGameObject.transform.position = new Vector3(outlineOffset.x, outlineOffset.y, 0); } var category = ""; - var spriteIndex = -1; - GetSpriteLibEntry(sprites[i].GetSpriteID().ToString(), out category, out spriteIndex); - if (!string.IsNullOrEmpty(category) && spriteIndex >= 0) + var labelName = ""; + GetSpriteLiblabel(sprites[i].GetSpriteID().ToString(), out category, out labelName); + if (!string.IsNullOrEmpty(category) && !string.IsNullOrEmpty(labelName)) { var sresolver = srGameObject.AddComponent(); - sresolver.spriteCategory = category; - sresolver.spriteIndex = spriteIndex; - sresolver.RefreshSpriteFromSpriteKey(); + sresolver.SetCategoryAndLabel(category, labelName); + sresolver.ResolveSpriteToSpriteRenderer(); } } } @@ -816,7 +817,7 @@ GameObject OnProducePrefab(string assetname, Sprite[] sprites, SpriteLibraryAsse root = new GameObject(); root.name = assetname + "_GO"; if (spriteLib != null) - root.AddComponent().spriteLib = spriteLib; + root.AddComponent().spriteLibraryAsset = spriteLib; var psdLayers = GetPSDLayers(); for (int i = 0; i < psdLayers.Count; ++i) { @@ -845,14 +846,13 @@ GameObject OnProducePrefab(string assetname, Sprite[] sprites, SpriteLibraryAsse } var category = ""; - var spriteIndex = -1; - GetSpriteLibEntry(layerSpriteID.ToString(), out category, out spriteIndex); - if (!string.IsNullOrEmpty(category) && spriteIndex >= 0) + var labelName = ""; + GetSpriteLiblabel(layerSpriteID.ToString(), out category, out labelName); + if (!string.IsNullOrEmpty(category) && !string.IsNullOrEmpty(labelName)) { var sresolver = l.gameObject.AddComponent(); - sresolver.spriteCategory = category; - sresolver.spriteIndex = spriteIndex; - sresolver.RefreshSpriteFromSpriteKey(); + sresolver.SetCategoryAndLabel(category, labelName); + sresolver.ResolveSpriteToSpriteRenderer(); } } } @@ -1239,18 +1239,30 @@ internal Vector2Int documentSize SpriteLibraryAsset ProduceSpriteLibAsset(Sprite[] sprites) { - if (!characterMode || m_SpriteLibrary.categories == null) + if (!characterMode || m_SpriteCategoryList.categories == null) return null; var sla = ScriptableObject.CreateInstance(); sla.name = "Sprite Lib"; - sla.entries = m_SpriteLibrary.categories.Select(x => - new LibEntry() + sla.labels = m_SpriteCategoryList.categories.Select(x => + new SpriteLibCategory() { - category = x.name, - spriteList = x.spriteIds.Select(y => sprites.FirstOrDefault(z => z.GetSpriteID().ToString() == y)).ToList() + name = x.name, + categoryList = x.labels.Select(y => + { + var sprite = sprites.FirstOrDefault(z => z.GetSpriteID().ToString() == y.spriteId); + return new Categorylabel() + { + name = y.name, + sprite = sprite + }; + }).ToList() }).ToList(); - sla.UpdateHashes(); - return sla; + if (sla.labels.Count > 0) + { + sla.UpdateHashes(); + return sla; + } + return null; } } } diff --git a/Editor/PSDImporterDataProvider.cs b/Editor/PSDImporterDataProvider.cs index e05b82b..8ab8564 100644 --- a/Editor/PSDImporterDataProvider.cs +++ b/Editor/PSDImporterDataProvider.cs @@ -2,20 +2,20 @@ using System.Linq; using UnityEngine; using UnityEngine.Assertions; -using UnityEngine.Experimental.U2D; -using UnityEditor.Experimental.U2D.Common; -using UnityEditor.Experimental.U2D.Animation; +using UnityEditor.U2D.Common; +using UnityEditor.U2D.Animation; using System; using UnityEditor.U2D.Sprites; +using UnityEngine.U2D; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { - public abstract class PSDDataProvider + internal abstract class PSDDataProvider { public PSDImporter dataProvider; } - public class SpriteBoneDataProvider : PSDDataProvider, ISpriteBoneDataProvider + internal class SpriteBoneDataProvider : PSDDataProvider, ISpriteBoneDataProvider { public List GetBones(GUID guid) { @@ -32,7 +32,7 @@ public void SetBones(GUID guid, List bones) } } - public class TextureDataProvider : PSDDataProvider, ITextureDataProvider + internal class TextureDataProvider : PSDDataProvider, ITextureDataProvider { Texture2D m_ReadableTexture; Texture2D m_OriginalTexture; @@ -72,7 +72,7 @@ public void GetTextureActualWidthAndHeight(out int width, out int height) } } - public class SpriteOutlineDataProvider : PSDDataProvider, ISpriteOutlineDataProvider + internal class SpriteOutlineDataProvider : PSDDataProvider, ISpriteOutlineDataProvider { public List GetOutlines(GUID guid) { @@ -105,7 +105,7 @@ public void SetTessellationDetail(GUID guid, float value) } } - public class SpritePhysicsOutlineProvider : PSDDataProvider, ISpritePhysicsOutlineDataProvider + internal class SpritePhysicsOutlineProvider : PSDDataProvider, ISpritePhysicsOutlineDataProvider { public List GetOutlines(GUID guid) { @@ -138,7 +138,7 @@ public void SetTessellationDetail(GUID guid, float value) } } - public class SpriteMeshDataProvider : PSDDataProvider, ISpriteMeshDataProvider + internal class SpriteMeshDataProvider : PSDDataProvider, ISpriteMeshDataProvider { public Vertex2DMetaData[] GetVertices(GUID guid) { @@ -196,7 +196,7 @@ public void SetEdges(GUID guid, Vector2Int[] edges) } - public class CharacterDataProvider : PSDDataProvider, ICharacterDataProvider + internal class CharacterDataProvider : PSDDataProvider, ICharacterDataProvider { int ParentGroupInFlatten(int parentIndex, List psdLayers) { @@ -268,16 +268,16 @@ public void SetCharacterData(CharacterData characterData) } } - public class SpriteLibraryDataProvider : PSDDataProvider, ISpriteLibDataProvider + internal class SpriteLibraryDataProvider : PSDDataProvider, ISpriteLibDataProvider { - public SpriteLibrary GetSpriteLibrary() + public SpriteCategoryList GetSpriteCategoryList() { - return dataProvider.spriteLibrary; + return dataProvider.spriteCategoryList; } - public void SetSpriteLibrary(SpriteLibrary spriteLibrary) + public void SetSpriteCategoryList(SpriteCategoryList spriteCategoryList) { - dataProvider.spriteLibrary = spriteLibrary; + dataProvider.spriteCategoryList = spriteCategoryList; } } } diff --git a/Editor/PSDImporterEditor.cs b/Editor/PSDImporterEditor.cs index d57a03f..c9249a5 100644 --- a/Editor/PSDImporterEditor.cs +++ b/Editor/PSDImporterEditor.cs @@ -3,15 +3,15 @@ using System.IO; using PhotoshopFile; using UnityEditor.Experimental.AssetImporters; -using UnityEditor.Experimental.U2D.Animation; -using UnityEditor.Experimental.U2D.Common; +using UnityEditor.U2D.Animation; +using UnityEditor.U2D.Common; using UnityEditor.U2D.Sprites; using UnityEngine; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { [CustomEditor(typeof(PSDImporter))] - public class PSDImporterEditor : ScriptedImporterEditor + internal class PSDImporterEditor : ScriptedImporterEditor { SerializedProperty m_TextureType; SerializedProperty m_TextureShape; diff --git a/Editor/PSDLayer.cs b/Editor/PSDLayer.cs index 780c7bc..185a75c 100644 --- a/Editor/PSDLayer.cs +++ b/Editor/PSDLayer.cs @@ -2,7 +2,7 @@ using Unity.Collections; using UnityEngine; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { [Serializable] class PSDLayer diff --git a/Editor/PSDPlugin/AssemblyInfo.cs b/Editor/PSDPlugin/AssemblyInfo.cs new file mode 100644 index 0000000..8ebf792 --- /dev/null +++ b/Editor/PSDPlugin/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Unity.2D.PsdImporter.Editor")] \ No newline at end of file diff --git a/Tests/EditorTests/PSDImporterDataProviderTests.cs.meta b/Editor/PSDPlugin/AssemblyInfo.cs.meta similarity index 83% rename from Tests/EditorTests/PSDImporterDataProviderTests.cs.meta rename to Editor/PSDPlugin/AssemblyInfo.cs.meta index 4673d2a..ce1ab1d 100644 --- a/Tests/EditorTests/PSDImporterDataProviderTests.cs.meta +++ b/Editor/PSDPlugin/AssemblyInfo.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 97da3634bc65c0a4498f2adf9dd49a2e +guid: 86edfd93afbfbfd4a9dd8afefbb6ba14 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Editor/PSDPlugin/PDNWrapper/BitmapLayer.cs b/Editor/PSDPlugin/PDNWrapper/BitmapLayer.cs index d4872ce..a6f2521 100644 --- a/Editor/PSDPlugin/PDNWrapper/BitmapLayer.cs +++ b/Editor/PSDPlugin/PDNWrapper/BitmapLayer.cs @@ -3,7 +3,7 @@ namespace PDNWrapper { - public static class Layer + internal static class Layer { public static BitmapLayer CreateBackgroundLayer(int w, int h) { @@ -11,7 +11,7 @@ public static BitmapLayer CreateBackgroundLayer(int w, int h) } } - public class BitmapLayer + internal class BitmapLayer { int width, height; diff --git a/Editor/PSDPlugin/PDNWrapper/Document.cs b/Editor/PSDPlugin/PDNWrapper/Document.cs index 84666a9..f0fd977 100644 --- a/Editor/PSDPlugin/PDNWrapper/Document.cs +++ b/Editor/PSDPlugin/PDNWrapper/Document.cs @@ -3,7 +3,7 @@ namespace PDNWrapper { - public class Document + internal class Document { public int width, height; diff --git a/Editor/PSDPlugin/PDNWrapper/Enums.cs b/Editor/PSDPlugin/PDNWrapper/Enums.cs index e341c0f..c7c18d9 100644 --- a/Editor/PSDPlugin/PDNWrapper/Enums.cs +++ b/Editor/PSDPlugin/PDNWrapper/Enums.cs @@ -1,13 +1,13 @@ namespace PDNWrapper { - public enum MeasurementUnit + internal enum MeasurementUnit { Pixel = 1, Inch = 2, Centimeter = 3 } - public enum LayerBlendMode + internal enum LayerBlendMode { Normal = 0, Multiply = 1, diff --git a/Editor/PSDPlugin/PDNWrapper/PDNDecodeJob.cs b/Editor/PSDPlugin/PDNWrapper/PDNDecodeJob.cs index 3ad873d..deac2df 100644 --- a/Editor/PSDPlugin/PDNWrapper/PDNDecodeJob.cs +++ b/Editor/PSDPlugin/PDNWrapper/PDNDecodeJob.cs @@ -12,7 +12,7 @@ struct PDNDecodeJobOut NativeArray buffer; } -public class PDNDecodeJob : IJob +internal class PDNDecodeJob : IJob { PDNDecodeJobOut output; public void Execute() diff --git a/Editor/PSDPlugin/PDNWrapper/Rectangle.cs b/Editor/PSDPlugin/PDNWrapper/Rectangle.cs index dc638fa..967d783 100644 --- a/Editor/PSDPlugin/PDNWrapper/Rectangle.cs +++ b/Editor/PSDPlugin/PDNWrapper/Rectangle.cs @@ -3,7 +3,7 @@ namespace PDNWrapper { // Mimics System.Drawing.Rectangle - public struct Rectangle + internal struct Rectangle { public static readonly Rectangle Empty = new Rectangle(); diff --git a/Editor/PSDPlugin/PDNWrapper/Size.cs b/Editor/PSDPlugin/PDNWrapper/Size.cs index 85e160d..b6a6bf2 100644 --- a/Editor/PSDPlugin/PDNWrapper/Size.cs +++ b/Editor/PSDPlugin/PDNWrapper/Size.cs @@ -1,7 +1,7 @@ namespace PDNWrapper { // Mimics System.Drawing.Size - public struct Size + internal struct Size { public static readonly Size Empty = new Size(); diff --git a/Editor/PSDPlugin/PDNWrapper/Surface.cs b/Editor/PSDPlugin/PDNWrapper/Surface.cs index 2439d6f..659e6a7 100644 --- a/Editor/PSDPlugin/PDNWrapper/Surface.cs +++ b/Editor/PSDPlugin/PDNWrapper/Surface.cs @@ -3,7 +3,7 @@ namespace PDNWrapper { - public class Surface + internal class Surface { NativeArray m_Color; public Surface(int w, int h) diff --git a/Editor/PSDPlugin/PhotoShopFileType/BlendModeMapping.cs b/Editor/PSDPlugin/PhotoShopFileType/BlendModeMapping.cs index f7bb42d..937b42e 100644 --- a/Editor/PSDPlugin/PhotoShopFileType/BlendModeMapping.cs +++ b/Editor/PSDPlugin/PhotoShopFileType/BlendModeMapping.cs @@ -23,7 +23,7 @@ namespace PaintDotNet.Data.PhotoshopFileType { - public static class BlendModeMapping + internal static class BlendModeMapping { /// /// Convert between Paint.NET and Photoshop blend modes. diff --git a/Editor/PSDPlugin/PhotoShopFileType/DocumentLoadContext.cs b/Editor/PSDPlugin/PhotoShopFileType/DocumentLoadContext.cs index 5f085df..292b402 100644 --- a/Editor/PSDPlugin/PhotoShopFileType/DocumentLoadContext.cs +++ b/Editor/PSDPlugin/PhotoShopFileType/DocumentLoadContext.cs @@ -23,7 +23,7 @@ namespace PaintDotNet.Data.PhotoshopFileType /// /// Controls the loading of a PSD file into a Paint.NET Document. /// - public class DocumentLoadContext : LoadContext + internal class DocumentLoadContext : LoadContext { public DocumentLoadContext() : base() { diff --git a/Editor/PSDPlugin/PhotoShopFileType/ImageDecoderPdn.cs b/Editor/PSDPlugin/PhotoShopFileType/ImageDecoderPdn.cs index 0832804..38c5717 100644 --- a/Editor/PSDPlugin/PhotoShopFileType/ImageDecoderPdn.cs +++ b/Editor/PSDPlugin/PhotoShopFileType/ImageDecoderPdn.cs @@ -25,7 +25,7 @@ namespace PaintDotNet.Data.PhotoshopFileType { - public static class ImageDecoderPdn + internal static class ImageDecoderPdn { private class DecodeContext { diff --git a/Editor/PSDPlugin/PhotoShopFileType/PsdLoad.cs b/Editor/PSDPlugin/PhotoShopFileType/PsdLoad.cs index 4dec70e..c66f387 100644 --- a/Editor/PSDPlugin/PhotoShopFileType/PsdLoad.cs +++ b/Editor/PSDPlugin/PhotoShopFileType/PsdLoad.cs @@ -23,7 +23,7 @@ namespace PaintDotNet.Data.PhotoshopFileType { - public static class PsdLoad + internal static class PsdLoad { public static PsdFile Load(System.IO.Stream input, ELoadFlag loadFlag) { diff --git a/Editor/PSDPlugin/PsdFile/Compression/EndianReverser.cs b/Editor/PSDPlugin/PsdFile/Compression/EndianReverser.cs index 13d4ab7..fcf8cb0 100644 --- a/Editor/PSDPlugin/PsdFile/Compression/EndianReverser.cs +++ b/Editor/PSDPlugin/PsdFile/Compression/EndianReverser.cs @@ -15,7 +15,7 @@ namespace PhotoshopFile.Compression { - public class EndianReverser : ImageData + internal class EndianReverser : ImageData { private ImageData imageData; diff --git a/Editor/PSDPlugin/PsdFile/Compression/ImageData.cs b/Editor/PSDPlugin/PsdFile/Compression/ImageData.cs index 43a65db..a9a7753 100644 --- a/Editor/PSDPlugin/PsdFile/Compression/ImageData.cs +++ b/Editor/PSDPlugin/PsdFile/Compression/ImageData.cs @@ -17,7 +17,7 @@ namespace PhotoshopFile.Compression { - public abstract class ImageData + internal abstract class ImageData { public int BitDepth { get; private set; } diff --git a/Editor/PSDPlugin/PsdFile/Compression/ImageDataFactory.cs b/Editor/PSDPlugin/PsdFile/Compression/ImageDataFactory.cs index 616b82a..98cac8b 100644 --- a/Editor/PSDPlugin/PsdFile/Compression/ImageDataFactory.cs +++ b/Editor/PSDPlugin/PsdFile/Compression/ImageDataFactory.cs @@ -17,7 +17,7 @@ namespace PhotoshopFile.Compression { - public static class ImageDataFactory + internal static class ImageDataFactory { /// /// Creates an ImageData object to compress or decompress image data. diff --git a/Editor/PSDPlugin/PsdFile/Compression/ZipImage.cs b/Editor/PSDPlugin/PsdFile/Compression/ZipImage.cs index 859461d..0de13a5 100644 --- a/Editor/PSDPlugin/PsdFile/Compression/ZipImage.cs +++ b/Editor/PSDPlugin/PsdFile/Compression/ZipImage.cs @@ -18,7 +18,7 @@ namespace PhotoshopFile.Compression { - public class ZipImage : ImageData + internal class ZipImage : ImageData { private MemoryStream zipDataStream; private DeflateStream zipStream; diff --git a/Editor/PSDPlugin/PsdFile/Compression/ZipPredict16Image.cs b/Editor/PSDPlugin/PsdFile/Compression/ZipPredict16Image.cs index 9ef03cd..1a4808c 100644 --- a/Editor/PSDPlugin/PsdFile/Compression/ZipPredict16Image.cs +++ b/Editor/PSDPlugin/PsdFile/Compression/ZipPredict16Image.cs @@ -17,7 +17,7 @@ namespace PhotoshopFile.Compression { - public class ZipPredict16Image : ImageData + internal class ZipPredict16Image : ImageData { private ImageData zipImage; diff --git a/Editor/PSDPlugin/PsdFile/Compression/ZipPredict32Image.cs b/Editor/PSDPlugin/PsdFile/Compression/ZipPredict32Image.cs index 3e31462..08b478f 100644 --- a/Editor/PSDPlugin/PsdFile/Compression/ZipPredict32Image.cs +++ b/Editor/PSDPlugin/PsdFile/Compression/ZipPredict32Image.cs @@ -16,7 +16,7 @@ namespace PhotoshopFile.Compression { - public class ZipPredict32Image : ImageData + internal class ZipPredict32Image : ImageData { private ZipImage zipImage; diff --git a/Editor/PSDPlugin/PsdFile/Exceptions.cs b/Editor/PSDPlugin/PsdFile/Exceptions.cs index 41e0378..538d234 100644 --- a/Editor/PSDPlugin/PsdFile/Exceptions.cs +++ b/Editor/PSDPlugin/PsdFile/Exceptions.cs @@ -21,7 +21,7 @@ namespace PhotoshopFile { [Serializable] - public class PsdInvalidException : Exception + internal class PsdInvalidException : Exception { public PsdInvalidException() { @@ -34,7 +34,7 @@ public PsdInvalidException(string message) } [Serializable] - public class RleException : Exception + internal class RleException : Exception { public RleException() {} diff --git a/Editor/PSDPlugin/PsdFile/ImageResource.cs b/Editor/PSDPlugin/PsdFile/ImageResource.cs index bfd9e61..8bf8ee5 100644 --- a/Editor/PSDPlugin/PsdFile/ImageResource.cs +++ b/Editor/PSDPlugin/PsdFile/ImageResource.cs @@ -23,7 +23,7 @@ namespace PhotoshopFile { - public enum ResourceID + internal enum ResourceID { Undefined = 0, MacPrintInfo = 1001, @@ -108,7 +108,7 @@ public enum ResourceID /// /// Abstract class for Image Resources /// - public abstract class ImageResource + internal abstract class ImageResource { private string signature; public string Signature @@ -171,7 +171,7 @@ protected ImageResource(string name) /// /// Creates the appropriate subclass of ImageResource. /// - public static class ImageResourceFactory + internal static class ImageResourceFactory { public static ImageResource CreateImageResource(PsdBinaryReader reader) { @@ -228,7 +228,7 @@ public static ImageResource CreateImageResource(PsdBinaryReader reader) } } - public class ImageResources : List + internal class ImageResources : List { public ImageResources() : base() { diff --git a/Editor/PSDPlugin/PsdFile/ImageResources/AlphaChannelNames.cs b/Editor/PSDPlugin/PsdFile/ImageResources/AlphaChannelNames.cs index 1680422..d039f22 100644 --- a/Editor/PSDPlugin/PsdFile/ImageResources/AlphaChannelNames.cs +++ b/Editor/PSDPlugin/PsdFile/ImageResources/AlphaChannelNames.cs @@ -19,7 +19,7 @@ namespace PhotoshopFile /// /// The names of the alpha channels /// - public class AlphaChannelNames : ImageResource + internal class AlphaChannelNames : ImageResource { public override ResourceID ID { diff --git a/Editor/PSDPlugin/PsdFile/ImageResources/RawImageResource.cs b/Editor/PSDPlugin/PsdFile/ImageResources/RawImageResource.cs index 57f5ddf..7826a8a 100644 --- a/Editor/PSDPlugin/PsdFile/ImageResources/RawImageResource.cs +++ b/Editor/PSDPlugin/PsdFile/ImageResources/RawImageResource.cs @@ -20,7 +20,7 @@ namespace PhotoshopFile /// /// Stores the raw data for unimplemented image resource types. /// - public class RawImageResource : ImageResource + internal class RawImageResource : ImageResource { public byte[] Data { get; private set; } diff --git a/Editor/PSDPlugin/PsdFile/ImageResources/ResolutionInfo.cs b/Editor/PSDPlugin/PsdFile/ImageResources/ResolutionInfo.cs index d33d91a..916ec6f 100644 --- a/Editor/PSDPlugin/PsdFile/ImageResources/ResolutionInfo.cs +++ b/Editor/PSDPlugin/PsdFile/ImageResources/ResolutionInfo.cs @@ -21,7 +21,7 @@ namespace PhotoshopFile /// /// Summary description for ResolutionInfo. /// - public class ResolutionInfo : ImageResource + internal class ResolutionInfo : ImageResource { public override ResourceID ID { @@ -41,7 +41,7 @@ public override ResourceID ID /// /// 1 = pixels per inch, 2 = pixels per centimeter /// - public enum ResUnit + internal enum ResUnit { PxPerInch = 1, PxPerCm = 2 @@ -62,7 +62,7 @@ public enum ResUnit /// /// Physical units. /// - public enum Unit + internal enum Unit { Inches = 1, Centimeters = 2, diff --git a/Editor/PSDPlugin/PsdFile/ImageResources/Thumbnail.cs b/Editor/PSDPlugin/PsdFile/ImageResources/Thumbnail.cs index ff158e2..d17aafb 100644 --- a/Editor/PSDPlugin/PsdFile/ImageResources/Thumbnail.cs +++ b/Editor/PSDPlugin/PsdFile/ImageResources/Thumbnail.cs @@ -25,7 +25,7 @@ namespace PhotoshopFile /// /// Summary description for Thumbnail. /// - public class Thumbnail : RawImageResource + internal class Thumbnail : RawImageResource { public Thumbnail(ResourceID id, string name) : base(id, name) diff --git a/Editor/PSDPlugin/PsdFile/ImageResources/UnicodeAlphaNames.cs b/Editor/PSDPlugin/PsdFile/ImageResources/UnicodeAlphaNames.cs index 857af9d..61a31ca 100644 --- a/Editor/PSDPlugin/PsdFile/ImageResources/UnicodeAlphaNames.cs +++ b/Editor/PSDPlugin/PsdFile/ImageResources/UnicodeAlphaNames.cs @@ -19,7 +19,7 @@ namespace PhotoshopFile /// /// The names of the alpha channels. /// - public class UnicodeAlphaNames : ImageResource + internal class UnicodeAlphaNames : ImageResource { public override ResourceID ID { diff --git a/Editor/PSDPlugin/PsdFile/ImageResources/VersionInfo.cs b/Editor/PSDPlugin/PsdFile/ImageResources/VersionInfo.cs index bbde7a9..ad49a46 100644 --- a/Editor/PSDPlugin/PsdFile/ImageResources/VersionInfo.cs +++ b/Editor/PSDPlugin/PsdFile/ImageResources/VersionInfo.cs @@ -18,7 +18,7 @@ namespace PhotoshopFile { - public class VersionInfo : ImageResource + internal class VersionInfo : ImageResource { public override ResourceID ID { diff --git a/Editor/PSDPlugin/PsdFile/Layers/BlendingRanges.cs b/Editor/PSDPlugin/PsdFile/Layers/BlendingRanges.cs index 36f6a9d..8a77772 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/BlendingRanges.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/BlendingRanges.cs @@ -20,7 +20,7 @@ namespace PhotoshopFile { - public class BlendingRanges + internal class BlendingRanges { /// /// The layer to which this channel belongs diff --git a/Editor/PSDPlugin/PsdFile/Layers/Channel.cs b/Editor/PSDPlugin/PsdFile/Layers/Channel.cs index 4f0126f..3f67a8e 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/Channel.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/Channel.cs @@ -24,7 +24,7 @@ namespace PhotoshopFile { - public class ChannelList : List + internal class ChannelList : List { /// /// Returns channels with nonnegative IDs as an array, so that accessing @@ -67,7 +67,7 @@ public bool ContainsId(int id) /////////////////////////////////////////////////////////////////////////// [DebuggerDisplay("ID = {ID}")] - public class Channel + internal class Channel { /// /// The layer to which this channel belongs diff --git a/Editor/PSDPlugin/PsdFile/Layers/Layer.cs b/Editor/PSDPlugin/PsdFile/Layers/Layer.cs index 1810f53..c8a6bee 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/Layer.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/Layer.cs @@ -27,7 +27,7 @@ namespace PhotoshopFile { [DebuggerDisplay("Name = {Name}")] - public class Layer + internal class Layer { internal PsdFile PsdFile { get; private set; } diff --git a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo.cs b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo.cs index 89d5daf..28380e8 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo.cs @@ -17,7 +17,7 @@ namespace PhotoshopFile { - public static class LayerInfoFactory + internal static class LayerInfoFactory { /// /// Loads the next LayerInfo record. @@ -159,7 +159,7 @@ internal static bool HasLongLength(string key, bool isLargeDocument) } } - public abstract class LayerInfo + internal abstract class LayerInfo { public abstract string Signature { get; } diff --git a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/InfoLayers.cs b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/InfoLayers.cs index 417854e..2176793 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/InfoLayers.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/InfoLayers.cs @@ -30,7 +30,7 @@ namespace PhotoshopFile /// required. Photoshop will successfully load a high-bitdepth image that /// puts the layers in the Layers section. /// - public class InfoLayers : LayerInfo + internal class InfoLayers : LayerInfo { public override string Signature { diff --git a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerId.cs b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerId.cs index 3138150..1eb0ca2 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerId.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerId.cs @@ -22,7 +22,7 @@ namespace PhotoshopFile /// required. Photoshop will successfully load a high-bitdepth image that /// puts the layers in the Layers section. /// - public class LayerId : LayerInfo + internal class LayerId : LayerInfo { public override string Signature { diff --git a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerSectionInfo.cs b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerSectionInfo.cs index 794b38a..de8af51 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerSectionInfo.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerSectionInfo.cs @@ -15,7 +15,7 @@ namespace PhotoshopFile { - public enum LayerSectionType + internal enum LayerSectionType { Layer = 0, OpenFolder = 1, @@ -23,7 +23,7 @@ public enum LayerSectionType SectionDivider = 3 } - public enum LayerSectionSubtype + internal enum LayerSectionSubtype { Normal = 0, SceneGroup = 1 @@ -32,7 +32,7 @@ public enum LayerSectionSubtype /// /// Layer sections are known as Groups in the Photoshop UI. /// - public class LayerSectionInfo : LayerInfo + internal class LayerSectionInfo : LayerInfo { public override string Signature { diff --git a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerUnicodeName.cs b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerUnicodeName.cs index a1891e7..58febf3 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerUnicodeName.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/LayerUnicodeName.cs @@ -15,7 +15,7 @@ namespace PhotoshopFile { - public class LayerUnicodeName : LayerInfo + internal class LayerUnicodeName : LayerInfo { public override string Signature { diff --git a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/RawLayerInfo.cs b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/RawLayerInfo.cs index d3c0ffb..77ba7ce 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/RawLayerInfo.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/LayerInfo/RawLayerInfo.cs @@ -17,7 +17,7 @@ namespace PhotoshopFile { [DebuggerDisplay("Layer Info: { key }")] - public class RawLayerInfo : LayerInfo + internal class RawLayerInfo : LayerInfo { private string signature; public override string Signature diff --git a/Editor/PSDPlugin/PsdFile/Layers/Mask.cs b/Editor/PSDPlugin/PsdFile/Layers/Mask.cs index 35f364e..14eff5b 100644 --- a/Editor/PSDPlugin/PsdFile/Layers/Mask.cs +++ b/Editor/PSDPlugin/PsdFile/Layers/Mask.cs @@ -22,7 +22,7 @@ namespace PhotoshopFile { - public class Mask + internal class Mask { /// /// The layer to which this mask belongs @@ -100,7 +100,7 @@ public Mask(Layer layer, Rectangle rect, byte color, BitVector32 flags) /// /// Mask info for a layer. Contains both the layer and user masks. /// - public class MaskInfo + internal class MaskInfo { public Mask LayerMask { get; set; } diff --git a/Editor/PSDPlugin/PsdFile/LoadContext.cs b/Editor/PSDPlugin/PsdFile/LoadContext.cs index d489310..513103c 100644 --- a/Editor/PSDPlugin/PsdFile/LoadContext.cs +++ b/Editor/PSDPlugin/PsdFile/LoadContext.cs @@ -24,7 +24,7 @@ namespace PhotoshopFile /// /// Contains settings and callbacks that affect the loading of a PSD file. /// - public class LoadContext + internal class LoadContext { public Encoding Encoding { get; set; } diff --git a/Editor/PSDPlugin/PsdFile/PsdBinaryReader.cs b/Editor/PSDPlugin/PsdFile/PsdBinaryReader.cs index f0c41c6..224554c 100644 --- a/Editor/PSDPlugin/PsdFile/PsdBinaryReader.cs +++ b/Editor/PSDPlugin/PsdFile/PsdBinaryReader.cs @@ -24,7 +24,7 @@ namespace PhotoshopFile /// /// Reads PSD data types in big-endian byte order. /// - public class PsdBinaryReader : IDisposable + internal class PsdBinaryReader : IDisposable { private BinaryReader reader; private Encoding encoding; diff --git a/Editor/PSDPlugin/PsdFile/PsdBlendMode.cs b/Editor/PSDPlugin/PsdFile/PsdBlendMode.cs index a94a879..daeeffc 100644 --- a/Editor/PSDPlugin/PsdFile/PsdBlendMode.cs +++ b/Editor/PSDPlugin/PsdFile/PsdBlendMode.cs @@ -18,7 +18,7 @@ namespace PhotoshopFile { - public static class PsdBlendMode + internal static class PsdBlendMode { public const string Normal = "norm"; public const string Darken = "dark"; diff --git a/Editor/PSDPlugin/PsdFile/PsdFile.cs b/Editor/PSDPlugin/PsdFile/PsdFile.cs index 914246b..66e27a3 100644 --- a/Editor/PSDPlugin/PsdFile/PsdFile.cs +++ b/Editor/PSDPlugin/PsdFile/PsdFile.cs @@ -26,7 +26,7 @@ namespace PhotoshopFile { [Flags] - public enum ELoadFlag + internal enum ELoadFlag { Header = 1, ColorMode = Header | 1 << 2, @@ -35,7 +35,7 @@ public enum ELoadFlag } - public enum PsdColorMode + internal enum PsdColorMode { Bitmap = 0, Grayscale = 1, @@ -47,13 +47,13 @@ public enum PsdColorMode Lab = 9 }; - public enum PsdFileVersion : short + internal enum PsdFileVersion : short { Psd = 1, PsbLargeDocument = 2 } - public class PsdFile + internal class PsdFile { #region Constructors @@ -903,7 +903,7 @@ private void LoadImage(PsdBinaryReader reader) /// /// The possible Compression methods. /// - public enum ImageCompression + internal enum ImageCompression { /// /// Raw data diff --git a/Editor/PSDPlugin/PsdFile/RleReader.cs b/Editor/PSDPlugin/PsdFile/RleReader.cs index 1c3501e..008d3be 100644 --- a/Editor/PSDPlugin/PsdFile/RleReader.cs +++ b/Editor/PSDPlugin/PsdFile/RleReader.cs @@ -21,7 +21,7 @@ namespace PhotoshopFile { - public class RleReader + internal class RleReader { private Stream stream; diff --git a/Editor/PSDPlugin/PsdFile/RleRowLengths.cs b/Editor/PSDPlugin/PsdFile/RleRowLengths.cs index f11a30b..56a7918 100644 --- a/Editor/PSDPlugin/PsdFile/RleRowLengths.cs +++ b/Editor/PSDPlugin/PsdFile/RleRowLengths.cs @@ -16,7 +16,7 @@ namespace PhotoshopFile { - public class RleRowLengths + internal class RleRowLengths { public int[] Values { get; private set; } diff --git a/Editor/PSDPlugin/PsdFile/RleWriter.cs b/Editor/PSDPlugin/PsdFile/RleWriter.cs index 3a16435..11486fa 100644 --- a/Editor/PSDPlugin/PsdFile/RleWriter.cs +++ b/Editor/PSDPlugin/PsdFile/RleWriter.cs @@ -21,7 +21,7 @@ namespace PhotoshopFile { - public class RleWriter + internal class RleWriter { private int maxPacketLength = 128; diff --git a/Editor/PSDPlugin/PsdFile/Util.cs b/Editor/PSDPlugin/PsdFile/Util.cs index 2be274b..effb6be 100644 --- a/Editor/PSDPlugin/PsdFile/Util.cs +++ b/Editor/PSDPlugin/PsdFile/Util.cs @@ -21,10 +21,10 @@ namespace PhotoshopFile { - public static class Util + internal static class Util { [DebuggerDisplay("Top = {Top}, Bottom = {Bottom}, Left = {Left}, Right = {Right}")] - public struct RectanglePosition + internal struct RectanglePosition { public int Top { get; set; } public int Bottom { get; set; } @@ -327,7 +327,7 @@ public static void DebugMessage(Stream stream, string message, /// /// Fixed-point decimal, with 16-bit integer and 16-bit fraction. /// - public class UFixed16_16 + internal class UFixed16_16 { public UInt16 Integer { get; set; } public UInt16 Fraction { get; set; } diff --git a/Editor/SpriteData.cs b/Editor/SpriteData.cs index e0637de..3ceeb2b 100644 --- a/Editor/SpriteData.cs +++ b/Editor/SpriteData.cs @@ -3,12 +3,12 @@ using System.Linq; using UnityEditor.U2D.Sprites; using UnityEngine; -using UnityEngine.Experimental.U2D; +using UnityEngine.U2D; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { [Serializable] - public class SpriteMetaData : SpriteRect + internal class SpriteMetaData : SpriteRect { public List spriteBone; public List spriteOutline; @@ -86,7 +86,7 @@ public static implicit operator UnityEditor.Experimental.AssetImporters.SpriteIm } [Serializable] - public class SpriteOutline + internal class SpriteOutline { [SerializeField] public Vector2[] outline; diff --git a/Editor/Tasks/ExtractLayerTask.cs b/Editor/Tasks/ExtractLayerTask.cs index 3f38eb6..6e62292 100644 --- a/Editor/Tasks/ExtractLayerTask.cs +++ b/Editor/Tasks/ExtractLayerTask.cs @@ -6,7 +6,7 @@ using Unity.Collections.LowLevel.Unsafe; using Unity.Jobs; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { class ExtractLayerTask { diff --git a/Editor/Tasks/FlattenImageTask.cs b/Editor/Tasks/FlattenImageTask.cs index a83a04a..aa69bed 100644 --- a/Editor/Tasks/FlattenImageTask.cs +++ b/Editor/Tasks/FlattenImageTask.cs @@ -6,7 +6,7 @@ using Unity.Collections.LowLevel.Unsafe; using Unity.Jobs; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { static class FlattenImageTask { diff --git a/Editor/TexturePlatformSettingsController.cs b/Editor/TexturePlatformSettingsController.cs index 7a82118..9fd01e5 100644 --- a/Editor/TexturePlatformSettingsController.cs +++ b/Editor/TexturePlatformSettingsController.cs @@ -2,9 +2,9 @@ using UnityEngine; using UnityEngine.Assertions; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { - public class TexturePlatformSettingsController + internal class TexturePlatformSettingsController { public bool HandleDefaultSettings(List platformSettings, TexturePlatformSettingsView view) { diff --git a/Editor/TexturePlatformSettingsModal.cs b/Editor/TexturePlatformSettingsModal.cs index e9c07d7..fe6dd18 100644 --- a/Editor/TexturePlatformSettingsModal.cs +++ b/Editor/TexturePlatformSettingsModal.cs @@ -1,4 +1,4 @@ -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { internal static class TexturePlatformSettingsModal { diff --git a/Editor/TexturePlatformSettingsView.cs b/Editor/TexturePlatformSettingsView.cs index 70ff6f1..3bda239 100644 --- a/Editor/TexturePlatformSettingsView.cs +++ b/Editor/TexturePlatformSettingsView.cs @@ -1,8 +1,8 @@ using UnityEngine; -namespace UnityEditor.Experimental.U2D.PSD +namespace UnityEditor.U2D.PSD { - public class TexturePlatformSettingsView + internal class TexturePlatformSettingsView { class Styles { diff --git a/Editor/TextureSettingsGUI.cs b/Editor/TextureSettingsGUI.cs index 45917e3..cb2cc8c 100644 --- a/Editor/TextureSettingsGUI.cs +++ b/Editor/TextureSettingsGUI.cs @@ -4,7 +4,7 @@ //using UnityEditor; //using UnityEngine; -//namespace UnityEditor.Experimental.U2D +//namespace UnityEditor.U2D //{ // public class TextureSettingsGUI // { diff --git a/LICENSE.md b/LICENSE.md index 70520bb..bb55c56 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ **Unity Companion Package License v1.0 ("_License_")** -Copyright © 2017 Unity Technologies ApS ("**_Unity_**") +Copyright © 2019 Unity Technologies ApS ("**_Unity_**") Unity hereby grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available with this License ("**_Software_**"), subject to the following terms and conditions: diff --git a/Tests/EditorTests/PSDImporterDataProviderTests.cs b/Tests/EditorTests/PSDImporterDataProviderTests.cs deleted file mode 100644 index 0126b2f..0000000 --- a/Tests/EditorTests/PSDImporterDataProviderTests.cs +++ /dev/null @@ -1,309 +0,0 @@ -using UnityEngine; -using NUnit.Framework; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.Experimental.U2D.Animation; -using UnityEditor.U2D.Sprites; -using UnityEngine.Experimental.U2D; - -namespace UnityEditor.Experimental.U2D.PSD.Tests -{ - public class PSDImporterDataProviderTests - { - const string k_TestTempPath = "Assets/PSDTestTemp"; - const string k_TestFilePath = "Packages/com.unity.2d.psdimporter/Tests/EditorTests/TestAssets/TestPSB.psb"; - const string k_TestFileMetaPath = "Packages/com.unity.2d.psdimporter/Tests/EditorTests/TestAssets/TestPSB.psb.meta"; - PSDImporter m_Importer; - - [SetUp] - public void Setup() - { - CopyTestFile(k_TestFilePath, k_TestTempPath); - CopyTestFile(k_TestFileMetaPath, k_TestTempPath); - AssetDatabase.Refresh(); - var copiedAsset = Path.Combine(k_TestTempPath, Path.GetFileName(k_TestFilePath)); - m_Importer = AssetImporter.GetAtPath(copiedAsset) as PSDImporter; - } - - void CopyTestFile(string sourcePath, string destPath) - { - var copiedTestAssetPath = Path.Combine(destPath, Path.GetFileName(sourcePath)); - if (File.Exists(copiedTestAssetPath)) - File.Delete(copiedTestAssetPath); - - if (!Directory.Exists(destPath)) - Directory.CreateDirectory(destPath); - - File.Copy(sourcePath, copiedTestAssetPath); - } - - [TearDown] - public void TearDown() - { - AssetDatabase.DeleteAsset(k_TestTempPath); - AssetDatabase.Refresh(); - } - - [Test] - [TestCase(SpriteImportMode.Single, false, 1)] - [TestCase(SpriteImportMode.Single, true, 1)] - [TestCase(SpriteImportMode.Multiple, false, 3)] - [TestCase(SpriteImportMode.Multiple, true, 4)] - public void SpriteRectDataProvider_HasCorrectNumberOfSpriteRect(SpriteImportMode mode, bool mosaicLayer, int expectedSprite) - { - var so = new SerializedObject(m_Importer); - var textureImporterSettingsSP = so.FindProperty("m_TextureImporterSettings"); - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)mode; - so.FindProperty("m_MosaicLayers").boolValue = mosaicLayer; - so.ApplyModifiedProperties(); - m_Importer.SaveAndReimport(); - - var spriteProvider = m_Importer.GetDataProvider(); - Assert.AreEqual(expectedSprite, spriteProvider.GetSpriteRects().Length); - Assert.AreEqual(expectedSprite, AssetDatabase.LoadAllAssetsAtPath(m_Importer.assetPath).Count(x => x is Sprite)); - } - - [Test] - [TestCase(SpriteImportMode.Single, false, 1, false)] - [TestCase(SpriteImportMode.Single, true, 1, false)] - [TestCase(SpriteImportMode.Multiple, false, 2, true)] - [TestCase(SpriteImportMode.Multiple, true, 3, true)] - public void SpriteRectDataProvider_DeleteSpriteRectPersistAfterReimport(SpriteImportMode mode, bool mosaicLayer, int expectedSprite, bool expectDelete) - { - var so = new SerializedObject(m_Importer); - var textureImporterSettingsSP = so.FindProperty("m_TextureImporterSettings"); - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)mode; - so.FindProperty("m_MosaicLayers").boolValue = mosaicLayer; - so.ApplyModifiedProperties(); - - var spriteProvider = m_Importer.GetDataProvider(); - var rects = spriteProvider.GetSpriteRects().ToList(); - var removedRect = rects[0]; - rects.RemoveAt(0); - spriteProvider.SetSpriteRects(rects.ToArray()); - spriteProvider.Apply(); - m_Importer.SaveAndReimport(); - var importer = AssetImporter.GetAtPath(m_Importer.assetPath) as PSDImporter; - spriteProvider = importer.GetDataProvider(); - Assert.AreEqual(expectedSprite, spriteProvider.GetSpriteRects().Length); - Assert.AreEqual(expectDelete, spriteProvider.GetSpriteRects().FirstOrDefault(x => x.spriteID == removedRect.spriteID) == null); - Assert.AreEqual(expectedSprite, AssetDatabase.LoadAllAssetsAtPath(m_Importer.assetPath).Count(x => x is Sprite)); - } - - [Test] - [TestCase(SpriteImportMode.Single, false, 1, false)] - [TestCase(SpriteImportMode.Single, true, 1, false)] - [TestCase(SpriteImportMode.Multiple, false, 4, true)] - [TestCase(SpriteImportMode.Multiple, true, 5, true)] - public void SpriteRectDataProvider_AddSpriteRectPersistAfterReimport(SpriteImportMode mode, bool mosaicLayer, int expectedSprite, bool expectAdd) - { - var so = new SerializedObject(m_Importer); - var textureImporterSettingsSP = so.FindProperty("m_TextureImporterSettings"); - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)mode; - so.FindProperty("m_MosaicLayers").boolValue = mosaicLayer; - so.ApplyModifiedProperties(); - - var spriteProvider = m_Importer.GetDataProvider(); - var rects = spriteProvider.GetSpriteRects().ToList(); - var newRect = new SpriteRect(); - newRect.name = "Test"; - newRect.rect = new Rect(0, 0, 32, 32); - rects.Add(newRect); - spriteProvider.SetSpriteRects(rects.ToArray()); - spriteProvider.Apply(); - m_Importer.SaveAndReimport(); - var importer = AssetImporter.GetAtPath(m_Importer.assetPath) as PSDImporter; - spriteProvider = importer.GetDataProvider(); - Assert.AreEqual(expectedSprite, spriteProvider.GetSpriteRects().Length); - Assert.AreEqual(expectAdd, spriteProvider.GetSpriteRects().FirstOrDefault(x => x.spriteID == newRect.spriteID) != null); - Assert.AreEqual(expectedSprite, AssetDatabase.LoadAllAssetsAtPath(m_Importer.assetPath).Count(x => x is Sprite)); - } - - [Test] - public void SpriteBoneDataProvider_AddBonePersistAfterReimport() - { - var boneProvider = m_Importer.GetDataProvider(); - var spriteProvider = m_Importer.GetDataProvider(); - var spriteRect = spriteProvider.GetSpriteRects().FirstOrDefault(x => x.name == "Green"); - boneProvider.SetBones(spriteRect.spriteID, new List() - { - new SpriteBone() { - name = "TestBone", - length = 1, - position = Vector2.zero, - rotation = Quaternion.identity, - parentId = -1 - } - }); - - spriteProvider.Apply(); - m_Importer.SaveAndReimport(); - var importer = AssetImporter.GetAtPath(m_Importer.assetPath) as PSDImporter; - boneProvider = importer.GetDataProvider(); - var bones = boneProvider.GetBones(spriteRect.spriteID); - Assert.AreEqual("TestBone", bones[0].name); - } - - [Test] - public void SpriteBoneDataProvider_HasCorretBoneData() - { - var boneProvider = m_Importer.GetDataProvider(); - var spriteProvider = m_Importer.GetDataProvider(); - var spriteRect = spriteProvider.GetSpriteRects().FirstOrDefault(x => x.name == "Black"); - var bones = boneProvider.GetBones(spriteRect.spriteID); - Assert.AreEqual(3, bones.Count); - } - - [Test] - public void SpriteBoneDataProvider_DeleteBonePersistAfterReimport() - { - var boneProvider = m_Importer.GetDataProvider(); - var spriteProvider = m_Importer.GetDataProvider(); - var spriteRect = spriteProvider.GetSpriteRects().FirstOrDefault(x => x.name == "Black"); - var bones = boneProvider.GetBones(spriteRect.spriteID); - Assert.IsTrue(0 < bones.Count, "Bones should exist for test setup"); - bones.Clear(); - boneProvider.SetBones(spriteRect.spriteID, bones); - spriteProvider.Apply(); - m_Importer.SaveAndReimport(); - var importer = AssetImporter.GetAtPath(m_Importer.assetPath) as PSDImporter; - boneProvider = importer.GetDataProvider(); - bones = boneProvider.GetBones(spriteRect.spriteID); - Assert.AreEqual(0, bones.Count); - } - - [Test] - public void SpriteOutlineDataProvider_HasCorrectOutline() - { - var provider = m_Importer.GetDataProvider(); - var spriteProvider = m_Importer.GetDataProvider(); - foreach (var sprite in spriteProvider.GetSpriteRects()) - { - var outline = provider.GetOutlines(sprite.spriteID); - Assert.IsTrue(outline.Count > 0); - Assert.IsTrue(outline[0].Length > 0); - } - } - - [Test] - public void SpriteOutlineDataProvider_SetOutlinePersistAfterReimport() - { - var provider = m_Importer.GetDataProvider(); - var spriteProvider = m_Importer.GetDataProvider(); - var spriteRect = spriteProvider.GetSpriteRects()[0]; - var outline = provider.GetOutlines(spriteRect.spriteID); - var newOutline = new[] - { - new Vector2(0 , 0), - new Vector2(0 , spriteRect.rect.height), - new Vector2(spriteRect.rect.width , spriteRect.rect.height), - new Vector2(spriteRect.rect.width , 0), - }; - outline[0] = newOutline; - provider.SetOutlines(spriteRect.spriteID, outline); - spriteProvider.Apply(); - m_Importer.SaveAndReimport(); - var importer = AssetImporter.GetAtPath(m_Importer.assetPath) as PSDImporter; - provider = importer.GetDataProvider(); - outline = provider.GetOutlines(spriteRect.spriteID); - for (int i = 0; i < newOutline.Length; ++i) - { - Assert.AreEqual(newOutline[i], outline[0][i]); - } - } - - [Test] - public void SpriteMeshDataProvider_SetDataPersistAfterReimport() - { - var provider = m_Importer.GetDataProvider(); - var spriteProvider = m_Importer.GetDataProvider(); - var spriteRect = spriteProvider.GetSpriteRects()[0]; - var vertices = new[] - { - new Vertex2DMetaData() - { - boneWeight = new BoneWeight(), - position = Vector2.down - }, - - new Vertex2DMetaData() - { - boneWeight = new BoneWeight(), - position = Vector2.up - }, - - new Vertex2DMetaData() - { - boneWeight = new BoneWeight(), - position = Vector2.left - }, - }; - var indices = new[] { 0, 1, 2 }; - var edges = new[] { Vector2Int.zero, Vector2Int.down }; - provider.SetVertices(spriteRect.spriteID, vertices); - provider.SetIndices(spriteRect.spriteID, indices); - provider.SetEdges(spriteRect.spriteID, edges); - - spriteProvider.Apply(); - m_Importer.SaveAndReimport(); - var importer = AssetImporter.GetAtPath(m_Importer.assetPath) as PSDImporter; - provider = importer.GetDataProvider(); - - var testVertices = provider.GetVertices(spriteRect.spriteID); - for (int i = 0; i < vertices.Length; ++i) - { - Assert.AreEqual(vertices[i], testVertices[i]); - } - - var testIndices = provider.GetIndices(spriteRect.spriteID); - for (int i = 0; i < indices.Length; ++i) - { - Assert.AreEqual(indices[i], testIndices[i]); - } - - var testEdges = provider.GetEdges(spriteRect.spriteID); - for (int i = 0; i < testEdges.Length; ++i) - { - Assert.AreEqual(edges[i], testEdges[i]); - } - } - - [Test] - public void UserCreatedSpriteRect_AppearsBottomLeftInCharacterMode() - { - var so = new SerializedObject(m_Importer); - var textureImporterSettingsSP = so.FindProperty("m_TextureImporterSettings"); - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)SpriteImportMode.Multiple; - so.FindProperty("m_MosaicLayers").boolValue = true; - so.FindProperty("m_CharacterMode").boolValue = true; - so.ApplyModifiedProperties(); - - var spriteProvider = m_Importer.GetDataProvider(); - var textureDataProvider = spriteProvider.GetDataProvider(); - int width, height; - textureDataProvider.GetTextureActualWidthAndHeight(out width, out height); - var spriteRect = spriteProvider.GetSpriteRects().ToList(); - - spriteRect.Add(new SpriteRect() - { - border = Vector4.zero, - alignment = SpriteAlignment.Center, - name = "InsertedRect", - pivot = Vector2.zero, - rect = new Rect(width - width * 0.5f, height - height * 0.5f, width * 0.5f, height * 0.5f), - }); - var newSpriteID = spriteRect[spriteRect.Count - 1].spriteID; - spriteProvider.SetSpriteRects(spriteRect.ToArray()); - spriteProvider.Apply(); - - m_Importer.SaveAndReimport(); - var importer = AssetImporter.GetAtPath(m_Importer.assetPath) as PSDImporter; - var characterProvider = importer.GetDataProvider(); - var characterData = characterProvider.GetCharacterData(); - Assert.AreEqual(spriteRect.Count, characterData.parts.Length); - var insertedSpriteCharacterPart = characterData.parts.FirstOrDefault(x => x.spriteId == newSpriteID.ToString()); - Assert.AreEqual(new RectInt(0, 0, (int)(width * 0.5f), (int)(height * 0.5f)), insertedSpriteCharacterPart.spritePosition); - } - } -} diff --git a/Tests/EditorTests/PSDImporterTests.cs b/Tests/EditorTests/PSDImporterTests.cs deleted file mode 100644 index 7815ebf..0000000 --- a/Tests/EditorTests/PSDImporterTests.cs +++ /dev/null @@ -1,243 +0,0 @@ -using UnityEngine; -using NUnit.Framework; -using System.IO; -using System.Linq; -using System; -using UnityEngine.Experimental.U2D.Animation; - -namespace UnityEditor.Experimental.U2D.PSD.Tests -{ - public class PSDImporterTests - { - const string k_TestTempPath = "Assets/PSDTestTemp"; - const string k_TestFilePath = "Packages/com.unity.2d.psdimporter/Tests/EditorTests/TestAssets/TestPSB.psb"; - - [TearDown] - public void TearDown() - { - AssetDatabase.DeleteAsset(k_TestTempPath); - AssetDatabase.Refresh(); - } - - string CopyTestAssetFile(bool copyMetaFile = true) - { - var copiedTestAssetPath = Path.Combine(k_TestTempPath, Path.GetFileName(k_TestFilePath)); - if (File.Exists(copiedTestAssetPath)) - File.Delete(copiedTestAssetPath); - - if (!Directory.Exists(k_TestTempPath)) - Directory.CreateDirectory(k_TestTempPath); - File.Copy(k_TestFilePath, copiedTestAssetPath); - if (copyMetaFile) - File.Copy(k_TestFilePath + ".meta", copiedTestAssetPath + ".meta"); - AssetDatabase.Refresh(); - return copiedTestAssetPath; - } - - [TestCase(EditorBehaviorMode.Mode2D, true)] - [TestCase(EditorBehaviorMode.Mode3D, true)] - public void EditorBehaviourModeImportTest(EditorBehaviorMode mode, bool expectSprite) - { - EditorSettings.defaultBehaviorMode = mode; - var testAssetPath = CopyTestAssetFile(false); - var sprite = AssetDatabase.LoadAssetAtPath(testAssetPath); - Assert.AreEqual(expectSprite, (sprite != null)); - } - - [TestCase(true, true, SpriteImportMode.Multiple, true)] - [TestCase(true, false, SpriteImportMode.Multiple, false)] - [TestCase(false, true, SpriteImportMode.Multiple, false)] - [TestCase(false, false, SpriteImportMode.Multiple, false)] - [TestCase(true, true, SpriteImportMode.Single, false)] - [TestCase(true, false, SpriteImportMode.Single, false)] - [TestCase(false, true, SpriteImportMode.Single, false)] - [TestCase(false, false, SpriteImportMode.Single, false)] - [Test] - public void PSBImporterProduceGameObject(bool mosaicLayer, bool charcterMode, SpriteImportMode importMode, bool shouldHaveGameObject) - { - var testAssetPath = CopyTestAssetFile(); - var importer = AssetImporter.GetAtPath(testAssetPath); - var so = new SerializedObject(importer); - - so.FindProperty("m_MosaicLayers").boolValue = mosaicLayer; - so.FindProperty("m_CharacterMode").boolValue = charcterMode; - var textureImporterSettingsSP = so.FindProperty("m_TextureImporterSettings"); - textureImporterSettingsSP.FindPropertyRelative("m_TextureType").intValue = (int)TextureImporterType.Sprite; - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)importMode; - so.ApplyModifiedPropertiesWithoutUndo(); - importer.SaveAndReimport(); - Assert.AreEqual(shouldHaveGameObject, AssetDatabase.LoadAssetAtPath(testAssetPath) != null); - } - - struct GameObjectHierarchyNode - { - public string name; - public Type[] componentType; - public GameObjectHierarchyNode[] children; - } - - [Test] - public void PSBImportProduceGameObjectWithCorrectHierarchy() - { - var testAssetPath = CopyTestAssetFile(); - var importer = AssetImporter.GetAtPath(testAssetPath); - var so = new SerializedObject(importer); - - so.FindProperty("m_MosaicLayers").boolValue = true; - so.FindProperty("m_CharacterMode").boolValue = true; - var textureImporterSettingsSP = so.FindProperty("m_TextureImporterSettings"); - textureImporterSettingsSP.FindPropertyRelative("m_TextureType").intValue = (int)TextureImporterType.Sprite; - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)SpriteImportMode.Multiple; - so.ApplyModifiedPropertiesWithoutUndo(); - importer.SaveAndReimport(); - - var prefab = AssetDatabase.LoadAssetAtPath(testAssetPath); - Assert.NotNull(prefab); - - var expectedGOHierarchy = new GameObjectHierarchyNode - { - name = "TestPSB", - componentType = new[] { typeof(Transform) }, - children = new[] - { - new GameObjectHierarchyNode() - { - name = "Green", - componentType = new[] { typeof(Transform), typeof(SpriteRenderer) }, - children = new GameObjectHierarchyNode[0] - }, - new GameObjectHierarchyNode() - { - name = "Blue", - componentType = new[] { typeof(Transform), typeof(SpriteRenderer) }, - children = new GameObjectHierarchyNode[0] - }, - new GameObjectHierarchyNode() - { - name = "Pink", - componentType = new[] { typeof(Transform), typeof(SpriteRenderer) }, - children = new GameObjectHierarchyNode[0] - }, - new GameObjectHierarchyNode() - { - name = "Black", - componentType = new[] { typeof(Transform), typeof(SpriteRenderer), typeof(SpriteSkin)}, - children = new GameObjectHierarchyNode[0] - }, - - new GameObjectHierarchyNode() - { - name = "bone_1", - componentType = new[] { typeof(Transform) }, - children = new[] - { - new GameObjectHierarchyNode() - { - name = "bone_2", - componentType = new[] { typeof(Transform) }, - children = new[] - { - new GameObjectHierarchyNode() - { - name = "bone_3", - componentType = new[] { typeof(Transform) }, - children = new GameObjectHierarchyNode[0] - } - } - } - } - }, - } - }; - - VerifyGameObjectHierarchy(prefab, expectedGOHierarchy); - } - - private void VerifyGameObjectHierarchy(GameObject go, GameObjectHierarchyNode hierarchy) - { - Assert.AreEqual(hierarchy.name, go.name); - Assert.AreEqual(hierarchy.children.Length, go.transform.childCount); - var components = go.GetComponents(typeof(Component)); - Assert.LessOrEqual(hierarchy.componentType.Length, components.Length); - foreach (var component in hierarchy.componentType) - { - Assert.NotNull(components.SingleOrDefault(x => x.GetType() == component)); - } - for (int i = 0; i < go.transform.childCount; ++i) - { - var child = go.transform.GetChild(i).gameObject; - var childHierarchy = hierarchy.children.FirstOrDefault(x => x.name == child.name); - VerifyGameObjectHierarchy(child, childHierarchy); - } - } - - [Test] - public void PSBImportWithReslice_RecreateSpritesFromLayer() - { - var testAssetPath = CopyTestAssetFile(); - var importer = AssetImporter.GetAtPath(testAssetPath) as PSDImporter; - var so = new SerializedObject(importer); - so.FindProperty("m_MosaicLayers").boolValue = true; - var textureImporterSettingsSP = so.FindProperty("m_TextureImporterSettings"); - textureImporterSettingsSP.FindPropertyRelative("m_TextureType").intValue = (int)TextureImporterType.Sprite; - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)SpriteImportMode.Multiple; - so.ApplyModifiedPropertiesWithoutUndo(); - importer.SaveAndReimport(); - - // now we have 4 sprites. Modify it to 1 - importer = AssetImporter.GetAtPath(testAssetPath) as PSDImporter; - importer.SetSpriteRects(new[] - { - new SpriteRect() - { - name = "TestSprite", - rect = new Rect(0, 0, 32, 32) - } - }); - importer.Apply(); - importer.SaveAndReimport(); - - importer = AssetImporter.GetAtPath(testAssetPath) as PSDImporter; - Assert.AreEqual(1, importer.GetSpriteRects().Length); - var assets = AssetDatabase.LoadAllAssetsAtPath(testAssetPath); - Assert.AreEqual(1, assets.Count(x => x is Sprite)); - - so = new SerializedObject(importer); - so.FindProperty("m_ResliceFromLayer").boolValue = true; - so.ApplyModifiedPropertiesWithoutUndo(); - importer.Apply(); - importer.SaveAndReimport(); - - importer = AssetImporter.GetAtPath(testAssetPath) as PSDImporter; - Assert.AreEqual(4, importer.GetSpriteRects().Length); - assets = AssetDatabase.LoadAllAssetsAtPath(testAssetPath); - Assert.AreEqual(4, assets.Count(x => x is Sprite)); - so = new SerializedObject(importer); - Assert.IsFalse(so.FindProperty("m_ResliceFromLayer").boolValue); - } - - [Test] - public void PrefabReferenceRemains_AfterAssetRename() - { - var testAssetPath = CopyTestAssetFile(); - var importer = AssetImporter.GetAtPath(testAssetPath) as PSDImporter; - var so = new SerializedObject(importer); - so.FindProperty("m_MosaicLayers").boolValue = true; - so.FindProperty("m_CharacterMode").boolValue = true; - var textureImporterSettingsSP = so.FindProperty("m_TextureImporterSettings"); - textureImporterSettingsSP.FindPropertyRelative("m_TextureType").intValue = (int)TextureImporterType.Sprite; - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)SpriteImportMode.Multiple; - textureImporterSettingsSP.FindPropertyRelative("m_SpriteMode").intValue = (int)SpriteImportMode.Multiple; - so.ApplyModifiedPropertiesWithoutUndo(); - importer.SaveAndReimport(); - - var prefabGO = AssetDatabase.LoadAssetAtPath(testAssetPath); - var instantiatedPrefab = PrefabUtility.InstantiatePrefab(prefabGO); - var fileName = System.IO.Path.GetFileNameWithoutExtension(testAssetPath); - var extension = System.IO.Path.GetExtension(testAssetPath); - var s = AssetDatabase.RenameAsset(testAssetPath, fileName + "-rename" + extension); - AssetDatabase.Refresh(); - Assert.IsFalse(PrefabUtility.IsPrefabAssetMissing(instantiatedPrefab)); - } - } -} diff --git a/Tests/EditorTests/PlaceholderTests.cs b/Tests/EditorTests/PlaceholderTests.cs new file mode 100644 index 0000000..0186ee7 --- /dev/null +++ b/Tests/EditorTests/PlaceholderTests.cs @@ -0,0 +1,14 @@ +using NUnit.Framework; + +namespace UnityEditor.Experimental.U2D.PSDImporter.Tests +{ + public class Placeholder + { + [Test] + public void PlaceHolderTest() + { + // Use the Assert class to test conditions. + Assert.Pass("This is a placeholder to ensure we have at least one test."); + } + } +} diff --git a/Tests/EditorTests/PSDImporterTests.cs.meta b/Tests/EditorTests/PlaceholderTests.cs.meta similarity index 83% rename from Tests/EditorTests/PSDImporterTests.cs.meta rename to Tests/EditorTests/PlaceholderTests.cs.meta index e5f961d..ba22654 100644 --- a/Tests/EditorTests/PSDImporterTests.cs.meta +++ b/Tests/EditorTests/PlaceholderTests.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b5836e6a10799b2408b18d16586a1043 +guid: e02c5dbafeee6ae488b1efd88793f456 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Tests/EditorTests/TestAssets.meta b/Tests/EditorTests/TestAssets.meta deleted file mode 100644 index 62801eb..0000000 --- a/Tests/EditorTests/TestAssets.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d4fde64305d116a4bb0d46faa01738a6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Tests/EditorTests/TestAssets/TestPSB.psb b/Tests/EditorTests/TestAssets/TestPSB.psb deleted file mode 100644 index 7591be5..0000000 Binary files a/Tests/EditorTests/TestAssets/TestPSB.psb and /dev/null differ diff --git a/Tests/EditorTests/TestAssets/TestPSB.psb.meta b/Tests/EditorTests/TestAssets/TestPSB.psb.meta deleted file mode 100644 index 812b5e1..0000000 --- a/Tests/EditorTests/TestAssets/TestPSB.psb.meta +++ /dev/null @@ -1,1368 +0,0 @@ -fileFormatVersion: 2 -guid: f05fbd7a1a49a6c4a8990a78c1cc7339 -ScriptedImporter: - internalIDToNameTable: - - first: - 28: 2800000 - second: TestPSB - - first: - 213: 21300004 - second: Blue - - first: - 213: 21300008 - second: Pink - - first: - 213: 21300010 - second: Black - - first: - 213: 21300012 - second: Green - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: b2a9591990af98743ba3ff7cf1000886, type: 3} - textureImporterSettings: - alphaSource: 1 - mipMapMode: 0 - enableMipMap: 1 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - convertToNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 1 - streamingMipmapsPriority: 0 - nPOTScale: 1 - sRGBTexture: 1 - spriteMode: 2 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 8 - textureShape: 1 - singleChannelComponent: 0 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - normalMap: 0 - textureFormat: 0 - maxTextureSize: 0 - lightmap: 0 - compressionQuality: 0 - linearTexture: 0 - grayScaleToAlpha: 0 - rGBM: 0 - cubemapConvolutionSteps: 0 - cubemapConvolutionExponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - spriteImportData: - - name: TestPSB.psb - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 0 - y: 0 - width: 512 - height: 512 - spriteID: 55e123acd9b743145883ba27997b9fda - internalID: 0 - spriteBone: [] - spriteOutline: [] - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: 0, y: 0} - - name: TestPSB_0 - originalName: - pivot: {x: 0, y: 0} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 260 - y: 362 - width: 128 - height: 132 - spriteID: d70ab4914c290c6479735cdc70b489a4 - internalID: 0 - spriteBone: [] - spriteOutline: [] - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: 0, y: 0} - - name: TestPSB_1 - originalName: - pivot: {x: 0, y: 0} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 353 - y: 132 - width: 81 - height: 85 - spriteID: 632f2828d03121049966a26d713d5f85 - internalID: 0 - spriteBone: [] - spriteOutline: [] - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: 0, y: 0} - - name: TestPSB_2 - originalName: - pivot: {x: 0, y: 0} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 142 - y: 171 - width: 98 - height: 113 - spriteID: 52746de69fa529249bd62fca6b96de2f - internalID: 0 - spriteBone: [] - spriteOutline: [] - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: 0, y: 0} - mosaicSpriteImportData: - - name: Blue - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 4 - y: 4 - width: 238 - height: 276 - spriteID: c191fd76c1fdda94fb78337fa56f2386 - internalID: 0 - spriteBone: [] - spriteOutline: - - outline: - - {x: 23, y: 130} - - {x: -22, y: 138} - - {x: -103, y: 138} - - {x: -119, y: 132} - - {x: -119, y: 27} - - {x: -55, y: -138} - - {x: 113, y: -138} - - {x: 119, y: -120} - - {x: 119, y: -16} - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: -98, y: -79} - - name: Pink - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 250 - y: 4 - width: 167 - height: 182 - spriteID: 77f3bfb5e0a09fc4b92e705f29834964 - internalID: 0 - spriteBone: [] - spriteOutline: - - outline: - - {x: -46.5, y: 91} - - {x: -83.5, y: 76} - - {x: -83.5, y: -43} - - {x: -81.5, y: -60} - - {x: -57.5, y: -91} - - {x: 47.5, y: -91} - - {x: 83.5, y: -78} - - {x: 83.5, y: 50} - - {x: 56.5, y: 91} - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: -38, y: -85} - - name: Black - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 4 - y: 576 - width: 138 - height: 377 - spriteID: dc1663c719918bb4a82717aeb7d6b254 - internalID: 0 - spriteBone: - - name: bone_1 - position: {x: 80.33257, y: 30.686523, z: 0} - rotation: {x: 0, y: 0, z: 0.63398886, w: 0.7733422} - length: 141.30975 - parentId: -1 - - name: bone_2 - position: {x: 141.30977, y: 0.0000043500704, z: 0} - rotation: {x: 0, y: 0, z: 0.248561, w: 0.96861625} - length: 87.16207 - parentId: 0 - - name: bone_3 - position: {x: 87.16207, y: 0.000016689168, z: 0} - rotation: {x: 0, y: 0, z: 0.037747666, w: 0.99928737} - length: 82.91087 - parentId: 1 - spriteOutline: - - outline: - - {x: -50, y: 188.5} - - {x: -69, y: 154.5} - - {x: -69, y: 6.5} - - {x: -64, y: -150.5} - - {x: -43, y: -188.5} - - {x: 69, y: -188.5} - - {x: 69, y: 188.5} - vertices: - - position: {x: 87, y: 1} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 115.973, y: 15.973999} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 133.79599, y: 43.593994} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 135.55301, y: 79.66498} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 136.87201, y: 114.560974} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 137.551, y: 149.594} - boneWeight: - weight0: 0.99999994 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 136.75, y: 184.62299} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 135.127, y: 219.61603} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 133.555, y: 254.62097} - boneWeight: - weight0: 0.783295 - weight1: 0.21670502 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 2 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 130.586, y: 289.09198} - boneWeight: - weight0: 0.7967345 - weight1: 0.2032655 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 126.534, y: 323.674} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 114.84, y: 352.159} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 89.408005, y: 372.359} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 64.547, y: 376.28198} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 41.196, y: 374.03198} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 19.217999, y: 359.21698} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 5.3950005, y: 340.19397} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 0.27700043, y: 320.42297} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 0.45500183, y: 299.023} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 3.822998, y: 264.36} - boneWeight: - weight0: 0.830611 - weight1: 0.16938902 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 6.5550003, y: 229.31598} - boneWeight: - weight0: 0.462578 - weight1: 0.43606478 - weight2: 0.10135724 - weight3: 0 - boneIndex0: 1 - boneIndex1: 2 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 7.415001, y: 205.935} - boneWeight: - weight0: 0.5647236 - weight1: 0.22664927 - weight2: 0.20862712 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 2 - boneIndex3: 0 - - position: {x: 9.414001, y: 170.65802} - boneWeight: - weight0: 0.5499514 - weight1: 0.45004863 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 9.550999, y: 136.065} - boneWeight: - weight0: 0.8112092 - weight1: 0.18879084 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 8.409, y: 101.42297} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 8.396, y: 66.83502} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 11.438, y: 42.813965} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 25.011002, y: 19.98999} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 49.240997, y: 3} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 69.67, y: 0.7850342} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 73.71646, y: 58.7677} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 71.80186, y: 164.70953} - boneWeight: - weight0: 0.629701 - weight1: 0.37029907 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 67.4084, y: 265.98315} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 51.453686, y: 108.71649} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 94.15408, y: 114.40662} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 72.79782, y: 215.35193} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 63.95909, y: 316.73676} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - spritePhysicsOutline: [] - indices: 16000000150000001f0000001e00000021000000220000001e00000003000000020000000400000022000000050000000400000003000000220000001e00000002000000010000001f0000000500000022000000140000002000000023000000230000002000000008000000240000000c0000000b0000000a000000240000000b000000240000000900000020000000060000001f00000023000000230000001f0000001500000008000000070000002300000009000000240000000a00000009000000080000002000000006000000230000000700000001000000000000001e0000001e0000002200000003000000210000001f000000220000001e000000000000001d0000002100000019000000180000001b0000001a0000001e00000017000000210000001800000019000000210000001e000000190000001e0000001a0000001f0000001700000016000000170000001f0000002100000015000000140000002300000006000000050000001f000000120000001100000024000000200000001200000024000000100000000f000000240000001300000020000000140000000f0000000e000000240000000d000000240000000e0000000d0000000c000000240000001200000020000000130000001c0000001b0000001e0000001100000010000000240000001e0000001d0000001c000000 - edges: - - {x: 1, y: 0} - - {x: 2, y: 1} - - {x: 3, y: 2} - - {x: 4, y: 3} - - {x: 5, y: 4} - - {x: 6, y: 5} - - {x: 7, y: 6} - - {x: 7, y: 8} - - {x: 9, y: 8} - - {x: 10, y: 9} - - {x: 11, y: 10} - - {x: 12, y: 11} - - {x: 13, y: 12} - - {x: 14, y: 13} - - {x: 15, y: 14} - - {x: 16, y: 15} - - {x: 17, y: 16} - - {x: 18, y: 17} - - {x: 18, y: 19} - - {x: 20, y: 19} - - {x: 21, y: 20} - - {x: 22, y: 21} - - {x: 23, y: 22} - - {x: 24, y: 23} - - {x: 25, y: 24} - - {x: 26, y: 25} - - {x: 27, y: 26} - - {x: 28, y: 27} - - {x: 29, y: 28} - - {x: 0, y: 29} - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: -252, y: 465} - - name: Green - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 4 - y: 288 - width: 234 - height: 280 - spriteID: 0a5e5d85355bee746989151746d8ef2e - internalID: 0 - spriteBone: [] - spriteOutline: - - outline: - - {x: 12, y: 140} - - {x: -117, y: 140} - - {x: -117, y: -7} - - {x: -29, y: -140} - - {x: 102, y: -140} - - {x: 117, y: -110} - - {x: 117, y: -16} - - {x: 26, y: 137} - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: -110, y: 128} - rigSpriteImportData: - - name: Blue - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 4 - y: 4 - width: 238 - height: 276 - spriteID: fe5dc95b9814d1548b3f56adfc5d84f6 - internalID: 0 - spriteBone: [] - spriteOutline: [] - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: -98, y: -79} - - name: Pink - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 250 - y: 4 - width: 167 - height: 182 - spriteID: 1b79cdeb9ef9a4d44a709dd930294bdf - internalID: 0 - spriteBone: [] - spriteOutline: [] - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: -38, y: -85} - - name: Black - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 4 - y: 576 - width: 138 - height: 377 - spriteID: 58c317c6611eb3644862842c1101f8a7 - internalID: 0 - spriteBone: - - name: bone_1 - position: {x: 85.43567, y: 27.516052, z: 0} - rotation: {x: 0, y: 0, z: 0.71753985, w: 0.69651747} - length: 108.224785 - parentId: -1 - - name: bone_2 - position: {x: 108.22475, y: -0.0000067296314, z: 0} - rotation: {x: 0, y: 0, z: -0.0046193935, w: 0.99998933} - length: 98.14395 - parentId: 0 - - name: bone_3 - position: {x: 98.144005, y: 0.0000018917898, z: 0} - rotation: {x: 0, y: 0, z: 0.07564789, w: 0.9971346} - length: 68.163185 - parentId: 1 - spriteOutline: [] - vertices: - - position: {x: 87, y: 1} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 115.973, y: 15.973999} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 133.79599, y: 43.593994} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 135.55301, y: 79.66498} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 136.87201, y: 114.560974} - boneWeight: - weight0: 0.8133554 - weight1: 0.18664461 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 137.551, y: 149.594} - boneWeight: - weight0: 0.7484131 - weight1: 0.25158694 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 136.75, y: 184.62299} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 135.127, y: 219.61603} - boneWeight: - weight0: 0.715746 - weight1: 0.284254 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 2 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 133.555, y: 254.62097} - boneWeight: - weight0: 0.8073857 - weight1: 0.19261433 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 130.586, y: 289.09198} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 126.534, y: 323.674} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 114.84, y: 352.159} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 89.408005, y: 372.359} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 64.547, y: 376.28198} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 41.196, y: 374.03198} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 19.217999, y: 359.21698} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 5.3950005, y: 340.19397} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 0.27700043, y: 320.42297} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 0.45500183, y: 299.023} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 3.822998, y: 264.36} - boneWeight: - weight0: 0.8491455 - weight1: 0.15085451 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 6.5550003, y: 229.31598} - boneWeight: - weight0: 0.5082795 - weight1: 0.49172047 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 2 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 7.415001, y: 205.935} - boneWeight: - weight0: 0.7643392 - weight1: 0.23566075 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 2 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 9.414001, y: 170.65802} - boneWeight: - weight0: 0.8532745 - weight1: 0.14672549 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 9.550999, y: 136.065} - boneWeight: - weight0: 0.504821 - weight1: 0.495179 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 8.409, y: 101.42297} - boneWeight: - weight0: 0.8691599 - weight1: 0.13084012 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 1 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 8.396, y: 66.83502} - boneWeight: - weight0: 0.99999994 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 11.438, y: 42.813965} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 25.011002, y: 19.98999} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 49.240997, y: 3} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 69.67, y: 0.7850342} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 73.71646, y: 58.7677} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 71.80186, y: 164.70953} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 67.4084, y: 265.98315} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 51.453686, y: 108.71649} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 94.15408, y: 114.40662} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 0 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 72.79782, y: 215.35193} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 1 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - - position: {x: 63.95909, y: 316.73676} - boneWeight: - weight0: 1 - weight1: 0 - weight2: 0 - weight3: 0 - boneIndex0: 2 - boneIndex1: 0 - boneIndex2: 0 - boneIndex3: 0 - spritePhysicsOutline: [] - indices: 16000000150000001f0000001e00000021000000220000001e00000003000000020000000400000022000000050000000400000003000000220000001e00000002000000010000001f0000000500000022000000140000002000000023000000230000002000000008000000240000000c0000000b0000000a000000240000000b000000240000000900000020000000060000001f00000023000000230000001f0000001500000008000000070000002300000009000000240000000a00000009000000080000002000000006000000230000000700000001000000000000001e0000001e0000002200000003000000210000001f000000220000001e000000000000001d0000002100000019000000180000001b0000001a0000001e00000017000000210000001800000019000000210000001e000000190000001e0000001a0000001f0000001700000016000000170000001f0000002100000015000000140000002300000006000000050000001f000000120000001100000024000000200000001200000024000000100000000f000000240000001300000020000000140000000f0000000e000000240000000d000000240000000e0000000d0000000c000000240000001200000020000000130000001c0000001b0000001e0000001100000010000000240000001e0000001d0000001c000000 - edges: - - {x: 1, y: 0} - - {x: 2, y: 1} - - {x: 3, y: 2} - - {x: 4, y: 3} - - {x: 5, y: 4} - - {x: 6, y: 5} - - {x: 7, y: 6} - - {x: 7, y: 8} - - {x: 9, y: 8} - - {x: 10, y: 9} - - {x: 11, y: 10} - - {x: 12, y: 11} - - {x: 13, y: 12} - - {x: 14, y: 13} - - {x: 15, y: 14} - - {x: 16, y: 15} - - {x: 17, y: 16} - - {x: 18, y: 17} - - {x: 18, y: 19} - - {x: 20, y: 19} - - {x: 21, y: 20} - - {x: 22, y: 21} - - {x: 23, y: 22} - - {x: 24, y: 23} - - {x: 25, y: 24} - - {x: 26, y: 25} - - {x: 27, y: 26} - - {x: 28, y: 27} - - {x: 29, y: 28} - - {x: 0, y: 29} - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: -252, y: 465} - - name: Green - originalName: - pivot: {x: 0.5, y: 0.5} - alignment: 0 - border: {x: 0, y: 0, z: 0, w: 0} - rect: - serializedVersion: 2 - x: 4 - y: 288 - width: 234 - height: 280 - spriteID: 18dbe6a80fe762b4fad1e6f329671562 - internalID: 0 - spriteBone: [] - spriteOutline: [] - vertices: [] - spritePhysicsOutline: [] - indices: - edges: [] - tessellationDetail: 0 - parentGroupIndex: -1 - uvTransform: {x: -110, y: 128} - platformSettings: [] - mosaicLayers: 1 - documentPivot: {x: 0, y: 0} - documentAlignment: 6 - importHiddenLayers: 0 - importedTextureWidth: 512 - importedTextureHeight: 1024 - documentSize: {x: 512, y: 512} - paperDollMode: 0 - spriteLibrary: - categories: [] - textureActualWidth: 512 - textureActualHeight: 1024 - spritePackingTag: - resliceFromLayer: 0 - characterMode: 0 - mosaicPSDLayers: - - name: Group A - spriteName: - isGroup: 1 - parentIndex: -1 - spriteID: 00000000000000000000000000000000 - layerID: 6 - mosaicPosition: {x: 0, y: 0} - - name: Blue - spriteName: Blue - isGroup: 0 - parentIndex: 0 - spriteID: c191fd76c1fdda94fb78337fa56f2386 - layerID: 5 - mosaicPosition: {x: 4, y: 4} - - name: Pink - spriteName: Pink - isGroup: 0 - parentIndex: 0 - spriteID: 77f3bfb5e0a09fc4b92e705f29834964 - layerID: 4 - mosaicPosition: {x: 250, y: 4} - - name: Group B - spriteName: - isGroup: 1 - parentIndex: -1 - spriteID: 00000000000000000000000000000000 - layerID: 8 - mosaicPosition: {x: 0, y: 0} - - name: Black - spriteName: Black - isGroup: 0 - parentIndex: 3 - spriteID: dc1663c719918bb4a82717aeb7d6b254 - layerID: 3 - mosaicPosition: {x: 4, y: 576} - - name: Green - spriteName: Green - isGroup: 0 - parentIndex: -1 - spriteID: 0a5e5d85355bee746989151746d8ef2e - layerID: 2 - mosaicPosition: {x: 4, y: 288} - rigPSDLayers: - - name: Group A - spriteName: - isGroup: 1 - parentIndex: -1 - spriteID: 00000000000000000000000000000000 - layerID: 6 - mosaicPosition: {x: 0, y: 0} - - name: Blue - spriteName: Blue - isGroup: 0 - parentIndex: 0 - spriteID: fe5dc95b9814d1548b3f56adfc5d84f6 - layerID: 5 - mosaicPosition: {x: 4, y: 4} - - name: Pink - spriteName: Pink - isGroup: 0 - parentIndex: 0 - spriteID: 1b79cdeb9ef9a4d44a709dd930294bdf - layerID: 4 - mosaicPosition: {x: 250, y: 4} - - name: Group B - spriteName: - isGroup: 1 - parentIndex: -1 - spriteID: 00000000000000000000000000000000 - layerID: 8 - mosaicPosition: {x: 0, y: 0} - - name: Black - spriteName: Black - isGroup: 0 - parentIndex: 3 - spriteID: 58c317c6611eb3644862842c1101f8a7 - layerID: 3 - mosaicPosition: {x: 4, y: 576} - - name: Green - spriteName: Green - isGroup: 0 - parentIndex: -1 - spriteID: 18dbe6a80fe762b4fad1e6f329671562 - layerID: 2 - mosaicPosition: {x: 4, y: 288} - characterData: - bones: - - name: bone_1 - position: {x: 239.43567, y: 55.51607, z: 0} - rotation: {x: 0, y: 0, z: 0.71753985, w: 0.69651747} - length: 108.224785 - parentId: -1 - - name: bone_2 - position: {x: 108.22478, y: -0.00000567732, z: 0} - rotation: {x: 0, y: 0, z: -0.004619358, w: 0.99998933} - length: 98.143936 - parentId: 0 - - name: bone_3 - position: {x: 98.14393, y: -0.000009017762, z: 0} - rotation: {x: 0, y: 0, z: 0.07564786, w: 0.9971346} - length: 68.16318 - parentId: 1 - parts: - - spritePosition: - x: 0 - y: 0 - width: 238 - height: 276 - spriteId: fe5dc95b9814d1548b3f56adfc5d84f6 - bones: - parentGroup: 0 - - spritePosition: - x: 186 - y: 6 - width: 167 - height: 182 - spriteId: 1b79cdeb9ef9a4d44a709dd930294bdf - bones: - parentGroup: 0 - - spritePosition: - x: 154 - y: 28 - width: 138 - height: 377 - spriteId: 58c317c6611eb3644862842c1101f8a7 - bones: 000000000100000002000000 - parentGroup: 0 - - spritePosition: - x: 12 - y: 77 - width: 234 - height: 280 - spriteId: 18dbe6a80fe762b4fad1e6f329671562 - bones: - parentGroup: 0 - dimension: {x: 0, y: 0} - characterGroups: [] - boneGOs: [] - generateGOHierarchy: 0 diff --git a/package.json b/package.json index 047579e..3d184fa 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,10 @@ { "name": "com.unity.2d.psdimporter", - "version": "1.2.0-preview.1", - "unity": "2019.2", + "version": "2.0.2", + "unity": "2019.3", + "unityRelease": "0a10", "displayName": "2D PSD Importer", - "description": "A ScriptedImporter for importing Adobe Photoshop PSB (Photoshop Big) file format. The ScriptedImporter is currently targeted for users who wants to create multi Sprite character animation using 2D Animation v2.", + "description": "A ScriptedImporter for importing Adobe Photoshop PSB (Photoshop Big) file format. The ScriptedImporter is currently targeted for users who wants to create multi Sprite character animation using Unity 2D Animation Package.", "keywords": [ "2d", "psdimporter", @@ -11,14 +12,13 @@ ], "category": "2D", "dependencies": { - "com.unity.2d.common": "1.2.0-preview.1", - "com.unity.2d.animation": "2.2.0-preview.1", - "com.unity.2d.sprite": "1.0.0", - "com.unity.test-framework": "1.0.9" + "com.unity.2d.common": "2.0.1", + "com.unity.2d.animation": "3.0.2", + "com.unity.2d.sprite": "1.0.0" }, "repository": { "type": "git", - "url": "git@github.cds.internal.unity3d.com:unity/com.unity.2d.psdimporter.git", - "revision": "fba313eac2ee5e76f1d106442e68039a17a51bf7" + "url": "git@github.cds.internal.unity3d.com:unity/2d.git", + "revision": "c06ab256c978bcb77ea807a86d299acfbe47f10b" } }