Conversation
In layout updates apply the layout position translation to the transform field and then `set_if_neq` it to the node entitie's `Transform` component.
|
Isn't this a bit anti-composition? The |
Yep, this isn't good at all, it's just the minimum I thought might possibly get merged as an intermediate step towards some of the problems with the UI transforms. #8240 is my preferred approach but it's going to take forever to update for main and it's been really difficult to reach concensus on changes like this.
We could make |
|
This seems like a good use case for a new transform type that better matches the semantics of how it is being used. I don't want to suggest that should be done here, but it does seem more and more compelling. Even if we make UI rendering more like the rest of our 3d rendering stack, as long as the layout system produces a I hope you don't take my initial comment as a vote against this change. I happened to stumble upon it and wanted to understand what the motivation was, the first post doesn't really explain why we want this. |
Yeah I had some older PRs that added UI transform types, but it was hard to get any sort of concensus, so I was going for the lowest impact change that would fix the bugs here. I don't think it's a great approach though, closing. |
Objective
Add UI node transform support with minimal changes.
Solution
transformfield toNode.set_if_neqit to the node entity'sTransformcomponent.Then leave
propagate_transformsto update theGlobalTransforms.Testing
Reviewers can look at the
overflow_debugexample, which is the only current UI example that modifies the transform.