// Author: Daniele Giardini - http://www.demigiant.com // Created: 2018/06/01 10:49 // License Copyright (c) Daniele Giardini // This work is subject to the terms at http://dotween.demigiant.com/license.php using DG.Tweening.Core; using DG.Tweening.CustomYieldInstructions; using UnityEngine; namespace DG.Tweening { /// /// Methods that extend Tween objects and allow to control or get data from them. /// These require at least Unity 5.3 /// public static class TweenExtensions53 { #region Custom Yield Instructions /// /// Returns a that waits until the tween is killed or complete. /// It can be used inside a coroutine as a yield. /// Example usage:yield return myTween.WaitForCompletionCY(); /// public static CustomYieldInstruction WaitForCompletionCY(this Tween t) { if (!t.active) { if (Debugger.logPriority > 0) Debugger.LogInvalidTween(t); return null; } return new WaitForCompletion(t); } #endregion } }