diff --git a/Assets/LINQtoGameObject/README.txt b/Assets/LINQtoGameObject/README.txt index a190196..f5b34ac 100644 --- a/Assets/LINQtoGameObject/README.txt +++ b/Assets/LINQtoGameObject/README.txt @@ -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 diff --git a/Assets/LINQtoGameObject/Scripts/GameObjectExtensions.Enumerable.cs b/Assets/LINQtoGameObject/Scripts/GameObjectExtensions.Enumerable.cs index 539beb2..6028807 100644 --- a/Assets/LINQtoGameObject/Scripts/GameObjectExtensions.Enumerable.cs +++ b/Assets/LINQtoGameObject/Scripts/GameObjectExtensions.Enumerable.cs @@ -155,7 +155,7 @@ public static void Destroy(this IEnumerable source, bool useDestroyI { foreach (var item in source) { - item.Destroy(useDestroyImmediate, false); // doesn't detouch. + item.Destroy(useDestroyImmediate, false); // doesn't detach. } } diff --git a/Assets/LINQtoGameObject/Scripts/GameObjectExtensions.Operate.cs b/Assets/LINQtoGameObject/Scripts/GameObjectExtensions.Operate.cs index e8a143e..61539e2 100644 --- a/Assets/LINQtoGameObject/Scripts/GameObjectExtensions.Operate.cs +++ b/Assets/LINQtoGameObject/Scripts/GameObjectExtensions.Operate.cs @@ -596,12 +596,12 @@ public static T[] MoveToAfterSelfRange(this GameObject parent, IEnumerable /// Destroy this GameObject safety(check null). /// If in EditMode, should be true or pass !Application.isPlaying. - /// set to parent = null. - public static void Destroy(this GameObject self, bool useDestroyImmediate = false, bool detouchParent = false) + /// set to parent = null. + 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); diff --git a/README.md b/README.md index a190196..f5b34ac 100644 --- a/README.md +++ b/README.md @@ -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