Search Unity

SpriteSharp - Sprite Mesh Optimizer

Discussion in 'Assets and Asset Store' started by ZimM, May 24, 2015.

  1. deemen

    deemen

    Joined:
    Dec 29, 2013
    Posts:
    17
    @ZimM: SpriteSharp currently isn't playing nice with the Unity Package Manager. When loading a project for the first time with packages being included, your texture pre-processor is trying to modify and re-import assets that are in packages. These assets are read-only and can't be modified so Unity enters an infinite loop and continues trying to reload the asset in a loop. We fixed this on one of our own texture pre-processors by adding a check that the path contained "Assets" at the start.

    Also, the sprite atlas hack changes the userData field but it would be nice if it didn't stomp what was already in there as we use it for something else.
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,456
    TBH I would say it's PM not playing nice with everything else. PM causes huge lag entering playmode and does a bunch of stuff it really shouldn't be doing atm.
     
  3. deemen

    deemen

    Joined:
    Dec 29, 2013
    Posts:
    17
    Yeah I don't disagree.
     
  4. HoneyButterAlmond

    HoneyButterAlmond

    Joined:
    Oct 27, 2016
    Posts:
    1
    SpriteSharp v2.5.0
    Unity 2019.1.3f1

    'Use Default Override Settings' is not working when add new sprite asset.
    It only worked with 'reimport'.

    The problem is SpriteImportManager.ProcessSingleSprite
    TextureImporter textureImporter = texture.GetTextureImporter();

    textureImporter is always null.

    So, I added next code to SpriteImportPostProcessorImpl.OnPostprocessSprites
    and using as parameter.
    TextureImporter textureImporter = (TextureImporter) postprocessor.assetImporter;
     
    Last edited: Jun 12, 2019
  5. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    67
    SpriteSharp 2.5.1.0 not working with Unity 2019.3.0b3