Added a way for platforms to define a custom resource pack location.

This commit is contained in:
Relintai 2024-02-17 22:14:44 +01:00
parent 7da17bca02
commit fa2a54a019
2 changed files with 10 additions and 0 deletions

View File

@ -399,6 +399,14 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
} }
#endif #endif
if (!found) {
String crl = OS::get_singleton()->get_custom_platform_resource_pack_location();
if (!crl.empty()) {
found = _load_resource_pack(crl);
}
}
if (!found) { if (!found) {
// Try to load data pack at the location of the executable. // Try to load data pack at the location of the executable.
// As mentioned above, we have two potential names to attempt. // As mentioned above, we have two potential names to attempt.

View File

@ -687,6 +687,8 @@ public:
virtual void process_and_drop_events() {} virtual void process_and_drop_events() {}
virtual String get_custom_platform_resource_pack_location() { return String(); }
OS(); OS();
virtual ~OS(); virtual ~OS();
}; };