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

26 lines
612 B
C#

using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
public class OnWillLog : BrainBase
{
public bool allowLogs = false;
public Transform target;
IEnumerator Start()
{
DOTween.onWillLog = OnWillLogCallback;
yield return new WaitForSeconds(0.5f);
target.DOMoveX(3, 2);
yield return new WaitForSeconds(0.5f);
Destroy(target.gameObject);
}
bool OnWillLogCallback(LogType logType, object message)
{
Debug.Log("LOG CAUGHT > " + logType + " > " + message);
return allowLogs;
}
}