コード例 #1
0
        private void UpdateOriginTexture()
        {
            if (!AssetDatabase.GetAssetPath(originTexture).EndsWith("psd"))
            {
                originTexture = null;
                Debug.LogError("it is not psd file.");
                return;
            }
            var path = Application.dataPath.Split('/');

            path[path.Length - 1] = AssetDatabase.GetAssetPath(originTexture);
            originPsd             = new PsdFile(string.Join("/", path), new LoadContext {
                Encoding = Encoding.Default
            });

            if (saveEditor != null)
            {
                saveEditor.Dispose();
            }
            saveEditor = new SaveAssetEditor(originPsd, parameter.textureSavePath);
        }