-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Anonymous ghost nodes #17908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
ickshonpe
wants to merge
31
commits into
bevyengine:main
Choose a base branch
from
ickshonpe:anonymous-ghosts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Anonymous ghost nodes #17908
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Required `GlobalTransform` instead of `Transform` on `Node`. * Update node's global transforms during layout updates.
…bevy into node-global-transform
Give every entity in the UI hierarchy a `UiElement` marker component and, if the "ghost_nodes" feature is enabled, implement the `Ghost` trait for `UiElement`
* `Ghost` to `GhostNode` * `UiElement` to `UiNode` * `Ghost::Completion` to `GhostNode::Actual` Both system param impl changes: * `iter_ui_children` to `iter_actual_actual_children` * `is_ui_node` to `is_actual_node` The `experimental` module now only contains the `GhostNode` trait and it's implementation. It works with any hierarchy now, not just UI nodes. The "ghost_nodes" feature gate and UI specfic navigation implementation has been moved to a new `navigation` module.
…nto ghostnode-trait
Replaced ghost nodes `SystemParam` with a `FlattenChildren<N>` system param that goes down the tree searching for the descendant child on each branch with an `N` component.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Objective
Another
GhostNode
alternative:Node
for translation, rotation and scaling. Propagate them after updating the layout during the update forComputedNode
s. Same withVisibility
.Solution
GhostNode
trait #17901GhostNode
This removes the ability to have root ghost nodes, because without a ghost node marker component we can't query using a
With<GhostNode>, Without<ChildOf>
filter.There are lots of warnings, probably have to replace the
GlobalTranform
andVisibility
components with UI specific types to fix them. But otherwise it seems to work. Some weird problems with the imports too.