Skip to content

Rule based SpriteAtlas Generator for Unity3D

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

UnioGame/UniGame.AtlasGenerator

Repository files navigation

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 via Package Manager

Add to your project manifiest by path [%UnityProject%]/Packages/manifiest.json new Scope:

{
  "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.

    {
        "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/(?<prefix>(?<category>[^/]+)/(.*/)*)(?<asset>.*_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

About

Rule based SpriteAtlas Generator for Unity3D

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages