summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-16 10:52:19 +0200
committerGitHub <noreply@github.com>2021-09-16 10:52:19 +0200
commitf24a98024df84023936de9c7a0c7b787c76c6294 (patch)
tree64f3783be6ece15c7c548b761a5225396f27ab28
parentdc7f5c681c1246d2c7716bb123a4726152369ecc (diff)
parenta6108f8a3dea4d05a197b5c01b0195ff8f56be35 (diff)
Merge pull request #44885 from Jummit/duplicate-docs
Clarify that duplicate only copies exported members and fails with a constructor
-rw-r--r--doc/classes/Resource.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 65dedf5280..efb0339aa7 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -16,7 +16,8 @@
<return type="Resource" />
<argument index="0" name="subresources" type="bool" default="false" />
<description>
- Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources.
+ Duplicates the resource, returning a new resource with the exported members copied. [b]Note:[/b] To duplicate the resource the constructor is called without arguments. This method will error when the constructor doesn't have default values.
+ By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources.
[b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
[b]Note:[/b] When duplicating a resource, only [code]export[/code]ed properties are copied. Other properties will be set to their default value in the new resource.
</description>