Skip to content

Commit

Permalink
fix typo(detouch - detach)
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Aug 1, 2016
1 parent 9fba119 commit 3322503
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Assets/LINQtoGameObject/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Descendants|Returns a collection of GameObjects that contains the descendant Gam
DescendantsAndSelf|Returns a collection of GameObjects that contains every GameObject in the source collection, and the descendent GameObjects of every GameObject in the source collection.
Children|Returns a filtered collection of the child GameObjects of every GameObject in the source collection. Only GameObjects that have a matching name are included in the collection.
ChildrenAndSelf|Returns a collection of GameObjects that contains every GameObject in the source collection, and the child GameObjects of every GameObject in the source collection.
Destroy|Destroy every GameObject in the source collection safety(check null, deactive/detouch before destroy).
Destroy|Destroy every GameObject in the source collection safety(check null).
OfComponent|Returns a collection of specified component in the source collection.

Author Info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public static void Destroy(this IEnumerable<GameObject> source, bool useDestroyI
{
foreach (var item in source)
{
item.Destroy(useDestroyImmediate, false); // doesn't detouch.
item.Destroy(useDestroyImmediate, false); // doesn't detach.
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,12 @@ public static T[] MoveToAfterSelfRange<T>(this GameObject parent, IEnumerable<T>

/// <summary>Destroy this GameObject safety(check null).</summary>
/// <param name="useDestroyImmediate">If in EditMode, should be true or pass !Application.isPlaying.</param>
/// <param name="detouchParent">set to parent = null.</param>
public static void Destroy(this GameObject self, bool useDestroyImmediate = false, bool detouchParent = false)
/// <param name="detachParent">set to parent = null.</param>
public static void Destroy(this GameObject self, bool useDestroyImmediate = false, bool detachParent = false)
{
if (self == null) return;

if (detouchParent)
if (detachParent)
{
#if !(UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5)
self.transform.SetParent(null);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Descendants|Returns a collection of GameObjects that contains the descendant Gam
DescendantsAndSelf|Returns a collection of GameObjects that contains every GameObject in the source collection, and the descendent GameObjects of every GameObject in the source collection.
Children|Returns a filtered collection of the child GameObjects of every GameObject in the source collection. Only GameObjects that have a matching name are included in the collection.
ChildrenAndSelf|Returns a collection of GameObjects that contains every GameObject in the source collection, and the child GameObjects of every GameObject in the source collection.
Destroy|Destroy every GameObject in the source collection safety(check null, deactive/detouch before destroy).
Destroy|Destroy every GameObject in the source collection safety(check null).
OfComponent|Returns a collection of specified component in the source collection.

Author Info
Expand Down

0 comments on commit 3322503

Please sign in to comment.