public void BeginFileVisit(AseFile file) { SpriteAtlasUserAsset.RemoveSpritesFromAtlas(assetPath); m_AseFile = file; m_Pivot = null; // Start off with a an empty 256 palette m_Palette = Enumerable.Repeat(m_TransparentColor, 256).ToList(); // Create the array of clear pixels we'll use to begin each frame m_ClearPixels = Enumerable.Repeat(Color.clear, m_AseFile.Header.Width * m_AseFile.Header.Height).ToArray(); var icon = AssetDatabaseEx.LoadFirstAssetByFilter <Texture2D>("aseprite2unity-icon-0x1badd00d"); m_GameObject = new GameObject(Path.GetFileNameWithoutExtension(assetPath)); m_Context.AddObjectToAsset("_main", m_GameObject, icon); m_Context.SetMainObject(m_GameObject); }