浏览代码

Merge pull request #82849 from KoBeWi/change_dir_to_parallel_universe

Clarify `change_dir()` and access scopes
Rémi Verschelde 1 年之前
父节点
当前提交
d31794c4a2
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      doc/classes/DirAccess.xml

+ 1 - 0
doc/classes/DirAccess.xml

@@ -71,6 +71,7 @@
 			<description>
 			<description>
 				Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
 				Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]).
 				Returns one of the [enum Error] code constants ([constant OK] on success).
 				Returns one of the [enum Error] code constants ([constant OK] on success).
+				[b]Note:[/b] The new directory must be within the same scope, e.g. when you had opened a directory inside [code]res://[/code], you can't change it to [code]user://[/code] directory. If you need to open a directory in another access scope, use [method open] to create a new instance instead.
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="copy">
 		<method name="copy">