{"action":"created","comment":{"url":"https://api.github.com/repos/cocos-creator/engine/pulls/comments/232559507","pull_request_review_id":173777092,"id":232559507,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjU1OTUwNw==","diff_hunk":"@@ -486,6 +512,76 @@ proto.loadRes = function (url, type, progressCallback, completeCallback) {\n     }\n };\n \n+/**\n+ * Everything like loadRes, but just for internal assets. Notice that you can not\n+ * use releaseRes() to release built-in asset, instead use release() or releaseAsset()\n+ * @method _loadBuiltin\n+ * @private\n+ */\n+proto._loadBuiltin = function (url, type, progressCallback, completeCallback) {\n+    var args = this._parseLoadResArgs(type, progressCallback, completeCallback);\n+    type = args.type;\n+    progressCallback = args.onProgress;\n+    completeCallback = args.onComplete;\n+    var self = this;\n+    var uuid = self._getBuiltinUuid(url, type);\n+    if (uuid) {\n+        this.load(\n+            {\n+                type: 'uuid',\n+                uuid: uuid\n+            },\n+            progressCallback,\n+            function (err, asset) {\n+                if (asset) {\n+                    // should not release these assets, even if they are static referenced in the scene.\n+                    self.setAutoReleaseRecursively(uuid, false);\n+                }\n+                if (completeCallback) {\n+                    completeCallback(err, asset);\n+                }\n+            }\n+        );\n+    }\n+    else {\n+        self._urlNotFound(url, type, completeCallback);\n+    }\n+};\n+\n+/**\n+ * Everything like loadResDir, but just for internal assets. Notice that you can not \n+ * use releaseRes() to release built-in asset, instead use release() or releaseAsset()\n+ * @method _loadBuiltinDir\n+ * @private\n+ */\n+proto._loadBuiltinDir = function (url, type ,progressCallback, completeCallback) {\n+    var args = this._parseLoadResArgs(type, progressCallback, completeCallback);","path":"cocos2d/core/load-pipeline/CCLoader.js","position":87,"original_position":87,"commit_id":"1ebcd094bb8cb778547351cd6eae59bbf341af1a","original_commit_id":"1ebcd094bb8cb778547351cd6eae59bbf341af1a","user":{"login":"jareguo","id":1503156,"node_id":"MDQ6VXNlcjE1MDMxNTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1503156?v=4","gravatar_id":"","url":"https://api.github.com/users/jareguo","html_url":"https://github.com/jareguo","followers_url":"https://api.github.com/users/jareguo/followers","following_url":"https://api.github.com/users/jareguo/following{/other_user}","gists_url":"https://api.github.com/users/jareguo/gists{/gist_id}","starred_url":"https://api.github.com/users/jareguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jareguo/subscriptions","organizations_url":"https://api.github.com/users/jareguo/orgs","repos_url":"https://api.github.com/users/jareguo/repos","events_url":"https://api.github.com/users/jareguo/events{/privacy}","received_events_url":"https://api.github.com/users/jareguo/received_events","type":"User","site_admin":false},"body":"同上，建议扩展并内部调用 loadResDir。","created_at":"2018-11-12T07:56:03Z","updated_at":"2018-11-12T07:56:28Z","html_url":"https://github.com/cocos-creator/engine/pull/3485#discussion_r232559507","pull_request_url":"https://api.github.com/repos/cocos-creator/engine/pulls/3485","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/comments/232559507"},"html":{"href":"https://github.com/cocos-creator/engine/pull/3485#discussion_r232559507"},"pull_request":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/3485"}}},"pull_request":{"url":"https://api.github.com/repos/cocos-creator/engine/pulls/3485","id":229585402,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5NTg1NDAy","html_url":"https://github.com/cocos-creator/engine/pull/3485","diff_url":"https://github.com/cocos-creator/engine/pull/3485.diff","patch_url":"https://github.com/cocos-creator/engine/pull/3485.patch","issue_url":"https://api.github.com/repos/cocos-creator/engine/issues/3485","number":3485,"state":"open","locked":false,"title":"Add some interfaces to load internal resources","user":{"login":"holycanvas","id":15109777,"node_id":"MDQ6VXNlcjE1MTA5Nzc3","avatar_url":"https://avatars2.githubusercontent.com/u/15109777?v=4","gravatar_id":"","url":"https://api.github.com/users/holycanvas","html_url":"https://github.com/holycanvas","followers_url":"https://api.github.com/users/holycanvas/followers","following_url":"https://api.github.com/users/holycanvas/following{/other_user}","gists_url":"https://api.github.com/users/holycanvas/gists{/gist_id}","starred_url":"https://api.github.com/users/holycanvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holycanvas/subscriptions","organizations_url":"https://api.github.com/users/holycanvas/orgs","repos_url":"https://api.github.com/users/holycanvas/repos","events_url":"https://api.github.com/users/holycanvas/events{/privacy}","received_events_url":"https://api.github.com/users/holycanvas/received_events","type":"User","site_admin":false},"body":"Re: cocos-creator/2d-tasks#174\r\n\r\nChanges:\r\n * 加入接口在编辑器或者运行时加载资源。\r\nAssetLibrary._loadAssetFromDB和AssetLibrary._loadAssetsFromDB在编辑器下可以加载任一资源，无论是internal还是assets下的任意目录中，运行时下只能加载resources目录中的资源\r\n\r\nccloader._loadBuiltin和cc.loader._loadBuiltinDir只能在运行时下用，只能加载internal/resources下的资源\r\n\r\n尽量统一使用AssetLibrary._loadAssetFromDB和AssetLibrary._loadAssetsFromDB，运行时和编辑器都能使用\r\n\r\n<!-- Note: Makes sure these boxes are checked before submitting your PR - thank you!\r\n\r\n- [ ] If your pull request has gone \"stale\", you should **rebase** your work on top of the latest version of the upstream branch.\r\n- [ ] If your commit history is full of small, unimportant commits (such as \"fix pep8\" or \"update tests\"), **squash** your commits down to a few, or one, discreet changesets before submitting a pull request.\r\n\r\n- For official teams:\r\n  - [ ] Check that your javascript is following our [style guide](https://docs.cocos.com/creator/manual/zh/scripting/reference/coding-standards.html) and end files with a newline\r\n  - [ ] Document new code with comments in source code based on [API Docs](https://github.com/cocos-creator/fireball#api-docs)\r\n  - [ ] Make sure any **runtime** log information in `cc.log`, `cc.error` or `new Error()` has been moved into `EngineErrorMap.md` with an ID, and use `cc.logID(id)` or `new Error(cc.debug.getError(id))` instead.\r\n\r\n-->\r\n","created_at":"2018-11-09T04:30:06Z","updated_at":"2018-11-12T07:56:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f6bd4f87e7c847d21b817bdf42fe3ebb96d6907","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cocos-creator/engine/pulls/3485/commits","review_comments_url":"https://api.github.com/repos/cocos-creator/engine/pulls/3485/comments","review_comment_url":"https://api.github.com/repos/cocos-creator/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cocos-creator/engine/issues/3485/comments","statuses_url":"https://api.github.com/repos/cocos-creator/engine/statuses/1ebcd094bb8cb778547351cd6eae59bbf341af1a","head":{"label":"holycanvas:master","ref":"master","sha":"1ebcd094bb8cb778547351cd6eae59bbf341af1a","user":{"login":"holycanvas","id":15109777,"node_id":"MDQ6VXNlcjE1MTA5Nzc3","avatar_url":"https://avatars2.githubusercontent.com/u/15109777?v=4","gravatar_id":"","url":"https://api.github.com/users/holycanvas","html_url":"https://github.com/holycanvas","followers_url":"https://api.github.com/users/holycanvas/followers","following_url":"https://api.github.com/users/holycanvas/following{/other_user}","gists_url":"https://api.github.com/users/holycanvas/gists{/gist_id}","starred_url":"https://api.github.com/users/holycanvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holycanvas/subscriptions","organizations_url":"https://api.github.com/users/holycanvas/orgs","repos_url":"https://api.github.com/users/holycanvas/repos","events_url":"https://api.github.com/users/holycanvas/events{/privacy}","received_events_url":"https://api.github.com/users/holycanvas/received_events","type":"User","site_admin":false},"repo":{"id":154475122,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ0NzUxMjI=","name":"engine","full_name":"holycanvas/engine","private":false,"owner":{"login":"holycanvas","id":15109777,"node_id":"MDQ6VXNlcjE1MTA5Nzc3","avatar_url":"https://avatars2.githubusercontent.com/u/15109777?v=4","gravatar_id":"","url":"https://api.github.com/users/holycanvas","html_url":"https://github.com/holycanvas","followers_url":"https://api.github.com/users/holycanvas/followers","following_url":"https://api.github.com/users/holycanvas/following{/other_user}","gists_url":"https://api.github.com/users/holycanvas/gists{/gist_id}","starred_url":"https://api.github.com/users/holycanvas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holycanvas/subscriptions","organizations_url":"https://api.github.com/users/holycanvas/orgs","repos_url":"https://api.github.com/users/holycanvas/repos","events_url":"https://api.github.com/users/holycanvas/events{/privacy}","received_events_url":"https://api.github.com/users/holycanvas/received_events","type":"User","site_admin":false},"html_url":"https://github.com/holycanvas/engine","description":"The engine for Cocos Creator","fork":true,"url":"https://api.github.com/repos/holycanvas/engine","forks_url":"https://api.github.com/repos/holycanvas/engine/forks","keys_url":"https://api.github.com/repos/holycanvas/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holycanvas/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holycanvas/engine/teams","hooks_url":"https://api.github.com/repos/holycanvas/engine/hooks","issue_events_url":"https://api.github.com/repos/holycanvas/engine/issues/events{/number}","events_url":"https://api.github.com/repos/holycanvas/engine/events","assignees_url":"https://api.github.com/repos/holycanvas/engine/assignees{/user}","branches_url":"https://api.github.com/repos/holycanvas/engine/branches{/branch}","tags_url":"https://api.github.com/repos/holycanvas/engine/tags","blobs_url":"https://api.github.com/repos/holycanvas/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holycanvas/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holycanvas/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/holycanvas/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holycanvas/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/holycanvas/engine/languages","stargazers_url":"https://api.github.com/repos/holycanvas/engine/stargazers","contributors_url":"https://api.github.com/repos/holycanvas/engine/contributors","subscribers_url":"https://api.github.com/repos/holycanvas/engine/subscribers","subscription_url":"https://api.github.com/repos/holycanvas/engine/subscription","commits_url":"https://api.github.com/repos/holycanvas/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/holycanvas/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/holycanvas/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/holycanvas/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/holycanvas/engine/contents/{+path}","compare_url":"https://api.github.com/repos/holycanvas/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holycanvas/engine/merges","archive_url":"https://api.github.com/repos/holycanvas/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holycanvas/engine/downloads","issues_url":"https://api.github.com/repos/holycanvas/engine/issues{/number}","pulls_url":"https://api.github.com/repos/holycanvas/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/holycanvas/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/holycanvas/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holycanvas/engine/labels{/name}","releases_url":"https://api.github.com/repos/holycanvas/engine/releases{/id}","deployments_url":"https://api.github.com/repos/holycanvas/engine/deployments","created_at":"2018-10-24T09:33:14Z","updated_at":"2018-11-09T09:03:53Z","pushed_at":"2018-11-09T09:03:51Z","git_url":"git://github.com/holycanvas/engine.git","ssh_url":"git@github.com:holycanvas/engine.git","clone_url":"https://github.com/holycanvas/engine.git","svn_url":"https://github.com/holycanvas/engine","homepage":"http://www.cocos2d-x.org/creator","size":39379,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cocos-creator:master","ref":"master","sha":"66082d74a520cb76d6254ff56725347d619e1885","user":{"login":"cocos-creator","id":6937061,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MzcwNjE=","avatar_url":"https://avatars3.githubusercontent.com/u/6937061?v=4","gravatar_id":"","url":"https://api.github.com/users/cocos-creator","html_url":"https://github.com/cocos-creator","followers_url":"https://api.github.com/users/cocos-creator/followers","following_url":"https://api.github.com/users/cocos-creator/following{/other_user}","gists_url":"https://api.github.com/users/cocos-creator/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos-creator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos-creator/subscriptions","organizations_url":"https://api.github.com/users/cocos-creator/orgs","repos_url":"https://api.github.com/users/cocos-creator/repos","events_url":"https://api.github.com/users/cocos-creator/events{/privacy}","received_events_url":"https://api.github.com/users/cocos-creator/received_events","type":"Organization","site_admin":false},"repo":{"id":47440536,"node_id":"MDEwOlJlcG9zaXRvcnk0NzQ0MDUzNg==","name":"engine","full_name":"cocos-creator/engine","private":false,"owner":{"login":"cocos-creator","id":6937061,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MzcwNjE=","avatar_url":"https://avatars3.githubusercontent.com/u/6937061?v=4","gravatar_id":"","url":"https://api.github.com/users/cocos-creator","html_url":"https://github.com/cocos-creator","followers_url":"https://api.github.com/users/cocos-creator/followers","following_url":"https://api.github.com/users/cocos-creator/following{/other_user}","gists_url":"https://api.github.com/users/cocos-creator/gists{/gist_id}","starred_url":"https://api.github.com/users/cocos-creator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocos-creator/subscriptions","organizations_url":"https://api.github.com/users/cocos-creator/orgs","repos_url":"https://api.github.com/users/cocos-creator/repos","events_url":"https://api.github.com/users/cocos-creator/events{/privacy}","received_events_url":"https://api.github.com/users/cocos-creator/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cocos-creator/engine","description":"The engine for Cocos Creator","fork":false,"url":"https://api.github.com/repos/cocos-creator/engine","forks_url":"https://api.github.com/repos/cocos-creator/engine/forks","keys_url":"https://api.github.com/repos/cocos-creator/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cocos-creator/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cocos-creator/engine/teams","hooks_url":"https://api.github.com/repos/cocos-creator/engine/hooks","issue_events_url":"https://api.github.com/repos/cocos-creator/engine/issues/events{/number}","events_url":"https://api.github.com/repos/cocos-creator/engine/events","assignees_url":"https://api.github.com/repos/cocos-creator/engine/assignees{/user}","branches_url":"https://api.github.com/repos/cocos-creator/engine/branches{/branch}","tags_url":"https://api.github.com/repos/cocos-creator/engine/tags","blobs_url":"https://api.github.com/repos/cocos-creator/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cocos-creator/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cocos-creator/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/cocos-creator/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cocos-creator/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/cocos-creator/engine/languages","stargazers_url":"https://api.github.com/repos/cocos-creator/engine/stargazers","contributors_url":"https://api.github.com/repos/cocos-creator/engine/contributors","subscribers_url":"https://api.github.com/repos/cocos-creator/engine/subscribers","subscription_url":"https://api.github.com/repos/cocos-creator/engine/subscription","commits_url":"https://api.github.com/repos/cocos-creator/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/cocos-creator/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/cocos-creator/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/cocos-creator/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/cocos-creator/engine/contents/{+path}","compare_url":"https://api.github.com/repos/cocos-creator/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cocos-creator/engine/merges","archive_url":"https://api.github.com/repos/cocos-creator/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cocos-creator/engine/downloads","issues_url":"https://api.github.com/repos/cocos-creator/engine/issues{/number}","pulls_url":"https://api.github.com/repos/cocos-creator/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/cocos-creator/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/cocos-creator/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cocos-creator/engine/labels{/name}","releases_url":"https://api.github.com/repos/cocos-creator/engine/releases{/id}","deployments_url":"https://api.github.com/repos/cocos-creator/engine/deployments","created_at":"2015-12-05T03:28:59Z","updated_at":"2018-11-12T03:10:00Z","pushed_at":"2018-11-12T07:28:56Z","git_url":"git://github.com/cocos-creator/engine.git","ssh_url":"git@github.com:cocos-creator/engine.git","clone_url":"https://github.com/cocos-creator/engine.git","svn_url":"https://github.com/cocos-creator/engine","homepage":"http://www.cocos2d-x.org/creator","size":39483,"stargazers_count":777,"watchers_count":777,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":481,"mirror_url":null,"archived":false,"open_issues_count":144,"license":null,"forks":481,"open_issues":144,"watchers":777,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/3485"},"html":{"href":"https://github.com/cocos-creator/engine/pull/3485"},"issue":{"href":"https://api.github.com/repos/cocos-creator/engine/issues/3485"},"comments":{"href":"https://api.github.com/repos/cocos-creator/engine/issues/3485/comments"},"review_comments":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/3485/comments"},"review_comment":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cocos-creator/engine/pulls/3485/commits"},"statuses":{"href":"https://api.github.com/repos/cocos-creator/engine/statuses/1ebcd094bb8cb778547351cd6eae59bbf341af1a"}},"author_association":"NONE"}}
{"actor":{"display_login":"jareguo"}}