From f5132968cdf6b795d7998558adcefe33de50ec75 Mon Sep 17 00:00:00 2001 From: Walter Hulsebos <77513543+Walter-Hulsebos@users.noreply.github.com> Date: Wed, 4 Aug 2021 14:10:16 +0200 Subject: [PATCH 1/3] FIX: Handle TGA Texture Format --- Editor/TexturePackerWindow.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Editor/TexturePackerWindow.cs b/Editor/TexturePackerWindow.cs index 0112b45..bb03e30 100644 --- a/Editor/TexturePackerWindow.cs +++ b/Editor/TexturePackerWindow.cs @@ -114,11 +114,14 @@ private void OnGUI() Texture2D output = _texturePacker.Create(); if(_textureFormat == TextureFormat.JPG) - File.WriteAllBytes(savePath, output.EncodeToJPG()); + File.WriteAllBytes(savePath, bytes: output.EncodeToJPG()); else if(_textureFormat == TextureFormat.PNG) - File.WriteAllBytes(savePath, output.EncodeToPNG()); - else - File.WriteAllBytes(savePath, output.EncodeToEXR()); + File.WriteAllBytes(savePath, bytes: output.EncodeToPNG()); + else if(_textureFormat == TextureFormat.TGA) + File.WriteAllBytes(savePath, bytes: output.EncodeToTGA()); + else if(_textureFormat == TextureFormat.EXR) + File.WriteAllBytes(savePath, bytes: output.EncodeToEXR()); + else Debug.LogError(message: "Texture Format not supported!"); AssetDatabase.Refresh(); } From 66718d3a23780c96c3a392dcfa4e1b6f57b19212 Mon Sep 17 00:00:00 2001 From: Walter Hulsebos <77513543+Walter-Hulsebos@users.noreply.github.com> Date: Wed, 4 Aug 2021 14:22:14 +0200 Subject: [PATCH 2/3] DOCS: Updated Installation Instructions --- README.md | 33 ++++++--------------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index ec87992..5fd8ce1 100644 --- a/README.md +++ b/README.md @@ -6,35 +6,14 @@ unity-texture-packer [![License](https://img.shields.io/badge/License-MIT-lightg ![screenshot](Screenshots/screen00.gif) -## Install +# Installation -### Using Git +#####Install the latest *stable release* by following these steps: -Make sure the Git client is installed on your marchine and that you have added the Git executable path to your PATH environment variable. - -Go in %ProjectFolder%/Packages/ and open the "manifest.json" file. - -in the "dependencies" section add: - -```sh -{ - "dependencies": { - ... - "ca.andydbc.unity-texture-packer":"https://github.com/andydbc/unity-texture-packer.git#0.1.0" - ... - } -} -``` - -Find more information about this [here](https://docs.unity3d.com/Manual/upm-git.html). - -### Manual - -Dowload this repository as a zip file, extract the archive.
-In Unity, go in "Window" -> "Package Manager" -> "Add Package from disk"
-Select the "package.json" file located at the root of the package folder.
- -The tool is located under "Window" and is called "Channel Packer" +1. Click on **Window/Package Manager**. +2. Click on the little + icon. +3. Click on button that says **Add Package from git URL**. +4. Put in `https://github.com/Walter-Hulsebos/unity-texture-packer.git` ## Note From ba9f6c440dea9dced01c35d4abf1924dfbb6a7c8 Mon Sep 17 00:00:00 2001 From: Walter Hulsebos <77513543+Walter-Hulsebos@users.noreply.github.com> Date: Wed, 4 Aug 2021 14:22:41 +0200 Subject: [PATCH 3/3] DOCS: Fixed formatting error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5fd8ce1..942ab6b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ unity-texture-packer [![License](https://img.shields.io/badge/License-MIT-lightg # Installation -#####Install the latest *stable release* by following these steps: +#### Install the latest *stable release* by following these steps: 1. Click on **Window/Package Manager**. 2. Click on the little + icon.