diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18ee520..648d70b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Changelog
+## [10.0.0] - 2024-12-09
+### Added
+- Added support for Sprite Frame Editing capabilities where data that are from the source file are locked by default.
+- Added new ability to generate Tile asset and Tile Palette from PSDImporter.
+
## [9.0.3] - 2024-04-01
### Fixed
- Fix source file cannot be deleted after subsequent import. (Case DANB-579)
diff --git a/Documentation~/PSD-importer-properties.md b/Documentation~/PSD-importer-properties.md
index 16cf62e..6dfc3c4 100644
--- a/Documentation~/PSD-importer-properties.md
+++ b/Documentation~/PSD-importer-properties.md
@@ -1,7 +1,7 @@
#PSD Importer Inspector properties
The PSD Importer is available after you import a .psb file into your Project. Select the .psb Asset file and set its **Texture Type** to [Sprite (2D and UI)](https://docs.unity3d.com/Manual/TextureTypes.html#Sprite). The PSD Importer properties are split between two main tabs, with the following properties available.
-![](images/psdimporter-properties-22.2.png)
PSD Importer Inspector properties
+![](images/psdimporter-properties-6000.1.png)
PSD Importer Inspector properties
##Settings tab
The Settings tab allows you to customize how the PSD Importer imports a file. The settings are categorized into individual section fold-outs.
@@ -201,6 +201,11 @@ If there is no .skeleton Asset assigned to the importer’s **Main Skeleton** pr
When you open and edit the character in 2D Animation package’s **Skinning Editor**, the module will display the bone hierarchy provided by the skeleton Asset assigned to **Main Skeleton** for rigging.
+###Tile Palette
+The following section allows generating Tile assets and Tile Palette where each layer in the source file will also generate a tile asset
+
+![](images/tilepalette-6000.1.png)
+
##Layer Management Tab
The **Layer Management Tab** allows you to customize how the Importer imports the layers from the Photoshop file.
diff --git a/Documentation~/images/psdimporter-properties-22.2.png b/Documentation~/images/psdimporter-properties-22.2.png
deleted file mode 100644
index f422eeb..0000000
Binary files a/Documentation~/images/psdimporter-properties-22.2.png and /dev/null differ
diff --git a/Documentation~/images/psdimporter-properties-6000.1.png b/Documentation~/images/psdimporter-properties-6000.1.png
new file mode 100644
index 0000000..c426c14
Binary files /dev/null and b/Documentation~/images/psdimporter-properties-6000.1.png differ
diff --git a/Documentation~/images/tilepalette-6000.1.png b/Documentation~/images/tilepalette-6000.1.png
new file mode 100644
index 0000000..5dc62ad
Binary files /dev/null and b/Documentation~/images/tilepalette-6000.1.png differ
diff --git a/Documentation~/index.md b/Documentation~/index.md
index 3bc5fe3..2f13d0a 100644
--- a/Documentation~/index.md
+++ b/Documentation~/index.md
@@ -9,7 +9,8 @@ The different versions of the PSD Importer package are supported by the followin
Package version | Unity Editor version
--|--
-9.x.x | 2023.1
+10.x.x | 6000.1
+9.x.x | 2023.1 up to 6000.0
8.x.x | 2022.2
7.x.x | 2022.1
6.x.x | 2021.2 or 2021.3
diff --git a/Documentation~/whats-new.md b/Documentation~/whats-new.md
index a2667b9..524cbf6 100644
--- a/Documentation~/whats-new.md
+++ b/Documentation~/whats-new.md
@@ -1,8 +1,5 @@
-# What's new in version 9.0
+# What's new in version 10.0
-## Improved
-- Faster imports of .psd/.psb files. The update will be particularly noticable when importing files with many layers.
-- Reduced the memory overhead when importing a .psd/.psb file.
-
-## Updated
-- Reduced the number of [Sprite Rect Data](PSD-importer-SpriteRect.md) containers, from five to three.
\ No newline at end of file
+## Added
+- Added support for Sprite Frame Editing capabilities where data that are from the source file are locked by default.
+- Added new ability to generate Tile asset and Tile Palette from PSDImporter.
\ No newline at end of file
diff --git a/Editor/PSDImportData.cs b/Editor/PSDImportData.cs
index 6cfb94f..645a11f 100644
--- a/Editor/PSDImportData.cs
+++ b/Editor/PSDImportData.cs
@@ -50,6 +50,14 @@ public int textureActualWidth
set => m_TextureActualWidth = value;
}
+ [SerializeField]
+ TextureImporterSettings m_SingleSpriteTextureImporterSettings;
+ public TextureImporterSettings singleSpriteTextureImporterSettings
+ {
+ get => m_SingleSpriteTextureImporterSettings;
+ set => m_SingleSpriteTextureImporterSettings = value;
+ }
+
[SerializeField]
PSDLayerData[] m_PsdLayerData;
public PSDLayerData[] psdLayerData => m_PsdLayerData;
diff --git a/Editor/PSDImporter.cs b/Editor/PSDImporter.cs
index 37876e4..841f627 100644
--- a/Editor/PSDImporter.cs
+++ b/Editor/PSDImporter.cs
@@ -12,6 +12,11 @@
using UnityEngine.U2D;
using UnityEngine.Scripting.APIUpdating;
+#if ENABLE_2D_TILEMAP_EDITOR
+using UnityEditor.Tilemaps;
+using UnityEngine.Tilemaps;
+#endif
+
#if ENABLE_2D_ANIMATION
using UnityEditor.U2D.Animation;
using UnityEngine.U2D.Animation;
@@ -149,6 +154,38 @@ internal enum ELayerMappingOption
[SerializeField]
bool m_KeepDupilcateSpriteName = true;
+#if ENABLE_2D_TILEMAP_EDITOR
+ [SerializeField]
+ bool m_GenerateTileAssets = false;
+
+ [SerializeField]
+ GridLayout.CellLayout m_TilePaletteCellLayout = GridLayout.CellLayout.Rectangle;
+
+ private static readonly GridLayout.CellSwizzle[] s_TilePaletteexagonSwizzleTypeValue =
+ {
+ GridLayout.CellSwizzle.XYZ,
+ GridLayout.CellSwizzle.YXZ,
+ };
+
+ [SerializeField]
+ int m_TilePaletteHexagonLayout;
+
+ [SerializeField]
+ Vector3 m_TilePaletteCellSize = new Vector3(1, 1, 0);
+
+ [SerializeField]
+ GridPalette.CellSizing m_TilePaletteCellSizing = GridPalette.CellSizing.Automatic;
+
+ [SerializeField]
+ TransparencySortMode m_TransparencySortMode = TransparencySortMode.Default;
+
+ [SerializeField]
+ Vector3 m_TransparencySortAxis = new Vector3(0f, 0f, 1f);
+
+ [SerializeField]
+ TileTemplate m_TileTemplate = null;
+#endif
+
[SerializeField]
int m_Padding = 4;
@@ -546,16 +583,83 @@ TextureGenerationOutput ImportFlattenImage(Document doc, AssetImportContext ctx)
{
FlattenImageTask.Execute(m_ExtractData, ref outputImageBuffer, m_ImportHiddenLayers, canvasSize);
- m_SingleSpriteImportData[0].name = System.IO.Path.GetFileNameWithoutExtension(ctx.assetPath) + "_1";
- m_SingleSpriteImportData[0].alignment = (SpriteAlignment)m_TextureImporterSettings.spriteAlignment;
- m_SingleSpriteImportData[0].border = m_TextureImporterSettings.spriteBorder;
- m_SingleSpriteImportData[0].pivot = m_TextureImporterSettings.spritePivot;
- m_SingleSpriteImportData[0].rect = new Rect(0, 0, doc.width, doc.height);
-
+ m_ImportData.singleSpriteTextureImporterSettings = m_TextureImporterSettings;
importData.importedTextureWidth = textureActualWidth = doc.width;
importData.importedTextureHeight = textureActualHeight = doc.height;
var spriteImportData = GetSpriteImportData();
+ if (m_ResliceFromLayer)
+ {
+ var spriteNameHash = new UniqueNameGenerator();
+ var oldPsdLayers = GetPSDLayers();
+ List psdLayers = null;
+ try
+ {
+ ExtractLayerTask.Execute(in m_ExtractData, out psdLayers, m_ImportHiddenLayers, canvasSize);
+
+ var mappingStrategy = GetLayerMappingStrategy();
+ var layerUnique = mappingStrategy.LayersUnique(psdLayers.ConvertAll(x => (IPSDLayerMappingStrategyComparable)x));
+ if (!string.IsNullOrEmpty(layerUnique))
+ {
+ Debug.LogWarning(layerUnique,this);
+ }
+ var layerIndex = new List();
+ var spriteData = new List();
+ for (var i = 0; i < psdLayers.Count; ++i)
+ {
+ var l = psdLayers[i];
+ var expectedBufferLength = l.width * l.height;
+ if (l.texture.IsCreated && l.texture.Length == expectedBufferLength && l.isImported)
+ {
+ layerIndex.Add(i);
+ var rect = new RectInt((int) l.layerPosition.x, (int) l.layerPosition.y, l.width, l.height);
+ spriteData.Add(rect);
+ }
+ }
+
+ var newSpriteMeta = new List();
+
+ for (int i = 0; i < spriteData.Count && i < layerIndex.Count; ++i)
+ {
+ var psdLayer = psdLayers[layerIndex[i]];
+ var spriteSheet = spriteImportData.FirstOrDefault(x => x.spriteID == psdLayer.spriteID);
+ if (spriteSheet == null)
+ {
+ spriteSheet = new SpriteMetaData();
+ spriteSheet.border = Vector4.zero;
+ spriteSheet.alignment = (SpriteAlignment)m_TextureImporterSettings.spriteAlignment;
+ spriteSheet.pivot = m_TextureImporterSettings.spritePivot;
+ spriteSheet.rect = new Rect(spriteData[i].x, spriteData[i].y, spriteData[i].width, spriteData[i].height);
+ spriteSheet.spriteID = psdLayer.spriteID;
+ }
+ else
+ {
+ var r = spriteSheet.rect;
+ r.position = r.position - psdLayer.mosaicPosition + spriteData[i].position;
+ spriteSheet.rect = r;
+ }
+
+ psdLayer.spriteName = ImportUtilities.GetUniqueSpriteName(psdLayer.name, spriteNameHash, m_KeepDupilcateSpriteName);
+ spriteSheet.name = psdLayer.spriteName;
+ spriteSheet.spritePosition = psdLayer.layerPosition;
+
+ spriteSheet.rect = new Rect(spriteData[i].x, spriteData[i].y, spriteData[i].width, spriteData[i].height);
+
+ psdLayer.spriteID = spriteSheet.spriteID;
+ psdLayer.mosaicPosition = spriteData[i].position;
+ newSpriteMeta.Add(spriteSheet);
+ }
+ spriteImportData.Clear();
+ spriteImportData.AddRange(newSpriteMeta);
+ }
+ finally
+ {
+ if (psdLayers != null)
+ foreach (var l in psdLayers)
+ l.Dispose();
+ }
+ }
+
output = ImportTexture(ctx, outputImageBuffer, doc.width, doc.height, spriteImportData.ToArray());
importData.importedTextureWidth = output.texture.width;
importData.importedTextureHeight = output.texture.height;
@@ -866,6 +970,7 @@ void RegisterAssets(AssetImportContext ctx, TextureGenerationOutput output)
RegisterGameObjects(ctx, output, ref mainAsset);
RegisterSprites(ctx, output, assetNameGenerator);
RegisterSkeletonAsset(ctx, output, assetName);
+ RegisterTilemapAsset(ctx, output, assetName, ref mainAsset);
ctx.SetMainObject(mainAsset);
}
@@ -957,6 +1062,59 @@ void RegisterSkeletonAsset(AssetImportContext ctx, TextureGenerationOutput outpu
#endif
}
+ void RegisterTilemapAsset(AssetImportContext ctx
+ , TextureGenerationOutput output
+ , string assetName
+ , ref UnityEngine.Object mainAsset)
+ {
+ if (output.texture == null)
+ return;
+
+ if (output.sprites == null)
+ return;
+
+#if ENABLE_2D_TILEMAP_EDITOR
+ if (!m_GenerateTileAssets)
+ return;
+
+ var sprites = new List();
+ foreach (var s in output.sprites)
+ {
+ if(s.rect.width > 4 && s.rect.height > 4)
+ sprites.Add(s);
+ }
+ var paletteGO = GridPaletteUtility.CreateNewPaletteAsSubAsset(assetName
+ , m_TilePaletteCellLayout
+ , m_TilePaletteCellSizing
+ , m_TilePaletteCellSize
+ , s_TilePaletteexagonSwizzleTypeValue[m_TilePaletteHexagonLayout]
+ , m_TransparencySortMode
+ , m_TransparencySortAxis
+ , new [] { output.texture }
+ , new [] { sprites }
+ , new [] { m_TileTemplate }
+ , out var palette
+ , out var tiles);
+
+ ctx.AddObjectToAsset("GridPalette", palette);
+ foreach (var tile in tiles)
+ {
+ // Use Sprite ID + Tile for pure Tile
+ if (tile is Tile t && t.sprite != null)
+ {
+ ctx.AddObjectToAsset($"{t.sprite.GetSpriteID()} Tile", tile);
+ }
+ else
+ {
+ ctx.AddObjectToAsset(tile.name, tile);
+ }
+ }
+
+ ctx.AddObjectToAsset("Palette", paletteGO);
+ mainAsset = paletteGO;
+#endif
+ }
+
void BuildGroupGameObject(List psdGroup, int index, Transform root)
{
var psdData = psdGroup[index];
@@ -1278,7 +1436,7 @@ List GetSpriteImportData()
return m_MultiSpriteImportData;
}
- return m_SingleSpriteImportData;
+ return new List { GetSingleSpriteImportData() };
}
internal SpriteMetaData[] GetSpriteMetaData()
@@ -1290,7 +1448,7 @@ internal SpriteMetaData[] GetSpriteMetaData()
return m_MultiSpriteImportData.ToArray();
}
- return new[] { new SpriteMetaData(m_SingleSpriteImportData[0]) };
+ return new[] { GetSingleSpriteImportData() };
}
internal SpriteRect GetSpriteData(GUID guid)
@@ -1302,7 +1460,26 @@ internal SpriteRect GetSpriteData(GUID guid)
return m_MultiSpriteImportData.FirstOrDefault(x => x.spriteID == guid);
}
- return m_SingleSpriteImportData[0];
+ return GetSingleSpriteImportData();
+ }
+
+ SpriteMetaData GetSingleSpriteImportData()
+ {
+ SpriteMetaData spriteMetaData = new SpriteMetaData();
+ spriteMetaData.spriteID = AssetDatabase.GUIDFromAssetPath(assetPath);
+ if(m_SingleSpriteImportData == null || m_SingleSpriteImportData.Count < 1 && m_SingleSpriteImportData[0] != null)
+ spriteMetaData.Copy(m_SingleSpriteImportData[0]);
+ if(assetPath != null)
+ spriteMetaData.name = System.IO.Path.GetFileNameWithoutExtension(assetPath) + "_1";
+ if (importData != null)
+ {
+ spriteMetaData.rect = new Rect(0, 0, importData.importedTextureWidth, importData.importedTextureHeight);
+ spriteMetaData.pivot = m_TextureImporterSettings.spritePivot;
+ spriteMetaData.alignment = (SpriteAlignment)m_TextureImporterSettings.spriteAlignment;
+ spriteMetaData.border = m_TextureImporterSettings.spriteBorder;
+ }
+
+ return spriteMetaData;
}
internal Vector2 GetDocumentPivot()
diff --git a/Editor/PSDImporterAPI.cs b/Editor/PSDImporterAPI.cs
index 2edddb2..684d15f 100644
--- a/Editor/PSDImporterAPI.cs
+++ b/Editor/PSDImporterAPI.cs
@@ -1,5 +1,8 @@
using System;
using UnityEditor.AssetImporters;
+#if ENABLE_2D_TILEMAP_EDITOR
+using UnityEditor.Tilemaps;
+#endif
using UnityEditor.U2D.Sprites;
using UnityEngine;
@@ -35,7 +38,7 @@ public int anisoLevel
SetDirty();
}
}
-
+
///
/// Keeps texture borders the same when generating mipmaps.
///
@@ -48,7 +51,7 @@ public bool borderMipmap
SetDirty();
}
}
-
+
///
/// Fades out mip levels to a gray color.
///
@@ -87,7 +90,7 @@ public float mipMapBias
SetDirty();
}
}
-
+
///
/// Generate Mip Maps.
///
Select this to enable mip-map generation. Mipmaps are smaller versions of the Texture that get used when the Texture is very small on screen.
@@ -101,7 +104,7 @@ public bool mipmapEnabled
SetDirty();
}
}
-
+
///
/// Mip level where texture is faded out completely.
///
@@ -114,7 +117,7 @@ public int mipmapFadeDistanceEnd
SetDirty();
}
}
-
+
///
/// Mip level where texture begins to fade out.
///
@@ -127,7 +130,7 @@ public int mipmapFadeDistanceStart
SetDirty();
}
}
-
+
///
/// Enable mipmap streaming for the texture.
///
Only load larger mipmaps as needed to render the current game cameras. Requires texture streaming to be enabled in quality settings.
@@ -167,7 +170,7 @@ public TextureImporterMipFilter mipmapFilter
SetDirty();
}
}
-
+
///
/// Enables or disables coverage-preserving alpha mipmapping.
///
Enable this to rescale the alpha values of computed mipmaps so coverage is preserved. This means a higher percentage of pixels passes the alpha test and lower mipmap levels do not become more transparent. This is disabled by default (set to false).
@@ -181,7 +184,7 @@ public bool mipMapsPreserveCoverage
SetDirty();
}
}
-
+
///
/// Selects Single or Manual import mode for Sprite textures.
///
@@ -214,7 +217,7 @@ public SpriteMeshType spriteMeshType
SetDirty();
}
}
-
+
///
/// Which type of texture are we dealing with here.
///
@@ -234,7 +237,7 @@ public TextureImporterType textureType
throw new ArgumentException("Invalid value. Valid values are TextureImporterType.Sprite or TextureImporterType.Default");
}
}
-
+
///
/// Texture coordinate wrapping mode.
///
Using wrapMode sets the same wrapping mode on all axes. Different per-axis wrap modes can be set using wrapModeU, wrapModeV, wrapModeW. Querying the value returns the U axis wrap mode (same as wrapModeU getter).
@@ -248,7 +251,7 @@ public TextureWrapMode wrapMode
SetDirty();
}
}
-
+
///
/// Texture U coordinate wrapping mode.
///
Controls wrapping mode along texture U (horizontal) axis.
@@ -262,7 +265,7 @@ public TextureWrapMode wrapModeU
SetDirty();
}
}
-
+
///
/// Texture V coordinate wrapping mode.
///
Controls wrapping mode along texture V (vertical) axis.
@@ -276,7 +279,7 @@ public TextureWrapMode wrapModeV
SetDirty();
}
}
-
+
///
/// Texture W coordinate wrapping mode for Texture3D.
///
Controls wrapping mode along texture W (depth, only relevant for Texture3D) axis.
@@ -313,7 +316,7 @@ public TextureImporterPlatformSettings GetImporterPlatformSettings(BuildTarget b
{
return TextureImporterUtilities.GetPlatformTextureSettings(buildTarget, in m_PlatformSettings);
}
-
+
///
/// Sets the platform settings used by the importer for a given build target.
///
@@ -323,7 +326,7 @@ public void SetImporterPlatformSettings(TextureImporterPlatformSettings setting)
SetPlatformTextureSettings(setting);
SetDirty();
}
-
+
///
/// Secondary textures for the imported Sprites.
///
@@ -351,7 +354,7 @@ public bool useCharacterMode
SetDirty();
}
}
-
+
///
/// Sets if importer should generate a mosaic texture from the source layers.
/// To generate such texture, the importer needs to be set to import Sprites in multiple mode.
@@ -378,7 +381,7 @@ public uint mosiacPadding
SetDirty();
}
}
-
+
///
/// Sets the value to increase the Sprite size by.
///
@@ -392,7 +395,113 @@ public ushort spriteSizeExpand
SetDirty();
}
}
-
+
+#if ENABLE_2D_TILEMAP_EDITOR
+ ///
+ /// Sets whether to generate Tile assets.
+ ///
+ public bool generateTileAssets
+ {
+ get => m_GenerateTileAssets;
+ set
+ {
+ m_GenerateTileAssets = value;
+ SetDirty();
+ }
+ }
+
+ ///
+ /// Cell Layout for generated Tile Palette
+ ///
+ public GridLayout.CellLayout tilePaletteCellLayout
+ {
+ get => m_TilePaletteCellLayout;
+ set
+ {
+ m_TilePaletteCellLayout = value;
+ SetDirty();
+ }
+ }
+
+ ///
+ /// Hexagonal Layout for generated Tile Palette
+ ///
+ public int tilePaletteHexagonLayout
+ {
+ get => m_TilePaletteHexagonLayout;
+ set
+ {
+ m_TilePaletteHexagonLayout = value != 0 ? 1 : 0;
+ SetDirty();
+ }
+ }
+
+ ///
+ /// Cell Size for generated Tile Palette
+ ///
+ public Vector3 tilePaletteCellSize
+ {
+ get => m_TilePaletteCellSize;
+ set
+ {
+ m_TilePaletteCellSize = value;
+ SetDirty();
+ }
+ }
+
+ ///
+ /// Cell Sizing for generated Tile Palette
+ ///
+ public GridPalette.CellSizing tilePaletteCellSizing
+ {
+ get => m_TilePaletteCellSizing;
+ set
+ {
+ m_TilePaletteCellSizing = value;
+ SetDirty();
+ }
+ }
+
+ ///
+ /// Transparency Sort Mode for generated Tile Palette
+ ///
+ public TransparencySortMode transparencySortMode
+ {
+ get => m_TransparencySortMode;
+ set
+ {
+ m_TransparencySortMode = value;
+ SetDirty();
+ }
+ }
+
+ ///
+ /// Transparency Sort Axis for generated Tile Palette
+ ///
+ public Vector3 transparencySortAxis
+ {
+ get => m_TransparencySortAxis;
+ set
+ {
+ m_TransparencySortAxis = value;
+ SetDirty();
+ }
+ }
+
+ ///
+ /// Tile Template for importing Tile Palette
+ ///
+ public TileTemplate tileTemplate
+ {
+ get => m_TileTemplate;
+ set
+ {
+ m_TileTemplate = value;
+ SetDirty();
+ }
+ }
+#endif
+
internal TextureImporterSwizzle swizzleR
{
get => m_TextureImporterSettings.swizzleR;
@@ -402,7 +511,7 @@ internal TextureImporterSwizzle swizzleR
SetDirty();
}
}
-
+
internal TextureImporterSwizzle swizzleG
{
get => m_TextureImporterSettings.swizzleG;
@@ -412,7 +521,7 @@ internal TextureImporterSwizzle swizzleG
SetDirty();
}
}
-
+
internal TextureImporterSwizzle swizzleB
{
get => m_TextureImporterSettings.swizzleB;
@@ -422,7 +531,7 @@ internal TextureImporterSwizzle swizzleB
SetDirty();
}
}
-
+
internal TextureImporterSwizzle swizzleA
{
get => m_TextureImporterSettings.swizzleA;
@@ -448,4 +557,4 @@ void SetDirty()
EditorUtility.SetDirty(this);
}
}
-}
+}
\ No newline at end of file
diff --git a/Editor/PSDImporterDataProvider.cs b/Editor/PSDImporterDataProvider.cs
index 501d758..1cb2eeb 100644
--- a/Editor/PSDImporterDataProvider.cs
+++ b/Editor/PSDImporterDataProvider.cs
@@ -206,7 +206,35 @@ public void SetEdges(GUID guid, Vector2Int[] edges)
((SpriteMetaData)sprite).edges = edges;
}
}
-
+
+#if USE_SPRITE_FRAME_CAPABILITY
+ internal class SpriteFrameEditCapabilityDataProvider : PSDDataProvider, ISpriteFrameEditCapability
+ {
+ static EditCapability s_MosaicEditCapability = new EditCapability(EEditCapability.EditPivot | EEditCapability.EditBorder);
+ static EditCapability s_SpriteSheetCapabilities = new EditCapability(EEditCapability.All);
+ static EditCapability s_NonMultipleCapabilities = new EditCapability(EEditCapability.None);
+ static EditCapability s_SingleModeCapabilities = new EditCapability(EEditCapability.EditPivot | EEditCapability.EditBorder);
+
+ public EditCapability GetEditCapability()
+ {
+ if (dataProvider.spriteImportMode == SpriteImportMode.Multiple)
+ {
+ return dataProvider.useMosaicMode ? s_MosaicEditCapability : s_SpriteSheetCapabilities;
+ }
+ if (dataProvider.spriteImportMode == SpriteImportMode.Single)
+ {
+ return s_SingleModeCapabilities;
+ }
+ return s_NonMultipleCapabilities;
+ }
+
+ public void SetEditCapability(EditCapability editCapability)
+ {
+
+ }
+ }
+#endif
+
#if ENABLE_2D_ANIMATION
internal class CharacterDataProvider : PSDDataProvider, ICharacterDataProvider
{
@@ -214,7 +242,7 @@ int ParentGroupInFlatten(Dictionary groupDictIndex, List psdLayers)
parentGroup = GenerateNodeForGroup(layer.parentIndex, psdLayers);
return psdLayers[index].isGroup && !psdLayers[index].flatten && parentGroup;
}
-
+
public CharacterData GetCharacterData()
{
var psdLayers = dataProvider.GetPSDLayers();
var groupDictionaryIndex = new Dictionary();
var groups = new List();
-
+
var cd = dataProvider.characterData;
cd.pivot = dataProvider.GetDocumentPivot();
var parts = cd.parts == null ? new List() : cd.parts.ToList();
@@ -257,12 +285,12 @@ public CharacterData GetCharacterData()
CharacterPart cp = srIndex == -1 ? new CharacterPart() : parts[srIndex];
cp.spriteId = spriteMetaData.spriteID.ToString();
cp.order = psdLayers.FindIndex(l => l.spriteID == spriteMetaData.spriteID);
-
+
cp.spritePosition = new RectInt();
-
+
var spritePos = spriteMetaData.spritePosition;
cp.spritePosition.position = new Vector2Int((int)spritePos.x, (int)spritePos.y);
-
+
cp.spritePosition.size = new Vector2Int((int)spriteMetaData.rect.width, (int)spriteMetaData.rect.height);
cp.parentGroup = -1;
//Find group
@@ -271,13 +299,13 @@ public CharacterData GetCharacterData()
{
cp.parentGroup = ParentGroupInFlatten(groupDictionaryIndex, groups, spritePSDLayer.parentIndex, psdLayers);
}
-
+
if (srIndex == -1)
parts.Add(cp);
else
parts[srIndex] = cp;
}
-
+
parts.Sort((x, y) =>
{
return x.order.CompareTo(y.order);
@@ -306,4 +334,4 @@ public MainSkeletonData GetMainSkeletonData()
}
}
#endif
-}
+}
\ No newline at end of file
diff --git a/Editor/PSDImporterEditor.cs b/Editor/PSDImporterEditor.cs
index 32a62f7..9424515 100644
--- a/Editor/PSDImporterEditor.cs
+++ b/Editor/PSDImporterEditor.cs
@@ -80,6 +80,17 @@ struct InspectorGUI
SerializedProperty m_Padding;
SerializedProperty m_SpriteSizeExpand;
SerializedProperty m_SpriteSizeExpandChanged;
+
+#if ENABLE_2D_TILEMAP_EDITOR
+ SerializedProperty m_GenerateTileAssets;
+ SerializedProperty m_TilePaletteCellLayout;
+ SerializedProperty m_TilePaletteHexagonLayout;
+ SerializedProperty m_TilePaletteCellSize;
+ SerializedProperty m_TilePaletteCellSizing;
+ SerializedProperty m_TransparencySortMode;
+ SerializedProperty m_TransparencySortAxis;
+ SerializedProperty m_TileTemplate;
+#endif
#if ENABLE_2D_ANIMATION
SerializedProperty m_PaperDollMode;
@@ -190,6 +201,17 @@ public override void OnEnable()
m_SkeletonAsset = AssetDatabase.LoadAssetAtPath(assetPath);
#endif
+#if ENABLE_2D_TILEMAP_EDITOR
+ m_GenerateTileAssets = serializedObject.FindProperty("m_GenerateTileAssets");
+ m_TilePaletteCellLayout = serializedObject.FindProperty("m_TilePaletteCellLayout");
+ m_TilePaletteHexagonLayout = serializedObject.FindProperty("m_TilePaletteHexagonLayout");
+ m_TilePaletteCellSize = serializedObject.FindProperty("m_TilePaletteCellSize");
+ m_TilePaletteCellSizing = serializedObject.FindProperty("m_TilePaletteCellSizing");
+ m_TransparencySortMode = serializedObject.FindProperty("m_TransparencySortMode");
+ m_TransparencySortAxis = serializedObject.FindProperty("m_TransparencySortAxis");
+ m_TileTemplate = serializedObject.FindProperty("m_TileTemplate");
+#endif
+
var advanceGUIAction = new Action[]
{
ColorSpaceGUI,
@@ -924,13 +946,10 @@ void DoSpriteTextureTypeInspector()
}
}
EditorGUILayout.PropertyField(m_GeneratePhysicsShape, styles.generatePhysicsShape);
- using (new EditorGUI.DisabledScope(!m_MosaicLayers.boolValue))
+ EditorGUILayout.PropertyField(m_ResliceFromLayer, styles.resliceFromLayer);
+ if (m_ResliceFromLayer.boolValue)
{
- EditorGUILayout.PropertyField(m_ResliceFromLayer, styles.resliceFromLayer);
- if (m_ResliceFromLayer.boolValue)
- {
- EditorGUILayout.HelpBox(styles.resliceFromLayerWarning.text, MessageType.Info, true);
- }
+ EditorGUILayout.HelpBox(styles.resliceFromLayerWarning.text, MessageType.Info, true);
}
DoOpenSpriteEditorButton();
@@ -994,6 +1013,83 @@ void DoSpriteInspector()
//EditorGUILayout.PropertyField(m_PaperDollMode, s_Styles.paperDollMode);
}
#endif
+#if ENABLE_2D_TILEMAP_EDITOR
+ if (m_EditorFoldOutState.DoTilePaletteUI(styles.tilePaletteHeaderText))
+ {
+ EditorGUILayout.PropertyField(m_GenerateTileAssets, styles.generateTileAssets);
+ using (new EditorGUI.DisabledScope(!m_GenerateTileAssets.boolValue))
+ {
+ EditorGUI.BeginChangeCheck();
+ EditorGUILayout.PropertyField(m_TilePaletteCellLayout);
+ if (EditorGUI.EndChangeCheck())
+ {
+ // Set useful user settings for certain layouts
+ switch ((GridLayout.CellLayout) m_TilePaletteCellLayout.enumValueIndex)
+ {
+ case GridLayout.CellLayout.Rectangle:
+ {
+ m_TilePaletteCellSizing.intValue = (int)GridPalette.CellSizing.Automatic;
+ m_TilePaletteCellSize.vector3Value = new Vector3(1, 1, 0);
+ break;
+ }
+ case GridLayout.CellLayout.Hexagon:
+ {
+ m_TilePaletteCellSizing.intValue = (int)GridPalette.CellSizing.Manual;
+ m_TilePaletteCellSize.vector3Value = new Vector3(0.8659766f, 1, 0);
+ break;
+ }
+ case GridLayout.CellLayout.Isometric:
+ {
+ m_TilePaletteCellSizing.intValue = (int)GridPalette.CellSizing.Manual;
+ m_TilePaletteCellSize.vector3Value = new Vector3(1, 0.5f, 1);
+ break;
+ }
+ case GridLayout.CellLayout.IsometricZAsY:
+ {
+ m_TilePaletteCellSizing.intValue = (int)GridPalette.CellSizing.Manual;
+ m_TilePaletteCellSize.vector3Value = new Vector3(1, 0.5f, 1);
+ m_TransparencySortMode.intValue = (int)TransparencySortMode.CustomAxis;
+ m_TransparencySortAxis.vector3Value = new Vector3(0f, 1f, -0.26f);
+ break;
+ }
+ }
+ }
+
+ if (m_TilePaletteCellLayout.enumValueIndex == (int) GridLayout.CellLayout.Hexagon)
+ {
+ m_TilePaletteHexagonLayout.intValue = EditorGUILayout.Popup(Styles.tilePaletteHexagonLabel, m_TilePaletteHexagonLayout.intValue, Styles.tilePaletteHexagonSwizzleTypeLabel);
+ }
+
+ EditorGUILayout.PropertyField(m_TilePaletteCellSizing);
+ using (new EditorGUI.DisabledScope(m_TilePaletteCellSizing.enumValueIndex == (int) GridPalette.CellSizing.Automatic))
+ {
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.LabelField(Styles.tilePaletteCellSizeLabel, GUILayout.Width(EditorGUIUtility.labelWidth));
+ EditorGUI.BeginChangeCheck();
+ var val = EditorGUILayout.Vector3Field(GUIContent.none, m_TilePaletteCellSize.vector3Value);
+ if (EditorGUI.EndChangeCheck())
+ {
+ m_TilePaletteCellSize.vector3Value = val;
+ }
+ EditorGUILayout.EndHorizontal();
+ }
+ EditorGUILayout.PropertyField(m_TransparencySortMode);
+ using (new EditorGUI.DisabledScope(m_TransparencySortMode.enumValueIndex != (int)TransparencySortMode.CustomAxis))
+ {
+ EditorGUILayout.BeginHorizontal();
+ EditorGUILayout.LabelField(Styles.tilePaletteTransparencySortAxisLabel, GUILayout.Width(EditorGUIUtility.labelWidth));
+ EditorGUI.BeginChangeCheck();
+ var val = EditorGUILayout.Vector3Field(GUIContent.none, m_TransparencySortAxis.vector3Value);
+ if (EditorGUI.EndChangeCheck())
+ {
+ m_TransparencySortAxis.vector3Value = val;
+ }
+ EditorGUILayout.EndHorizontal();
+ }
+ EditorGUILayout.PropertyField(m_TileTemplate);
+ }
+ }
+#endif
}
void DoOpenSpriteEditorButton()
@@ -1463,7 +1559,7 @@ internal TextureImporterSettings GetSerializedPropertySettings(TextureImporterSe
/// Override of AssetImporterEditor.showImportedObject
/// The property always returns false so that imported objects does not show up in the Inspector.
///
- /// false
+ /// false
public override bool showImportedObject
{
get { return false; }
@@ -1689,6 +1785,7 @@ internal class Styles
public readonly GUIContent layerMapping = EditorGUIUtility.TrTextContent("Layer Mapping", "Options for indicating how layer to Sprite mapping.");
public readonly GUIContent generatePhysicsShape = EditorGUIUtility.TrTextContent("Generate Physics Shape", "Generates a default physics shape from the outline of the Sprite/s when a physics shape has not been set in the Sprite Editor.");
+ public readonly GUIContent generateTileAssets = EditorGUIUtility.TrTextContent("Generate Tile Assets", "Generates Tile assets from Sprite/s generated by importer.");
public readonly GUIContent importHiddenLayer = EditorGUIUtility.TrTextContent("Include Hidden Layers", "Settings to determine when hidden layers should be imported.");
public readonly GUIContent mosaicLayers = EditorGUIUtility.TrTextContent("Import Mode", "Layers will be imported as individual Sprites.");
public readonly GUIContent characterMode = EditorGUIUtility.TrTextContent("Use as Rig","Enable to support 2D Animation character rigging.");
@@ -1702,6 +1799,16 @@ internal class Styles
public readonly GUIContent textureHeaderText = EditorGUIUtility.TrTextContent("Texture","Texture settings.");
public readonly GUIContent multiEditLayerManagementNotSupported = EditorGUIUtility.TrTextContent("Multi editing in Layer Management is not supported.","");
public readonly GUIContent characterRigHeaderText = EditorGUIUtility.TrTextContent("Character Rig","Character Rig settings.");
+
+ public readonly GUIContent tilePaletteHeaderText = EditorGUIUtility.TrTextContent("Tile Palette","Tile Palette settings.");
+ public static readonly GUIContent tilePaletteHexagonLabel = EditorGUIUtility.TrTextContent("Hexagon Type");
+ public static readonly GUIContent[] tilePaletteHexagonSwizzleTypeLabel =
+ {
+ EditorGUIUtility.TrTextContent("Point Top"),
+ EditorGUIUtility.TrTextContent("Flat Top"),
+ };
+ public static readonly GUIContent tilePaletteCellSizeLabel = EditorGUIUtility.TrTextContent("Tile Palette Cell Size");
+ public static readonly GUIContent tilePaletteTransparencySortAxisLabel = EditorGUIUtility.TrTextContent("Transparency Sort Axis");
public readonly int[] falseTrueOptionValue =
{
@@ -1790,6 +1897,7 @@ class PSDImporterEditorFoldOutState
SavedBool m_GeneralFoldout;
SavedBool m_LayerImportFoldout;
SavedBool m_CharacterRigFoldout;
+ SavedBool m_TilePaletteFoldout;
SavedBool m_AdvancedFoldout;
SavedBool m_TextureFoldout;
SavedBool m_PlatformSettingsFoldout;
@@ -1799,6 +1907,7 @@ public PSDImporterEditorFoldOutState()
m_GeneralFoldout = new SavedBool("PSDImporterEditor.m_GeneralFoldout", true);
m_LayerImportFoldout = new SavedBool("PSDImporterEditor.m_LayerImportFoldout", true);
m_CharacterRigFoldout = new SavedBool("PSDImporterEditor.m_CharacterRigFoldout", false);
+ m_TilePaletteFoldout = new SavedBool("PSDImporterEditor.m_TilePaletteFoldout", false);
m_AdvancedFoldout = new SavedBool("PSDImporterEditor.m_AdvancedFoldout", false);
m_TextureFoldout = new SavedBool("PSDImporterEditor.m_TextureFoldout", false);
m_PlatformSettingsFoldout = new SavedBool("PSDImporterEditor.m_PlatformSettingsFoldout", false);
@@ -1828,6 +1937,12 @@ public bool DoCharacterRigUI(GUIContent title)
return m_CharacterRigFoldout.value;
}
+ public bool DoTilePaletteUI(GUIContent title)
+ {
+ m_TilePaletteFoldout.value = DoFoldout(title, m_TilePaletteFoldout.value);
+ return m_TilePaletteFoldout.value;
+ }
+
public bool DoAdvancedUI(GUIContent title)
{
m_AdvancedFoldout.value = DoFoldout(title, m_AdvancedFoldout.value);
diff --git a/Editor/PSDSpriteEditorDataProvider.cs b/Editor/PSDSpriteEditorDataProvider.cs
index f86197e..3181b4b 100644
--- a/Editor/PSDSpriteEditorDataProvider.cs
+++ b/Editor/PSDSpriteEditorDataProvider.cs
@@ -3,7 +3,7 @@
using UnityEditor.AssetImporters;
using UnityEditor.U2D.Sprites;
-#if ENABLE_2D_ANIMATION
+#if ENABLE_2D_ANIMATION
using UnityEditor.U2D.Animation;
#endif
@@ -14,13 +14,13 @@ public partial class PSDImporter : ScriptedImporter, ISpriteEditorDataProvider
SpriteImportMode ISpriteEditorDataProvider.spriteImportMode => spriteImportModeToUse;
UnityEngine.Object ISpriteEditorDataProvider.targetObject => targetObject;
internal UnityEngine.Object targetObject => this;
-
+
///
/// Implementation for ISpriteEditorDataProvider.pixelsPerUnit.
///
float ISpriteEditorDataProvider.pixelsPerUnit => pixelsPerUnit;
internal float pixelsPerUnit => m_TextureImporterSettings.spritePixelsPerUnit;
-
+
///
/// Implementation for ISpriteEditorDataProvider.GetDataProvider.
///
@@ -29,8 +29,8 @@ public partial class PSDImporter : ScriptedImporter, ISpriteEditorDataProvider
T ISpriteEditorDataProvider.GetDataProvider()
{
return GetDataProvider();
- }
-
+ }
+
internal T GetDataProvider() where T : class
{
if (typeof(T) == typeof(ISpriteBoneDataProvider))
@@ -57,7 +57,13 @@ internal T GetDataProvider() where T : class
{
return new SecondaryTextureDataProvider() { dataProvider = this } as T;
}
-#if ENABLE_2D_ANIMATION
+#if USE_SPRITE_FRAME_CAPABILITY
+ if (typeof(T) == typeof(ISpriteFrameEditCapability))
+ {
+ return new SpriteFrameEditCapabilityDataProvider() { dataProvider = this } as T;
+ }
+#endif
+#if ENABLE_2D_ANIMATION
if (typeof(T) == typeof(ICharacterDataProvider))
{
return inCharacterMode ? new CharacterDataProvider { dataProvider = this } as T : null;
@@ -65,12 +71,12 @@ internal T GetDataProvider() where T : class
if (typeof(T) == typeof(IMainSkeletonDataProvider))
{
return inCharacterMode && skeletonAsset != null ? new MainSkeletonDataProvider() { dataProvider = this } as T : null;
- }
-#endif
+ }
+#endif
else
return this as T;
- }
-
+ }
+
///
/// Implementation for ISpriteEditorDataProvider.HasDataProvider.
///
@@ -79,11 +85,11 @@ internal T GetDataProvider() where T : class
bool ISpriteEditorDataProvider.HasDataProvider(Type type)
{
return HasDataProvider(type);
- }
-
+ }
+
internal bool HasDataProvider(Type type)
{
-#if ENABLE_2D_ANIMATION
+#if ENABLE_2D_ANIMATION
if (inCharacterMode)
{
if (type == typeof(ICharacterDataProvider))
@@ -104,7 +110,7 @@ internal bool HasDataProvider(Type type)
else
return type.IsAssignableFrom(GetType());
}
-
+
///
/// Implementation for ISpriteEditorDataProvider.Apply.
///
@@ -112,17 +118,17 @@ void ISpriteEditorDataProvider.Apply()
{
Apply();
}
-
+
///
/// Implementation for ISpriteEditorDataProvider.InitSpriteEditorDataProvider.
///
void ISpriteEditorDataProvider.InitSpriteEditorDataProvider()
{
InitSpriteEditorDataProvider();
- }
-
+ }
+
void InitSpriteEditorDataProvider() {}
-
+
///
/// Implementation for ISpriteEditorDataProvider.GetSpriteRects.
///
@@ -131,7 +137,7 @@ SpriteRect[] ISpriteEditorDataProvider.GetSpriteRects()
{
return GetSpriteRects();
}
-
+
internal SpriteRect[] GetSpriteRects()
{
if (spriteImportModeToUse == SpriteImportMode.Multiple)
@@ -141,9 +147,9 @@ internal SpriteRect[] GetSpriteRects()
return m_MultiSpriteImportData.Select(x => new SpriteMetaData(x) as SpriteRect).ToArray();
}
- return new[] { new SpriteMetaData(m_SingleSpriteImportData[0]) };
- }
-
+ return new[] { GetSingleSpriteImportData() };
+ }
+
///
/// Implementation for ISpriteEditorDataProvider.SetSpriteRects.
///
@@ -151,8 +157,8 @@ internal SpriteRect[] GetSpriteRects()
void ISpriteEditorDataProvider.SetSpriteRects(SpriteRect[] spriteRects)
{
SetSpriteRects(spriteRects);
- }
-
+ }
+
internal void SetSpriteRects(SpriteRect[] spriteRects)
{
var spriteImportData = GetSpriteImportData();
@@ -190,6 +196,6 @@ internal void SetSpriteRects(SpriteRect[] spriteRects)
spriteImportData[0] = new SpriteMetaData(spriteRects[0]);
}
}
- }
+ }
}
}
\ No newline at end of file
diff --git a/Editor/SpriteData.cs b/Editor/SpriteData.cs
index 99a49ff..d2efb9c 100644
--- a/Editor/SpriteData.cs
+++ b/Editor/SpriteData.cs
@@ -32,6 +32,25 @@ public SpriteMetaData(SpriteRect sr)
spriteID = sr.spriteID;
}
+ public void Copy(SpriteMetaData sr)
+ {
+ alignment = sr.alignment;
+ border = sr.border;
+ name = sr.name;
+ pivot = GetPivotValue(sr.alignment, sr.pivot);
+ rect = sr.rect;
+ spriteID = sr.spriteID;
+ spriteBone = sr.spriteBone;
+ spriteOutline = sr.spriteOutline;
+ vertices = sr.vertices;
+ spritePhysicsOutline = sr.spritePhysicsOutline;
+ indices = sr.indices;
+ edges = sr.edges;
+ tessellationDetail = sr.tessellationDetail;
+ uvTransform = sr.uvTransform;
+ spritePosition = sr.spritePosition;
+ }
+
public static Vector2 GetPivotValue(SpriteAlignment alignment, Vector2 customOffset)
{
switch (alignment)
@@ -86,4 +105,4 @@ internal class SpriteOutline
[SerializeField]
public Vector2[] outline;
}
-}
+}
\ No newline at end of file
diff --git a/Editor/UTK/PSDImporterMultiColumnTreeViewUI.cs b/Editor/UTK/PSDImporterMultiColumnTreeViewUI.cs
index a06f42f..d868257 100644
--- a/Editor/UTK/PSDImporterMultiColumnTreeViewUI.cs
+++ b/Editor/UTK/PSDImporterMultiColumnTreeViewUI.cs
@@ -32,17 +32,16 @@ public void Update(SerializedObject so)
mappingStrategy = ((PSDImporter)so.targetObject).GetLayerMappingStrategy();
layerImportSettings = so.FindProperty("m_PSDLayerImportSetting");
}
-
+
}
- [Serializable]
internal class PSDImporterLayerManagementMultiColumnTreeView : MultiColumnTreeView
{
int m_LastArraySize;
LayerManagementTreeViewData m_LayerManagementTreeViewData;
PSDTreeViewNode[] m_Data;
UILayerImportColumn m_LayerImportColumn;
-
+
public void UpdateTreeView(SerializedObject so)
{
m_LayerManagementTreeViewData.Update(so);
@@ -65,10 +64,10 @@ void SetupColumns()
name = "UILayerNameColumn",
};
columns.Add(col);
-
+
columns.primaryColumnName = "UILayerNameColumn";
}
-
+
public PSDImporterLayerManagementMultiColumnTreeView(SerializedObject so)
{
viewDataKey = "PSDImporterLayerManagementMultiColumnTreeView-ViewDataKey";
@@ -79,19 +78,19 @@ public PSDImporterLayerManagementMultiColumnTreeView(SerializedObject so)
}
public PSDTreeViewNode[] data => m_Data;
-
+
public bool importHidden => m_LayerManagementTreeViewData.importHiddenLayers.boolValue;
SerializedProperty layerImportSetting => m_LayerManagementTreeViewData.layerImportSettings;
IList importLayerData => m_LayerManagementTreeViewData.importData.psdLayerData;
IPSDLayerMappingStrategy layerMappingStrategy => m_LayerManagementTreeViewData.mappingStrategy;
-
+
void RebuildTree()
{
SetRootItems(BuildTree());
Rebuild();
}
-
+
public void Update()
{
foreach (var c in columns)
@@ -102,7 +101,7 @@ public void Update()
}
}
}
-
+
List> BuildTree()
{
var treeViewData = new List>();
@@ -145,7 +144,7 @@ List> BuildTree()
importSetting = spWrapper[importSettingIndex];
spWrapper.RemoveAt(importSettingIndex);
}
-
+
if (l != null && l.isGroup)
nodes[i] = new PSDGroupTreeViewNode(l, i, importSetting);
else
@@ -185,7 +184,7 @@ List> BuildTree()
m_Data = new[] { fileRoot };
}
treeViewData.Add(fileRoot.BuildTreeViewItemData());
- return treeViewData;
+ return treeViewData;
}
public PSDTreeViewNode GetFromIndex(int i)
@@ -194,4 +193,4 @@ public PSDTreeViewNode GetFromIndex(int i)
return m_Data[e];
}
}
-}
+}
\ No newline at end of file
diff --git a/Editor/Unity.2D.Psdimporter.Editor.asmdef b/Editor/Unity.2D.Psdimporter.Editor.asmdef
index 099b8e8..169869e 100644
--- a/Editor/Unity.2D.Psdimporter.Editor.asmdef
+++ b/Editor/Unity.2D.Psdimporter.Editor.asmdef
@@ -8,6 +8,7 @@
"Unity.2D.Animation.Editor",
"Unity.2D.Animation.Runtime",
"Unity.2D.Sprite.Editor",
+ "Unity.2D.Tilemap.Editor",
"Unity.Mathematics",
"Unity.Burst",
"Unity.InternalAPIEngineBridge.001"
@@ -31,6 +32,16 @@
"name": "Unity",
"expression": "2023.2.0a22",
"define": "USE_NEW_EDITOR_ANALYTICS"
+ },
+ {
+ "name": "com.unity.2d.tilemap",
+ "expression": "1.0.0",
+ "define": "ENABLE_2D_TILEMAP_EDITOR"
+ },
+ {
+ "name": "Unity",
+ "expression": "6000.1.0a2",
+ "define": "USE_SPRITE_FRAME_CAPABILITY"
}
],
"noEngineReferences": false
diff --git a/package.json b/package.json
index 1f22680..311b0d3 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,8 @@
{
"name": "com.unity.2d.psdimporter",
- "version": "9.0.3",
- "unity": "2023.1",
+ "version": "10.0.0",
+ "unity": "6000.1",
+ "unityRelease": "0a9",
"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 Unity 2D Animation Package.",
"keywords": [
@@ -11,11 +12,11 @@
],
"category": "2D",
"dependencies": {
- "com.unity.2d.common": "9.0.4",
+ "com.unity.2d.common": "9.0.7",
"com.unity.2d.sprite": "1.0.0"
},
"relatedPackages": {
- "com.unity.2d.psdimporter.tests": "9.0.3"
+ "com.unity.2d.psdimporter.tests": "10.0.0"
},
"samples": [
{
@@ -25,15 +26,15 @@
}
],
"_upm": {
- "changelog": "### Fixed\n- Fix source file cannot be deleted after subsequent import. (Case DANB-579)\n\n### Changed\n- Updated the Editor Analytics to use the latest APIs."
+ "changelog": "### Added \n- Added support for Sprite Frame Editing capabilities where data that are from the source file are locked by default.\n- Added new ability to generate Tile asset and Tile Palette from PSDImporter."
},
"upmCi": {
- "footprint": "ec7f070542925957d8aeffef11be9cd939d31bd7"
+ "footprint": "ef5b65d9cab60543bc5d1725bc4d14c685f6bb13"
},
- "documentationUrl": "https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@9.0/manual/index.html",
+ "documentationUrl": "https://docs.unity3d.com/Packages/com.unity.2d.psdimporter@10.0/manual/index.html",
"repository": {
"url": "https://github.cds.internal.unity3d.com/unity/2d.git",
"type": "git",
- "revision": "cacb780673a1e5d1e9bd0e398015b1a9924c0922"
+ "revision": "c3aca8670c64fa4c4d765e1f4dfbc9b18fb80001"
}
}