Add water and terrain as child game object #265
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains some fixes:
If we move the mouse to a game object in Outline and click to Add water or Add terrain then it will be added as child game object.
If we create a water at root in Outline and move it into a game object as a child game object then it will be rendered.
There is the
findComponentsByType(Array<Component> out, Component.Type type, boolean includeChilds)
method in GameObject class and it's javadoc says that if the includeChilds variable is true then it searches in children too, but in this case this method doesn't search in the current game object, only in children. So with this fixes if recursive variable is true then it will search in the current game object and recursively too. Added this changes into runtime's CHANGES file as braking changes.Rendering water in runtime if water is child object.