Skip to content
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

[Merged by Bors] - Derive FromReflect for Transform and GlobalTransform #6015

Closed
wants to merge 2 commits into from

Conversation

afonsolage
Copy link
Contributor

Objective

Both components already derives Reflect and it would be nice to have FromReflect in order to ser/de between those types without relaying on downcast, since it can fail between different platforms, like WebAssembly.

Solution

Derive FromReflect for Transform and GlobalTransform.

I thought if I should also derive FromReflect for GlobalTransform, since it's a computed component, but there may be some use cases where a GlobalTransform is needed to be sent over the wire, so I decided to do it.

@MrGVSV MrGVSV added C-Usability A simple quality-of-life change that makes Bevy easier to use A-Reflection Runtime information about types labels Sep 18, 2022
@rparrett rparrett added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Sep 19, 2022
@cart
Copy link
Member

cart commented Sep 22, 2022

bors r+

bors bot pushed a commit that referenced this pull request Sep 22, 2022
# Objective

Both components already derives `Reflect` and it would be nice to have `FromReflect` in order to ser/de between those types without relaying on `downcast`, since it can fail between different platforms, like WebAssembly.

## Solution

Derive `FromReflect` for `Transform` and `GlobalTransform`.

I thought if I should also derive `FromReflect` for `GlobalTransform`, since it's a computed component, but there may be some use cases where a `GlobalTransform` is needed to be sent over the wire, so I decided to do it.
@bors bors bot changed the title Derive FromReflect for Transform and GlobalTransform [Merged by Bors] - Derive FromReflect for Transform and GlobalTransform Sep 22, 2022
@bors bors bot closed this Sep 22, 2022
@afonsolage afonsolage deleted the transform_from_reflect branch September 22, 2022 06:49
vabrador pushed a commit to vabrador/bevy that referenced this pull request Sep 27, 2022
…e#6015)

Both components already derives `Reflect` and it would be nice to have `FromReflect` in order to ser/de between those types without relaying on `downcast`, since it can fail between different platforms, like WebAssembly.

Derive `FromReflect` for `Transform` and `GlobalTransform`.

I thought if I should also derive `FromReflect` for `GlobalTransform`, since it's a computed component, but there may be some use cases where a `GlobalTransform` is needed to be sent over the wire, so I decided to do it.
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 19, 2022
…e#6015)

# Objective

Both components already derives `Reflect` and it would be nice to have `FromReflect` in order to ser/de between those types without relaying on `downcast`, since it can fail between different platforms, like WebAssembly.

## Solution

Derive `FromReflect` for `Transform` and `GlobalTransform`.

I thought if I should also derive `FromReflect` for `GlobalTransform`, since it's a computed component, but there may be some use cases where a `GlobalTransform` is needed to be sent over the wire, so I decided to do it.
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
…e#6015)

# Objective

Both components already derives `Reflect` and it would be nice to have `FromReflect` in order to ser/de between those types without relaying on `downcast`, since it can fail between different platforms, like WebAssembly.

## Solution

Derive `FromReflect` for `Transform` and `GlobalTransform`.

I thought if I should also derive `FromReflect` for `GlobalTransform`, since it's a computed component, but there may be some use cases where a `GlobalTransform` is needed to be sent over the wire, so I decided to do it.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
…e#6015)

# Objective

Both components already derives `Reflect` and it would be nice to have `FromReflect` in order to ser/de between those types without relaying on `downcast`, since it can fail between different platforms, like WebAssembly.

## Solution

Derive `FromReflect` for `Transform` and `GlobalTransform`.

I thought if I should also derive `FromReflect` for `GlobalTransform`, since it's a computed component, but there may be some use cases where a `GlobalTransform` is needed to be sent over the wire, so I decided to do it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants