{"action":"created","comment":{"url":"https://api.github.com/repos/fireball-packages/scene/pulls/comments/45059748","id":45059748,"diff_hunk":"@@ -148,15 +148,26 @@ Editor.registerElement({\n     },\n \n     _initEngine: function () {\n+\n         // init asset library\n         //var importUrl = Url.format({\n         //    protocol: '',\n         //    pathname: Editor.importPath,\n         //    slashes: true,\n         //});\n-        var importUrl = Editor.importPath.replace(/\\\\/g, '/');\n-        var assetUrl = Path.join(Editor.projectInfo.path, 'assets').replace(/\\\\/g, '/');\n-        cc.AssetLibrary.init(importUrl, assetUrl);\n+        if (!cc.engine.isInitialized) {\n+            var importUrl = Editor.importPath.replace(/\\\\/g, '/');\n+            var assetUrl = Path.join(Editor.projectInfo.path, 'assets').replace(/\\\\/g, '/');\n+            cc.AssetLibrary.init(importUrl, assetUrl);\n+        }\n+        else {\n+            cc.game._prepared = false;","path":"panel/scene-view/scene-view.js","position":20,"original_position":20,"commit_id":"53f4ecf1a420c22a265e27ffdae78ba52a96fb13","original_commit_id":"53f4ecf1a420c22a265e27ffdae78ba52a96fb13","user":{"login":"2youyouo2","id":1862402,"avatar_url":"https://avatars.githubusercontent.com/u/1862402?v=3","gravatar_id":"","url":"https://api.github.com/users/2youyouo2","html_url":"https://github.com/2youyouo2","followers_url":"https://api.github.com/users/2youyouo2/followers","following_url":"https://api.github.com/users/2youyouo2/following{/other_user}","gists_url":"https://api.github.com/users/2youyouo2/gists{/gist_id}","starred_url":"https://api.github.com/users/2youyouo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2youyouo2/subscriptions","organizations_url":"https://api.github.com/users/2youyouo2/orgs","repos_url":"https://api.github.com/users/2youyouo2/repos","events_url":"https://api.github.com/users/2youyouo2/events{/privacy}","received_events_url":"https://api.github.com/users/2youyouo2/received_events","type":"User","site_admin":false},"body":"@jareguo \r\n去掉 webview 后，popup scene view 后 干掉之前的canvas, 再将scene view 重新贴回到 main scene 上时，需要重新 对 cocos 初始化。\r\n因为现在不像webview会重置cocos状态，这里需要将 手动将 cocos重置，目前是像下面这样处理的\r\n","created_at":"2015-11-17T13:36:53Z","updated_at":"2015-11-17T13:36:53Z","html_url":"https://github.com/fireball-packages/scene/pull/25#discussion_r45059748","pull_request_url":"https://api.github.com/repos/fireball-packages/scene/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/fireball-packages/scene/pulls/comments/45059748"},"html":{"href":"https://github.com/fireball-packages/scene/pull/25#discussion_r45059748"},"pull_request":{"href":"https://api.github.com/repos/fireball-packages/scene/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/fireball-packages/scene/pulls/25","id":50946727,"html_url":"https://github.com/fireball-packages/scene/pull/25","diff_url":"https://github.com/fireball-packages/scene/pull/25.diff","patch_url":"https://github.com/fireball-packages/scene/pull/25.patch","issue_url":"https://api.github.com/repos/fireball-packages/scene/issues/25","number":25,"state":"open","locked":false,"title":"fixed scene errors","user":{"login":"2youyouo2","id":1862402,"avatar_url":"https://avatars.githubusercontent.com/u/1862402?v=3","gravatar_id":"","url":"https://api.github.com/users/2youyouo2","html_url":"https://github.com/2youyouo2","followers_url":"https://api.github.com/users/2youyouo2/followers","following_url":"https://api.github.com/users/2youyouo2/following{/other_user}","gists_url":"https://api.github.com/users/2youyouo2/gists{/gist_id}","starred_url":"https://api.github.com/users/2youyouo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2youyouo2/subscriptions","organizations_url":"https://api.github.com/users/2youyouo2/orgs","repos_url":"https://api.github.com/users/2youyouo2/repos","events_url":"https://api.github.com/users/2youyouo2/events{/privacy}","received_events_url":"https://api.github.com/users/2youyouo2/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-17T13:33:14Z","updated_at":"2015-11-17T13:36:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01b147293b4746caa4a71332f462fa61f0a00dbb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fireball-packages/scene/pulls/25/commits","review_comments_url":"https://api.github.com/repos/fireball-packages/scene/pulls/25/comments","review_comment_url":"https://api.github.com/repos/fireball-packages/scene/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fireball-packages/scene/issues/25/comments","statuses_url":"https://api.github.com/repos/fireball-packages/scene/statuses/53f4ecf1a420c22a265e27ffdae78ba52a96fb13","head":{"label":"2youyouo2:dev","ref":"dev","sha":"53f4ecf1a420c22a265e27ffdae78ba52a96fb13","user":{"login":"2youyouo2","id":1862402,"avatar_url":"https://avatars.githubusercontent.com/u/1862402?v=3","gravatar_id":"","url":"https://api.github.com/users/2youyouo2","html_url":"https://github.com/2youyouo2","followers_url":"https://api.github.com/users/2youyouo2/followers","following_url":"https://api.github.com/users/2youyouo2/following{/other_user}","gists_url":"https://api.github.com/users/2youyouo2/gists{/gist_id}","starred_url":"https://api.github.com/users/2youyouo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2youyouo2/subscriptions","organizations_url":"https://api.github.com/users/2youyouo2/orgs","repos_url":"https://api.github.com/users/2youyouo2/repos","events_url":"https://api.github.com/users/2youyouo2/events{/privacy}","received_events_url":"https://api.github.com/users/2youyouo2/received_events","type":"User","site_admin":false},"repo":{"id":38746626,"name":"scene","full_name":"2youyouo2/scene","owner":{"login":"2youyouo2","id":1862402,"avatar_url":"https://avatars.githubusercontent.com/u/1862402?v=3","gravatar_id":"","url":"https://api.github.com/users/2youyouo2","html_url":"https://github.com/2youyouo2","followers_url":"https://api.github.com/users/2youyouo2/followers","following_url":"https://api.github.com/users/2youyouo2/following{/other_user}","gists_url":"https://api.github.com/users/2youyouo2/gists{/gist_id}","starred_url":"https://api.github.com/users/2youyouo2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2youyouo2/subscriptions","organizations_url":"https://api.github.com/users/2youyouo2/orgs","repos_url":"https://api.github.com/users/2youyouo2/repos","events_url":"https://api.github.com/users/2youyouo2/events{/privacy}","received_events_url":"https://api.github.com/users/2youyouo2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/2youyouo2/scene","description":"scene editor","fork":true,"url":"https://api.github.com/repos/2youyouo2/scene","forks_url":"https://api.github.com/repos/2youyouo2/scene/forks","keys_url":"https://api.github.com/repos/2youyouo2/scene/keys{/key_id}","collaborators_url":"https://api.github.com/repos/2youyouo2/scene/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/2youyouo2/scene/teams","hooks_url":"https://api.github.com/repos/2youyouo2/scene/hooks","issue_events_url":"https://api.github.com/repos/2youyouo2/scene/issues/events{/number}","events_url":"https://api.github.com/repos/2youyouo2/scene/events","assignees_url":"https://api.github.com/repos/2youyouo2/scene/assignees{/user}","branches_url":"https://api.github.com/repos/2youyouo2/scene/branches{/branch}","tags_url":"https://api.github.com/repos/2youyouo2/scene/tags","blobs_url":"https://api.github.com/repos/2youyouo2/scene/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/2youyouo2/scene/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/2youyouo2/scene/git/refs{/sha}","trees_url":"https://api.github.com/repos/2youyouo2/scene/git/trees{/sha}","statuses_url":"https://api.github.com/repos/2youyouo2/scene/statuses/{sha}","languages_url":"https://api.github.com/repos/2youyouo2/scene/languages","stargazers_url":"https://api.github.com/repos/2youyouo2/scene/stargazers","contributors_url":"https://api.github.com/repos/2youyouo2/scene/contributors","subscribers_url":"https://api.github.com/repos/2youyouo2/scene/subscribers","subscription_url":"https://api.github.com/repos/2youyouo2/scene/subscription","commits_url":"https://api.github.com/repos/2youyouo2/scene/commits{/sha}","git_commits_url":"https://api.github.com/repos/2youyouo2/scene/git/commits{/sha}","comments_url":"https://api.github.com/repos/2youyouo2/scene/comments{/number}","issue_comment_url":"https://api.github.com/repos/2youyouo2/scene/issues/comments{/number}","contents_url":"https://api.github.com/repos/2youyouo2/scene/contents/{+path}","compare_url":"https://api.github.com/repos/2youyouo2/scene/compare/{base}...{head}","merges_url":"https://api.github.com/repos/2youyouo2/scene/merges","archive_url":"https://api.github.com/repos/2youyouo2/scene/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/2youyouo2/scene/downloads","issues_url":"https://api.github.com/repos/2youyouo2/scene/issues{/number}","pulls_url":"https://api.github.com/repos/2youyouo2/scene/pulls{/number}","milestones_url":"https://api.github.com/repos/2youyouo2/scene/milestones{/number}","notifications_url":"https://api.github.com/repos/2youyouo2/scene/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/2youyouo2/scene/labels{/name}","releases_url":"https://api.github.com/repos/2youyouo2/scene/releases{/id}","created_at":"2015-07-08T10:05:43Z","updated_at":"2015-07-08T10:05:43Z","pushed_at":"2015-11-17T13:31:03Z","git_url":"git://github.com/2youyouo2/scene.git","ssh_url":"git@github.com:2youyouo2/scene.git","clone_url":"https://github.com/2youyouo2/scene.git","svn_url":"https://github.com/2youyouo2/scene","homepage":null,"size":229,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fireball-packages:dev","ref":"dev","sha":"f159b3f5356136913ce92c205d8618ba4b265a4d","user":{"login":"fireball-packages","id":12668295,"avatar_url":"https://avatars.githubusercontent.com/u/12668295?v=3","gravatar_id":"","url":"https://api.github.com/users/fireball-packages","html_url":"https://github.com/fireball-packages","followers_url":"https://api.github.com/users/fireball-packages/followers","following_url":"https://api.github.com/users/fireball-packages/following{/other_user}","gists_url":"https://api.github.com/users/fireball-packages/gists{/gist_id}","starred_url":"https://api.github.com/users/fireball-packages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fireball-packages/subscriptions","organizations_url":"https://api.github.com/users/fireball-packages/orgs","repos_url":"https://api.github.com/users/fireball-packages/repos","events_url":"https://api.github.com/users/fireball-packages/events{/privacy}","received_events_url":"https://api.github.com/users/fireball-packages/received_events","type":"Organization","site_admin":false},"repo":{"id":37584461,"name":"scene","full_name":"fireball-packages/scene","owner":{"login":"fireball-packages","id":12668295,"avatar_url":"https://avatars.githubusercontent.com/u/12668295?v=3","gravatar_id":"","url":"https://api.github.com/users/fireball-packages","html_url":"https://github.com/fireball-packages","followers_url":"https://api.github.com/users/fireball-packages/followers","following_url":"https://api.github.com/users/fireball-packages/following{/other_user}","gists_url":"https://api.github.com/users/fireball-packages/gists{/gist_id}","starred_url":"https://api.github.com/users/fireball-packages/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fireball-packages/subscriptions","organizations_url":"https://api.github.com/users/fireball-packages/orgs","repos_url":"https://api.github.com/users/fireball-packages/repos","events_url":"https://api.github.com/users/fireball-packages/events{/privacy}","received_events_url":"https://api.github.com/users/fireball-packages/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fireball-packages/scene","description":"scene editor","fork":false,"url":"https://api.github.com/repos/fireball-packages/scene","forks_url":"https://api.github.com/repos/fireball-packages/scene/forks","keys_url":"https://api.github.com/repos/fireball-packages/scene/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fireball-packages/scene/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fireball-packages/scene/teams","hooks_url":"https://api.github.com/repos/fireball-packages/scene/hooks","issue_events_url":"https://api.github.com/repos/fireball-packages/scene/issues/events{/number}","events_url":"https://api.github.com/repos/fireball-packages/scene/events","assignees_url":"https://api.github.com/repos/fireball-packages/scene/assignees{/user}","branches_url":"https://api.github.com/repos/fireball-packages/scene/branches{/branch}","tags_url":"https://api.github.com/repos/fireball-packages/scene/tags","blobs_url":"https://api.github.com/repos/fireball-packages/scene/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fireball-packages/scene/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fireball-packages/scene/git/refs{/sha}","trees_url":"https://api.github.com/repos/fireball-packages/scene/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fireball-packages/scene/statuses/{sha}","languages_url":"https://api.github.com/repos/fireball-packages/scene/languages","stargazers_url":"https://api.github.com/repos/fireball-packages/scene/stargazers","contributors_url":"https://api.github.com/repos/fireball-packages/scene/contributors","subscribers_url":"https://api.github.com/repos/fireball-packages/scene/subscribers","subscription_url":"https://api.github.com/repos/fireball-packages/scene/subscription","commits_url":"https://api.github.com/repos/fireball-packages/scene/commits{/sha}","git_commits_url":"https://api.github.com/repos/fireball-packages/scene/git/commits{/sha}","comments_url":"https://api.github.com/repos/fireball-packages/scene/comments{/number}","issue_comment_url":"https://api.github.com/repos/fireball-packages/scene/issues/comments{/number}","contents_url":"https://api.github.com/repos/fireball-packages/scene/contents/{+path}","compare_url":"https://api.github.com/repos/fireball-packages/scene/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fireball-packages/scene/merges","archive_url":"https://api.github.com/repos/fireball-packages/scene/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fireball-packages/scene/downloads","issues_url":"https://api.github.com/repos/fireball-packages/scene/issues{/number}","pulls_url":"https://api.github.com/repos/fireball-packages/scene/pulls{/number}","milestones_url":"https://api.github.com/repos/fireball-packages/scene/milestones{/number}","notifications_url":"https://api.github.com/repos/fireball-packages/scene/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fireball-packages/scene/labels{/name}","releases_url":"https://api.github.com/repos/fireball-packages/scene/releases{/id}","created_at":"2015-06-17T09:03:27Z","updated_at":"2015-09-16T13:51:55Z","pushed_at":"2015-11-17T13:33:14Z","git_url":"git://github.com/fireball-packages/scene.git","ssh_url":"git@github.com:fireball-packages/scene.git","clone_url":"https://github.com/fireball-packages/scene.git","svn_url":"https://github.com/fireball-packages/scene","homepage":null,"size":219,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fireball-packages/scene/pulls/25"},"html":{"href":"https://github.com/fireball-packages/scene/pull/25"},"issue":{"href":"https://api.github.com/repos/fireball-packages/scene/issues/25"},"comments":{"href":"https://api.github.com/repos/fireball-packages/scene/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/fireball-packages/scene/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/fireball-packages/scene/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fireball-packages/scene/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/fireball-packages/scene/statuses/53f4ecf1a420c22a265e27ffdae78ba52a96fb13"}}}}