Skip to content

Commit

Permalink
Add: return value of MotionHandle.Preserve() for method chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnulusGames committed Dec 6, 2024
1 parent 0095c20 commit 0fcc6cb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ public static bool IsActive(this MotionHandle handle)
return MotionManager.IsActive(handle);
}

/// <summary>
/// Preserves the MotionHandle so that it is not destroyed until Cancel() is explicitly called.
/// </summary>
/// <param name="handle">This motion handle</param>
/// <returns>Returns itself for method chaining</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void Preserve(this MotionHandle handle)
public static MotionHandle Preserve(this MotionHandle handle)
{
MotionManager.GetDataRef(handle).IsPreserved = true;
return handle;
}

/// <summary>
Expand Down

0 comments on commit 0fcc6cb

Please sign in to comment.