This package provides various solutions for dots sprite rendering based on NSprites package. While NSprites trying to be flexible solution for any needs this project is more like set of samples and useful tools which can be not perfect for your personal needs.
I would recommend download this as embedded package and adapt for your needs. You can use parts separately except those who depends on each other (details below). Though you can implement your own tools on top of those or from scratch looking here as to example.
Also before working with this package please read NSprites documentation to understand what is going on (or use without editing :D)
name | running | description |
---|---|---|
Components | runtime | Contains components to be used with NSprites |
Authoring | editor | Bakes basic render data, uses all other parts |
Render data registration | runtime | Register render data for NSprites render system |
Sorting | runtime | Calculate SortingValue depending on 2D position to use in shader |
Culling | runtime | Disables / Enables rendering based on 2D position relatively to camera |
Animation | runtime | Shifts UVs values to simulate sprite animation |
2D Transform | both | Provides systems / components to simulate 2D transforms |
Graphics | runtime | Provides shaders / materials / other render assets |
Diagram below illustrates dependencies between parts
- You can use included shaders only with URP, so before anything rendered you should import, create and assign URP asset in project settings. If you want use another render pipeline then you need to implement your own shader and create material with it.
- Some components registered as properties in this package, so by default you will have component properties (you can see them this window). This means that some shader properties names already registered with some component and you can't use similar names for different formats in another shaders you want to use with NSprites. If you don't want to have default registered components you can exclude manifest file from asset (use *.unitypackage installation for that).
- NSprites v3.0.0+
- Unity v2022.2.3+
- Universal RP v14.0.6+
- Entities v1.0.0-pre.65+
- Window -> Package Manager -> + button -> Add package from git url
- Paste
https://github.com/Antoshidza/NSprites-Foundation.git
cd
to your project's/Packages
folder- git submodule https://github.com/Antoshidza/NSprites-Foundation.git
- Open release you need in this repository
- Expand Assets foldout and download *.unitypackage file
- Import it to your project by opening file during unity editor opened or Assets -> Import Package
Note: You can select what files to import, use this to filter unwanted assets. Package will be installed as local to /Packages folder as usual, but in this case package will be already cached so you can freely modify it.