getResources = function (resourceIdentifier) {
    let resources = [];

    // get direct resource
    const resource = RSX[resourceIdentifier];
    if (resource != null) {
      resources.push(resource);
    }

    // reverse map
    resources = resources.concat(RSX.getResourcesByPath(resourceIdentifier));

    return resources;
  }
This script generates resource packages for dynamic loading by parsing all source files.
To add resources used in a source file to a specific package, add the following comment:
//pragma PKGS: package_name_1 package_name_2 package_name_n