https://github.com/UnioGame/UniGame.AtlasGenerator
Rule based SpriteAtlas Generator for Unity3D
https://github.com/UnioGame/UniGame.AtlasGenerator
Last synced: 33 minutes ago
JSON representation
Rule based SpriteAtlas Generator for Unity3D
- Host: GitHub
- URL: https://github.com/UnioGame/UniGame.AtlasGenerator
- Owner: UnioGame
- License: mit
- Created: 2021-05-22T22:01:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-13T06:29:16.000Z (almost 2 years ago)
- Last Synced: 2024-05-21T13:59:17.851Z (over 1 year ago)
- Language: C#
- Size: 151 KB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- anything_about_game - AtlasGenerator
README
Unity SpriteAtlas Generator
A simple rule-based sprite atlas generator. The generator create atlased by matching the rule pattern.
Table of Contents
- [Install Package](#install-package)
- [Install via Package Manager](#Install-via-package-manager)
- [Install via Git URL](#install-via-git-url)
- [How to Use](#how-to-use)
## Install Package
### Install via Package Manager
Add to your project manifiest by path [%UnityProject%]/Packages/manifiest.json new Scope:
```json
{
"scopedRegistries": [
{
"name": "UniGame",
"url": "http://packages.unigame.pro:4873/",
"scopes": [
"com.unigame",
"com.littlebigfun",
"com.alelievr"
]
},
"__comment":"another scoped registers",
],
}
```
Now install via Package Manager
### Install via Git URL
Open *Packages/manifest.json* with your favorite text editor. Add the following line to the dependencies block.
```json
{
"dependencies": {
"com.unigame.atlasgenerator": "https://github.com/UniGameTeam/UniGame.AtlasGenerator.git"
}
}
```
## How to Use
### Default Sprite Atlas Settings

### Atlas Generator Rules

- Sprites Root
Root folder for scaning all defined rules
- `Match Type`
- Wildcard, `*` matches any number of characters, `?` matches a single character.
- Regex.
- Path, path or regexpr to files
- Path to Altlas, location where generated atlases will be saved, support regexp groups
- Apply Custom Settings, allow you override default atlas settings
### Rule Examples
| Type | Example |
|----------|---------------------------------------------------------------------------------|
| Wildcard | `Asset/Sprites/Icons/*` |
| Wildcard | `Asset/Sprites/Level??/*.asset` |
| Regex | `^Assets/Models/.*\.fbx` |
| Regex | `Assets/Weapons/(?(?[^/]+)/(.*/)*)(?.*_Data.*\.asset)` |
| Rule Path | Rule Type | Results | Comments |
|-------------------|-----------|---------------------|----------|
| `Assets/t1` | Wildcard | `t1` and `t1/1.txt` | bad |
| `Assets/t1/*.txt` | Wildcard | `t1/1.txt` | good |
| `^Assets/t1$` | Regex | `t1` | good |
| `^Assets/t1/.*` | Regex | `t1/1.txt` | good |