-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Clarify that Resource.duplicate(true)
doesn't duplicate subresources inside Array
or Dictionary
properties
#94142
Clarify that Resource.duplicate(true)
doesn't duplicate subresources inside Array
or Dictionary
properties
#94142
Conversation
I believe this is the way to go for this, even if we consider the current behavior a clear bug changing it without adding more options and complexity would IMO break compatibility with existing code. We can work further with improving the behavior (IMO by adding a flag for this), but I think the first step is to reduce confusion by adjusting the documentation to match reality |
639edc8
to
735e33f
Compare
I think it would be worthwhile including a workaround as well like mentioned in this comment #74918 (comment) |
The workaround is a bit too broad and non-exhaustive in my opinion. It has to be copied and pasted for every array/dictionary property. At the same time, anything more would be too verbose to fit the description. |
@Mickeon Fair enough, I think I might try and play around with an editor warning for when this issue happens 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wording looks good to me
…inside Array or Dictionary properties
735e33f
to
5488fef
Compare
- Subresource properties with the [constant PROPERTY_USAGE_ALWAYS_DUPLICATE] flag are always duplicated. | ||
- Subresource properties with the [constant PROPERTY_USAGE_NEVER_DUPLICATE] flag are never duplicated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That reminds me, these property flags are currently not surfaced in the inspector tooltips or class reference in any way. We should find a way to do this somehow.
Thanks! |
Partially addresses #74918 by documenting it. The issue has been bugging a lot of people for at least a year now, and with no fix in sight the documentation might as well mention it to save a lot of sweat and tears.