using UnityEngine; namespace Lean.Transition.Method { /// This will submit all transitions you added before this one. Any transitions you perform after this will begin immediately. [HelpURL(LeanTransition.HelpUrlPrefix + "LeanInsert")] [AddComponentMenu(LeanTransition.MethodsMenuPrefix + "Insert" + LeanTransition.MethodsMenuSuffix + "(LeanInsert)")] public class LeanInsert : LeanMethod { public Transform Target; public override void Register() { LeanTransition.InsertTransitions(Target); } } } namespace Lean.Transition { public static partial class LeanExtensions { /// This will insert all transitions inside the specified GameObject, as if they were added manually. public static T InsertTransition(this T target, GameObject root) where T : Component { LeanTransition.InsertTransitions(root); return target; } /// This will insert all transitions inside the specified GameObject, as if they were added manually. public static T InsertTransition(this T target, Transform root) where T : Component { LeanTransition.InsertTransitions(root); return target; } /// This will insert all transitions inside the specified GameObject, as if they were added manually. public static GameObject InsertTransition(this GameObject target, GameObject root) { LeanTransition.InsertTransitions(root); return target; } /// This will insert all transitions inside the specified GameObject, as if they were added manually. public static GameObject InsertTransition(this GameObject target, Transform root) { LeanTransition.InsertTransitions(root); return target; } } }