Expose helper methods for converting UIDs

This commit is contained in:
kobewi
2025-05-22 15:08:22 +02:00
parent 4a44078451
commit 9c37ca5383
2 changed files with 25 additions and 0 deletions

View File

@@ -364,6 +364,10 @@ void ResourceUID::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_id_path", "id"), &ResourceUID::get_id_path);
ClassDB::bind_method(D_METHOD("remove_id", "id"), &ResourceUID::remove_id);
ClassDB::bind_static_method("ResourceUID", D_METHOD("uid_to_path", "uid"), &ResourceUID::uid_to_path);
ClassDB::bind_static_method("ResourceUID", D_METHOD("path_to_uid", "path"), &ResourceUID::path_to_uid);
ClassDB::bind_static_method("ResourceUID", D_METHOD("ensure_path", "path_or_uid"), &ResourceUID::ensure_path);
BIND_CONSTANT(INVALID_ID)
}
ResourceUID *ResourceUID::singleton = nullptr;