Use resourceName if present.