Jump to content

loodakrawa

Members
  • Posts

    161
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by loodakrawa

  1. Did you add all the images used in spriter to Unity? If yes, check if they were imported as Sprites - sometimes Unity imports them as Textures
  2. That probably happens due to the script execution order - take a look here.
  3. - Animation Start event - I'll add it - SpriterAnimator has an exposed event for handling Animation end (AnimationFinished). Or did you have something else in mind? - BoxColliders2D do get generated for every box in Spriter. They sit under Metadata/Boxes - The GitHub unity example package has examples of every feature supported - Boxes do get their name set as in Spriter (although this still needs a small fix to ensure consistency). Sprites on the other hand don't get names since the library reuses them between animations (potentially changing names - e.g. the sprite used for rendering "head" might be used for rendering the "torso" in another animation). Just curious - why would you need to find them by name?
  4. If that were a feature it would be an easy fix. This way I'm not sure so I'd like to avoid weird behaviour (like the small offset you mention). As for getting colliders - I'm not using them in my projects so I haven't tried in a real use-case. I'd like to hear your feedback in this regard so I can make it more user friendly. I guess that ATM the easiest way of getting the collider is using Unity's Find functionality but I'm not sure how that affects performance. I have a couple of potential ideas but I'd like to hear your feedback / suggestions if you have any.
  5. The fix is not really complex but it seems that's really a bug. Take a look here. If this becomes resolved as desired behaviour, I'll fix it in the library.
  6. SpriterDotNet allows to blend any 2 animations as long as the hierarchy is identical. There is a feature called Sub Entities that allows you to do exactly that and it's supported in SpriterDotNet. However, it is not well documented yet so I suggest to search the forum a little bit because I remember there was mention of it.
  7. Hi, It seems that this happens due to a bug in Spriter where the size of the rectangle has a negative value. Take a look here. If this is what's happening in your case you can manually edit the scml as a quick fix and remove the minus from the offending entry. If this is caused by something else, let me know and I'll investigate.
  8. This line sets the alpha value from spriter. However, it does reset the colour and that's wrong. I'll fix it to just set the alpha without changing the RGB values.
  9. I'll investigate this ASAP. Thanks for reporting it
  10. The problem is that everything under "Sprites" is essentially an implementation detail of the library so if you shouldn't rely on this. Additionally, the lib only "knows" about the collision boxes which are imported from spriter. What you potentially could do is creating collision boxes under another child of the main object and then attach a custom behaviour to the main object which updates the collision boxes based on the transforms of the objects under the "Sprites" child. Basically every frame iterate through the collision boxes, find the desired Sprite (probably by name) and apply the transforms to the collision box.
  11. Just to check - does your Spriter file have collision boxes? Now I remembered you mentioned you were adding them manually. The thing is - this plugin uses a set of child objects and sprite renderers and reuses them between animations. If you manually attach colliders to these sprites they are going to change names between animations. However, if you add collision boxes in spriter they are going to be imported and created under Metadata. They're also being reused between animations but you should be able to differentiate them by name. Let me know if this helps.
  12. This happens because one of the boxes has a negative size which makes no sense so I suppose this is Spriter bug - could you please report it?. <obj_info name="box_001" type="box" w="196" h="-88" pivot_x="0" pivot_y="0"/>
  13. The import issue was due to an completely blank animation - will fix that. Other that that, it blows up during one of the animations. Did you edit the .scml manually? Because based on the error it's either a manual modification error or a spriter bug (or undocumented feature). For future reference: <key id="3" time="350"> <bone_ref id="0" timeline="0" key="3"/> <object_ref id="19" timeline="0" key="3" z_index="19"/> </key> <key id="3" time="350" spin="-1"> <bone x="10.99669" y="434.393979" angle="61.467489"/> </key>
  14. This is probably due to the script execution order. If you want to do this init logic inside the Start method, jou just have to make sure the SpriterDotNetBehaviour runs before. Take a look here: http://docs.unity3d.com/Manual/class-ScriptExecution.html Personally, I always do it in the Update method because I don't have to rely on project settings.
  15. The colliders get added automatically under the "Metadata" -> "Boxes" object. However, I'm reusing collisions between animations and that could potentially cause problems. I'll look into it ASAP.
  16. I'm not familiar with spritelamp but if you need to load something like this you should probably do it during import time. There's an event that get called after the import. Take a look here.
  17. There seems to be an issue with attachments on the forum - I can't access it. Can you please upload it to an external location and provide the link
  18. Can you please send me the .scml so I can investigate? You can either attach it here or pm me.
  19. Good suggestion. However, it would be rather unpractical to detect usage so I'll just expose various flags to allow user to enable/disable individual features. Also, I'll try to fix other things you mentioned in the Unity thread. Btw, opened issues on github: https://github.com/loodakrawa/SpriterDotNet/issues
  20. Fair enough - that's a valid point. I have a pretty good idea what can be done so I'll take a look this weekend and hopefully come up with a good solution. I'll let you know how it goes.
  21. This is basically the draw data and metadata for every frame. Did you have any performance issues due to this, or you just want to optimise for the sake of it? I'm a big fan of optimisation but usually I avoid doing it until proven necessary because "premature optimization is the root of all evil" as a smart person said. That being said, feel free to do it and submit a pull request if you get good results. Contributions are always welcome
  22. Hey, I can't access the attachment. I'm getting an error saying "The page you are trying to access is not available for your account." - might me a forum issue. Can you try to upload the file somewhere else?
  23. Hi, There are two C# events exposed in SpriterAnimator (and UnitySpriterAnimator subclass) which provide the functionality you want: AnimationFinished and EventTriggered
  24. SpriterDotNet is a library that does all the work in pure C# code in order to support all Spriter features and be able to work with any .net frameworks/platforms. Unfortunately that means that it doesn't use platform specific things like Unity's animation system (which includes the Animator view). The idea is to control the animations with SpriterAnimator - you can take a look at the example provided. That being said, Unity allows custom editors so I'll add the development of such a tool (something like the Animator view) to the project's long term goals. Cheers
  25. Hey, can you provide more specific details about the exact .scml/entity/animation that cause these issues so I can investigate further? Thanks
×
×
  • Create New...