A class in Root.Township, Alta.Utilities.Atlas.
Settings asset listing which shaders can be atlased, their atlas type, and the blit shaders that bake each into diffuse, normal and emission atlases.
Constructors
| Member | What it is |
|---|
AtlasSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private static AtlasSettings instance | Backing field for Instance. |
private const string settingsPath | Project path of the settings asset, Assets/Atlases/Settings.asset. |
private AtlasSettings.ShaderBlits[] supportedShaders | The supported shaders with their blit shaders and atlas type. |
Properties
| Member | What it is |
|---|
static AtlasSettings Instance { get; } | The settings object. In this build it creates a new empty instance on first use rather than loading the asset. |
IEnumerable<Shader> SupportedShaders { get; } | Every listed shader. Fills in a missing entry name from the last part of the shader name. |
Methods
| Member | What it is |
|---|
bool GetBlitMaterials(Shader shader, out Material diffuseBlit, out Material normalBlit, out Material emissionBlit) | Creates new diffuse, normal and emission blit materials for a supported shader. Returns false if the shader is not listed. |
bool IsShaderSupported(Shader shader, out AtlasType type) | Whether the shader is in the list, and its atlas type (Common if not). |