thanks a lot - i will try this
18 Nov 2016 10:53 am
worked perfectly, thanks
thanks a lot - i will try this
18 Nov 2016 10:53 am
worked perfectly, thanks
Hi Pharan - thanks for your reply, but no setting for Ansio level has a significant effect. I've attached my atlas if you want to try it for yourself. I'm aware this is a standard Unity issue rather than something specific to Spine - which is why I'm interested to know if there is a way to override the texture at runtime, to one that has been scaled down or manually blurred.
Not sure if the solution to this will be technical or creative, any advice appreciated: I have a very high resolution character (about 600px tall), but in game I am zooming out quite far, so sometimes the character is downscaled to as little as 25% of original size. With mipmapping turned off, this leads to a sparkly/pixelated end result - with mipmapping on, the sprite looks blurry / low resolution. The best solution I have found so far is to half the resolution of the atlas in the unity inspector - but this means I no longer have the full resolution when I zoom in. The ideal solution would seem to be to swap between a high and low resolution atlas as the camera zooms - but I can't see a way to override the material or texture that each skeleton/animation uses.
thanks for your time
Hi Nate, thanks for your reply. Ok I've tried the updated version, but I can't see a massive difference - it's still jumping frames rather than transitioning from whatever the current state of the skeleton happens to be.
I'm having a bit of an issue with mixing animations in Spine (Unity). I have an Idle animation and a Running animation. I've set the transitions between each animation to 0.1 seconds. It all looks great if you get all the way to running before you let go of the run key / thumbstick. However, if you tap the run key and release, it jumps all the way to the Running animation and transitions back to Idle. This looks wrong - the desired effect would be to transition from whatever in-between pose you are currently in to Idle. I'd request that this be the built-in behavior, or is there a way I can modify the code to achieve this myself?
Steps to recreate:
Create an skeleton that uses skin placeholders. Add the same image (e.g. "head" )to more than one of the placeholders for a slot > Spine will automatically change to "head1", "head2" etc.
Open in Unity > Unity will complain that region "head1" doesn't exist.
Can be solved by clicking in the spine Hierarchy and manually deleting the numbers from the attachment names.
How I solved it:
Duplicated SkeletonAnimation and renamed as CharacterSpineAnimator, still extending SkeletonComponent. Used that instead of SkeletonAnimation and added in my own code.
Had to also make a duplicate of SkeletonAnimationInspector and change all the refs that pointed to SkeletonAnimation so that it showed with the right controls in the inspector.
This wasn't how I imagined I would have done it but it seems to work. Is this about right?
Just found this thread. Rotating a bone doesn't seem like something I should need to extend SkeletonAnimation for? Even doing so I can't really see how you rotate a bone from an external script. Unity is a composition-based programming model and it feels like there should be a way to do this without inheritance (e.g. in SmoothMoves it is very simple to do in LateUpdate from any external script)
Hi, I'm having some trouble rotating a my head bone through code. At the moment I'm trying this in Update and LateUpdate:
headBone.Rotation = 180; // for testing
Followed by various combinations of:
skeleton.UpdateWorldTransform();
skeleton.Update(0f);
skeletonAnimation.state.Update(0f);
skeletonAnimation.UpdateSkeleton(0f);
But none of them work. However if I try:
skeletonAnimation.state.SetAnimation(0, "run", true);
after setting the rotation then the head bone is rotated to 180 degrees (but obviously the animation keeps restarting over and over)
I've looked in SkeletonComponent.Update and really seems I should have to position the bones somewhere around line 129 but obviously there's no hook for that.
Somebody must have solved this - any help greatly appreciated!
Maybe I tried to add the same bone twice when I was setting up the skeleton or something?
Yep, that was it - Spine had added "2" to a bunch of attachment regions - possible bug.
Ok I've found this error in the Unity console:
Error reading skeleton JSON file for skeleton data asset: CharacterSkeletonData
Region not found in atlas: Assets/x2characters/heros/yuki_skirt2 (region)
which is understandable as the asset is called yuki_skirt not yuki_skirt2 - either me or Spine has introduced this error somehow? Will try fixing this path..
Hi,
Very possible I'm just missing something, however: Trying to import my Spine animations into Unity 4.3 - have followed the video tutorial: http://www.youtube.com/watch?v=x1umSQulghA but it doesn't work seem to work for me (nor for anyone else in the youtube comments). I follow all the stages but the add mix button etc never appears. The dragon and goblin examples work fine (however the Spine Boy example does not - only his head shows) so I'm guessing it's something to do with how I've exported my animation? Or maybe something has changed with Spine itself and the examples only work because they're using old data?
Help needed and appreciated
Iain