godot/doc/classes/ResourceUID.xml
reduz 32b43cfeb3 Implement Resource UIDs
* Most resource types now have unique identifiers.
* Applies to text, binary and imported resources.
* File formats reference both by text and UID (when available). UID always has priority.
* Resource UIDs are 64 bits for better compatibility with the engine.
* Can be represented and used textually, example `uuid://dapwmgsmnl28u`.
* A special binary cache file is used and exported, containing the mappings.

Example of how it looks:

```GDScript
[gd_scene load_steps=2 format=3 uid="uid://dw86wq31afig2"]

[ext_resource type="PackedScene" uid="uid://bt36ojelx8q6c" path="res://subscene.scn" id="1_t56hs"]
```

GDScript, shaders and other special resource files can't currently provide UIDs, but this should be doable with special keywords on the files.
This will be reserved for future PRs.
2021-07-24 09:16:52 -03:00

74 lines
1.6 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="ResourceUID" inherits="Object" version="4.0">
<brief_description>
</brief_description>
<description>
</description>
<tutorials>
</tutorials>
<methods>
<method name="add_id">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="path" type="String">
</argument>
<description>
</description>
</method>
<method name="create_id" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
<method name="get_id_path" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
</description>
</method>
<method name="has_id" qualifiers="const">
<return type="bool">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
</description>
</method>
<method name="id_to_text" qualifiers="const">
<return type="String">
</return>
<argument index="0" name="id" type="int">
</argument>
<description>
</description>
</method>
<method name="set_id">
<return type="void">
</return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="path" type="String">
</argument>
<description>
</description>
</method>
<method name="text_to_id" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="text_id" type="String">
</argument>
<description>
</description>
</method>
</methods>
<constants>
<constant name="INVALID_ID" value="-1">
</constant>
</constants>
</class>