https://github.com/breadnone/STween
A fast, lightweight, zero allocation tweening engine for Unity3d inspired by the all time legendary LeanTween. It works for both runtime and edit-mode. Oh, it works with UIToolkit too. You can tween almost anything with it (read the readme/docs)
#STween - Zero Allocation Tweening framework
1 messages ยท Page 1 of 1 (latest)
dotween or leanTween has gc alloc?
yes, DotTween will take at least 700+ bytes, LeanTween is about 200+ bytes
DOTween doesn't do any pooling at all internally
That is no GC? They are preallocated?
that's at least estimation in a tight loop instantiation until they're get gc collected, you can profile this pretty easily
Ok, will take a look at dotween gc
@crisp umbra I recommend you to also add CanvasGroup fade tweening
And make your plugin to be upm compatible
it can tween anything.. including canvasgroup
you can even make your own custom tween and tween any property with it ๐
DOTween doesn't do any pooling at all internally
https://dotween.demigiant.com/support.php
See How does tween caching work?
well my number is similar to LITMotion regarding DOTween, see it here
it might allocate the 1st time tbf tho
even so that 700 bytes is too high
I've not tested it, but if you're not aware that DOTween has pooling then I'd be concerned for your testing methodology
(Note that it can be turned on and off via the settings)
I believe on stress testing for this type of scenario, if you have a pooling system and it can't deal with a basic scenario one then that's more concerning to me
Whete is the source for this?
will make mine too soon, I just published it two days ago so i need things to prepare, stay tuned
also keep in mind it's not about bashing other libraries and whatnot
I don't disagree, and I wouldn't be surprised if DOTween did have allocations, it's ancient and people make replacements regularly. I would just not make incorrect statements about it ๐
fair ๐
just a trivia I'm a fan of the lgendary LeanTween, so the convention used for mine is very similar to LT. LeanTween can't stop to amaze me during my testing, considering it's unmaintained for 6+ years now
And make your plugin to be upm compatible
will do thanks for the reminder ๐
@crisp umbra I've been trying this out in my project and overall it seems pretty good.
I did just run into an issue with rotation though, as the method comment states Direction of the rotation. e.g: Vector3.forward etc. but based on the code it actually needs something else. Easily confused with a transform direction e.g. transform.forward, which is more of a 'look' rotation than an axis, or a euler angle.
And in one of the tests you're passing in Vector3(0, 0f, 180f) which is definitely not a direction (in the look-rotation sense) or an axis.
Just needs to be cleaned up to clearly state what kind of rotation vector it expects.
ah yes, it definitely need some cleanups with the naming stuff ๐
will do that proly tomorrow ๐, thanks for the reminder ๐
I absolutely love leantween, so I'm going to be keeping my good eye on this ๐
Also thank you for making it open source.
np ๐
I made a struct version of this tweening lib, and I'm now debating whether should I include it in or publish it as separate library ๐
Within
Probably adding support for UniTask if it's available in the project would be a good addition instead of Task.
UnityTask can await regular awaiters or tasks
tho in this case it will allocate due to TaskCompletion<T> source being passed on.
I'll add it to my to-do list so it won't put pressure on the gc either make a struct based asyncmethod builder or just a pooled INotifyCompletion.
The later will make less bloats which I think I'll go with that instead
I uses leanTween for a long time, and I found out it have a lot of issues on delayedCall
and my tweens of choice either this or dotween
hey what do you think about this one? https://flowent.friedsynapse.com/
I found out that, tweening performance doesnt really matter..
Who the hell is going to tween 100 things in one frame?
Ease of use and stability is the most important
as someone who doesnt know, im curious, what does this change? just game uses 700 bytes less memory? what does this change though, just allowing worse pc's to play this game or is there more to it? im genuinely curious because if it does actually matter then im actually interested in this
For mobile it may have impact
Pc games, not really
it surely does matter, especially in gamedev bcos GC is tremendously slow and will introduce micro pauses in your game when it kicks in, either way you generally should avoid pressuring the GC
700 bytes ain't that much but it will pile up eventually and will trigger the GC, we simply don't want that ๐
btw I made a struct version of this tween : https://github.com/breadnone/CTween
feel free to test it and let me know if there's a bug, it's much much faster than the non-struct version
the only downside is that it doesn't have edit-mode support, just that ๐
this 700 bytes happens only once though, so it only triggers GC once at the start of the game right?
thats not how gc works ๐
i use dotween and garbage collector doesnt seem to be doing anything so idk how that works