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

Fix error when saving nested non-persistent resource #90902

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

Conversation

timothyqiu
Copy link
Member

@timothyqiu timothyqiu commented Apr 19, 2024

Found this bug when tweaking the resource format saver.

If a property is PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT and is a resource containing another new resource, saving the scene / resource will fail:

Resource was not pre cached for the resource section, bug?

In the engine, only ImageTexture* has PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT properties. And those properties don't have nested resource, thus won't trigger this bug.

Fixes #92820


To reproduce this bug, use this MRP (test-4.zip).

  1. Open new_resource.tres in the inspector.
  2. Click "Generate" property (it won't change, just to set temporary value for the actual non-persistent property)
  3. Click save.

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.

PackedByteArray resource compression not triggered by sub-resources
1 participant