Skip to content

Commit

Permalink
Added a way for platforms to define a custom resource pack location.
Browse files Browse the repository at this point in the history
  • Loading branch information
Relintai committed Feb 17, 2024
1 parent 7da17bc commit fa2a54a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,14 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
}
#endif

if (!found) {
String crl = OS::get_singleton()->get_custom_platform_resource_pack_location();

if (!crl.empty()) {
found = _load_resource_pack(crl);
}
}

if (!found) {
// Try to load data pack at the location of the executable.
// As mentioned above, we have two potential names to attempt.
Expand Down
2 changes: 2 additions & 0 deletions core/os/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,8 @@ class OS {

virtual void process_and_drop_events() {}

virtual String get_custom_platform_resource_pack_location() { return String(); }

OS();
virtual ~OS();
};
Expand Down

0 comments on commit fa2a54a

Please sign in to comment.