Hi!
I have a SpriteAtlas “atlas”, from which I’ve created a Preset “preset” from the Editor
However, If I use the DataEquals method of the preset, I always get “false”, even though the data is correct.
var isDataEqual = preset.DataEquals(atlas) // Always return false!
For a SpineTexture, the following method worked:
var texturePath = AssetDatabase.GetAssetPath(texture);
var importer = AssetImporter.GetAtPath(texturePath) as TextureImporter;
var isDataEqual = preset.DataEquals(importer) // This works as expected
So I tried to do something similar with a SpriteAtlas:
var atlasPath = AssetDatabase.GetAssetPath(atlas);
var importer = AssetImporter.GetAtPath(atlasPath) as SpriteAtlasImporter;
var isDataEqual = preset.dataEquals(importer)
But that didn’t work as well
The Unity manual shows that I need to use the NativeFormatImporter Unity - Manual: Built-in Importers - but I cannot import it, it cannot be found in any namespace.
Is this a Unity bug? Is there a way to compare preset data for the SpriteAtlas after all?