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

Set surface_override_material to RID() when the MeshInstance3D is freed #88284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rindbee
Copy link
Contributor

@Rindbee Rindbee commented Feb 13, 2024

For resources with resource_local_to_scene enabled, a copy of the original resource instance is usually used. When the node instance is freed, the copied resouce instance may be freed soon. However, the relevant data in RenderingServer may not be synchronized in time, which may cause some error messages to be output.

Fix #88206.

@Rindbee Rindbee requested a review from a team as a code owner February 13, 2024 14:25
@akien-mga akien-mga requested a review from a team February 13, 2024 14:55
@akien-mga akien-mga added this to the 4.3 milestone Feb 13, 2024
…is freed

For resources with `resource_local_to_scene` enabled, a copy of the
original resource instance is usually used. When the node instance
is freed, the copied resouce instance may be freed soon. However,
the relevant data in `RenderingServer` may not be synchronized in
time, which may cause some error messages to be output.

Set `surface_override_material` to `RID()` when the `MeshInstance3D`
is freed.
@Rindbee Rindbee force-pushed the reset-surface_override_material-to-empty-during-NOTIFICATION_PREDELETE-in-MeshInstance3D branch from 4d5d259 to 8ea0abe Compare February 14, 2024 00:28
@Rindbee Rindbee changed the title Set surface_override_material to RID() before the MeshInstance3D is freed Set surface_override_material to RID() when the MeshInstance3D is freed Feb 14, 2024
@KoBeWi KoBeWi modified the milestones: 4.3, 4.4 Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set resource_local_to_scene in surface_material_override causes error
3 participants