Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

PowerSprite Animator - Edit your sprite animations in style

Discussion in 'Assets and Asset Store' started by PowerhoofDave, Sep 29, 2016.

  1. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Ooh, yep that's a bug. I've DM'd you a fix, let me know if it works and I'll update on the asset store too.
     
  2. Kakapio

    Kakapio

    Joined:
    Nov 8, 2014
    Posts:
    9
    I think the 2017.3 update broke it. Some method being obsolete.

    Assets/PowerSpriteAnimator/Scripts/Editor/SpriteAnimatorTimeline.cs(386,28): error CS0619: `UnityEngine.EventType.mouseDown' is obsolete: `Use MouseDown instead (UnityUpgradable) -> MouseDown'
     
  3. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Ahh, fun! I'll be away until the new year but if you change that from .mouseDown to .MouseDown hopefully it'll work work fine, and I'll do an official update soon.
     
  4. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,188
    This asset works with the latest Unity version(s)?
     
  5. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    I haven't been testing fully with each version, but it should work, yes. Let me know if you find anything and I'll fix it up asap!
     
    BTStone and Lars-Steenhoff like this.
  6. Kakapio

    Kakapio

    Joined:
    Nov 8, 2014
    Posts:
    9
    Hey Dave,
    I think I discovered a flaw in the way PowerSprite handles the animations. I'm currently trying to combine pixel art and normal-based lighting using toon shaders, which works fine with everything but animated objects. I found that using Unity's stock animation tools would render animations properly, while PowerSprite seems to ignore the normals completely. Here's what I mean:



    The one on the left is just a normal animation in Unity. Here's the inspector for it:

    As you can see, I'm moving the light around and it's working perfectly.

    The one on the right is an animation that is being played by PowerSprite:


    I wrote it so that when I push 'U' PowerSprite starts the animation in a loop. The exact same animation as the one on the left, when used by PowerSprite, does not render normals properly. You can see the animation on the right side has no shading.

    Here's the 'Rotate Controller' script which handles playing the animation:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using PowerTools;
    4. using UnityEngine;
    5.  
    6. public class RotateController : MonoBehaviour
    7. {
    8.     public AnimationClip Spinny;
    9.  
    10.     // Use this for initialization
    11.     void Start () {
    12.      
    13.     }
    14.  
    15.     // Update is called once per frame
    16.     void Update ()
    17.     {
    18.         if (Input.GetKeyDown(KeyCode.U))
    19.             GetComponent<SpriteAnim>().Play(Spinny);
    20.      
    21.         if (Input.GetKeyDown(KeyCode.I))
    22.             GetComponent<SpriteAnim>().Stop();
    23.     }
    24. }
    25.  

    Do you have any idea why PowerSprite Animator would not allow normals to function properly? Any solutions you can think of?

    Thanks!

    EDIT:
    So it seems the issue was with the 'animator' component. Unity automatically creates one when you drop an animation onto an empty, and this allows normals to function. Powersprite makes its own, however.

    Interestingly, I made a demo of the same lighting feature in a new project and found that it worked with no issue.
     
    Last edited: Jan 22, 2018
  7. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Ah, sorry for the late reply, I missed the notification! I'm not quite sure how unity handles animating sprites with normals, but if you couldn't get it working and you're happy to email me a sample project, I could take a look and see if I can work out how to get it going. (dave at powerhoof.com)
     
  8. Kakapio

    Kakapio

    Joined:
    Nov 8, 2014
    Posts:
    9
    Thanks, but I managed to figure it out. Actually, I wanted to ask if you could add some functionality to the editor. A method to play an animation from a certain frame would be wonderful, along with a property to get the current frame of the animation. I'm not quite sure how PowerSprite's code works since mine is generally much worse in terms of quality,:(lol.

    I'd be extremely grateful if you could introduce these features though! They'd add an appeal to PowerSprite that even Unity doesn't offer directly.
     
    Last edited: Jan 25, 2018
  9. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Sure thing, should be simple. Your implementation probably wouldn't be much different than mine, add that to the list for the next update!
     
  10. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    501
    @PowerhoofDave

    I also have a small suggestion for the next update. Can you change STATE_NAME from sting to int in SpriteAnim.cs?

    Code (CSharp):
    1. static readonly int STATE_NAME = Animator.StringToHash ("a");
    I know the gain would be tiny but every little bit helps, right? :)
     
  11. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Oh yeah, good spot! Will do.
     
    PixelEnvision likes this.
  12. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    924
    Hello Dave,

    For some time now my previews in PowerAnim have been blacker than what they're supposed to be (the true color is to the right).

    Does someone have the same problem? I've reimported PowerAnim in my project to no avail.

    I'm in Unity 2017.4.3f1.

    upload_2018-6-2_21-26-3.png
     
  13. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    I believe that can happen if you're using Linear colour space rather than Gamma. I don't have a fix right now, but it only effects the preview, not the actual game, so hopefully it's not too problematic. If it's an issue let me know!
     
  14. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    924
    If you don't have a fix that's ok. Some characters I can't see at all because they're black but I can deal with that in other ways. You're right btw it's due to my color space being in linear.
     
  15. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    924
    One thing that would be great is the ability to choose which animations you want to take a look at.

    Here's an example where I don't want to see the animated effect but the character itself:

    These are 2 animations of my character attacking (GladiusCombo1, GladiusCombo2), but on one of them I see the effect that plays during the animation and on the other I see the animation. Could there be an option to choose which I want to see? Using the Sprite Path seems to overwrite my paths which is not what I want, I merely want to choose which preview to see on an animation clip.


    2018-06-06_12-10-45.gif
     
  16. darydol

    darydol

    Joined:
    May 19, 2017
    Posts:
    8
    Good morning?
    An example of using SpriteAnimEventHandler would be appreciated.
    Event Example
    I registered an event in Power Anim and how should I use it?
     
  17. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    @darydol There's a section on animation events in the manual- here's a link to the online version. http://powerhoof.com/public/powerspriteanimator/PowerSpriteAnimator-Manual.pdf

    But basically, you add the event in the timeline, say you call it "Footstep"
    All you need then is to add a function with the same name (and parameters if you have any) in a script on the animated object. eg:
    void Footstep() { Debug.Log("Yay"); }


    If the "Add anim prefix" checkbox is ticked, you also need to add "Anim" to the start of the function name. eg:
    void AnimFootstep() { Debug.Log("Yay"); }

    I find this keeps the code cleaner since you know which functions are called from animations.

    Also note- you only need to add the SpriteAnimEventHandler component if you have "Send Upwards" ticked on the event, and you don't already have the SpriteAnim component on the object
     
    Last edited: Aug 23, 2018
  18. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    104
    Hi,

    This asset looks great. I'd like to know a few things before purchasing and adding it to our pipeline.

    Are the events created in the powersprite windows regular events or are they special "powersprite" events ?
    I already have a massive network of them in my game, and that's one of the reason I'd like to use your asset.
    I assume they are normal events, but I'd rather ask.

    Does it support sprite sheet ? I'm asking because in the exemples you provide, you only use single images.

    Does it slow down the editor in any significant way ?

    Thanks !
     
  19. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    They're the same events as the unity ones, but you type in the name rather than selecting from a dropdown box.

    Yep it supports sprite sheets

    Not as far as I can tell, and it shouldn't. It doesn't' do any background processing or anything, it only updates anim files when you make changes in the Power Anim editor, and it doesn't do anything except render during the update loop.

    Hope that helps!
     
  20. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    104
    Hi,

    I've just purchased your tool. Looks great so far.
    There is one thing I can't wrap my head around though.

    I'm working in Aseprite and I've got each frame timed in millisecond.
    But the numbers to set on each frame doesn't seem to be milliseconds.

    How can I get the same timing I've got in Aseprite ?

    Thanks
     
  21. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Yeah it's a quirk of how unity's own animation editor works, frames are measured in samples rather than just in seconds (and i wanted to keep things cross-compatible).

    If you set the "Sample Rate" in the Power Anim editor to 1000 then the "length" of each frame will be in milliseconds, so you can match it to aseprite. And you don't have to worry about performance setting that number high or anything, since the animations get converted to a timed duration for playback anyway.

    Also if you want new anims you make to start with that set up, open the "Editor Settings" drop down, and set "Default Frame Length" to 0.1, and "Default Frame Samples" to 100
     
  22. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    104
    Thanks for the lightning fast answer.
    Ok, I get the sample rate thing, it does make sense. I just was scared to put a too high number.

    There is another thing that bothers me. In the event text fields, the underscore ( _ ) is not visible.
    I think it's due to the fact that the text field is too narrow.
    Would it be possible to modify it ?

    Also, I don't know why but the Lenght(sec) text field (between Sample Rate and Looping), doesn't show the same lenght as the animation clip lenght on the top right corner (in light grey), which is the right value. How come is that so ?

    Cheers !
     
  23. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Ah good spot. I can fix that when I next do an update (might be a while cause it's a PITA to do). For now, copy this file over the top and it'll work. https://www.dropbox.com/s/tz8i1nqkglgkg60/SpriteAnimatorTimeline.cs?dl=0

    Yeah that's kinda confusing actually. The light-grey length is the actual length. The length in the box is snapped to the nearest 0.05f seconds to make it easier to modify. I found it handy to snap the value like that, but it's not quite granular enough really, should probably be snapping to units of 0.001 instead. I can change that next time I update the asset. For now if you want, you can change it yourself. In "SpriteAnimatorInfoPanel.cs" line 67 and 68. Change the 0.05f value to 0.001f (or whatever you want, you could even remove the "snap" function on those lines if you want)
     
  24. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    104
    Thanks, that works :)

    [EDIT] I noticed that the length parameter modification actually didn't work. And, when I restarted my project, the powersprite window was not available anymore.

    Code (CSharp):
    1.  
    2. Assets/PowerSpriteAnimator/Scripts/Editor/SpriteAnimator.cs(197,2): error CS0246: The type or namespace name `eDragState' could not be found. Are you missing an assembly reference?
    3.  
     
    Last edited: Oct 15, 2018
  25. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    Any way to do animated colliders with this? How is it recommended to handle that?
     
  26. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Hrmm... You can go in and animate the colliders as part of the same animation using unity's default animation editor. It might be a bit annoying keeping the two things in sync sometimes, but might be fine.

    Otherwise you could set something up in a script using the animation nodes, and animation events to set the position and enable/disable colliders. We've done something similar to that in projects and it's worked alright.
     
  27. gamefish

    gamefish

    Joined:
    Jul 5, 2013
    Posts:
    11
    Hello Dave very cool plugin! and we learned a lot about animation our characters through Crawl.
    Do you have any plans to add 'Modular' feature into this plugin? Which means a frame can be composed of several body parts so we can do something like z ordering of weapon between hands and equipment/skin changing of characters. I believe this feature will make PowerSprite more powerful:p
     
  28. Alexander-Fedoseev

    Alexander-Fedoseev

    Joined:
    Jan 1, 2015
    Posts:
    2
    Hey! Thanks for the awesome plugin!
    I only have a small problem that if I place an animation event at the very end of animation and call Play from a script it makes an additional event fire right after Play call plus to regular one :( If I place the event a frame before it works fine. Can you fix it pls?
    Снимок экрана 2018-12-12 в 18.37.22.png
     
  29. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Oops, missed these last two replies, sorry!

    @gamefish I'm keen to add a sprite preview option to nodes, so you can preview how positioning sprites on nodes will look. Someone I talked to had hacked it in themselves already. I don't know when I'll get to adding it as a feature though since it's a more specific usage. If more people are keen on it i'll definitely look into it.

    For Regular Human Basketball we had player sprites split out onto different layers so we could change team colours, or head/body parts. We still previewed a flattened version of the animation, but I made a script that just gets the name of the current sprite in LateUpdate, and sets each layer's sprite based on that name. (so if it's Run_3, it'd set the head layer to Run_3_head, etc etc... Couldn't preview each iteration, but it wasn't really necessary in that case.

    @Alexander-Fedoseev Ah yeah, I rely on unity's system for the event calling, not sure why it would trigger on the play call... What version of unity are you on?
    As an intermediate fix, you can increase the sample rate and put the event one sample earlier, then it won't be noticable (although i obviously still need to fix it so you don't have to do that)
     
  30. Aedous

    Aedous

    Joined:
    Jun 20, 2009
    Posts:
    243
    Hey @PowerhoofDave, you're probably getting bombarded with questions so hopefully mine is pretty straight forward. I've been working with the Unity Animation default editor for some time now, and frankly.. it does have problems.

    My question I hope is straight forward, here goes...
    How easy is the event editing, I noticed you don't have a drop down to bring down a list of available functions, which isn't a big deal, but the thing that bugs me the most is editing animation frames and then having to re-adjust events separately. because the default editor doesn't allow you to select keyframes and events at the same time. Does your tool solve this?

    I really like what you're doing here, I think one of the useful things may be editing animations without having to open up the gameobject, or scroll through multiple animations just to get to the specific one. Thanks for building this will be sure to give it a go, I'm really hoping it can speed up the animation drawbacks in our game.
     
  31. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Sorry for the late reply, was afk on holidays :D

    But yeah, PSA solves this, event positions are automatically adjusted when you make changes to timing. They basically "stick" to the sprite frame they're on.

    If you use it, let me know if you prefer the event dropdown of available functions (unity way) or just typing them in (PSA way). I find the dropdown tedious but curious if that's just me cause i'm a coder and like typing! ;)
     
  32. Aedous

    Aedous

    Joined:
    Jun 20, 2009
    Posts:
    243
    That's no problem, I went ahead and got the package :D, from first glance can already see it will speed up the process of working with animations. The scroll down menu isn't really needed as I find it tedious as well, but something like intellisense so you can get a glance of the methods available to you. I'm guessing this a bit more difficult as the window uses the clip and not the gameobject itself. If it is possible though that would be such a welcome feature!

    I am really glad I got this though, it makes the workflow a lot easier *plus there's a bug with the current Unity default animation window which lags if there's too many states :(.
     
  33. Aedous

    Aedous

    Joined:
    Jun 20, 2009
    Posts:
    243
    Was curious to know if it's possible to customise your animation window? The reason I ask is I'm wondering how you manage to add your 2D attachment points on there, where is data actually saved to?

    I built an editor for the hitboxes but that uses the default animation window, and is dependant on you actually clicking the gameobject in order to view the hitbox. Was wondering if there was a way I could integrate that into your current window so I don't have to swap inbetween the two!

    Also how do you manage your animations that have more than just the sprite renderer on them? For example I noticed you only show the sprite renderer frames and the events, is it possible to show others as well?

    So many questions! sorry for the bombardment, I just really like your tool! :D
     
  34. SeanC88

    SeanC88

    Joined:
    Apr 21, 2012
    Posts:
    18
    Is it possible to get Playmaker actions for this product? This looks amazing, and I can say that a lot of artists would benefit from being able to use this tool in conjunction with PM!
     
    Lars-Steenhoff likes this.
  35. SeanC88

    SeanC88

    Joined:
    Apr 21, 2012
    Posts:
    18
    Hi all, I actually found someone willing to help out on Playmaker actions! But one area I am having trouble on: Is there a way within PowerSprite's code to start playing a new animation clip at a specific time within the clip? The scenario I'm looking to solve is, I have a character running north, and the user changes their input to run east. I want the Run_East animation to play but I don't want it to start from the beginning, I want it to start from the same time I was in so that the animations looks relatively seamless. Titan Souls is a great example of this.
    Currently, I am getting the time every frame and then I set the time before a new animation, but when I start playing a new animation, it forces me to start at 0. Is there any way to switch animations without it starting over? Maybe like a SetNewClip function that keeps playing but changes the animation?
     
  36. Gontzalve

    Gontzalve

    Joined:
    Aug 11, 2016
    Posts:
    3
    Hi, @PowerhoofDave . Fantastic job with the asset!
    I was wondering if you had the time to fix the 'event at the end of animation triggering at the start'.
    Or maybe you could guide me and I could try to fix it?
    Thanks again for the asset.
     
  37. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Hi @Gontzalve! Sorry for the huge delay in replying. I was in the middle of a 2 week gamejam, and (subsequent recovery period)

    I've just submitted a build to the asset store with that fix. As well as a bunch of other minor fixes I've made over the last few projects. Including setting a preview sprite on nodes, and auto-complete when typing in events. But mainly little fixes and quality of life improvements.

    Usually takes a few days for the updates to filter through unity's system, but look-out for v1.6 soon.
     
    spacefrog likes this.
  38. Gontzalve

    Gontzalve

    Joined:
    Aug 11, 2016
    Posts:
    3
    No worries! Thanks a lot for the fix!
     
  39. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    633
    Thanks Dave for keeping this tool updated.
    I noticed a serious bug/oversight though (might be Unity's fault .. not sure ):
    You subscribe to the EditorApplication.update notification but don't unsubscribe when your window gets closed/destroyed. That means Unity keeps calling your Update() till eternity. You wont usually notice that, but it becomes more apparent when you have activated the loop playback mode.
    I myself only noticed it, because i wrote an extension to your Animation Editor, which allows me to handle standard Unity animation events when previewing the animation ( i use it mainly for frame exact sound triggering, its pretty cool i have to confess :) ) . And of course i heard the sounds still playing through after i closed the Power Anim window
    PS: i'm not even sure if it is necessary for PowerAnim to subscribe to EditorApplication.update manually. According to the unity docs Update() would get called anyways, so i'm not sure why you placed the subscrition call, but i did'nt want to change and test that ...

    The fix is simple enough: just add the following lines to your code SpriteAnimator.cs (somewhere right after tjhe PowerAnimator() constructor )

    Code (CSharp):
    1.   private void OnDestroy()
    2.   {
    3.         EditorApplication.update -= Update;
    4.   }
     
    Last edited: Jul 3, 2019
  40. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Oh thanks for that! I'll fix it. It's possible that subscribing to that was only necessary in a really old version of unity and I don't need to do it anymore. I *think* it was so the player would continue to update when the mouse isn't over the window, but I can't be sure.

    Your extension sounds cool. Do you think it'd be useful for others or is it specific to your workflow? Let me know if you think it'd be a useful thing to add anyway.
     
  41. spacefrog

    spacefrog

    Joined:
    Jun 14, 2009
    Posts:
    633
    In general, I would say sound playback is almost essential if one has to do frame exact timing on eg. foodstep sounds etc... together with PoweAnims playback speed slider ( set on 0.3 playback speed or something ), this has become an invaluable tool to place my sound trigger callback events exactly on the timeline
    Had to think a bit how to do the sound loading and playback in the editor, but i think i have solved it for my needs
    Can't share the code though, as it's for contract work...

    But overall i think, being able to have anim events getting triggered and handled while PowerAnim preview-plays the Anim would be a SUPER COOL extension if implemented directly out of the package :)
     
  42. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Ah, yeah, all good. I have similar code for my own audio system to be able to preview sound cues while the game's not running, but never took the step of actually hooking them up when testing animations. I might experiment with enabling testing of events on a gameobject, might be cool.
     
  43. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,188
    +1 for anim events getting triggered/handled in the prewiew plays with PowerAnim :D
     
  44. Luthdraco

    Luthdraco

    Joined:
    Sep 12, 2019
    Posts:
    3
    Hey so I just bought this asset, and it is quite nice. Thanks for your work.

    But for me at least, it is missing something and it's the option to list all animations of a certain object and navigate and work on them inside the PowerSprite tab, just like the vanilla Animator behavior.

    The basic workflow in Unity's out-of-the-box Animator module is more or less this: You click on a game-object in a scene and if the game-object has an animator component with animations linked to it, those animations are listed in the Animator tab and you can navigate the list to select specific animations and work on them.

    You see, I understand why you changed the workflow to open up an animation in the PowerSprite Animator tab: Now we have to open up the ".animation" files directly in the assets folder to "load up" an animation in the tab to work with, which also allows us to create animations directly in the folders too.

    But it would be really nice to have an additional mode of opening up animations, that mimics the quality of life that the vanilla Unity Animator behavior offers. which is having a list right there inside the tab.

    Of course, I understand the amount of editor extension work that you would have to implement to check for selected game objects, read all the .animations files of the animator component, check for changes in the selected animation in the list, etc... but in my opinion with this functionality, PowerSprite would basically 100% deprecate Unity's own Animator module.
     
  45. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Hey Luthdraco, yeah I think I'd find that useful too, I'll look into it. What I'm imagining is be a tab in PSA that would list all the animations referenced from the last selected game object (its components and animators). Should be doable I think.

    Might take me a while to get to it though unfortunately, I'm pretty slammed the next month and a bit. For now, in-case you missed this, and it's useful at all- you can click the animation name at the top of powersprite animator and it'll show the location of the animation in the project view, so if you're keeping anims for an object in the same folder, the others will be there too.
     
  46. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    104
    Hi,
    I'm a pretty long time user and first of all, thank you !
    This tool is sooo handy, and I'm flabbergasted that this isn't implemented in unity already.
    There is only one thing I would change though:



    I would make this part of the window scalable. Most of the time, I don't see the full name of my sprites.
     
  47. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    Someone else asked for that actually, so it's already on my list. As a quick fix for you- copy these two files over the existing ones in PowerSpriteAnimator/Scripts/Editor/
    And then you can set the info panel width under the "Editor settings" dropdown in that panel. Just a stop-gap solution before I make it a resizable with the mouse ;)
     

    Attached Files:

  48. arkogelul

    arkogelul

    Joined:
    Nov 14, 2016
    Posts:
    104
    Thank you very much :)
    Where will you share this update ?
     
  49. PowerhoofDave

    PowerhoofDave

    Joined:
    Jun 26, 2015
    Posts:
    69
    It's just a temporary solution so I'll just leave it at that attached zip file until I have time to do it properly and push out an update. But I'm pretty slammed with upcoming events and getting a demo ready for my game project, so that probably won't be for a couple of months.
     
  50. Thony-D

    Thony-D

    Joined:
    Sep 9, 2018
    Posts:
    2
    Hi Dave, I really like PSA. As someone new at Game Dev it really makes things easier.

    I am trying to create 4-player multiplayer game for which the different players/characters have different sprites but behave exactly the same. Like how in Crawl there are 4 different colored characters (for the humans as well as the ghost), which seem to have different sprites but have the same animations.

    Currently I have created 4 separate animations for the same action (for example: shooting, shielding, dashing), so when I change the animation for one of the characters I have to change the other 3 as well. I would like to use one animation file instead of 4 for one action.

    My question:
    Is it possible to set the list of sprites/frames of an animation uses through code?

    If that would be possible I could have one animation and change the sprites in code depending on which character the player selected. If this is not possible, could you share how you dealt with this for Crawl? That would really help me out.

    Thanks!
     
unityunity