├── .gitignore ├── Assets ├── TextureExporter.meta └── TextureExporter │ ├── Editor.meta │ ├── Editor │ ├── TextureExporter.cs │ └── TextureExporter.cs.meta │ ├── Example.meta │ └── Example │ ├── ExampleScene.unity │ ├── ExampleScene.unity.meta │ ├── Materials.meta │ ├── Materials │ ├── Square.mat │ └── Square.mat.meta │ ├── Sprites.meta │ └── Sprites │ ├── Square.png │ ├── Square.png.meta │ ├── atlas.png │ ├── atlas.png.meta │ ├── atlas_3.png │ ├── atlas_3.png.meta │ ├── atlas_7.png │ └── atlas_7.png.meta ├── LICENSE ├── Packages └── TextureExporter.unitypackage ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md ├── atlas_3.png └── readmeExampleCheckmark.png /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | #*.unitypackage 35 | 36 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm 37 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 38 | 39 | # User-specific stuff: 40 | .idea/**/workspace.xml 41 | .idea/**/tasks.xml 42 | .idea/dictionaries 43 | 44 | # Sensitive or high-churn files: 45 | .idea/**/dataSources/ 46 | .idea/**/dataSources.ids 47 | .idea/**/dataSources.xml 48 | .idea/**/dataSources.local.xml 49 | .idea/**/sqlDataSources.xml 50 | .idea/**/dynamic.xml 51 | .idea/**/uiDesigner.xml 52 | 53 | # Gradle: 54 | .idea/**/gradle.xml 55 | .idea/**/libraries 56 | 57 | # CMake 58 | cmake-build-debug/ 59 | 60 | # Mongo Explorer plugin: 61 | .idea/**/mongoSettings.xml 62 | 63 | ## File-based project format: 64 | *.iws 65 | 66 | ## Plugin-specific files: 67 | 68 | # IntelliJ 69 | /out/ 70 | 71 | # mpeltonen/sbt-idea plugin 72 | .idea_modules/ 73 | 74 | # JIRA plugin 75 | atlassian-ide-plugin.xml 76 | 77 | # Cursive Clojure plugin 78 | .idea/replstate.xml 79 | 80 | # Crashlytics plugin (for Android Studio and IntelliJ) 81 | com_crashlytics_export_strings.xml 82 | crashlytics.properties 83 | crashlytics-build.properties 84 | fabric.properties -------------------------------------------------------------------------------- /Assets/TextureExporter.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: da1bcd5074d764c5e8f31f4e63474cdc 3 | folderAsset: yes 4 | timeCreated: 1503648576 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b34a9809f6864dca96337d5c9b42a9a 3 | folderAsset: yes 4 | timeCreated: 1503648580 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Editor/TextureExporter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using UnityEngine.UI; 6 | using System.IO; 7 | 8 | public class TextureExporter { 9 | 10 | [MenuItem("CONTEXT/SpriteRenderer/Export texture to png")] 11 | private static void ExportSpriteRendererTextureToPng(MenuCommand command) 12 | { 13 | var spriteRenderer = (SpriteRenderer)command.context; 14 | var sprite = spriteRenderer.sprite; 15 | ExportTexture (sprite.texture,sprite.textureRect,sprite.name); 16 | } 17 | 18 | [MenuItem("CONTEXT/RawImage/Export texture to png")] 19 | private static void ExportRawImageTextureToPng(MenuCommand command) 20 | { 21 | var Image = (RawImage)command.context; 22 | var texture = Image.texture; 23 | ExportTexture (texture,new Rect(0,0,texture.width,texture.height),texture.name); 24 | } 25 | 26 | [MenuItem("CONTEXT/Image/Export texture to png")] 27 | private static void ExportImageTextureToPng(MenuCommand command) 28 | { 29 | var Image = (Image)command.context; 30 | var sprite = Image.sprite; 31 | ExportTexture (sprite.texture,sprite.textureRect,sprite.name); 32 | } 33 | 34 | [MenuItem("CONTEXT/MeshRenderer/Export main texture to png")] 35 | private static void ExportMeshRendererMainTextureToPng(MenuCommand command) 36 | { 37 | var meshRenderer = (MeshRenderer)command.context; 38 | var texture = meshRenderer.sharedMaterial.mainTexture; 39 | ExportTexture (texture,new Rect(0,0,texture.width,texture.height),texture.name); 40 | } 41 | 42 | private static void ExportTexture(Texture sourceTexture,Rect textureRect, string name) { 43 | 44 | RenderTexture rt = RenderTexture.GetTemporary(sourceTexture.width,sourceTexture.height,0,RenderTextureFormat.ARGB32,RenderTextureReadWrite.Default); 45 | Graphics.Blit(sourceTexture,rt); 46 | 47 | RenderTexture.active = rt; 48 | 49 | Texture2D readableTexture = new Texture2D((int)textureRect.width,(int)textureRect.height,TextureFormat.ARGB32,false); 50 | readableTexture.ReadPixels(textureRect,0,0 ); 51 | 52 | RenderTexture.active = null; 53 | RenderTexture.ReleaseTemporary(rt); 54 | var pngBytes = readableTexture.EncodeToPNG(); 55 | 56 | var savePath = EditorUtility.SaveFilePanel("Save image", "", name, "png"); 57 | 58 | if (string.IsNullOrEmpty(savePath)) 59 | { 60 | return; 61 | } 62 | 63 | File.WriteAllBytes(savePath,pngBytes); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Editor/TextureExporter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87148be84bfca437eab02bbc50942bfd 3 | timeCreated: 1503648587 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cc7b270dba2844b8882be141ec221e0 3 | folderAsset: yes 4 | timeCreated: 1503659168 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/ExampleScene.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/Assets/TextureExporter/Example/ExampleScene.unity -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/ExampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72b204203dad8441b803a4a08bb09d74 3 | timeCreated: 1503659182 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70751deb2c7b44e84a9a987fc8852ebb 3 | folderAsset: yes 4 | timeCreated: 1503659006 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Materials/Square.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/Assets/TextureExporter/Example/Materials/Square.mat -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Materials/Square.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6267a55b3b2bb4465b474e3e59069804 3 | timeCreated: 1503659006 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d8e7a17d3f01449a8ee82e47e1b9567 3 | folderAsset: yes 4 | timeCreated: 1503868228 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites/Square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/Assets/TextureExporter/Example/Sprites/Square.png -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites/Square.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 88b59e6a9e2db4f319e0766a25466bbb 3 | timeCreated: 1503659002 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: 0 31 | aniso: 16 32 | mipBias: 0 33 | wrapMode: 0 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 3 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 4 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 8 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: 4 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | spriteSheet: 62 | serializedVersion: 2 63 | sprites: [] 64 | outline: 65 | - - {x: -2, y: -2} 66 | - {x: -2, y: 2} 67 | - {x: 2, y: 2} 68 | - {x: 2, y: -2} 69 | spritePackingTag: 70 | userData: 71 | assetBundleName: 72 | assetBundleVariant: 73 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites/atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/Assets/TextureExporter/Example/Sprites/atlas.png -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites/atlas.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e69acad0f2c7646b18a2b094492f221f 3 | timeCreated: 1503868291 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: 7 | 21300000: atlas_0 8 | 21300002: atlas_1 9 | 21300004: atlas_2 10 | 21300006: atlas_3 11 | 21300008: atlas_4 12 | 21300010: atlas_5 13 | 21300012: atlas_6 14 | 21300014: atlas_7 15 | 21300016: atlas_8 16 | 21300018: atlas_9 17 | 21300020: atlas_10 18 | 21300022: atlas_11 19 | 21300024: atlas_12 20 | 21300026: atlas_13 21 | 21300028: atlas_14 22 | 21300030: atlas_15 23 | serializedVersion: 4 24 | mipmaps: 25 | mipMapMode: 0 26 | enableMipMap: 1 27 | sRGBTexture: 1 28 | linearTexture: 0 29 | fadeOut: 0 30 | borderMipMap: 0 31 | mipMapFadeDistanceStart: 1 32 | mipMapFadeDistanceEnd: 3 33 | bumpmap: 34 | convertToNormalMap: 0 35 | externalNormalMap: 0 36 | heightScale: 0.25 37 | normalMapFilter: 0 38 | isReadable: 0 39 | grayScaleToAlpha: 0 40 | generateCubemap: 6 41 | cubemapConvolution: 0 42 | seamlessCubemap: 0 43 | textureFormat: 1 44 | maxTextureSize: 2048 45 | textureSettings: 46 | filterMode: -1 47 | aniso: 16 48 | mipBias: -1 49 | wrapMode: -1 50 | nPOTScale: 0 51 | lightmap: 0 52 | compressionQuality: 50 53 | spriteMode: 2 54 | spriteExtrude: 1 55 | spriteMeshType: 1 56 | alignment: 0 57 | spritePivot: {x: 0.5, y: 0.5} 58 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 59 | spritePixelsToUnits: 100 60 | alphaUsage: 1 61 | alphaIsTransparency: 0 62 | spriteTessellationDetail: -1 63 | textureType: 8 64 | textureShape: 1 65 | maxTextureSizeSet: 0 66 | compressionQualitySet: 0 67 | textureFormatSet: 0 68 | platformSettings: 69 | - buildTarget: DefaultTexturePlatform 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: Standalone 78 | maxTextureSize: 2048 79 | textureFormat: -1 80 | textureCompression: 1 81 | compressionQuality: 50 82 | crunchedCompression: 0 83 | allowsAlphaSplitting: 0 84 | overridden: 0 85 | - buildTarget: iPhone 86 | maxTextureSize: 2048 87 | textureFormat: -1 88 | textureCompression: 1 89 | compressionQuality: 50 90 | crunchedCompression: 0 91 | allowsAlphaSplitting: 0 92 | overridden: 0 93 | - buildTarget: Android 94 | maxTextureSize: 2048 95 | textureFormat: -1 96 | textureCompression: 1 97 | compressionQuality: 50 98 | crunchedCompression: 0 99 | allowsAlphaSplitting: 0 100 | overridden: 0 101 | spriteSheet: 102 | serializedVersion: 2 103 | sprites: 104 | - serializedVersion: 2 105 | name: atlas_0 106 | rect: 107 | serializedVersion: 2 108 | x: 0 109 | y: 277.5 110 | width: 180.75 111 | height: 92.5 112 | alignment: 0 113 | pivot: {x: 0, y: 0} 114 | border: {x: 0, y: 0, z: 0, w: 0} 115 | outline: [] 116 | tessellationDetail: 0 117 | - serializedVersion: 2 118 | name: atlas_1 119 | rect: 120 | serializedVersion: 2 121 | x: 180 122 | y: 277.5 123 | width: 180.75 124 | height: 92.5 125 | alignment: 0 126 | pivot: {x: 0, y: 0} 127 | border: {x: 0, y: 0, z: 0, w: 0} 128 | outline: [] 129 | tessellationDetail: 0 130 | - serializedVersion: 2 131 | name: atlas_2 132 | rect: 133 | serializedVersion: 2 134 | x: 360 135 | y: 277.5 136 | width: 180.75 137 | height: 92.5 138 | alignment: 0 139 | pivot: {x: 0, y: 0} 140 | border: {x: 0, y: 0, z: 0, w: 0} 141 | outline: [] 142 | tessellationDetail: 0 143 | - serializedVersion: 2 144 | name: atlas_3 145 | rect: 146 | serializedVersion: 2 147 | x: 540 148 | y: 277.5 149 | width: 180.75 150 | height: 92.5 151 | alignment: 0 152 | pivot: {x: 0, y: 0} 153 | border: {x: 0, y: 0, z: 0, w: 0} 154 | outline: [] 155 | tessellationDetail: 0 156 | - serializedVersion: 2 157 | name: atlas_4 158 | rect: 159 | serializedVersion: 2 160 | x: 0 161 | y: 185.5 162 | width: 180.75 163 | height: 92.5 164 | alignment: 0 165 | pivot: {x: 0, y: 0} 166 | border: {x: 0, y: 0, z: 0, w: 0} 167 | outline: [] 168 | tessellationDetail: 0 169 | - serializedVersion: 2 170 | name: atlas_5 171 | rect: 172 | serializedVersion: 2 173 | x: 180 174 | y: 185.5 175 | width: 180.75 176 | height: 92.5 177 | alignment: 0 178 | pivot: {x: 0, y: 0} 179 | border: {x: 0, y: 0, z: 0, w: 0} 180 | outline: [] 181 | tessellationDetail: 0 182 | - serializedVersion: 2 183 | name: atlas_6 184 | rect: 185 | serializedVersion: 2 186 | x: 360 187 | y: 185.5 188 | width: 180.75 189 | height: 92.5 190 | alignment: 0 191 | pivot: {x: 0, y: 0} 192 | border: {x: 0, y: 0, z: 0, w: 0} 193 | outline: [] 194 | tessellationDetail: 0 195 | - serializedVersion: 2 196 | name: atlas_7 197 | rect: 198 | serializedVersion: 2 199 | x: 540 200 | y: 185.5 201 | width: 180.75 202 | height: 92.5 203 | alignment: 0 204 | pivot: {x: 0, y: 0} 205 | border: {x: 0, y: 0, z: 0, w: 0} 206 | outline: [] 207 | tessellationDetail: 0 208 | - serializedVersion: 2 209 | name: atlas_8 210 | rect: 211 | serializedVersion: 2 212 | x: 0 213 | y: 93.5 214 | width: 180.75 215 | height: 92.5 216 | alignment: 0 217 | pivot: {x: 0, y: 0} 218 | border: {x: 0, y: 0, z: 0, w: 0} 219 | outline: [] 220 | tessellationDetail: 0 221 | - serializedVersion: 2 222 | name: atlas_9 223 | rect: 224 | serializedVersion: 2 225 | x: 180 226 | y: 93.5 227 | width: 180.75 228 | height: 92.5 229 | alignment: 0 230 | pivot: {x: 0, y: 0} 231 | border: {x: 0, y: 0, z: 0, w: 0} 232 | outline: [] 233 | tessellationDetail: 0 234 | - serializedVersion: 2 235 | name: atlas_10 236 | rect: 237 | serializedVersion: 2 238 | x: 360 239 | y: 93.5 240 | width: 180.75 241 | height: 92.5 242 | alignment: 0 243 | pivot: {x: 0, y: 0} 244 | border: {x: 0, y: 0, z: 0, w: 0} 245 | outline: [] 246 | tessellationDetail: 0 247 | - serializedVersion: 2 248 | name: atlas_11 249 | rect: 250 | serializedVersion: 2 251 | x: 540 252 | y: 93.5 253 | width: 180.75 254 | height: 92.5 255 | alignment: 0 256 | pivot: {x: 0, y: 0} 257 | border: {x: 0, y: 0, z: 0, w: 0} 258 | outline: [] 259 | tessellationDetail: 0 260 | - serializedVersion: 2 261 | name: atlas_12 262 | rect: 263 | serializedVersion: 2 264 | x: 0 265 | y: 1.5 266 | width: 180.75 267 | height: 92.5 268 | alignment: 0 269 | pivot: {x: 0, y: 0} 270 | border: {x: 0, y: 0, z: 0, w: 0} 271 | outline: [] 272 | tessellationDetail: 0 273 | - serializedVersion: 2 274 | name: atlas_13 275 | rect: 276 | serializedVersion: 2 277 | x: 180 278 | y: 1.5 279 | width: 180.75 280 | height: 92.5 281 | alignment: 0 282 | pivot: {x: 0, y: 0} 283 | border: {x: 0, y: 0, z: 0, w: 0} 284 | outline: [] 285 | tessellationDetail: 0 286 | - serializedVersion: 2 287 | name: atlas_14 288 | rect: 289 | serializedVersion: 2 290 | x: 360 291 | y: 1.5 292 | width: 180.75 293 | height: 92.5 294 | alignment: 0 295 | pivot: {x: 0, y: 0} 296 | border: {x: 0, y: 0, z: 0, w: 0} 297 | outline: [] 298 | tessellationDetail: 0 299 | - serializedVersion: 2 300 | name: atlas_15 301 | rect: 302 | serializedVersion: 2 303 | x: 540 304 | y: 1.5 305 | width: 180.75 306 | height: 92.5 307 | alignment: 0 308 | pivot: {x: 0, y: 0} 309 | border: {x: 0, y: 0, z: 0, w: 0} 310 | outline: [] 311 | tessellationDetail: 0 312 | outline: [] 313 | spritePackingTag: 314 | userData: 315 | assetBundleName: 316 | assetBundleVariant: 317 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites/atlas_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/Assets/TextureExporter/Example/Sprites/atlas_3.png -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites/atlas_3.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d083bc9b0cac4bfab03e96a1f61a2dc 3 | timeCreated: 1503869301 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 1 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 8 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: iPhone 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: Android 78 | maxTextureSize: 2048 79 | textureFormat: -1 80 | textureCompression: 1 81 | compressionQuality: 50 82 | crunchedCompression: 0 83 | allowsAlphaSplitting: 0 84 | overridden: 0 85 | spriteSheet: 86 | serializedVersion: 2 87 | sprites: [] 88 | outline: [] 89 | spritePackingTag: my_atlas 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites/atlas_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/Assets/TextureExporter/Example/Sprites/atlas_7.png -------------------------------------------------------------------------------- /Assets/TextureExporter/Example/Sprites/atlas_7.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53970b616ebbe4ab58c6cdff23326682 3 | timeCreated: 1503869257 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 1 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 0 46 | spriteTessellationDetail: -1 47 | textureType: 8 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: iPhone 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: Android 78 | maxTextureSize: 2048 79 | textureFormat: -1 80 | textureCompression: 1 81 | compressionQuality: 50 82 | crunchedCompression: 0 83 | allowsAlphaSplitting: 0 84 | overridden: 0 85 | spriteSheet: 86 | serializedVersion: 2 87 | sprites: [] 88 | outline: [] 89 | spritePackingTag: my_atlas 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Miguel Ferreira 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/TextureExporter.unitypackage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/Packages/TextureExporter.unitypackage -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.5.4p4 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Texture Exporter 2 | 3 | Export procedural or hidden textures to .png files with one click! 4 | 5 | 6 | ![](readmeExampleCheckmark.png) 7 | 8 | 9 | ## Use case 10 | 11 | Say you want to have a red check mark instead of the default black one. If your photoshop skills aren't up to the task or you don't want to waste time, just export the default checkmark texture, color it with your favorite image manipulation software and _voilá_. 12 | 13 | ## Instructions 14 | 15 | 1. Import the `Packages/TextureExporter.unitypackage` 16 | 2. Click the gear icon on any SpriteRenderer/Image/RawImage/MeshRenderer 17 | 3. Click "Export texture to png" 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /atlas_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/atlas_3.png -------------------------------------------------------------------------------- /readmeExampleCheckmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miguel12345/UnityTextureExporter/01c1e8f3c3b5d943229ff2bdb1b4ec521a4452d5/readmeExampleCheckmark.png --------------------------------------------------------------------------------