Skip to content

Commit

Permalink
prepare 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
neuecc committed Jan 21, 2015
1 parent 4587135 commit d6b0220
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions Assets/LINQtoGameObject/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ LINQ to GameObject
===
LINQ to GameObject is GameObject extensions for Unity that allows traverse hierarchy like LINQ to XML.
Project Home: https://github.com/neuecc/LINQ-to-GameObject-for-Unity
Unity Forums support thread: http://forum.unity3d.com/threads/linq-to-gameobject.292611/

Axis
---
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LINQ to GameObject
===
LINQ to GameObject is GameObject extensions for Unity that allows traverse hierarchy like LINQ to XML.
LINQ to GameObject is GameObject extensions for Unity that allows traverse hierarchy like LINQ to XML. You can install from [Unity Asset Store - LINQ to GameObject](http://u3d.as/content/neuecc/linq-to-game-object) as FREE. Unity Forums support thread, ask me any questions - [http://forum.unity3d.com/threads/linq-to-gameobject.292611/](http://forum.unity3d.com/threads/linq-to-gameobject.292611/)

Axis
---
Expand All @@ -14,8 +14,8 @@ Every traverse method returns `IEnumerable<GameObject>` and deferred exectuion.
origin.Ancestors(); // Container, Root
origin.Children(); // Sphere_A, Sphere_B, Group, Sphere_A, Sphere_B
origin.Descendants(); // Sphere_A, Sphere_B, Group, P1, Group, Sphere_B, P2, Sphere_A, Sphere_B
origin.ObjectsBeforeSelf(); // C1, C2
origin.ObjectsAfterSelf(); // C3, C4
origin.BeforeSelf(); // C1, C2
origin.AfterSelf(); // C3, C4
```

You can chain query(LINQ to Objects) and use some specified methods(Destroy, OfComponent and others).
Expand All @@ -36,7 +36,7 @@ var fooScripts = root.ChildrenAndSelf().OfComponent<FooScript>();

How to use
---
Import LINQ to GameObject from Unity Asset Store - [http://u3d.as/content/neuecc/linq-to-game-object](http://u3d.as/content/neuecc/linq-to-game-object) or copy [Assets/LINQtoGameObject/Scripts/LINQtoGameObject](https://github.com/neuecc/LINQ-to-GameObject-for-Unity/tree/master/Assets/LINQtoGameObject/Scripts).
Import LINQ to GameObject from Unity Asset Store - [http://u3d.as/content/neuecc/linq-to-game-object](http://u3d.as/content/neuecc/linq-to-game-object).

All methods are extension of GameObject, using `Unity.Linq` then you can use all extension methods.

Expand Down Expand Up @@ -100,10 +100,10 @@ Ancestors|Returns a collection of the ancestor GameObjects of this GameObject.
AncestorsAndSelf|Returns a collection of GameObjects that contain this element, and the ancestors of this GameObject.
Descendants|Returns a collection of the descendant GameObjects.
DescendantsAndSelf|Returns a collection of GameObjects that contain this GameObject, and all descendant GameObjects of this GameObject.
ObjectsBeforeSelf|Returns a collection of the sibling GameObjects before this GameObject.
ObjectsBeforeSelfAndSelf|Returns a collection of GameObjects that contain this GameObject, and the sibling GameObjects before this GameObject.
ObjectsAfterSelf|Returns a collection of the sibling GameObjects after this GameObject.
ObjectsAfterSelfAndSelf|Returns a collection of GameObjects that contain this GameObject, and the sibling GameObjects after this GameObject.
BeforeSelf|Returns a collection of the sibling GameObjects before this GameObject.
BeforeSelfAndSelf|Returns a collection of GameObjects that contain this GameObject, and the sibling GameObjects before this GameObject.
AfterSelf|Returns a collection of the sibling GameObjects after this GameObject.
AfterSelfAndSelf|Returns a collection of GameObjects that contain this GameObject, and the sibling GameObjects after this GameObject.

Operate methods have three optional parameter. `cloneType` configure cloned child GameObject's localPosition/Scale/Rotation. `setActive` configure activates/deactivates child GameObject. If null, doesn't set specified value. `specifiedName` configure set name of child GameObject. If null, doesn't set specified value.

Expand Down

0 comments on commit d6b0220

Please sign in to comment.