1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-20 09:16:02 +08:00

29 lines
571 B
C#

// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2019/10/25
using System;
using DG.Tweening;
using UnityEngine;
public class TweenedObj : MonoBehaviour
{
Tween t;
void Start()
{
Debug.Log("Create OBJ tween");
t = this.transform.DOScale(1.5f, 2).SetLoops(-1, LoopType.Yoyo);
}
void OnDestroy()
{
Debug.Log("Kill from OnDestroy obj " + this.name);
t.Kill();
}
void OnDisable()
{
Debug.Log("DOTween.Clear from OnDisable obj " + this.name);
DOTween.Clear();
}
}