Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
sator-imaging committed Mar 20, 2024
1 parent 7967640 commit d86b1dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions LifecycleBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Here is example to bind instance lifetime to cancellation token or MonoBehaviour
grand.DestroyWith(child);
// --> child and grand will be marked as DontDestroyOnLoad automatically
// action for debugging purpose which will be invoked before binding (when not null)
// action for debugging purpose which will be invoked when object bound (set null if don't require)
LifetimeExtensions.DebuggerAction = (obj, token, ticket, ownerOrNull) =>
{
Debug.Log($"Target Object: {obj}");
Expand Down Expand Up @@ -511,9 +511,8 @@ public void Clear()
/// Do nothing when null action specified.
/// </remarks>
/// <returns>
/// <para>
/// Returns received action instance as-is. It is null when null is passed.
/// </para>
/// <br/>
/// > [!NOTE]
/// > `Add(instance.Method)` will create new Action instance call by call implicitly.
/// > If plan to remove action later, removing requires exactly same instance so need to keep returned one.
Expand All @@ -539,9 +538,8 @@ public Action Add(Action act)
}

/// <remarks>
/// <para>
/// Do nothing when null action specified.
/// </para>
/// <br/>
/// > [!WARNING]
/// > Item order will be changed. See file header document for details.
/// </remarks>
Expand Down Expand Up @@ -799,7 +797,7 @@ internal static void DeepDestroy_NoCheck(UnityEngine.Object obj)
}

#if UNITY_EDITOR
if (Application.IsPlaying(obj))
if (UnityEditor.EditorApplication.isPlaying)
#endif
UnityEngine.Object.Destroy(obj);
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ child.DestroyWith(root);
grand.DestroyWith(child);
// --> child and grand will be marked as DontDestroyOnLoad automatically
// action for debugging purpose which will be invoked before binding (when not null)
// action for debugging purpose which will be invoked when object bound (set null if don't require)
LifetimeExtensions.DebuggerAction = (obj, token, ticket, ownerOrNull) =>
{
Debug.Log($"Target Object: {obj}");
Expand Down

0 comments on commit d86b1dc

Please sign in to comment.