Jump to content

Thrasher

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Thrasher

  1. @lucid - Thanks for the pointer. Opening and saving the resized project seems to have fixed the issue. Ahhh yeahh!! Many thanks for the quick reply and help.
  2. Hey there, I'm working on a Unity project and recently started trying to use the new "Save as Resized" feature to reduce our texture requirements for our currently very large enemy assets. The newly resized .scml files look great in SpriterPro but appear broken in-game (with different sprites flying off of the body and back again based on the animation). I have attempted using both Spriter2UnityDX and SpriterDotNet on the Unity side and the issues exist in both which makes me wonder if there is something going on with the resize. Is there a known issue regarding this problem? Any suggestions on how I might track the issue down or find a work around? Thanks, James
  3. Thanks for the quick reply. I was able to fix the issue by making sure each animation had the identical z-order for all sprites as the first listed animation and then also making sure that all of the sprites were present in each animation (even when they are not visible). Cheers, James
  4. Hey Dengar, many thanks for your work on this. I've been bumping into an issue where anytime I have a sprite swap (usually for facial expressions but sometimes for hand holds) the z-value for the spriterenderer transform changes causing my hero to not be sorted correctly (e.g. the swapped face is behind the head). I've tried enabling "Apply Spriter Z Order" on the EntityRenderer and it still is not working properly. I've experimented with changing the sprite swap keyframes to instant transitions instead of linear. Would having completely different z-orders in the animation that is having an issue cause this to happen? Any recommendations on what I could do to fix this either code side or asset side? Thanks, James
  5. Hey Loodakrawa, When I spawn in enemies that use character maps, the basic enemy appears for a moment before the character map gets assigned. Do you know of a way to set this character map before the visuals are displayed? I am setting the character map in the Awake() method for these game objects yet they still appear for a frame before popping to the desired character map. Thanks, James Update: I realized after my post that the sprites are not actually swapped for a character map until SpriterAnimator.Step() is called to animate the entity. I simply added "spriterAnimator.Step(0);" after my "spriterAnimator.PushCharMap()" call and it appears to be working great.
  6. Awesome! Thanks again. I had missed the FileEntries field. I am now able to successfully swap out all of my character customization assets. The one thing remaining that I'm having some difficulty with is that the swapped sprite is using the sprite pivot from the original sprite. For example, if I swap hairstyle05 for hairstyle_default (which has a centered pivot of 0.5, 0.5) then the center of hairstyle05 will be on the center of hairstyle_default regardless of the pivot point set for hairstyle05. This becomes an issue anytime the swapped sprite is a different size than the default and I want to alight a non-center point with the center of the sprite being replaced. If I'm working in the Unity Editor and simply drag hairstyle05 onto the spriterenderer associated with hairstyle_default everything lines up just fine. However, when I swap these sprites using SwapSprite(hairstyle_default, hairstyle05) the new hair style is misaligned. Is there a way to have this function as it does natively in the Unity Editor? Thanks, James
  7. Thanks for the reply. In order to use SwapSprite I need to first find the original sprite (i.e. GameObject.Find("Sprite 5").GetComponent<SpriteRenderer>().sprite). Is there a more efficient way to reference the existing sprite from within SpriterDotNet (by name) to avoid making a GameObject.Find call? If not, is there any guarantee that this sprite will always be "Sprite 5" assuming the base asset in Spriter Pro is never removed or changed? Thanks!
  8. Many thanks, Loodakrawa for the effort you have put into this project. I was able to successfully migrate our project, on Friday, and we are now happily using SpriterDotNet for our enemy animations. w00t! I am now working on migrating over our player character which includes a bunch of customization options such as character cosmetics, equipped weapons, equipped armor, etc. Do you or anyone else on this thread have a best practices recommendation on how I should be finding and replacing these sprites in code using SpriterDotNet? Will the numbers assigned to a sprite element change if the .scml file is resaved? Thanks, James
×
×
  • Create New...