Awesome
SmartTexture Asset for Unity
SmartTexture is a custom asset for Unity that allows you a channel packing workflow in the editortextures and use them in the Unity editor for a streamlined workflow. SmartTextures work as a regular 2D texture asset and you can assign it to material inspectors.
Dependency tracking is handled by SmartTexture, that means you can change input textures and the texture asset will be re-generated. The input textures are editor only dependencies, they will not be included in the build, unless they are referenced by another asset or scene.
<img width="347" alt="inspector" src="https://user-images.githubusercontent.com/7453395/82161433-dbe8ab00-989c-11ea-9003-10e8ca867bfe.png">NOTE
This package is still a Proof of Concept (POC) and it's still experimental. You can request features or submit bugs by creating new issues in the issue tab. For feature request please add "enhancement" label.
Installation
SmartTexture is a unity package and you can install it from Package Manager.
Option 1: Install package via Github.
Option 2: Clone or download this Github project and install it as a local package.
How to use
-
Create a SmartTexture asset by clicking on
<img width="870" alt="create" src="https://user-images.githubusercontent.com/7453395/82161430-d9865100-989c-11ea-9497-19d1cf77fed9.png">Asset -> Create -> Smart Texture
, or by right-clicking on the Project Window and thenCreate -> Smart Texture
. -
An asset will be created in your project.
<img width="378" alt="asset" src="https://user-images.githubusercontent.com/7453395/82161427-d68b6080-989c-11ea-9fae-1d65e06ad3d6.png"> -
On the asset inspector you can configure input textures and texture settings for your smart texture.
-
Hit
<img width="347" alt="inspector" src="https://user-images.githubusercontent.com/7453395/82161433-dbe8ab00-989c-11ea-9003-10e8ca867bfe.png">Apply
button to generate the texture with selected settings. -
Now you can use this texture as any regular 2D texture in your project.
<img width="524" alt="assign" src="https://user-images.githubusercontent.com/7453395/82161435-de4b0500-989c-11ea-9784-e4a9b9403120.png">
Acknowledgements
- Thanks to pschraut for Texture2DArrayImporter project. I've used that project to learn a few things about ScriptedImporter and reused the code to create asset file.
- Thanks to Aras P. for guidance and ideas on how to create this.