A tweening library for Unity-3D.
Questions tagged [dotween]
46 questions
0
votes
1 answer
How do I flip the gameobject at every Dotween loop?
transform
.DOPath(path, animDuration, pathType, pathMode, 10).SetLoops(-1, LoopType.Yoyo)
.SetEase(ease);
This is my simple dotween code to follow path. After every yoyo I want my object to flip or change direction towards its next path…

ManSal
- 25
- 1
- 5
0
votes
2 answers
Why is lambda expression used in DOTween?
I'm using a lambda expression in my C# script in my Unity project to call a function with a parameter when a DOTween callback is called.
It simply looks like this: animation.OnComplete(() => DestroyOnCompleted(children));
It works just fine, but I…

Christoffer
- 77
- 1
- 6
0
votes
0 answers
How to perform a tween animation while pushing a UI object with DOTween?
Unity:
I want to push a picture up with a finger keeping touch the screen, and the picture should move with the finger at the first time when this gesture begin.
Just move y position, but don't change x.
public void CallEvent() {
case…

heinzQ
- 23
- 2
0
votes
1 answer
DOTween transform.DOMove function changes scale of object
Hi I am using DOTween for some smooth transformation.
Collider _leftForeArmBounds = leftForeArm.GetComponent();
for (int i = 0; i < leftForeArmCubes.Count; i++)
…

Kureyş Alp Kılıç
- 61
- 1
- 9
0
votes
3 answers
DOTween is not available in Unity C#
I'm working on the Unity project now and have an error message in VSCode.
'Transform' does not contain a definition for 'DOMove' and the best extension method overload 'DOTweenModulePhysics2D.DOMove(Rigidbody2D, Vector2, float, bool)' requires a…

Yuuu
- 715
- 1
- 9
- 32
0
votes
1 answer
Mouse click animation fade using DOTween don't working
I'm trying to make a mouse click animation using two sprites, one is the mouse normal and the second one is the mouse with the left click highlighted, and i fade the normal sprite (0 to 100) to show the other sprite that is below it.
_ _ _ _ _…

Patitotective
- 35
- 1
- 7
0
votes
2 answers
Killing the current DoTween sequence
I am trying to run a DoTween and it runs well but when I want to stop it, it does not stop at all, it keeps running till it finishes. I am using the DoTween Sequence to kill it but somehow it is not working. What is the issue?
public float prevValue…

Pifo
- 57
- 1
- 8
0
votes
1 answer
Time.Timescale Not working with DOTween Animation
My code looks like this.
gameObject.transform.DOMoveY(transform.position.y * -1, animationDuration, false)
.SetEase(easeType).SetUpdate(false).OnComplete(() => {
gameObject.SetActive(false); });
what I want to do here is that, whenever I pause my…

Baku
- 1
- 4
0
votes
3 answers
Scale in modal UI prefab in Unity
I'm developing a learning game in Unity that has many UI elements. Sometimes I need to show up a modal, which is an instance of a prefab and I want to add a zoom in effect. I have tried with DOTween with the following code:
GameObject modalPrefab =…

ramz
- 143
- 1
- 5
0
votes
1 answer
"Interruption" callback when another animation starts for the same object in DOTween
I have a method which is called on button tap which fades audio volume and mutes when completes:
MusicBox.musicAudioSource.DOFade(0.0f, 1.0f).OnComplete(() => { MusicBox.musicAudioSource.mute = true; });
If I tap on button quicker than 1 second…

Serge
- 2,031
- 3
- 33
- 56
0
votes
3 answers
Moving a UI gameobject to the position of another ui gameobject
I'm trying to move one of my UI gameobject (that has a render mode of screen space) to the position of another UI gameobject. I'm using the DoTween asset to help with the movement. I've currently…

WonderfulWonder
- 515
- 1
- 8
- 20
0
votes
1 answer
how to change shake vibrato/strength while tween is playing
I have a shake tweener initilialized like this:
mainCamera.DOShakePosition (100f, 0.05f, shakeVibrato, 90, false, false);
The duration 100 is just put there so I can have some big value. The idea is to change the vibrato/strength of the shake while…

Martin Asenov
- 1,288
- 2
- 20
- 38
0
votes
2 answers
GameObject transform.Rotate()
I have a question. I have 4 objects on the screen and a projectile as in the picture below.
image source
When I click on an object in the 4 projectile it changes position indicating to the object I clicked on.
This is the code used but it does not…

George
- 45
- 7
0
votes
1 answer
transform.SetParent(null) does not work; does not remove transform from parent
Using Unity 4.6 with 2D objects.
Somehow, at the end of a DOTween sequence, in the OnComplete() block, it seems that the Text label transform (recttransformLabel.DOMove) is not removed from parent. It's still in the Unity hierarchy. Btw the DOMove…

Jonny
- 15,955
- 18
- 111
- 232
-1
votes
1 answer
'Component.GetComponent()' is a method, which is not valid in the given context
'Component.GetComponent()' is a method, which is not valid in the given context
this error in my code;
GetComponent().DOMove(finalPos,2f);