Beispiel #1
0
void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {

	if (get_script_instance() && get_script_instance()->has_method("get_dependencies")) {
		PoolStringArray deps = get_script_instance()->call("get_dependencies", p_path, p_add_types);

		{
			PoolStringArray::Read r = deps.read();
			for (int i = 0; i < deps.size(); ++i) {
				p_dependencies->push_back(r[i]);
			}
		}
	}
}
Beispiel #2
0
void ResourceFormatLoader::get_recognized_extensions(List<String> *p_extensions) const {

	if (get_script_instance() && get_script_instance()->has_method("get_recognized_extensions")) {
		PoolStringArray exts = get_script_instance()->call("get_recognized_extensions");

		{
			PoolStringArray::Read r = exts.read();
			for (int i = 0; i < exts.size(); ++i) {
				p_extensions->push_back(r[i]);
			}
		}
	}
}