Search Unity

  1. How has 2019.2 and the beta been for you so far? Give us feedback in this thread.
    Dismiss Notice

2D Animation v2 - Preview Packages

Discussion in '2D Experimental Preview' started by rustum, Dec 17, 2018.

  1. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    I made a new backup project and re-imported the assets many times and always half of the prefabs are missing for no apparent reason. This is serious. I submitted the crashing bug Case 1140983. Any workaround for the missing PSBs prefabs?
     
  2. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    I found the root of the problem. Both the missing prefabs and the out of memory errors happen only if I delete the 'library' folder and force Unity to start serializing from the beginning. If I change platform without deleting the Library folder it works.
     
  3. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    124
  4. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I experienced with the bug with both 2018.3.10f1 and the version before it. I also made sure to use the latest version of IK/PSB/Animation packages.
     
    EvOne likes this.
  5. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    2018.3.10f1
     
  6. vahab2

    vahab2

    Joined:
    Nov 12, 2009
    Posts:
    10
    I've used 2D animation V2 in my project but don't show anything after WebGL build, I think there is an issue in library
     
  7. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I have a feature request that may already exist: I'd like to be able to put a "glow effect" around a character when the mouse hovers over them so the player can tell who is selected. Is this currently possible? How would you do this?
     
  8. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Outside of the editor, my game crashes when you try to close it, and the only way to close it is to use Ctrl+Alt+Delete. I think the preview package might be causing it? The only thing in the logs when it happens is this:

    Code (CSharp):
    1. Unloading 550 unused Assets to reduce memory usage. Loaded Objects now: 2893.
    2. Total: 4.107519 ms (FindLiveObjects: 0.351017 ms CreateObjectMapping: 0.134112 ms MarkObjects: 3.138971 ms  DeleteObjects: 0.483077 ms)
    3.  
    4. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    5. (Filename:  Line: 388)
    6.  
    7. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    8. (Filename:  Line: 390)
    9.  
    10. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    11. (Filename:  Line: 388)
    12.  
    13. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    14. (Filename:  Line: 390)
    15.  
    16. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    17. (Filename:  Line: 388)
    18.  
    19. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    20. (Filename:  Line: 390)
    21.  
    22. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    23. (Filename:  Line: 388)
    24.  
    25. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    26. (Filename:  Line: 390)
    27.  
    28. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    29. (Filename:  Line: 388)
    30.  
    31. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    32. (Filename:  Line: 390)
    33.  
    34. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    35. (Filename:  Line: 388)
    36.  
    37. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    38. (Filename:  Line: 390)
    39.  
    40. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    41. (Filename:  Line: 388)
    42.  
    43. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    44. (Filename:  Line: 390)
    45.  
    46. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    47. (Filename:  Line: 388)
    48.  
    49. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    50. (Filename:  Line: 390)
    51.  
    52. Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak
    53. (Filename:  Line: 388)
    54.  
    55. To Debug, enable the define: TLA_DEBUG_STACK_LEAK in ThreadsafeLinearAllocator.cpp. This will output the callstacks of the leaked allocations
    56. (Filename:  Line: 390)
    I've googled this warning, and can't figure out what to do with it to provide more info for you guys. Let me know how I can help.

    Thanks
     
    UnityIco likes this.
  9. HarryCodder

    HarryCodder

    Joined:
    Feb 20, 2015
    Posts:
    67
    Hi,
    I'm having the same problem, I opened a discussion about it there if you're interested :
    https://forum.unity.com/threads/psdimporter-spriteskin-crash-when-exiting-a-build-on-windows.651661/
     
    AcademyOfFetishes likes this.
  10. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    I have a weird error in Windows Standalone player using the latest Unity.
    Application.Quit() hangs the program and does not exit in Windows 10 after you seen a view with many PSBs loaded. If not seen it exits ok.
    Here is the windows crash:

    Code (CSharp):
    1. Source
    2. xxx.exe
    3.  
    4. Summary
    5. Stopped responding and was closed
    6.  
    7. Date
    8. 3/4/2019 15:00
    9.  
    10. Status
    11. Report sent
    12.  
    13. Description
    14. A problem caused this program to stop interacting with Windows.
    15. Faulting Application Path:    C:\PROJECTS\Unity\xxx\RUN\Desktop\xxx.exe
    16.  
    17. Problem signature
    18. Problem Event Name:    AppHangB1
    19. Application Name:    xxx.exe
    20. Application Version:    2018.3.10.36322
    21. Application Timestamp:    5c98a4d3
    22. Hang Signature:    a674
    23. Hang Type:    134217728
    24. OS Version:    10.0.16299.2.0.0.256.48
    25. Locale ID:    1032
    26. Additional Hang Signature 1:    a674652e790813e5fe6b6d04ce70bb8f
    27. Additional Hang Signature 2:    5b43
    28. Additional Hang Signature 3:    5b43dbf247d63ef67db1a15875902555
    29. Additional Hang Signature 4:    a674
    30. Additional Hang Signature 5:    a674652e790813e5fe6b6d04ce70bb8f
    31. Additional Hang Signature 6:    5b43
    32. Additional Hang Signature 7:    5b43dbf247d63ef67db1a15875902555
    33.  
    34. Extra information about the problem
    35. Bucket ID:    fb627758d8f5b857f6606ff9a860c93e (1612411784661092670)
    36.  
     
    AcademyOfFetishes likes this.
  11. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I think that's the same thing we're talking about above.
     
  12. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    Sorry I havent read this
     
  13. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    If I zoom in too far in the scene view, the 2d Animation GO disappears. I don't think this normally happens on other GOs. Is this a bug?

    Here's a gif showing it off. Note that the character's clothes are slightly NSFW, but this doesn't show any nudity. I'm going to split up the URL to the gif so it doesn't render for everyone: https:// gfycat.com/OblongFearfulElectriceel
     
  14. raganvald

    raganvald

    Joined:
    Feb 1, 2019
    Posts:
    2
    Does anyone know if there is a way to handle layers? For example if I want my characters eyes to blink independently of the run, idle, attack animations. Is it possible to do something similar as 3d with an override or additive layer. Another use case is for having throwing independent of walking, splitting the upper and lower half. If I try to use the layers it doesnt seem to work because there is no way to do a Avatar Mask for 2d. I also noticed a 2d animation override script, is there any documentation on using that?

    Edit.
    Ok I figured this out. If you just setup your override animations and only animate the parts you want changed. It will not affect the other. So on your base layer you can have your standard walking. Than you can create a override layer and create a throw animation with only the arms. When the arms play it will only override the base layer arms and not the rest of the animation in the base layer.
     
    Last edited: Apr 12, 2019
  15. raganvald

    raganvald

    Joined:
    Feb 1, 2019
    Posts:
    2
    I tried to re name my *.psb file and now I get constant warning messages.

    Like the following.

    File's Layer ID is not unique. Please report to developer. 0 UpperArmRight::ElbowRight
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    How do I fix this?

    Please see image link.
     

    Attached Files:

  16. pastaluego

    pastaluego

    Joined:
    Mar 30, 2017
    Posts:
    48
    When I install the package, the first time I enter playmode suddenly started taking ~5-10 seconds, up from ~1-2. But subsequent enterings of playmode go back down to ~1-2. If I don't go into playmode for a bit of time, the first time takes 5-10 again. When I remove the package it stops happening. Sorry if this was already brought up.

    Also my friend with the same project is also having the issue, so it could be a bug related to my specific project setup. It's not large but it's not small. I should test to see if it happens in an empty project first.
     
    AcademyOfFetishes likes this.
  17. Pudgy138

    Pudgy138

    Joined:
    Sep 10, 2018
    Posts:
    77
    When I go from Skinning Editor (Apply changes) back out to the Scene view, none of my skeletons/rigs are showing up like everyone else lol. However, when I go back into the Skinning Editor, the bones etc are all in place.

    Using Unity 2018.3
     
    Last edited: Apr 15, 2019
  18. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    some info about v2.1?
     
  19. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    171
    Is 2.1 still in Preview? I think Unity should label these things like "2.1p" . Don't make me go hunt for release notes.
     
  20. Rijicho_nl

    Rijicho_nl

    Joined:
    Oct 6, 2018
    Posts:
    3
    upload_2019-4-17_19-19-50.png

    Hi,
    I installed Unity 2019.1 and updated the package to 2.1.0.
    The previous version (2.0.0) has made terrible GC Alloc for each frame, and it seems to decrease to some extent with this update, but still remains (please see the screenshot of Profiler pasted above).
    Is it difficult to avoid this allocation completely like Anima2D?
    Or are there something wrong with my settings of the systems, such as ECS?
     
  21. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    179
    Hi, please try profiling in a player build. When using native arrays the editor will show managed memory allocs that come from the editor-only safety checks.
     
    Rijicho_nl and EvOne like this.
  22. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    I installed Unity 2019.1 and updated the package to 2.1.0 and after some errors I managed to fix everything. All works well except some weird bug I cannot understand. I use animation 2d with many PSDs and all work well except one. This one shows perfectly in the Editor but when I compile for Windows or MacOS or even Android it had some parts of it missing. One time it shoes some parts and when animating one part completley disappears. I tried everything. I have to downgrade until this is fixed.
    Watch these 2 hands that are made with animation 2.1. It looks ok:

    and after a while animating:

    One part of the sprite is gone. Same thing happens later one with other parts.
    This is not my error. I have exactly the same settings in 2018.3.11 and it works perfectly.
    Also everything works as it should in the Editor, it doesnt work on the players which makes it really difficult and time consuming to find whats happening.

    Do you have any quick ideas to fix it?
     
    Last edited: Apr 18, 2019
  23. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Last edited: Apr 18, 2019
  24. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    I had this too. I installed cecil 0.1.5 and then it worked.
     
  25. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Oh, thanks. How did you install it? Did you find the dll online and drag it into your project?
     
  26. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    58
    any support for unity 2019.1 ?
     
  27. Rijicho_nl

    Rijicho_nl

    Joined:
    Oct 6, 2018
    Posts:
    3
    Thank you for answering, and I'm sorry I missed the check after build... there is no problem.

    But now, I found another problem.
    Installing 2D Animation 2.1.0 conflicts with TilemapRenderer, like this:

    wrong.png

    How to reproduce this:
    1. Create a new Unity project with Unity 2019.1.0f2 (3D template).
    2. Install the package "2D Animation" (2.1.0-preview.2) with PackageManagerWindow.
    3. Put any image file into the project and import as a Sprite (2D and UI).
    4. Create a new TilePalette.
    5. D&D the image into the palette to generate a new tile asset.
    6. The tile placed in the palette looks terrible.
    7. Create a Tilemap and draw something with the tile.
    8. The tiles placed in the scene view also seem to be broken.

    This is the tile image used in the screenshot: block.png

    Here is more detailed information as a bug report.
    https://fogbugz.unity3d.com/default.asp?1146955_agfpa77b4hcmpn55

    (5/16 edited)
    The bug report above has closed, and here is the Issue Tracker of the problem.
    https://issuetracker.unity3d.com/is...-imported-with-2d-animation-package-installed
     
    Last edited: May 16, 2019
  28. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    35
    Hi All,

    It seems like when Users upgrade from 2018.3 to 2019.1,
    Multiplayer HLAPI Package has a dependency which uses mono-ceil package 0.1.5 .
    That seems to be what is causing the conflict at the moment.

    Current workaround option is to note of that dependency and upgrade the mono-ceil package to 0.1.6 via package manager.

    Do note that the new 2019.1 2D Animation Preview packages now has new dependencies like entities, burst and mathematics.
     
  29. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    35
    Apologizes on this, this is an interesting issue that we are currently looking at, have you reported a Bug via Bug reporter yet?

    If we have a small sample project in the bug report, this helps us to debug the issue much faster.

    In the mean time, perhaps you could share more info on the missing sprite"sprite renderer" or texture settings on it? We would like to know the Sorting Order or Transform values of the sprites that have issues.
     
    Last edited: Apr 23, 2019
  30. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    35
    Yes! Do try to grab the latest packages for 2019.1 via Package Manager.
    Unity Editor: "Window -> Package Manager"

    - 2D Animation 2.1.0-preview.2
    - 2D IK 1.1.0-preview.1
    - 2D PSD Importer 1.1.0-preview.1
     
    AAK_Lebanon likes this.
  31. Democore

    Democore

    Joined:
    Mar 8, 2016
    Posts:
    9
    Hi there!

    We've encounterted a problem that multiplies values of animations by 10^something when using bones from the 2d Animation package. Having skimmed the thread so far, I haven't seen anyone report this yet. Is this a known issue?

    The problem was also already reported in greater detail here.

    Otherwise fantastic Package! ♥
     
  32. dquek

    dquek

    Unity Technologies

    Joined:
    Apr 17, 2018
    Posts:
    35
    Hi there!

    Thanks for giving us feedback on it! :)

    On the problem you mentioned, did you try using absolute values in the timeline yet?
    That might help solve your issue.
     
  33. Democore

    Democore

    Joined:
    Mar 8, 2016
    Posts:
    9
    Hey there!

    Thanks for the quick response.

    The error is not present, while I change the values in the Animation window on the left side. It does however happen relieably, when I try to change values in the Scene window (by using various gizmos) or in the inspector.
     
  34. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    555
    Its not sorting, I thought that too and I removed all background to be sure and it doesnt show. About transform I dont know because as I said this doesnt appear in the editor only on players.

    I didnt file a but and the project is not small.
    I will tell you the sorting order value and transform values.
     
  35. bigbadzone

    bigbadzone

    Joined:
    Jan 14, 2018
    Posts:
    16
    Is it possible (through a simple script) to swap sprites at runtime without needing to copy/paste the bones and mesh of each new sprite over in the sprite editor for each new sprite? I want to be able to maintain the bone and mesh structure of each sprite when I swap them, where the image transparencies are identical. Is there currently no support for this, is there a simple fix I'm missing, and/or sprite swapping is being worked on?
     
    Last edited: May 1, 2019
  36. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    179
    Hi, what version of Unity are you using? Looks like the serialization bug that was fixed in 2018.3.11
     
  37. Nightcap_David

    Nightcap_David

    Joined:
    Dec 14, 2017
    Posts:
    7
    Hello!

    Is it possible to have bones affect multiple sprite sheet pieces? I am trying to swap out the head on the left cop, but the rigging tool/process only seems to be affecting one head. My hope is to have one sprite sheet with multiple heads to swap out for different emotions via enable/disable the game objects (as you see me doing live in the gif on left cop).

    Thanks!
     

    Attached Files:

  38. Nightcap_David

    Nightcap_David

    Joined:
    Dec 14, 2017
    Posts:
    7
    Also, for more info, here is the Sprite Editor view...can't seem to get it to generate anything for that head behind the foreground head.

    upload_2019-5-2_18-54-20.png
     
  39. bigbadzone

    bigbadzone

    Joined:
    Jan 14, 2018
    Posts:
    16
    I haven't gotten an answer to a similar question, but the solution I have off hand is pretty simple. What you'll need to do is leave the head bone in the body empty. Then place the sprites of your different heads in the head bone game object as it's child, and change the Order In Layer of the head sprites so that they don't overlap with the body. You can then enable/disable the heads via script or during animation. From here you could give the head it's own geometry, but if you choose not to give the sprite geometry you can swap it at runtime with a script. If you want to swap a sprite with geometry you just need to make sure that both sprites have the same geometry by copy/pasting the geometry from one head to another.
     
    Last edited: May 3, 2019
  40. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    179
    Could you share with us your psb file? Thanks
     
  41. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    268
    Are there any updates on the sprite swapping / skins workflow? I remember reading that was hopefully going into preview alongside 2019.1?
     
    bigbadzone and rushk1 like this.
  42. Democore

    Democore

    Joined:
    Mar 8, 2016
    Posts:
    9
    That might actually be it, I'm using 2018.3.5f1! I'll try it and get back to you as soon as I can manage to update!
     
  43. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,596
    It cant go into preview while it forces you to use PSB files, they need to make it be able to use imported sprites first (like the rest of the engine does) otherwise it is at odds with the rest of the engine. Currently you cannot use any 2D assets or any normal assets with this system which makes it pretty unusable for a lot of people
     
    EvOne likes this.
  44. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    268
    Of course it can, that's part-and-parcel of it being in "preview". When it comes out of preview, I would expect it to work with all other Unity-supported image file formats.

    In the current preview, in order to use the character rigging, I have to use PSBs for our characters anyway, so I'd have no problem if the system continued to require PSBs for any sprites I want to swap onto those characters, for the remainder of the time its in preview.

    The requirement for PSBs is entirely superficial until it can replace the PSD importer anyway:

     
  45. superchop

    superchop

    Joined:
    Apr 27, 2011
    Posts:
    59
    I'm having a similar issue, but in my case the bones are indeed "touching"/overlapping the mesh. I have several bones touching the selected mesh, but when I try to auto-generate the weights, it only uses one of those bones (even after I manually set those bones as bone enfluencers on that mesh).
    Before auto-weights:
    before-auto-weights.PNG
    After auto-weights: after-auto-weights.PNG

    Am I doing something wrong? I've done this several times before on other psb's with good/expected results, but sometimes this happens and I can't get auto-generate to respect/use the touching or manually set bone influencers. It's nearly impossible to manually set all the weights on more complicated rigs, so I'd love to figure this out.

    Another issue I've hit a few times is the root bone not being set properly on a SpriteSkin component. It always seems to use the first bone created as the Root Bone, as apposed to the root set in the Sprite Editor->Reparent Bone interface. This one isn't a huge deal, as I can just go to the SpriteSkin and manually set the root. But still a bit annoying.
     
  46. superchop

    superchop

    Joined:
    Apr 27, 2011
    Posts:
    59
    Ok I have some more info on this bug (at least I'd call it a bug after seeing the following):

    Auto-weights seems to work fine with certain geometry settings, and fail with subtly different geometry settings. Here it works fine:
    success-auto-weights.PNG

    But notice after adjusting the geometry settings slightly it fails. I changed Outline Detail here, but changing other settings also breaks it:
    failed-auto-weights.PNG

    It's hard to tell from looking at the geometry what the cause of the issue is, but it seems to me like the weights generator (BoundedBiharmonicWeightsGenerator?) chokes with certain types of mesh. Hopefully this extra info helps you all with debugging.
     

    Attached Files:

  47. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    124
    @superchop Thanks for the report. Is it possible we get the asset to debug at our end?
     
  48. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    179
    Hi, try cleaning up your mesh to make it a single region. Thanks.
     
  49. superchop

    superchop

    Joined:
    Apr 27, 2011
    Posts:
    59
    Thanks for the responses.

    I've attached a psb with the relevant layer. On my machine Geometry settings of 71/100/100 fail and 72/100/100 succeeds.

    Yeah I thought about that, but it was strange that it would both work and not work with multi-region meshes simply by adjusting the settings. It makes me think there's some edge-case not being accounted for. This sort of mesh will be abundant in the wild, so I'd recommend at a minimum throwing an error to the console with the above advice when the weights generation fails.

    Ideally the IWeightsGenerator would handle such a use-case, but I can't see the external BBW module code so maybe it's just not reasonable/possible to do?
     

    Attached Files:

  50. Pudgy138

    Pudgy138

    Joined:
    Sep 10, 2018
    Posts:
    77
    Do you absolutely need a PSB file or does the Animator 2D Package work with any PNG?? Because I've been using only PNGs, not any Photoshop files and I cannot get a rig to appear in the hierarchy at all, ever.
     
    EvOne likes this.