블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-18 17:47

[Link] Online PDF Tools

Utility / 2019. 7. 4. 14:19

 

[Link] https://tools.pdf24.org/ko/

 

온라인 PDF 도구를 사용하기 쉽고 쉽습니다

소프트웨어 다운로드 없이 당신의 PDF 문제를 해결해 주는 사용하기 쉽고 무료인 온라인 PDF 도구. ✓ 쉬운 ✓ 안전한 ✓ 설치하지 않고 ✓ 등록하지 않고

tools.pdf24.org

 

반응형
Posted by blueasa
, |

[TroubleShooting]


[에러메시지]

NotSupportedException: .... System.Net.WebRequest.GetCreator (System.String prefix) System.Net.WebRequest.Create (System.Uri requestUri)


PC/iOS에서는 잘 되는데 Android에서 위와 같은 NotSupportedException이 난다.(현재 Unity v5.6.5f1)

검색해보니 게임코디에 아래와 같은 답변을 해주신 분이 있다.



  비회원: 
kimsama

NotSupportedException: .... System.Net.WebRequest.GetCreator (System.String prefix) System.Net.WebRequest.Create (System.Uri requestUri) 모바일에서 위의 에러로 인해 HttpWebReaquest 를 사용하지 못하는 경우라면 여기 링크의 내용 참고하시기 바랍니다. http://www.vovchik.org/blog/13001 간단하게 우회하는 방법이 나와 있습니다.

[출처] http://lab.gamecodi.com/board/zboard.php?id=GAMECODILAB_QnA_etc&page=2&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=2617



그래서 링크(http://www.vovchik.org/blog/13001)에서 말해준 대로 Wrapping을 해서 Android에서 돌려보니 잘된다!!

(kimsama님 감사합니다!)


내가 추가 및 수정한 소스는 아래와 같다.


// Wrapper Class
using System;
using System.Net;

public class HttpRequestCreator : IWebRequestCreate 
{
	public WebRequest Create(Uri uri)
	{
		return new HttpWebRequest(uri);	
	}
}


    //Get size of the asset
    HttpRequestCreator cHttpRequestCreator = new HttpRequestCreator();            // modify
    System.Net.WebRequest req = cHttpRequestCreator.Create(new Uri(assetURL));    // modify
    req.Method = "HEAD";

    float ContentLength;
    using (System.Net.WebResponse resp = req.GetResponse())
    {
        float.TryParse(resp.ContentLength.ToString(), out ContentLength);
    }

    while (!download.isDone)
    {
        if (progressBar != null)
	    {
            progressBar.LabelInformations = "Downloading Assets";
            progressBar.Progress = download.progress;
            progressBar.AssetSize = ContentLength / 1000000; //(Mb)
	    }
	    yield return null;
    }






- CDN에 있는 파일 사이즈를 어떻게 알 수 없나 하고 찾다가 테스트 해보고 잘 되길래 올려 놓음.

  (PC/iOS는 잘되는데 Android가 에러나서 위와 같이 고침)

    1. //Get size of the asset
    2. System.Net.WebRequest req = System.Net.HttpWebRequest.Create(assetURL);
    3. req.Method = "HEAD";
    4. float ContentLength;
    5. using (System.Net.WebResponse resp = req.GetResponse())
    6. {
    7. float.TryParse(resp.ContentLength.ToString(), out ContentLength);
    8. }
    9. while (!download.isDone)
    10. {
    11. if (progressBar != null)
    12. {
    13. progressBar.LabelInformations = "Downloading Assets";
    14. progressBar.Progress = download.progress;
    15. progressBar.AssetSize = ContentLength / 1000000; //(Mb)
    16. }
    17. yield return null;
    18. }


[출처] https://answers.unity.com/questions/1035361/get-size-of-an-online-assetbundle-and-progress-in.html




반응형
Posted by blueasa
, |