Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
134 stars 2 forks source link

New ProtoFlux Node: Rect Transform Properties #258

Open JackTheFoxOtter opened 11 months ago

JackTheFoxOtter commented 11 months ago

Is your feature request related to a problem? Please describe.

Currently, there is no way to get the computed Rect and Bounds of a given UIX RectTransform.

Describe the solution you'd like

A new ProtoFlux node that exposes the properties of a UIX RectTransform component (Rect and Bounds). I think this would be somewhat analogous to the BoundingBoxProperties node.

Describe alternatives you've considered

Manually computing the bounds based on simplified expressions.

Additional Context

No response

art0007i commented 11 months ago

worth noting that these properties are exposed through the Debug > RectTransformComputedProperties component

5H4D0W-X commented 11 months ago

if you need the size of, say, a scrollable list, you can nest multiple ContentSizeFitters and determine the size by driving a dynvar or valuefield with a RectSizeDriver, but I agree that this would be a useful node

JackTheFoxOtter commented 7 months ago

I guess if it is safe to use Debug > RectTransformComputedProperties then this can be closed. I've seen that used in some of the official content as well, so I'm assuming that debug component solves the requirement I had here.

JackTheFoxOtter commented 7 months ago

Actually I just relized that's a component and not a ProtoFlux node, so the node would still be usefull. Sorry closed this too quickly, need more coffee °^°