godotengine / godotengine/godot-docs
ResourceLoader documentation should explain that all methods with res:// path parameter (exists, load, etc.) support passing UID
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**Your Godot version:**
v4.6.stable.official [89cea1439]
**Issue description:**
I was hesitating a lot when using `ResourceLoader.exists` and `load` with my variable:
```gd
@export_file("*.tscn") var scene_uid: String
```
(which stores a UID whether toggling the Inspector view to show `res://` path or `uid://`, as explained in both `@export_file` doc and the view mode toggle button tooltip)
as I wasn't sure if it was supporting scene file UID or just asset path as written in the documentation. So I would tend to convert all my variables with `ResourceUID.path_to_uid` but most of the time, it wasn't necessary.
For instance, the doc for `exists` just says:
> ```gd
> bool exists(path: String, type_hint: String = "")
> ```
>
> Returns whether a recognized resource exists for the given path.
Looking at https://godotengine.org/article/uid-changes-coming-to-godot-4-4/ it seems that Godot calls both `res://` and `uid://` "paths", so maybe it is considered obvious that Godot methods are res path/UID-agnostic now, but I think it's worth indicating for people who've been working with older versions of Godot and wondering how the transition affected the resource loading API (in my mind, a UID was a number not a path).
To avoid repetition, maybe just mentioning once at the top that both res path and UID path are supported.
**URL to the documentation page (if already existing):**
https://docs.godotengine.org/en/stable/classes/class_resourceloader.html
Contributor guide
No contributing guide indexed for this repository
Research direction
Open the linked ResourceLoader class documentation and review the descriptions and signatures for exists, load, and other methods that accept a resource path. Add a concise explanation that these methods accept both res:// paths and uid:// paths, then verify the wording is consistent across the page and the documentation builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100