In V1, it would pack once you enter playmode, but now it repacks every time i change something in a packed folder, even if its not a sprite! And for some reason, it packs significantly slower than v1. Is there a way to make it deferred to entering playmode again? And about the slowness, should i just revert to v1?
You can use “Sprite Atlas V2 - Enabled for Builds” setting for SpritePacker mode in Editor Settings. However this is only available in recent versions. What version of Unity do you use ?
I have that option so I will try it out. My concern with that setting is that it would no longer simulate as if it were a packed sprite atlas in a build right? or does the editor still do that anyway? The reason is that i would like all my addressable atlas sprites to behave as expected, and dont want to get any surprises when testing in a build.
Edit: actually ive just tested it, and my addressable atlas sprite refs did not like that change. Guess i need to stick with the “Enabled” option

incredibly slow
Hi guys, just hitting the same issue after upgrading to spriteatlasv2…
here is an editor script that set the sprite packing to “build only v2” when not in play mode and set it back to “always v2” when entering play mode.
using UnityEditor;
[InitializeOnLoad]
public static class SpriteAtlasAutoEnable
{
private const string cEditorPrefSpriteAtlasAutoEnable = "SpriteAtlasAutoEnable.AutoEnable";
private const string menuName = "Tools/SpriteAtlas AutoEnable/Enabled";
public static bool AutoEnable
{
get => EditorPrefs.GetBool( cEditorPrefSpriteAtlasAutoEnable, true );
set
{
EditorPrefs.SetBool( cEditorPrefSpriteAtlasAutoEnable, value );
if( value )
EditorSettings.spritePackerMode = EditorApplication.isPlayingOrWillChangePlaymode ? SpritePackerMode.SpriteAtlasV2 : SpritePackerMode.SpriteAtlasV2Build;
Menu.SetChecked(menuName, value);
}
}
static SpriteAtlasAutoEnable()
{
EditorApplication.playModeStateChanged += OnEnterPlayMode;
if( AutoEnable )
EditorSettings.spritePackerMode = EditorApplication.isPlayingOrWillChangePlaymode ? SpritePackerMode.SpriteAtlasV2 : SpritePackerMode.SpriteAtlasV2Build;
Menu.SetChecked(menuName, AutoEnable);
}
private static void OnEnterPlayMode(PlayModeStateChange obj)
{
if( !AutoEnable )
return;
EditorSettings.spritePackerMode = obj switch
{
PlayModeStateChange.ExitingEditMode => SpritePackerMode.SpriteAtlasV2,
PlayModeStateChange.ExitingPlayMode => SpritePackerMode.SpriteAtlasV2Build,
_ => EditorSettings.spritePackerMode
};
}
[MenuItem( menuName )]
private static void ToggleEnabled()
{
AutoEnable = !AutoEnable;
Menu.SetChecked(menuName, AutoEnable);
}
}