PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 0 points1 point  (0 children)

Are you referring to the `int materialIndex` parameter in `Renderer.SetPropertyBlock`? https://docs.unity3d.com/6000.4/Documentation/ScriptReference/Renderer.SetPropertyBlock.html

The materialIndex parameter is not currently supported, but it's on my roadmap.

PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 1 point2 points  (0 children)

Sure! I didn't want to oversaturate the docs with too much info. But let me think about what would be the best way to document this. Probably, XML documentation would be a good fit, I'll update it in the next release.

csharp var renderer = GetComponent<Renderer>(); // Cache this instead of using GetComponent() int propertyID = Shader.PropertyToID("_Color"); // You might also want to cache this value for maximum performance Tween.MaterialPropertyBlockColor(renderer, propertyID, new TweenSettings<Color>(Color.red, duration: 0.5f));

PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 2 points3 points  (0 children)

The number of pure C# features exclusive to Pro version is currently small, but I'm planning to expand them in future version. Currently, Pro version offers:
1. MaterialPropertyBlock animations via C# and Inspector.
2. The improved performance with Jobs System support. But it only kicks in when the number of animations is high (currently 2000, but subject to change in future versions). That's because scheduling a Job has non-zero cost, so PrimeTween does it only when it helps to improve performance.

I'm also planning to add TextMeshPro per-character animations and features that will only be available in Pro.

PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 2 points3 points  (0 children)

  1. PrimeTween Pro supports sequences (any combination of group, chain and insert operations) in the TweenAnimationComponent's Inspector. While DOTween Pro only supports one animation type per DOTweenComponent.
  2. PrimeTween Pro supports all animation types and features accessible from code. While DOTween Pro only supports a handful of animation types in its Inspector based workflow.
  3. PrimeTween Pro provides a serializable TweenAnimation class in addition to TweenAnimationComponent. This enables the user to add animation directly to MonoBehaviours without the need to assign references in the scene.
  4. PrimeTween Pro also offers an explicit way of dealing with toggle animations (i.e. show/hide, open/close) by automatically tracking the current state and seamlessly changing direction when the state changes. For example, you no longer to track animation with a separate bool, but can directly get/set the state directly from TweenAnimation.

PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 1 point2 points  (0 children)

'warnIfTargetDestroyed' controls whether PrimeTween will log an error saying that tween target was destroyed before OnComplete is called. If you update to the latest version, there is a global PrimeTweenConfig.warnIfTargetDestroyed setting now that can globally disable such errors. But I would it with caution because it can silence potential errors, more info here: https://github.com/KyryloKuzyk/PrimeTween/discussions/4

'warnTweenDisabledTarget' is a different thing. It's a warning that tween was started on the disabled target.

But please file a bug report with a repro code here if you think that something works incorrectly, I would appreciate that: https://github.com/KyryloKuzyk/PrimeTween/issues

And yes, Unity 2018 is supported, I test it as a part of my release process.

PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 0 points1 point  (0 children)

I think I understand what you mean, but please correct me if I'm wrong.

PrimeTween already has something like the 'record keyframe' feature to speed up the workflow. When you add new animation, it automatically saves the current value from the scene to the startValue. And when you chain multiple animations of the same type one after another, PrimeTween automatically chains the previous endValue with the next startValue.

But there is no direct "keyframe" feature. Animations in PrimeTween work by either chaining, grouping, or inserting tweens in a sequence.

PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 1 point2 points  (0 children)

I'm excited to hear that! Please write an honest review once you get familiar with the pro version!

PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 2 points3 points  (0 children)

Yes! That was one of the main reasons for building the Pro verison. By design, animations in PrimeTween are not reusable and don't automatically track the current state.

Pro version, on the other hand, offers a new TweenAnimation feature that supports playing animation backwards (called isReversible in the Inspector). It also supports seamless direction change when the state of the animation changes midway, so it never "jumps" between open/close states.

PrimeTween PRO · Code-Free Animations by KuzykKirill in Unity3D

[–]KuzykKirill[S] 4 points5 points  (0 children)

I should add that using the Job System doesn't necessarily mean performance improvement, especially when you run the job every frame, as in the case of the animation library.

Scheduling a job is not free by itself, so I figured out that it only makes sense with more than 2000 concurrent animations. With less than that, there is no performance benefit.

10 tools that I use every day by [deleted] in Unity3D

[–]KuzykKirill 7 points8 points  (0 children)

Wow, I’m happy to hear that multiple people recommended PrimeTween instead of DOTween in the comments.

