Search Unity

TexturePacker + Importer - Spritesheet generator & Sprite mesh optimizer

Discussion in 'Assets and Asset Store' started by CodeAndWeb, Nov 13, 2015.

  1. amirblum_nogame

    amirblum_nogame

    Joined:
    Mar 1, 2017
    Posts:
    3
    Hi, we are using the new "experimental" .NET 4.6 support in Unity 2017.1 and the importer doesn't run when using that mode. If we change to 3.5 it works but we would like to use 4.6 features. Do you know about this issue?
     
  2. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Hi,

    I can't reproduce this issue:
    • create new project with Unity 2017.1
    • select .NET 4.6 in player settings, restart Unity
    • add TexturePackerImporter to project
    • modify / add sprite sheet -> sheet is split into sprites as expected
    Are you using the latest TexturePackerImporter version? Any other changes in your project?
     
  3. amirblum_nogame

    amirblum_nogame

    Joined:
    Mar 1, 2017
    Posts:
    3
    Hi @j-o-e, I just performed those same steps - Brand new project, .NET 4.6, fresh import of TexturePacker, and I am seeing the same issue. Are you using Unity2017.1.0f3?
     
  4. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Can you please close Unity, open the file codeandweb.com/Editor/SettingsTexturePackerImporter.txt with a text editor and change "enableDebugOutput: 0" to "1".
    After starting Unity, is there a line "TexturePacker Importer initialized" in the console log?

    (yes, I'm using 2017.1.0f3, ... btw, are you working with MacOS or Windows?)
     
  5. amirblum_nogame

    amirblum_nogame

    Joined:
    Mar 1, 2017
    Posts:
    3
    Yes, I get the line "TexturePacker Importer Initialized" (twice, actually). Still doesn't splitting the sprite.
    I've tried it on Windows. I can try it on Mac on Sunday when I'm back in the office.
     
  6. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    We've fixed this issue, an updated TexturePacker Importer version will be available in the asset store soon.
     
  7. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Hey there,

    do you have any plans to support the new Unity 2017 Spritepacker?
     
  8. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Hi,

    TexturePacker is an alternative to Unity's internal sprite packer. What support do you expect?
     
  9. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    To be able to reference the scripts with the new API or is this already possible with TexturePacker?
     
  10. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    What scripts with what API?? SpriteAtlas.GetSprites() won't work, but you can access the sprites from script using Resources.LoadAll():

    Code (csharp):
    1.     Sprite[] sprites = Resources.LoadAll<Sprite>(pathToTexture);
     
    glenneroo likes this.
  11. tigerjk0409

    tigerjk0409

    Joined:
    Aug 17, 2012
    Posts:
    2
    importer doesn't work at 2017.01. and newer vision still doesn't work. plz fix this. it was work for unity 5.6
     
  12. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Hi,
    what exactly doesn't work? What .NET version and operating system are you using?

    Can you please close Unity, open the file codeandweb.com/Editor/SettingsTexturePackerImporter.txt with a text editor and change "enableDebugOutput: 0" to "1". After starting Unity, is there a line "TexturePacker Importer initialized" in the console log?

    Please send the console log and the problem you've observed to support@codeandweb.com, thanks.
     
  13. mistergreen2016

    mistergreen2016

    Joined:
    Dec 4, 2016
    Posts:
    226
    Any Ideas on how to use variant spriteSheets (different resolutions) in Variant AssetBundle in Unity?
    The atlases (.tpsheet) can't be included in the AssetBundles, only images.
     
  14. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    The slicing of the sprite sheet is done by the editor as soon as you add / change a sprite sheet, the bounding rectangles of the individual sprites are stored in the .meta file of the texture. the tpsheet file is not required at runtime.
     
  15. guido-nautilus

    guido-nautilus

    Joined:
    Apr 12, 2017
    Posts:
    1
    Hi ! I am using this asset and it's awesome thank you very much !
    Since some days ago, I can't export from texture packer to unity new atlases, in unity i have this error:

    IOException: Sharing violation on path

    Do you know something about it?

    Thank you in advance!
     
  16. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Can you please check if you have read+write permission for this directory and its files: "Assets/codeandweb.com/Editor/
     
  17. mistergreen2016

    mistergreen2016

    Joined:
    Dec 4, 2016
    Posts:
    226
    Hey, I'm using Unity 2017.2.

    I can't 'apply' physics shapes to the sprite sheet, in the sprite editor. The changes aren't saved and every time I go back to edit the physics shapes, it regenerate automatically the physics shape like it has never been edited before.

    The physics shape apply fine to a single sprite but doesn't work on a sprite sheet created by the texture packer plugin.

    I tried creating manually sprites from a spritesheet from Unity's Sprite Editor and applying physics shapes. It works fine.
     
    Last edited: Nov 6, 2017
  18. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Hm, this is indeed a problem. Unity resets the physics shapes each time new sprite coordinates are set on Unity's TextureImporter class. I can implement a fix that this is only done if the sprites on the sheet have been changed (current implementation updates the coordinates a bit to often), this would keep your physics shapes as long as you do not touch the sprite sheet.
    But I would prefer a solution which doesn't reset the physics shapes even when updating the sheet... at the moment I have no idea how to implement this :-(
     
  19. anthony_q

    anthony_q

    Joined:
    Oct 28, 2017
    Posts:
    6
    Hi! Thank you for your great work of TexturePacker. We use this tool for UI part and we've implemented a PolyImage to add support Image in UGUI. This helps a lot with both memory and performance.
    demo.png

    If you are interested, you can find more info here PolyImage - Support Polygon Sprite in UGUI Image
     
  20. CodeAndWeb

    CodeAndWeb

    Joined:
    Jul 31, 2014
    Posts:
    60
  21. KingShadowClock

    KingShadowClock

    Joined:
    Feb 17, 2017
    Posts:
    10
    TexturePacker still seems to be broken for 2017.3 : (. I originally was running off of TP two updates ago for 2017.3.b1 for Windows 8. It seemed to work fine except for a few glitches here and there (having to publish, trim names and republish again for it to work properly.) Collab somewhere down the line started to really not like this behavior and texture packer completely broke sprite names which broke connections down the line.

    I tried updating to the next version which created a reeeeeeeaally harmful loop when "reimporting" the sprite sheets with the new TP. This loop will show the "Hold On" window with the green progress bar moving extremely stagnant, reaching half way then freezing for a few minutes, moving a little bit more and then stopping. Leaving this at this state for over 8+ hours my computer crashes Unity stating I've run out of memory....and I can assure I shouldn't have ^^" with over 100gb of storage left for 20 512x512 sprite sheets.

    I am also using Unet 4.6 as our saving method requires us to do so. Is there any quick fixes to this? Since I've updated there is almost no way of going back, and since I am using Anima2D....it's required that I open the sprite sheet (which is causing it to re-import).
     
    Last edited: Jan 29, 2018
  22. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Hi, I'm sorry that the importer causes such a pain :-(
    Can you help us to reproduce this issue? If you create an new project, add TexturePacker Importer and a sprite sheet and reimport, does this trigger the infinite loop, too?

    Can you please close Unity, open the file Assets/codeandweb.com/Editor/SettingsTexturePackerImporter.txt with a text editor and change "enableDebugOutput: 0" to "1". The importer will write some debug output to the editor console while loading a sprite sheet. If you can't access the console due to the hanging Unity UI, the log file is also stored in ~/Library/Logs/Unity/Editor.log (Mac) or C:\Users\<user>\AppData\Local\Unity\Editor (Windows). Please send us this log to support@codeandweb.com. Thanks!
     
  23. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    We've analyzed KingShadowClocks problem, it was caused by an incompatibility between Anima2D and TexturePacker Importer.

    We've already submitted a fixed version, it will be available in the asset store within the next few days.
     
  24. GabrielAguiarProductions

    GabrielAguiarProductions

    Joined:
    Aug 29, 2017
    Posts:
    8
    This is a fantastic asset, but it doesn't work with Anima2D.
    Changing something in the sprite sheet of a character (which is common - adding a hat, pants, etc) breaks everything.

    Here's what happens:

    1)Create a sprite sheet of a character in TexturePacker and export it to Unity;
    2)Great, Anima2D detects each sprite/texture and you can create a SpriteMesh;
    3)Cool now we can create the bones, do the animations, etc...
    4)Try to add something new to the sprite sheet in TexturePacker. Export to Unity again, and everything crumbles apart.
    5)Anima2D doesn't know where each sprite/texture is anymore. And the work of days is broken.

    Please, let me know if there is a fix.
    Thanks!
     
  25. CodeAndWeb

    CodeAndWeb

    Joined:
    Jul 31, 2014
    Posts:
    60
    Anima is currently indeed a problem. Parts of it do the same as TexturePacker and now both tools interfere. Anima clones the meshes that TexturePacker creates and allows you to modify them but does not refresh the positions after we update the sprites.
     
  26. GabrielAguiarProductions

    GabrielAguiarProductions

    Joined:
    Aug 29, 2017
    Posts:
    8
    Exactly, Anima doesn't update the changes and they kinda conflit with each other.
    It's such a shame, this two tools together are a great addition for a 2d project.

    Thanks for the prompt answer, just wanted to be sure the problem is know and if someone had any fix.
     
  27. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    390
    I'm posting this problem here, since perhaps if there is a solution, it will be useful to others. I'm using Unity 2017.4.11 (LTS) and I've got the TexturePackerImporter plugin installed, but I'm not seeing the "Texture2D spritesheet" Texture Type as the tutorial explains I should. However, all the sprite names, polygon meshes, and animations seem to be importing correctly with the "Sprite (2D and UI)" texture type.

    However, I'm seeing an exception in the editor:

    NullReferenceException: Object reference not set to an instance of an object
    UnityEngine.GUILayout.Space (Single pixels) (at /Users/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:271)
    UnityEditor.TextureImporterInspector.ShowPlatformSpecificSettings () (at /Users/builduser/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1550)
    UnityEditor.TextureImporterInspector.OnInspectorGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/ImportSettings/TextureImporterInspector.cs:1386)
    UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1253)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Thanks for the help.
     
  28. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Which data format have you selected in TexturePacker to create your sprite sheet? It is important that you choose "Unity Texture2D sprite sheet"! (click on the "Data format" button at the top of the "Settings" side bar of the TexturePacker UI to change the format). When publishing your sprite sheet TexturePacker will create a data file with extension .tpsheet, can you please verify this? If this file is missing the TexturePacker Importer plugin of the Unity Editor will not be able to import the sprite sheet.

    What action triggers the exception from above? It doesn't contain any class of TexturePacker Importer, I'm not sure if our importer is responsible for this exception.
     
  29. tessellation

    tessellation

    Joined:
    Aug 11, 2015
    Posts:
    390
    @j-o-e That is correct, there is a .tpsheet there in addition to the PNG. This crash happens whenever the sheet is imported/created. It does not happen for any of my other hundreds of textures, sprites, or standard Unity spritesheets. It only happens to .tpsheet textures. Given this, I don't see how it *cannot* be related to the .tpsheet textures or the unlikely chance of a conflict between this and some other editor plug-in.

    The exception appears to happen when drawing the standard texture importer UI after completing the tpsheet import. Isn't it possible that your importer is setting some invalid values that are causing the exception? Are you not able to reproduce this in Unity 2017.4.11? I'd be happy to send you a PNG and .tpsheet that causes the exception if you contact me through the support email I sent.
     
  30. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    @tessellation: I can't reproduce this problem (Unity 2017.4.12 @ MacOS 10.13). What other plugins are you using? Anima2D? Spine? Can you reproduce the issue with a new project, containing just TexturePackerImporter and a spritesheet + tpsheet? Can you please send the complete editor log + sprite sheet + tpsheet to support@codeandweb.com?
     
  31. LavaPatrik

    LavaPatrik

    Joined:
    Feb 21, 2017
    Posts:
    12
    I know this already been asked a couple of times in this thread, but I can't seem to find any answers...

    Does SettingsTexturePackerImporter.txt need to be commited to version control, or can each developer just generate their own?

    I'm asking because SettingsTexturePackerImporter.txt is causing havoc as its being changed each and every time unity compiles something. I can't even count the number of times I've had to discard such changes manually.
     
  32. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    What differences do you observe in this file? In theory it should only change if you add / remove sprite sheets to your unity project.
     
  33. pit-travis

    pit-travis

    Joined:
    Sep 17, 2018
    Posts:
    14
    Hi, a question regarding the sprite names in the exported sprite sheet:

    Can you import spritesheets into unity and have sprites in them preserve the folder structure naming? E.g. "test/asdf/sprite1.png" etc.

    It works fine when I export to other platforms - e.g. exporting to .plist and taking a quick look at it confirms that the sprite names are just folder structures.

    However exporting to unity in the resulting unity sprite atlas the names get replaced with a format that seems to replace the / in the path with "-" and removes the file endings.

    I create the spritesheet via a command line batch script, and from what I can see there's no command line option to preserve folder structures (seems like it was intended to be the default behaviour). Does unity not allow file endings and '/' in sprite names?
     
  34. petersrin

    petersrin

    Joined:
    Mar 20, 2018
    Posts:
    11
    I'm getting a console error: texturepacker Importer settings has changed during import, but the meta file was also modified.

    It doesn't seem to be negatively affecting anything in-game but does clog up the console and either signifies user error or a bug. Any idea what's causing it? 2018.3.0f2 here. Thanks!
     
  35. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Thats right, we've observed problems with sprite names containing slashes, especially when using them in animations. That's why the importer replaces "/" with "-"

    Thats not an error message generated by TexturePacker Importer...
    Can you please send the full editor log to support@codeandweb.com, I will have a look on it. (right-click on "Console" tab -> "Open Editor Log")
     
  36. pit-travis

    pit-travis

    Joined:
    Sep 17, 2018
    Posts:
    14
    @j-o-e Thanks. It's not a huge problem.

    Another question: Is there a way to import atlases as actual unity sprite atlases? With default settings it seems like they are imported as a sprite with the 'multiple sprites' setting. Those can be converted into sprite atlases easily enough - just create a sprite atlas and add the 'atlas sprite' to it, but it would be neat if this process was automated. Sprite Atlases are mostly needed because they make it easy to access textures by their path/name in Unity.

    edit: Also is there a chance we could change the pivot of the sprites to something else when importing?
     
    Last edited: Mar 6, 2019
  37. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    @pit-travis if you add the sprite sheet generated with TexturePacker to a Unity's SpriteAtlas the sprites will be repacked by unity. The preferred way would be to use the sheet already packed by TexturePacker, but Unity doesn't provide an API for that at the moment.

    Regarding pivot points: If you disable pivot points in TexturePacker they won't be exported to the .tpsheet file. In this case you can edit them directly in Unity, TexturePacker Importer won't touch them.
     
  38. pit-travis

    pit-travis

    Joined:
    Sep 17, 2018
    Posts:
    14
    @j-o-e Thanks for the responses again.

    Another question, when trimming transparency from sprites is there a way to retrieve information about what the original pre-trimmed size of the sprite was? I know the exporter for some other frameworks supports this (.plist for example) but I'm not sure if that information is still around in Unity.
     
  39. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Unity doesn't support trimmed sprites when importing sprite sheets, so the original size isn't available in Unity.
    (If you enable trimming in TexturePacker the pivot points are automatically adapted to ensure that a trimmed sprite is properly positioned, even if Unity does not know that the sprite was trimmed previously.)
     
  40. jacwilso-tt

    jacwilso-tt

    Joined:
    Jan 14, 2019
    Posts:
    3
    This question has been asked at least 3 times with no solid answer. Can you ignore SettingsTexturePackerImporter.txt in version control or not?
     
  41. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    Please add it to version control, you shouldn't ignore it.
     
  42. GreenPixel-ltd

    GreenPixel-ltd

    Joined:
    Jul 17, 2016
    Posts:
    17
    Just one question: where is multi-pack support, without it texture packer is useless
     
  43. CodeAndWeb

    CodeAndWeb

    Joined:
    Jul 31, 2014
    Posts:
    60
    Multipack is a convenience function which works with several frameworks. The disadvantage is that this might lead to minor performance because it can quickly introduce additional draw calls.

    It's way better to control the sheet content yourself. E.g., but everything that is in the background in one sheet, next foreground, characters and so on.

    The problem is Unity's API:
    Unity references sprites within a sprite sheet. There's no API I know of which would allow us to change the sprite sheet and update the reference.
    The result would be that the asset breaks each time a sprite switches to another texture.

    I propose to create .tps files from a folder for each layer/sheet and run TexturePacker from a script to build all of them.
     
  44. GreenPixel-ltd

    GreenPixel-ltd

    Joined:
    Jul 17, 2016
    Posts:
    17
    How about to make your own file to save all data for you script to handle that situation
     
  45. CodeAndWeb

    CodeAndWeb

    Joined:
    Jul 31, 2014
    Posts:
    60
    Can you explain a bit more in detail what you mean?
     
  46. bluntcoder

    bluntcoder

    Joined:
    Aug 16, 2013
    Posts:
    2
    Hi CodeAndWeb,

    Glad to see you are fully supporting Unity with your fantastic tool. I've been using it for years back in my Flash days and now slowly converting some of my game IP to unity. So it's time to start using TP again!

    The mesh optimizer is a great step in the right direction for efficiency. I'm wondering have you considered implementing this sprite dicing feature for mesh optimization? Like so: https://www.2dtoolkit.com/docs/latest/advanced/sprite_dicing.html

    That would take mesh optimization to the next level.

    Thanks!
     
  47. CodeAndWeb

    CodeAndWeb

    Joined:
    Jul 31, 2014
    Posts:
    60
    Yes - we have. It would be possible by using the sprite sheet splitter in TexturePacker which creates rectangular shapes and adding them all too TexturePacker.

    But you currently have to re-build the complete sprite yourself.

    The issue is the following: We've implemented the import as a pure editor feature. You don't need any additional code modules from us at runtime. But: There's no way to set separate coordinates for sprite and UVs. The sprite and the texture share the same mesh. This means that we can't compose the sprite from the mesh directly.
     
  48. rubeng

    rubeng

    Joined:
    Apr 20, 2013
    Posts:
    60
    Hi, whenever we try to work on branches, we have issues with the SettingsTexturePackerImporter.txt file, we get merge conflicts, and when we try to solve them manually, we sometimes end up with "IOException: Sharing violation on path ***/Assets/codeandweb.com/Editor/SettingsTexturePackerImporter.txt"

    and the SettingsTexturePackerImporter file ends up being empty (by unity or the importer, not sure)

    One of the teams working here, ignored the file and don't seem to be having issues with doing that (and they avoid all the merge problems), could you please tell us, what is this file exactly used for, and what risks we are accepting if we ignore it?

    Thanks for your help, and TexturePacker rocks

    just in case this helps

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
    System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    TPImporter.SettingsDatabase.swap[T] (System.Collections.Generic.List`1[T] list, System.Int32 index1, System.Int32 index2) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.SettingsDatabase.sortLists () (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.SettingsDatabase.saveDatabase () (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.SettingsDatabase.addSheet (System.String dataFile, System.String textureFile, System.String normalmapFile) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.SpritesheetCollection.loadSheetData (System.String dataFile) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.TexturePackerImporter.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    UnityEditor.AssetPostprocessingInternal.InvokeMethod (System.Reflection.MethodInfo method, System.Object[] args) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:633)
    UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:144)


    IOException: Sharing violation on path ****/Assets/codeandweb.com/Editor/SettingsTexturePackerImporter.txt
    System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
    System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.IO.StreamWriter..ctor (System.String path) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string)
    TPImporter.SettingsDatabase.saveDatabase () (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.SettingsDatabase.removeSheet (System.String dataFile, System.Boolean save) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.SpritesheetCollection.unloadSheetData (System.String dataFile) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.SpritesheetCollection.loadSheetData (System.String dataFile) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.SpritesheetCollection.sheetInfoForSpriteFile (System.String textureFile) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    TPImporter.TexturePackerImporter.OnPostprocessTexture (UnityEngine.Texture2D texture) (at <d8ca7ffa70054dc1842f85b7b43794ca>:0)
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0)
    UnityEditor.AssetPostprocessingInternal.InvokeMethodIfAvailable (System.Object target, System.String methodName, System.Object[] args) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:651)
    UnityEditor.AssetPostprocessingInternal.PostprocessTexture (UnityEngine.Texture2D tex, System.String pathName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:536)
     
    hamza_unity995 likes this.
  49. j-o-e

    j-o-e

    Joined:
    Mar 11, 2014
    Posts:
    36
    In some very rare cases (out of memory while loading assets, some cloud build setups) the sprite sheet data isn't available when (re)importing a sprite sheet. The SettingsTexturePackerImporter.txt is just a fallback to detect even these cases and fix the import process. In most cases you won't need this file.

    To avoid problems when merging this file:
    • close Unity before merging it
    • ensure that the 3 lists stored in this file (textures, normals, tpsheet files) have same length
     
    hamza_unity995 likes this.
  50. isaac-ashdown

    isaac-ashdown

    Joined:
    Jan 30, 2019
    Posts:
    69
    Hello,
    We have very large textures (8K) in our project, and so use Crunch Compression to make managable file sizes. This compression takes quite a while to perform, so we use the Unity Cache Server in our team so that only one developer has to wait for the crunching, and everyone else downloads the crunched texture from the Cache Server.

    This works fine for vanilla unity Sprites, but we recently switched to using texturepacker for some of our large atlases. Even though the texture settings in unity are the same, it appears that the cache server doesn't work on these crunched textures any more, and so every developer has to crunch them locally. This adds a lot to developer time.

    We're using 2019.2.3f1 and TexturePacker 5.1.1.

    Is this a known limitation of TexturePacker? Are there any plans to fix the issue?
    Thanks!