MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_uid

Method get_uid

compat/resource_compat_text.cpp:1697–1721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1695}
1696
1697ResourceUID::ID ResourceLoaderCompatText::get_uid(Ref<FileAccess> p_f) {
1698 error = OK;
1699
1700 lines = 1;
1701 f = p_f;
1702
1703 stream.f = f;
1704
1705 ignore_resource_parsing = true;
1706
1707 VariantParser::Tag tag;
1708 Error err = VariantParserCompat::parse_tag(&stream, lines, error_text, tag);
1709
1710 if (err) {
1711 _printerr();
1712 return ResourceUID::INVALID_ID;
1713 }
1714
1715 if (tag.fields.has("uid")) { //field is optional
1716 String uidt = tag.fields["uid"];
1717 return ResourceUID::get_singleton()->text_to_id(uidt);
1718 }
1719
1720 return ResourceUID::INVALID_ID;
1721}
1722
1723/////////////////////
1724

Callers 1

get_resource_uidMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected