-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
MaterialPipelineKey should have public fields #4507
Comments
It looks like the fields were private as |
Required to migrate to Bevy 0.7. Current the plugin can't work with 0.7 because of this upstream issue: bevyengine/bevy#4507
# Objective Fixes #4507. This comment provides a very good explanation: #4507 (comment). ## Solution Make `MaterialPipelineKey` fields public.
# Objective Fixes #4507. This comment provides a very good explanation: #4507 (comment). ## Solution Make `MaterialPipelineKey` fields public.
Fixed by #4508. |
# Objective Fixes bevyengine#4507. This comment provides a very good explanation: bevyengine#4507 (comment). ## Solution Make `MaterialPipelineKey` fields public.
# Objective Fixes bevyengine#4507. This comment provides a very good explanation: bevyengine#4507 (comment). ## Solution Make `MaterialPipelineKey` fields public.
In 0.6 MaterialPipeline used
(MeshPipelineKey, M::Key)
tuple as a key, whereM
is a custom material. But in 0.7 after #3959 it started using MaterialPipelineKey struct which is defined in the following way:It look nicer, but all fields are private, so I can't call
specialize
in my user code for such materials (because the function accepts a key).Here is how a real project uses it for overlay.
And here is my PR where I ported it. But it doesn't compile since in the mentioned place above I have to create
MaterialPipelineKey
(it compiles if I comment it out).The text was updated successfully, but these errors were encountered: