Function ResourcePreloader.addResource

Adds a resource to the preloader with the given name. If a resource with the given name already exists, the new resource will be renamed to "name N" where N is an incrementing number starting from 2.

void addResource (
  const(String) name,
  Resource resource
) nothrow @nogc;