Skip to content

FAQ (Frequently Asked Questions)

Is the asset compatible with Unity 6?

Of course it is :)
It supports the latest Unity LTS, and 2022.3 is the oldest version still supported.

Is it mandatory to use a certain Color Space in the Project?

Of course not, you are free to use whatever Color Space you want. Gamma is recommended to get the same exact results shown in the Demo and asset promo material.

Effects work in the editor but are missing in the build. How can I fix it?

Unity builds only the effect combinations that the materials in your build use. Every effect is a shader keyword that Unity strips when no material in the build turns it on, so an effect switched on from code with EnableKeyword, or a material made in code, can land on a combination the build doesn’t have. The sprite then shows without the effect, or not at all. On a device, the Player log names the missing combination:

Shader AllIn1SpriteShader/AllIn1Urp2dRenderer, subshader 0, pass 0, stage vertex: variant ALPHACUTOFF_ON HITEFFECT_ON OUTBASE_ON not found.

Fixes, best first:

  • Turn the effect on in the material and switch it with its properties, not its keyword. For an outline, set Outline Base Alpha (_OutlineAlpha) to 0 to hide it and 1 to show it. How to Enable/Disable Effects at Runtime covers this.
  • If you must switch keywords, put a material with each combination in the build: on an object in a scene that is in the build (a disabled object is enough), in a Resources folder, or in the same Addressables group or AssetBundle. A material that only sits in your project folder is not part of the build.
  • Or list the combinations in a Shader Variant Collection and add it to Preloaded Shaders in Project Settings, Graphics.
  • Copy an existing material instead of making one from the shader: new Material(existingMaterial) keeps its effects, new Material(Shader.Find(...)) starts with none.
"has too many Shader variants", or very long builds, after adding the shader to Always Included Shaders

Don’t put the Sprite Shader in Always Included Shaders. That list builds every combination of a shader’s keywords, and with this many effects that is billions of variants. Unity stops the build with:

AllIn1SpriteShader/AllIn1SpriteShader has too many Shader variants. To resolve this, go to Project Settings > Graphics and remove this Shader from the Always Included Shaders list

or the build runs for hours. Remove the shader from the list, leave the Graphics settings at their defaults, and use the fixes in the answer above.

Materials are pink or effects missing only when loaded from Addressables or an AssetBundle

A bundle carries the shader variants of the materials inside it. A material made at runtime, or an effect switched on in code, isn’t among them. Keep saved materials with the effects you need in the same Addressables group or AssetBundle, or add a Shader Variant Collection to it with the combinations you switch to.

A UI element is not showing up in a final device build, what should I do?

You are probably using Post Processing and that’s overriding the Depth Buffer. To solve it, set the ZTest Mode in Advanced Configuration to Always. You can do that in the Material Custom Inspector. Switching the Canvas to Screen Space Camera or World Space also works.

Time-based effects stutter or stop working after a few minutes on mobile devices. How can I fix this?

This is caused by variable precision issues with half-float types on mobile GPUs affecting time calculations. To fix this:

  1. Open the shader file in your code editor
  2. Use Find & Replace (Ctrl+H) to search for “half”
  3. Replace all instances with “float”
  4. Also check and update the .cginc file and the .hlsl files in Shaders/ShaderLibrary, which the SRP Batcher and URP 2D Renderer variants use
  5. Save the files

The two Lit shaders are generated by the asset, so edits to them are overwritten; this fix covers the other variants.

This increases the precision of floating point calculations, preventing time-based animations from stuttering or freezing on mobile devices. The performance impact is minimal compared to the visual artifacts it resolves.

A sprite only fails with one Graphics API, such as Vulkan

A few Android devices draw some effects wrongly under one graphics API: sprites that don’t show, or fades that run backwards, under Vulkan. Move another API, such as OpenGLES3, to the top of the Graphics APIs list in Player Settings, and tell us the device so we can look at it.

A hitch the first time an effect appears on a device

The first draw with a new combination of effects compiles it on the device, which shows up as Shader.CreateGPUProgram in the Profiler. Draw the effect once during a loading screen, or put the combinations in a Shader Variant Collection and call its WarmUp() before they are needed.

The material turns pink on prefabs, why?

You need to Save Material To Folder. More info in saving-prefabs

Why isn’t a UI Material getting masked?

You should use the UI Mask shader variant instead.

How can I make sure that a Material keeps being animated when the game is paused?

Use the Scaled Time shader variant and have an active object with the SetGlobalTime component attached to it. See Scaled Time.

Why are Materials not properly animating in the Scene view?

Because “Always Refresh” is not enabled in the Scene view

The Scene view's effects dropdown, with an arrow pointing at Always Refresh, ticked