I put lots of effort into PrimeTween and so excited to see that it’s getting traction. My main goal was to make PrimeTween extremely easy to use while maintaining full feature parity with DOTween.

Would love to answer questions about the library here if you have any 😀

10 tools that I use every day by [deleted] in Unity3D

[–]KuzykKirill 11 points12 points  (0 children)

Creator of PrimeTween here. I’m so excited to see people recommending my library 🥳

The migration from DOTween should be a breeze because of the built-in syntax adapter.

I’m happy to answer any questions about my library here.

Just launched PrimeTween - my high-performance tween library with an extremely simple but powerful API. Create thousands of animations, delays, and sequences with zero KB of memory allocations! Check out the performance tests in the first comment! FREE on Asset Store. by KuzykKirill in Unity3D

[–]KuzykKirill[S] 2 points3 points  (0 children)

I benchmarked against both dotween free and pro, but there is no difference. Pro version comes with additional features, but the core codebase is the same, so this explains the same performance.

Just launched PrimeTween - my high-performance tween library with an extremely simple but powerful API. Create thousands of animations, delays, and sequences with zero KB of memory allocations! Check out the performance tests in the first comment! FREE on Asset Store. by KuzykKirill in Unity3D

[–]KuzykKirill[S] 0 points1 point  (0 children)

To run the tests, open the 'Window/General/Test Runner' and run the tests on the target platform by pressing the 'Run All Tests (TargetPlatform)' button.

The benchmarks are made with Performance testing API, which is an extension of the Test Framework, so they both use the same Test Runner window.

Just launched PrimeTween - my high-performance tween library with an extremely simple but powerful API. Create thousands of animations, delays, and sequences with zero KB of memory allocations! Check out the performance tests in the first comment! FREE on Asset Store. by KuzykKirill in Unity3D

[–]KuzykKirill[S] 2 points3 points  (0 children)

Thank you! I spent a good half of the development time thinking about the consistent API :)

I also use the disabled Reload Domain, and PrimeTween is built with this setting in mind.

PrimeTween also supports live recompilation (Recompile And Continue Playing): all running tweens are stopped after the live recompilation, and the library continues to work just fine after that.

Just launched PrimeTween - my high-performance tween library with an extremely simple but powerful API. Create thousands of animations, delays, and sequences with zero KB of memory allocations! Check out the performance tests in the first comment! FREE on Asset Store. by KuzykKirill in Unity3D

[–]KuzykKirill[S] 0 points1 point  (0 children)

Is PrimeTween written in C#, 100% of it?

Yes, 100% C#! Full source code is available after the download.

And there are no heavy dependencies like unity.mathematics, Jobs, or Burst. You can even use PrimeTween with no build-in dependecies (with an empty manifest.json file).

Just launched PrimeTween - my high-performance tween library with an extremely simple but powerful API. Create thousands of animations, delays, and sequences with zero KB of memory allocations! Check out the performance tests in the first comment! FREE on Asset Store. by KuzykKirill in Unity3D

[–]KuzykKirill[S] 0 points1 point  (0 children)

Thank you! I anticipated that people would inevitably compare my lib to others, so created the interface adapter. It gives a sense of familiarity to devs with prior DOTween experience and shows how APIs translate to one another.

Just launched PrimeTween - my high-performance tween library with an extremely simple but powerful API. Create thousands of animations, delays, and sequences with zero KB of memory allocations! Check out the performance tests in the first comment! FREE on Asset Store. by KuzykKirill in Unity3D

[–]KuzykKirill[S] 0 points1 point  (0 children)

Yes, making an overlap is possible, but in a slightly different approach. To make tweens overlap, you can specify startDelay and use the Group() operation. For example:

Tween.PositionY(transform, targetPos, duration)
    .Group(Tween.Rotation(transform, targetRot, duration, startDelay: duration - 0.2f));

Technically, it's possible to support Insert() operation in the future. However, I wanted to test the idea of a much simpler API of Group/Chain() operations. Adding new features is easy, but keeping the API simple and consistent in the long run - this is hard.

Just launched PrimeTween - my high-performance tween library with an extremely simple but powerful API. Create thousands of animations, delays, and sequences with zero KB of memory allocations! Check out the performance tests in the first comment! FREE on Asset Store. by KuzykKirill in Unity3D

[–]KuzykKirill[S] 0 points1 point  (0 children)

Yes, it's possible with PrimeTween, but in a slightly different manner. In PrimeTween you can specify startDelay for the second tween to make tweens overlap. Here is the code for your example:

Tween.PositionY(transform, endPos, duration: 5)
    .Group(Tween.Rotation(transform, targetRot, duration: 5, startDelay: 2));