Search Unity

2D Animation v2 - Preview Packages

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

  1. UnityIco

    UnityIco

    Joined:
    Jan 5, 2017
    Posts:
    7

    Yes I did realize that. The thing is SpriteSkin kind of moves or even scales the SpriteRenderer object. So when I parent it to the bone I have to manually adjust it so it fits the SpriteRenderer. That's the part that I have to do manually.
    Either way, it's not a big deal for small amount of sprites. Thanks once again.
     
  2. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    My game has characters that wear different sets of armors. All the armor artwork isn't done yet, but I still want to put what I have into the game for people who are testing it. When more artwork is completed, how do I add the new armor sprites to the rig I have without starting from scratch creating bones/weights/animations?

    It takes me about 2 hours per character, so I don't think it's a good idea to start all over each time my artist completes some new armor artwork, but I don't know any other way I could do it besides that.
     
  3. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I don't understand what this means, but I think there's a 50/50 chance I'm already using it. Is there any documentation that teaches how this is supported?
     
    Last edited: Feb 28, 2019
  4. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    In my game you take actions and then the characters react to it with expressions: Sad, Happy, Neutral. Each of these expression is a face sprite. I'd want to replace them at run time. I think I can already do this by enabling/disabling sprites at runtime, but I find it a little clunky right now to work with this in the skinning editor. There's a lot of clicks and scanning with my eyes to find out what to make visible/invisible. This may already happen, I'm not sure, but it would be really convenient to give all these expressions the same bone influences and weights all at once.

    Oh and something that would be really nice in the skinning editor is if I could double click a sprite and then say "hide." The visibility button gives me a list of words, which isn't always as easy to use as the ability to say, "Hide this one" would be. I realize this feature would be useless to the person who has 1000s of sprites in his rig, but it'd be useful to me. I only have about 50.

    The other thing I need is the ability to put clothing on top of my characters. Sometimes articles of clothing will be full body, like a dress. Sometimes it'll be a top and a bottom. I want the player to be able to choose which top and bottom they want separately. I can solve this the same way, by enabling / disabling sprites. But I plan to make lots of different sets of clothes in the future, and I'm not sure how to deal with adding a new set of clothes. Do I have to redo my work all over? It won't be sustainable to have to redo the bones every time my artist makes new clothing.

    Since my artist and I (programmer) are remote from each other, the most convenient thing for me would be if he could send me a PSB with new sprites in it (additive, i.e., it has all the old sprites with the new sprites included), I could drag it into Unity, and it just magically uses the bones and animations I have set up from the last rigging I did. I don't know if this is even possible, but it would be great. That way, all I have to do is take the new file, drag it into my project, and voila, that character has new clothes that work. The only thing I would have to do is code when to enable/disable them.

    EDIT: I think I figured out this last part on my own. You can import a new PSB, go to the old one's skinning editor, hit copy, paste it into your new PSB. When you hit apply, the weights and mesh get copied over too. I'm not sure how to reuse the animations, but I have a feeling it's similarly easy.
     
    Last edited: Feb 28, 2019
  5. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    178
    Thanks for sharing your use-cases on sprite-swapping!
    Regarding updating the PSB, replacing the old one with the new one should be enough. The rig data is stored in the .meta file. PSDImporter should be able to incorporate the new layers as new sprites. If that doesn't happen, please report a bug. Animations will be compatible as long as the hierarchy of your prefab hasn't changed. Adding new sprites should not break your old hierarchy.
     
    AcademyOfFetishes likes this.
  6. Sam_Ooi

    Sam_Ooi

    Unity Technologies

    Joined:
    Mar 5, 2018
    Posts:
    14
  7. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    What do you mean by "replacing the old one with the new one"? When I dragged in the new one, it created a brand new asset. The original in the new were actually the same file on my HD. It had the same name as the original, but when I dragged it in, it incremented the name "mia_cutout2.psb" to "mia_cutout3.psb" Are you saying it should have replaced it instead, because that didn't happen. Alternatively, you could mean I'm supposed to copy the actual spritesheet from the new imported file into the original, but I'm not sure.

    Let me know if this is a bug, and I'll report it.
     
    Last edited: Mar 1, 2019
  8. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    122
    You would do that by overriding the original file with the updated file from Finder/Explorer
     
    AcademyOfFetishes likes this.
  9. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Oh, I never would have guessed that. I'll try it out tomorrow and check if it works. But since I've never done it that way, I have no reason to believe it wouldn't.
     
  10. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I can't figure out how to hide the effector gizmos. Is that possible?
     
  11. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    So I don't know if this is a good test because I had no changes in my sprite sheet, but I tried it with the same sprite sheet I already had and everything worked fine.
     
  12. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    The devs seem interested in use cases, so I wanted to share one of mine. I've got a character whose face looks like this:



    I want to have an animation where she flicks her head to the side and her hair flips all the way around her head. I can probably do some of this with bones, but I don't think it'll look that good. What would probably be best is some traditional frame-by-frame animation, where the hair sprite is changed throughout the head flick. Hope that helps.
     
    Last edited: Mar 2, 2019
  13. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    261
    We've been playing with these new tools for the last couple of days, and they look like they're really solidly built and will integrate nicely with the rest of the Unity workflow, but there's a big snag in how closed off a lot of it is at the moment.

    I actually hope we've missed some major part of the pipeline which makes my comments redundant, as that'd mean we have basically no qualms with the tools :)

    Regarding sprite swapping / skinning, we have some thoughts. I know the package doesn't currently support it, but it seems even through custom code / tooling it's nigh impossible to get this working in a relatively straightforward manner. Even if you plan to have in-built sprite set swapping, I would hope it'd be possible for us to roll our own approach too.

    We think the association between a sprite and mesh is much too tight and restrictive at the moment. Here, Sprites "own" the meshes and other information they need to deform, which complicates things. Spine and other competitors typically allow you to create meshes on a template sprite, which can be overriden via a socket or some kind of "target slot", to switch the sprite out on that mesh. The mesh is skinned independently from the sprite. This alleviates any coupling between sprite and animation.

    This tight association currently extends even further where the PSB file is controlling not only the import and atlassing options, but also knows about character rigs / bone information. Is this really appropriate? I would think a new PSD/PSB import pipeline would want to be completely separate from any character skinning pipeline, where it just generates the sprites according to import options, and can hand off all relevant information to other packages.

    We think you should be able to fully separate a rig structure from a sprite set. The rig shouldn't care what sprites you give it, because its a mesh that is tied to the bone structure. This is currently the case in your system, but for some reason the Mesh is coupled 1:1 with the sprite, and every sprite needs its own Mesh / skinning data.

    What if a Sprite could have its own MeshData, but it could also just use an existing MeshData? 90% of the time we're going to want to swap, lets say, a shirt sprite out for 5 other kinds of shirts. Shirts all work the same, and are rigged the same, so there's really no reason they should all have their own mesh and bone/skinning data. If we could create the appropriate mesh for one and then reuse it across all other shirts, that would be ideal.

    For our project, we want to be able to swap out dozens of chest armour pieces. We don't want to be creating meshes for every single sprite, where many are functionally identical, and then also recreating the bone structure and weighting them appropriately for every single sprite.

    As I said, I understand you are working on support for sprite swapping, but please consider whether you're leaving the API open to people rolling their own system too, as it's obviously quite a variable thing game-to-game. Currently it's even a pain to just transfer all mesh information from one PSB / sprite set to another so that you could swap the sprites on a rig (almost all the crucial MeshData Get/Set related methods are tucked away in internal classes).

    Just some thoughts. We really like all the actual tooling (mesh editing is great, editor is simple and nicely laid out etc), so it'd be a real shame if we couldn't leverage it. There's just several important things hidden away from us at the moment which are making things a bit trickier :(
     
    Betzalel, AcademyOfFetishes and EvOne like this.
  14. UnityIco

    UnityIco

    Joined:
    Jan 5, 2017
    Posts:
    7
    First of all good day.

    I got an issue with job allocations leaking if I use a rigidbody2D on a sprite with animations. This happens on deactivation of the gameobject. It only happens on deactivating objects animated with Animation package.


    The most likely cause is the spriteskin script. But I am not to sure. Do you have a way to solve this?
    Thanks for taking the time to respond to all of us.
     
  15. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Is that this warning:

    I get this without using rigidbody2D on my sprite. What I'm doing is, through a script, I set one sprite to active and two to inactive. Until I read your comment, I didn't realize it was due to the preview package, but it seems to be.
     
  16. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I have the same needs. My characters will have multiple variations of shirts. A lot of them will be made out of cotton, so they'll want to all use the same mesh/bones, but there might be some made of plate metal, and those would probably want different mesh/bones.

    I have no experience with other tools like spine, so I have no frame of reference. It feels like I can work with this tool to achieve this, I'd just have to create mesh/bones for each sprite. I guess you're saying that's very labor intensive compared to competitors.

    I have an unrelated feature request that may already exist: I'd really like a keyboard shortcut to hide a sprite/bones. You can do it from the tree view, but I find it challenging to match the name of the sprite/bone to what I'm seeing. 9 times out of 10, I see with my eyes what I want to hide. If I could just put my cursor over a sprite/bone and press H to hide it, that'd be a lot easier than searching through a list of things.
     
    Betzalel and EvOne like this.
  17. Betzalel

    Betzalel

    Joined:
    Dec 3, 2017
    Posts:
    15

    agreed!
     
  18. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    122
    We will take a look into this. Thanks for the report!
     
  19. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    122
    This is on our roadmap of things to design. Stay tune!
     
  20. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    122
    Thanks again for the suggestion. We will look into it. At the mean time, when you select a bone or a Sprite, the Visibility Window should auto select them as well so you should be able to find it easier on the list. If this is not happening, do let us know.
     
    AcademyOfFetishes likes this.
  21. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    246
    FYI Unity guys, there seems to be a conflict between Animation v2.1 and com.unity.multiplayer-hlapi package. Complains that two copies of the cecil dll are trying to be imported. Is there are workaround for this? I have an existing HLAPI project and was hoping to finally integrate the new animation stuff.

    ---edit---

    Turns out the conflict is with the entites package which is a dependency of the animation system. My fix was to update the dependency version in HLAPI: https://github.com/angusmf/HLAPI-ex/commit/7994cd7b6f45ee3c3e0648e39b9159d1a5430608
     
    Last edited: Mar 7, 2019
  22. UnityIco

    UnityIco

    Joined:
    Jan 5, 2017
    Posts:
    7
    You are right it's not the rigidbody. But it is something about activation and deactivation.
    @Leo-Yaik Tagged you so that I don't mislead you with the rigidbody. What I am doing is object pooling when this warning occurs.
     
  23. george_00

    george_00

    Joined:
    Oct 23, 2015
    Posts:
    19
    I get an error message referencing the .psb file when I try to create an iOS build - "DXT5 compressed textures are not supported when publishing to iPhone"
    Is there a way around this, or is iPhone not supported?
     
  24. scorp2007

    scorp2007

    Joined:
    Aug 17, 2014
    Posts:
    21
    There is an animation in the animator that uses bone bone_2, why can't I control this bone from code, even if the animation is not in use at the moment? A serious problem arises, in Spine such a problem is solved that you can put a bone into another parental bone, but in Unity this is impossible to do. Please, help.

    I added a video. Look, I turn the torso of the character behind the mouse bone_2, when I manipulate this bone (bone_2) in the animation, the torso (bone_2) no longer rotates behind the mouse, even when the animation is not playing (kick animation).

     
    Last edited: Mar 13, 2019
    m9731526 likes this.
  25. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    178
    Hi, please file a bug report so we can properly solve it. Thanks.

    I think it is because "write defaults" is enabled in your animation state https://docs.unity3d.com/Manual/class-State.html and your code is not running in a late-update.
     
  26. scorp2007

    scorp2007

    Joined:
    Aug 17, 2014
    Posts:
    21
    When I turned off the tick "Write Default" on the kick animation, nothing changed, the problem remains the same.

    I read an article about such a problem in the Spine+Unity, there the developer also could not combine the control with the mouse and the ready-made animations, but in the end the solution was quite simple there - he placed the key bones in other bones, so he could manage the parent bones and he did not lose the animation, in the current Unity-system it is impossible to do this.

    although maybe I’m wrong and here, too, you can do so, make 2 bones, 1 parent, and another one to attach to it, so the parent bone will be controlled from the code, and nested bone for handmade-animations?

    I will be glad if you show any example or give a hint.
     
    Last edited: Mar 15, 2019
  27. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    178
    Did you make sure your script is using LateUpdate instead of Update?
    A good example of this is the IK solvers. They do override the animated bones and set their rotations after the Animator did his work. You can also take a look at the RotationConstraint component.
     
  28. scorp2007

    scorp2007

    Joined:
    Aug 17, 2014
    Posts:
    21
    Yes, late update. I also tried a simple experiment, turned off the effect on the bone from the code in general, started the game, ran the bone from the editor, it turns. I made an animation with this bone, turned off "write defaults", started the game, and this bone does NOT rotate from incpector parameters, that is, the animator acts on it all the time.
    It is a curious fact that this happens only with a rotation, if I change the position in animation, I can still change the position from the editor during the game.

    Sorry, I communicate with you through a translator and therefore some points may not be clear.

    I still think that the best solution would be to add an extra bone, which will be the parent of bone_2, but the problem is that the whole architecture collapses, the nested objects fall out, and also have to reconfigure solvers.
     
  29. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    My workflow right now is my artist gives me (programmer) a psb, and I animate it. I'm trying to build this sophisticated wardrobe system right now, and I might want articles of clothing to overlap in ways that my artist didn't think of. I just noticed that the "Order in Layer" setting for each sprite seems to be disabled, so I can't change it. If I want something to interact in a way that wasn't anticipated, it would be nice if I could just change this number instead of wait for him to change the layer ordering on my behalf.

    Let me use a contrived example: Imagine there's one outfit I've commissioned where someone is wearing a helmet. In another outfit, someone has a voluminous hairstyle. This could occur months apart. After I import the new work, I realize the hairstyle is on top of the helmet when rendered. I would like the player to be able to equip a hairstyle and a helmet at the same time, because the hair would look fine under the helmet, but my artist may not have considered that. It would be convenient if I could just change the "Order in Layer" to fix the issue and put the hair underneath the helmet, but right now I'd have to wait for him to do this fix for me.

    I'm happy to create a feature request if this is reasonable. Let me know.
     
  30. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    178
    Hi, could you please make a bug report using "Help->Report a bug...". Thanks!

    Hi, you should be able to change the Order in Layer in the SpriteRenderer's Inspector of the Instance in the Scene. Afterwards you have to create a Prefab Variant out of it and use that as your main character.
     
  31. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Ah! OK I hadn't thought of that. Thank you!

    ------------------------

    I have another use case: My game is going to have a wardrobe scene where you dress your character in many different ways. It'll look similar to this:

    So when you click on an article of clothing on the left, it'll enable and disable different sprites on the right. The most straightforward way of doing this would be to add a custom script to each of these gameObjects created by the PSB importer. That custom script would have fields for the name of the article of clothing, which icon to use for it, stats, etc. But I'm worried that if I add the script to the object created by the importer, they'll be wiped when I reimport a change to that PSB.

    I tested this with the same PSB I originally used (unfortunately, I don't have one with additional sprites in it) and it seemed to work fine. Is that a safe assumption to make, or should I avoid adding my own components to the PSB Importer created gameObjects?

    Update: Maybe my "straightforward" idea isn't that great. Sometimes there's a 1 to many relationship between an article of clothing and sprites. It might make more sense to have a script/scriptableobject that references a list of these PSB Importer created gameObjects. If that's the route I go down, it slightly changes my question (but I'm interested in the answer of both): Is it safe to assume after I reimport that my script/scriptableobjects will still have references to the PSB Importer created gameObjects after a reimport of a PSB?
     
    Last edited: Mar 18, 2019
  32. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Here's a continuation of what I asked earlier. I'm trying to create a wardrobe scene, as I showed above. I imported a PSB, I added bones and animations to it, etc, then I saved it as a prefab variation. I want to create a scriptableobject that represents a CharacterAccessory (e.g., a shirt, a hairstyle, etc.) I've created it like this:

    Code (CSharp):
    1. public string title;
    2. public GameObject [] gameObjects;
    That gameObjects field is supposed to reference the PSB gameObject(s) that I want to enable when you're wearing this accessory. It's an array because a shirt might be 3 sprites/gameObjects. Of course, I will be adding additional fields to this in the future, like cost, description, icon, category, etc.

    Here's the problem: I can't drag gameObjects from the variation into the scriptable object:


    I want to drag bra_1 from the left into the scriptableobject on the right, but it won't let me.

    If I take the original PSB file, I can take its bra_1 and drag it into scriptableobject, but that prefab doesn't have effectors, IK, etc.

    What's the solution to this? Is it, "never use variations?" I don't even know if that will solve the problem, because I'm not sure if you can put animations/effectors on the PSB. I tried to, but it doesn't seem to let me save the prefab after these changes:


    Can someone give me advice on how to deal with this?
     
  33. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    178
    Assets can only reference other assets, that's why you can reference the original prefab. The fact you can drag the reference you want from the prefab is accidental, because the prefab exposes the first level of the hierarchy. I suggest you to store the path of your object and get it at runtime using Transform.Find.
     
  34. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I think you're saying drag the prefab variation into a script as a reference, and then inside that script use Transform.Find to find the GOs I want to activate and deactivate? If I understand correctly, that makes sense.

    Unrelated: I have no frame of reference because I've never used Anima2D or Spine so I was hoping you could give me some advice: I'd like to make my first demo available in a month or two, and I'm not sure if I should redo my current progress in Anima2D/Spine, or if it could make sense to keep going with the 2D Animation Package. I understand there are performance issues being fixed in the next release, but my game seems to run fine, even with more 2D Animation's on the screen than I plan to have in the final version. But, since I have no frame of reference, I'm also concerned I might need a feature that I don't even know I need yet, and the preview package may not have it for a while. Is this a valid concern? So far the package seems to do everything I need. Sorry to put this question on you, I'm sure you get asked questions like this all the time.
     
  35. default_team

    default_team

    Joined:
    Dec 1, 2018
    Posts:
    9
    First of all thanks for providing us with these cool packages.

    I've been working on a 2D mobile game and experiencing a huge FPS drop similar to what scorp2007 reported in the post #46

    Initially I thought the issue was with my rig setup. But then I checked
    Unity-Technologies/2d-animation-v2-samples in GitHub and they were performing in a similar fashion.

    I'm using 2.0.0-preview.1 in Unity 2018.3.7f

    BTW how can I get com.unity.2d.animation@2.1
    I could only see 2.0.0-preview.1 in the package manager.

    Are things being improved in 2019.1. If so I'd happy to upgrade.
     
    Last edited: Mar 22, 2019
  36. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I think someone already said in this thread that it hasn't been performance tuned yet and it will be in 2019.1.
     
  37. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I have a character that has one sprite that represent the back of her skirt, but I can't get the auto weights to work correctly. Here is a picture of the highlighted sprite:



    I've said that this sprite should be influenced by the blue and orange bones. But then when I click the "Auto Weights" "Generate" button without the "Associate Bones" checkbox checked, both sides of this sprite are influenced 100% by the blue bone. Shouldn't the part on my left be influenced by the blue and the one on my right be influenced by the orange?

    Do you consider this a bug, a feature request, or neither? I can ask my artist to separate the left and right into separate layers (or just add the weights by hand), but I feel like the Auto Weights should be able to figure this out. Also, weighting by hand is pretty inconvenient in this case, because whenever I click the "Auto Weights" button again, it undoes my hand painted weights.
     
    Last edited: Mar 24, 2019
  38. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I've got this other issue. I worked on creating bones and weights for a psb, then my artist gave me an updated version. When I overwrote the original, some of the sprites were in different places and I can't seem to fix that issue.

    Here's how it looks in my artist's photoshop:



    But here's how it looks in the skinning editor:



    The weird thing is, when I double click on that floating yellow hair, it says I've double clicked on the right arm.

    I created a brand new project and dropped this PSB into it, and everything was in the correct place. So this probably has something to do with skinning a PSB then replacing it later. I guess one thing worth noting is that some of the layers were in the wrong order, so the change I had my artist make was to rearrange the layers. I had him do this because that mesh shirt was on top of the green jacket, and I wanted it the other way around. Could that be responsible for this issue?

    Since this only occurs in an existing project, I'm not sure how to give you steps to reproduce it. I'm going to copy my project as-is in case it can help you devs troubleshoot later, but for now, I think I'm just going to wipe it and drag it in, pretending that I never had this psb in the first place. That seems to work in a fresh project (update: this worked correctly. Of course, I have to recreate everything from scratch again). But, I don't think that'll be an option when I have more progress, because then I'd have to start all over with weights, animations, etc.

    Update: I see now that a lot more changed than the order of layers. The names of layers changed, too. Given that, it's pretty reasonable that Unity would get confused, but I still think it could handle this better: If a layer is renamed, perhaps it should throw away the meta data of the layer that no longer exists? Keep in mind, I have no idea what's actually going on here, yet. Here's the important question to me: If you reorder the layers and don't rename them, should things work fine?
     
    Last edited: Mar 24, 2019
  39. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    178
    Auto-weights currently only works for meshes that touch the bones. If you have isolated meshes like this you have to go manual. This might change in the future.
    Generating weights without "associate bones" will keep the bone list. In your case no weights can be generated so the weights will be initialized to the first one in the list.
    Auto-weights should be able to operate only on the selected sprite. If no sprite is selected, it offers the option to generate for all sprites. Once you manually edit the weights of a sprite, you need to be careful not to generate weights for all sprites again.
     
  40. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    OK, thanks for the info. I believe you told me this already, but I didn't get it then. I think I was confused, because I assumed the button should have no effect, when in reality it just picks the first bone influence.

    If I make this mistake, is there a way to "undo" it?

    Also, UI/UX suggestion: Hitting apply seems to make all bones/sprites visible. IMO, that's unexpected and it should either give a warning, or leave the sprites/bones hidden that were hidden before you clicked apply.

    I'm still really curious about this: If, after importing and creating bones/weights, if my artist reorders the layers but leaves the layer names the same, should things work fine?
     
  41. Leo-Yaik

    Leo-Yaik

    Unity Technologies

    Joined:
    Aug 13, 2014
    Posts:
    122
    Yes it should. The layer orders is only used to determine the draw order of the Sprites. If this is not the case, do let us know!
     
    AcademyOfFetishes likes this.
  42. default_team

    default_team

    Joined:
    Dec 1, 2018
    Posts:
    9
  43. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Thank you! It seems to work. I tested it out before I saw your reply.

    Do you want a bug report for how things function when you rename the layers? Note: I can probably give you a sample project to reproduce it, but my characters are NSFW. I'm not sure if you want that.
     
  44. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    Forgive me for quoting myself here, but I'm still concerned about the above. After hours of work on an animation, I realized that my artist combined two sprites into one layer that I'd prefer to be separate. It's these piercings on my character's face:



    I'm creating a wardrobe system for my game, and I'd like players to be able to have a nose piercing OR a lip piercing, and not be forced to have both. The solution is to split this layer into two, one per piercing. But, I'm afraid to do that because last time we renamed layers, pieces of her started moving around (see the post I'm quoting for a picture of that).

    My suggestion is that he leaves this incorrect layer as-is, and creates two new ones with different names. I'm pretty sure this will be safe, but I don't know if this solution is good when it comes to long term maintenance. I'd prefer to be able to delete the "incorrect" layer, but I don't know if that's safe.

    If you want, I can create a feature request, or perhaps you feel the image of it not working above is a bug? Let me know what you think.
     
  45. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    My artist just rearranged some layers, changed some content in an existing layer, and added 2 new layers. We didn't rename or delete any. As far as I can tell, it imported fine, but my prefab variant of the PSB file got corrupted. Here's how it looks now:


    If I revert my PSB change, it looks like this:


    Is this a known issue? It may be worth noting that I rearranged some of the SpriteRenderer Order in Layer fields on parts of the variant. I don't know if that's relevant.

    I'd really love to help out and give you what you need to troubleshoot this, but keep in mind my game is NSFW and these are the visual assets. I'm happy to share if it helps, but I don't know if your bosses would appreciate that ;)

    Update: I thought this was a good test that I should let you know about: I reverted so I can use this variant again. Then I went into it and reverted all changes on the variant, so it's exactly like the PSB. Then I dragged my new PSB into place and the prefab variant STILL became corrupted. Only this time it looks a little different:

     
    Last edited: Mar 26, 2019
  46. Wonderis

    Wonderis

    Joined:
    Jul 22, 2013
    Posts:
    2
    Hi, i have few UI/UX suggestions.
    1. Text field in button needs a bit more space.
    Need more space for text.PNG
    2. Pie icons on vertexes like in Spine2d, it would save a lot of time in riging weights (using brush helps but its not as precise) it would also help to identify which bones affects vertex.
    Pies for vertex.png
     
  47. AcademyOfFetishes

    AcademyOfFetishes

    Joined:
    Nov 16, 2018
    Posts:
    212
    I have confirmed that all I have to do is add a new layer to corrupt the prefab variant. The layer doesn't even need to have anything in it. Simply creating a new one in the PSB and saving corrupts the prefab variant. If I then delete the layer, save the PSB, and tab back to Unity, the variant works again.

    If I swap two existing layers but leave the layer names the same, the variant works fine.

    I can't tell if I'm working in an unsupported way, or if this is a bug. Can someone let me know?
     
    Last edited: Mar 26, 2019
  48. Zero9

    Zero9

    Joined:
    Nov 3, 2016
    Posts:
    1
    I'm not sure if this is a bug or if this is simply a consequence of how meshed sprites are rendered under the hood but...

    The SpriteSkin component seems to prevent the Color attribute on the SpriteRenderer of a sprite actually affecting its color at all if the SpriteRenderer has a diffuse shader/material attached to it (such as the basic SpritesDiffuse material).

    Disabling the SpriteSkin component causes the Color attribute on the SpriteRenderer to affect color changes on the sprite again, but turning the SpriteSkin back on makes the sprite appear as if the color is simply set to white (even if it isn't set to white in the Inspector).

    Is this a known effect of the SpriteSkin component? A bug? Or am I just doing something wrong?

    Other than that this tool seems absolutely amazing and I desperately want to use it, but some of the sprites I want to use it on absolutely need to be recolored.
     
  49. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    547
    I found a serious problem. I have created almost 80 PSBs each wth 2048x2048 resolution. It works ok but when I tried to change platform and it started reimporting everything it crashed out of memory. I have a Windows 10 PC with 16GB memory and all other programs were closed and it crashed again. The only solution is to remove the PSBs and import everything. Then put portions of them to import them.
     
  50. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    547
    No even with the solution I said above it doesnt work. All PSBs prefabs are broken in the scenes and I dont want to fix them one by one.