示例#1
0
    public static SpritesPathData GetSpritesPathData()
    {
        var data = AssetDatabase.LoadAssetAtPath <SpritesPathData>(path);

        if (data == null)
        {
            data = SpritesPathData.CreateInstance <SpritesPathData>();
            AssetDatabase.CreateAsset(data, path);
            data.spriteInfos = new List <SpriteInfo>();
            AssetDatabase.Refresh();
        }
        data.RemoveNullOrEmpty();
        return(data);
    }
 static void OpenSpritePackerEditor()
 {
     window = SpritePackerEditorTool.GetWindow <SpritePackerEditorTool>();
     window.spritesPathData = SpritesPathData.GetSpritesPathData();
     window.Show();
 }