pixelmeat

  • 10 juil.
  • Inscrit 11 nov. 2015
    • Modifié

    @pixelmeat You can apply an animation to a skeleton without AnimationState, via Animation.Apply(skeleton), which is not something you do often in spine-unity normally. You can see that in the example scene Spine Examples/Other Examples/Spine Gauge, on the Spine GameObject (gauge), component Spine Gauge. See the code here.

    With spine-unity skeleton components, you should consider disabling the component or setting UpdateMode at the component to None to avoid re-generating the skeleton mesh, as LateUpdate would otherwise still perform unnecessary work.

    • Modifié

    @pixelmeat I assume that by "1 frame animation" you mean an animation with the key set at the very first frame only. If so, you could either check the current animation's Animation.Duration and check
    if (animation.Duration == 0.0f).

    If you allow a single frame to be anywhere in time, it's a bit more complex: you could iterate over Animation.Timelines and check Timeline.FrameCount and if it only has a single frame, and then also check whether Timeline.Frames[i] is the same time for all Timelines of the animation.

  • @pixelmeat Very cool, glad to hear it worked out! Thanks for letting us know.

  • @pixelmeat Very glad to hear you've found the issue!

    pixelmeat Just one more question for now. Are there versions of the outline shaders for the URP/2D category?

    It's a bit more complicated currently, unfortunately there is no single-shader version available yet. This is planned in this issue ticket:
    EsotericSoftware/spine-runtimes1824
    However in the meantime you can use e.g. the RenderExistingMesh component and the Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly shader as described here in the documentation.

    You can find an outline URP example scene Outline Shaders URP.unity in the Samples of the Spine URP Shaders UPM package (installed via Package Manager under the Samples tab), there you can see this setup in action.

    • Thanks for the kind comments!

      @pixelmeat: I actually export all my GIFs at top quality, 30-40 fps. Then I take them to Photoshop and reduce the size for forum or Twitter posting.

      By the way, new vertical ray effect finished in Spine.This is mostly frame by frame animtion, but I did some scaling, movement and opacity changes with Spine.
      Hope you like it!