{"action":"created","issue":{"url":"https://api.github.com/repos/fairygui/FairyGUI-unity/issues/27","repository_url":"https://api.github.com/repos/fairygui/FairyGUI-unity","labels_url":"https://api.github.com/repos/fairygui/FairyGUI-unity/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/fairygui/FairyGUI-unity/issues/27/comments","events_url":"https://api.github.com/repos/fairygui/FairyGUI-unity/issues/27/events","html_url":"https://github.com/fairygui/FairyGUI-unity/issues/27","id":190492195,"number":27,"title":"Remote Images","user":{"login":"aammfe","id":11896817,"avatar_url":"https://avatars.githubusercontent.com/u/11896817?v=3","gravatar_id":"","url":"https://api.github.com/users/aammfe","html_url":"https://github.com/aammfe","followers_url":"https://api.github.com/users/aammfe/followers","following_url":"https://api.github.com/users/aammfe/following{/other_user}","gists_url":"https://api.github.com/users/aammfe/gists{/gist_id}","starred_url":"https://api.github.com/users/aammfe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aammfe/subscriptions","organizations_url":"https://api.github.com/users/aammfe/orgs","repos_url":"https://api.github.com/users/aammfe/repos","events_url":"https://api.github.com/users/aammfe/events{/privacy}","received_events_url":"https://api.github.com/users/aammfe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-19T11:41:10Z","updated_at":"2016-11-20T05:49:34Z","closed_at":null,"body":"after seeing IconManager.cs i was thinking about how i can load remote images , \r\nIconManager is a complete package for loading and caching images , but its fields are not protected , means i could not extends this...\r\n\r\n\r\nso i have made some alternations in Run() , plz accept these changes or if you have better idea ,do implement.\r\n\r\n\r\n\r\n`IEnumerator Run()\r\n\t{\r\n\t\t_started = true;\r\n\r\n\t\tLoadItem item = null;\r\n\t\twhile (true)\r\n\t\t{\r\n\t\t\tif (_items.Count > 0)\r\n\t\t\t{\r\n\t\t\t\titem = _items[0];\r\n\t\t\t\t_items.RemoveAt(0);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tif (_pool.ContainsKey(item.url))\r\n\t\t\t{\r\n\t\t\t\t//Debug.Log(\"hit \" + item.url);\r\n\r\n\t\t\t\tNTexture texture = (NTexture)_pool[item.url];\r\n\t\t\t\ttexture.refCount++;\r\n\r\n\t\t\t\tif (item.onSuccess != null)\r\n\t\t\t\t\titem.onSuccess(texture);\r\n\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\r\n            string url ;\r\n            bool indernal;\r\n\r\n\r\n            if (item.url.IndexOf(\"ui://\") == 0)\r\n            {\r\n                url = _basePath + item.url + \".ab\";\r\n                indernal = true;\r\n            }\r\n            else\r\n            {\r\n                url = item.url;\r\n                indernal = false;\r\n            }\r\n\r\n\r\n\r\n\r\n            WWW www = new WWW(url);\r\n\t\t\tyield return www;\r\n\r\n\t\t\tif (string.IsNullOrEmpty(www.error))\r\n\t\t\t{\r\n\r\n                NTexture texture;\r\n\r\n                if (indernal)\r\n                {\r\n                    AssetBundle bundle = www.assetBundle;\r\n                    if (bundle == null)\r\n                    {\r\n                        Debug.LogWarning(\"Run Window->Build FairyGUI example Bundles first.\");\r\n                        if (item.onFail != null)\r\n                            item.onFail(www.error);\r\n                        continue;\r\n                    }\r\n#if UNITY_5\r\n                    texture = new NTexture(bundle.LoadAllAssets<Texture2D>()[0]);\r\n#else\r\n\t\t\t\tNTexture texture = new NTexture((Texture2D)bundle.mainAsset);\r\n#endif\r\n\r\n                    bundle.Unload(false);\r\n                }\r\n                else\r\n                {\r\n                    texture = new NTexture( www.texture);\r\n\r\n                }\r\n                \r\n\r\n                texture.refCount++;\r\n\t\t\t\t\r\n\t\t\t\t_pool[item.url] = texture;\r\n\r\n\t\t\t\tif (item.onSuccess != null)\r\n\t\t\t\t\titem.onSuccess(texture);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (item.onFail != null)\r\n\t\t\t\t\titem.onFail(www.error);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t_started = false;\r\n\t}\r\n`  "},"comment":{"url":"https://api.github.com/repos/fairygui/FairyGUI-unity/issues/comments/261760658","html_url":"https://github.com/fairygui/FairyGUI-unity/issues/27#issuecomment-261760658","issue_url":"https://api.github.com/repos/fairygui/FairyGUI-unity/issues/27","id":261760658,"user":{"login":"fairygui","id":9907813,"avatar_url":"https://avatars.githubusercontent.com/u/9907813?v=3","gravatar_id":"","url":"https://api.github.com/users/fairygui","html_url":"https://github.com/fairygui","followers_url":"https://api.github.com/users/fairygui/followers","following_url":"https://api.github.com/users/fairygui/following{/other_user}","gists_url":"https://api.github.com/users/fairygui/gists{/gist_id}","starred_url":"https://api.github.com/users/fairygui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fairygui/subscriptions","organizations_url":"https://api.github.com/users/fairygui/orgs","repos_url":"https://api.github.com/users/fairygui/repos","events_url":"https://api.github.com/users/fairygui/events{/privacy}","received_events_url":"https://api.github.com/users/fairygui/received_events","type":"User","site_admin":false},"created_at":"2016-11-20T05:49:34Z","updated_at":"2016-11-20T05:49:34Z","body":"IconManager is just an example for how to use custom loader. It is not part of FairyGUI SDK."}}
{"actor":{"display_login":"fairygui"}}