Merge pull request #79306 from KoBeWi/broken_as_intended

Clarify return value of `get_dependencies()`
This commit is contained in:
Yuri Sizov 2023-07-12 13:03:07 +02:00 committed by GitHub
commit aa353df8cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -161,6 +161,7 @@ See the [release announcement](https://godotengine.org/article/godot-4-1-is-here
#### Core
- The strings returned by `ResourceLoader::get_dependencies()` now include paths in addition to UIDs ([GH-73131](https://github.com/godotengine/godot/pull/73131)).
- Optimize Node children management ([GH-75627](https://github.com/godotengine/godot/pull/75627)).
- Deprecate `NOTIFICATION_MOVED_IN_PARENT` for `NOTIFICATION_CHILD_ORDER_CHANGED` ([GH-75701](https://github.com/godotengine/godot/pull/75701)).
- Optimize `Node::add_child` validation ([GH-75760](https://github.com/godotengine/godot/pull/75760)).

View File

@ -35,6 +35,12 @@
<param index="0" name="path" type="String" />
<description>
Returns the dependencies for the resource at the given [param path].
[b]Note:[/b] The dependencies are returned with slices separated by [code]::[/code]. You can use [method String.get_slice] to get their components.
[codeblock]
for dep in ResourceLoader.get_dependencies(path):
print(dep.get_slice("::", 0)) # Prints UID.
print(dep.get_slice("::", 2)) # Prints path.
[/codeblock]
</description>
</method>
<method name="get_recognized_extensions_for_type">