Ability to change a resource UID from API
* Works for text, binary and imported resources * Allows better clean up of duplicate files. TODO (future PRs): * Use this API for assigning new UIDs to copied files. * Use this API for UID conflict on FS scanning (if more than one file has the same UID, the newer one(s) should get assigned a different UID).
This commit is contained in:
@ -32,6 +32,7 @@
|
||||
#define RESOURCE_IMPORTER_H
|
||||
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/io/resource_saver.h"
|
||||
|
||||
class ResourceImporter;
|
||||
|
||||
@ -149,4 +150,11 @@ public:
|
||||
|
||||
VARIANT_ENUM_CAST(ResourceImporter::ImportOrder);
|
||||
|
||||
class ResourceFormatImporterSaver : public ResourceFormatSaver {
|
||||
GDCLASS(ResourceFormatImporterSaver, ResourceFormatSaver)
|
||||
|
||||
public:
|
||||
virtual Error set_uid(const String &p_path, ResourceUID::ID p_uid) override;
|
||||
};
|
||||
|
||||
#endif // RESOURCE_IMPORTER_H
|
||||
|
||||
Reference in New Issue
Block a user