{"action":"created","issue":{"url":"https://api.github.com/repos/CM3D2-01/CM3D2.AddModsSlider.Plugin/issues/5","labels_url":"https://api.github.com/repos/CM3D2-01/CM3D2.AddModsSlider.Plugin/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/CM3D2-01/CM3D2.AddModsSlider.Plugin/issues/5/comments","events_url":"https://api.github.com/repos/CM3D2-01/CM3D2.AddModsSlider.Plugin/issues/5/events","html_url":"https://github.com/CM3D2-01/CM3D2.AddModsSlider.Plugin/issues/5","id":106340187,"number":5,"title":"エディット画面の出入りを繰り返すと初期化完了までの時間が延びる","user":{"login":"neguse11","id":13947058,"avatar_url":"https://avatars.githubusercontent.com/u/13947058?v=3","gravatar_id":"","url":"https://api.github.com/users/neguse11","html_url":"https://github.com/neguse11","followers_url":"https://api.github.com/users/neguse11/followers","following_url":"https://api.github.com/users/neguse11/following{/other_user}","gists_url":"https://api.github.com/users/neguse11/gists{/gist_id}","starred_url":"https://api.github.com/users/neguse11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neguse11/subscriptions","organizations_url":"https://api.github.com/users/neguse11/orgs","repos_url":"https://api.github.com/users/neguse11/repos","events_url":"https://api.github.com/users/neguse11/events{/privacy}","received_events_url":"https://api.github.com/users/neguse11/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-14T13:24:23Z","updated_at":"2015-09-14T15:09:46Z","closed_at":null,"body":"## 現象\r\n\r\nエディット画面の出入りを繰り返すと、レベルのロード完了からinitModsSliderNGUIの処理完了までの時間が延びます\r\n\r\n\r\n## 確認方法\r\n\r\nAddModsSliderに以下を加えます\r\n\r\n```C#\r\npublic class AddModsSlider : UnityInjector.PluginBase\r\n{\r\n    float levelLoadedRealtime = 0f;\r\n    ...\r\n\r\n    public void OnLevelWasLoaded(int level)\r\n    {\r\n        levelLoadedRealtime = Time.realtimeSinceStartup;\r\n        ...\r\n    }\r\n\r\n    private bool initModsSliderNGUI()\r\n    {\r\n        float time0 = Time.realtimeSinceStartup;\r\n        ...\r\n        goAMSPanel.SetActive(false);\r\n        Debug.Log(string.Format(\"AddModSlider : Completed initialization. {0:F3}sec for function, {1:F3} sec since level loaded\", Time.realtimeSinceStartup - time0, Time.realtimeSinceStartup - levelLoadedRealtime));\r\n        return true;\r\n    }\r\n}\r\n```\r\n\r\nエディットの出入りを繰り返して時間を見る\r\n\r\n```\r\n(操作：エディットに入る (１回目))\r\nAddModSlider : Completed initialization. 0.316sec for function, 3.269 sec since level loaded\r\n\r\n(操作：OKでエディットから抜ける) すぐに (エディットに入る (2回目))\r\nAddModSlider : Completed initialization. 0.236sec for function, 4.123 sec since level loaded\r\n\r\n(操作：OKでエディットから抜ける) すぐに (エディットに入る (3回目))\r\nAddModSlider : Completed initialization. 0.231sec for function, 5.171 sec since level loaded\r\n\r\n(操作：OKでエディットから抜ける) すぐに (エディットに入る (4回目))\r\nAddModSlider : Completed initialization. 0.236sec for function, 6.154 sec since level loaded\r\n\r\n(操作：OKでエディットから抜ける) すぐに (エディットに入る (5回目))\r\nAddModSlider : Completed initialization. 0.236sec for function, 7.129 sec since level loaded\r\n```\r\n\r\ninitModsSliderNGUI内の処理時間は変わらないが、OnLevelWasLoadedからinitModsSliderNGUI完了までの時間が延びているのが分かります\r\n"},"comment":{"url":"https://api.github.com/repos/CM3D2-01/CM3D2.AddModsSlider.Plugin/issues/comments/140111444","html_url":"https://github.com/CM3D2-01/CM3D2.AddModsSlider.Plugin/issues/5#issuecomment-140111444","issue_url":"https://api.github.com/repos/CM3D2-01/CM3D2.AddModsSlider.Plugin/issues/5","id":140111444,"user":{"login":"neguse11","id":13947058,"avatar_url":"https://avatars.githubusercontent.com/u/13947058?v=3","gravatar_id":"","url":"https://api.github.com/users/neguse11","html_url":"https://github.com/neguse11","followers_url":"https://api.github.com/users/neguse11/followers","following_url":"https://api.github.com/users/neguse11/following{/other_user}","gists_url":"https://api.github.com/users/neguse11/gists{/gist_id}","starred_url":"https://api.github.com/users/neguse11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neguse11/subscriptions","organizations_url":"https://api.github.com/users/neguse11/orgs","repos_url":"https://api.github.com/users/neguse11/repos","events_url":"https://api.github.com/users/neguse11/events{/privacy}","received_events_url":"https://api.github.com/users/neguse11/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T15:09:46Z","updated_at":"2015-09-14T15:09:46Z","body":"おお。単純ミスでよかったです :smiley: "}}