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(); } diff --git a/README.md b/README.md index ec87992..942ab6b 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