Get it on Google Play


Wm뮤 :: '분류 전체보기' 카테고리의 글 목록 (74 Page)

블로그 이미지
가끔 그림그리거나 3D모델링하거나
취미로 로봇만드는
전자과 게임프로그래머 (퇴사함)
2022.3.22f1 주로 사용
모카쨩
@Ahzkwid

Recent Comment

Archive


'전체보기'에 해당되는 글 1152건

  1. 2020.09.24 유니티 Mask
  2. 2020.09.03 HDclone 사용법
  3. 2020.09.03 윈도우 이전작업
  4. 2020.09.01 failed to connect to localhost port 80: Connection
  5. 2020.08.31 SSD 시세 추이
  6. 2020.08.25 간편식 후기모음
  7. 2020.08.25 c# MD5
  8. 2020.08.20 UnityWebRequest
2020. 9. 24. 11:17 Unity

 

 

 

 

해당 오브젝트 하위의 이미지등이 rect 안에서만 보임

alpha값은 1/255 이상이여야 하고 0이면 안됨

적용이 잘 안 된다면 Mask컴포넌트를 지웠다가 재할당 할것

'Unity' 카테고리의 다른 글

TTS  (0) 2020.10.19
유니티 IDE(비주얼스튜디오) 바꾸기  (0) 2020.08.19
유니티 콜라보레이트 클라우드  (0) 2020.08.10
posted by 모카쨩
2020. 9. 3. 23:57 공학기술

 

 

 

www.miray.de/download/hdclone.html

 

HDClone | Miray Software

HDClone X Free Edition The Free Edition is real freeware without any obligation to buy. It is intended for temporary and free use cases. For more frequent or professional use, we recommend you to use one of the higher editions, as they offer higher speed,

www.miray.de

 

 

일반용

 

 

나머진 그냥 next

 

 

 

 

 

 

 

-usb부팅 방법

 

'공학기술' 카테고리의 다른 글

안드로이드 스튜디오 앱 업로드  (0) 2020.10.19
윈도우 이전작업  (0) 2020.09.03
스마트폰으로 컴퓨터 인터넷 연결하기  (0) 2020.08.15
posted by 모카쨩
2020. 9. 3. 13:32 공학기술

 

 

c:\windows\system32\sysprep\sysprep.exe

를 친다.

'공학기술' 카테고리의 다른 글

HDclone 사용법  (0) 2020.09.03
스마트폰으로 컴퓨터 인터넷 연결하기  (0) 2020.08.15
프로그래밍 영어  (0) 2020.08.12
posted by 모카쨩
2020. 9. 1. 12:36 Unity/C#

 

 

파일 주소앞에 file:///를 넣는다

 

 

'Unity > C#' 카테고리의 다른 글

유니티 에디터 관련  (0) 2020.10.05
c# MD5  (0) 2020.08.25
UnityWebRequest  (0) 2020.08.20
posted by 모카쨩
2020. 8. 31. 01:47 나의 작은 정보들

 

2019.09.06

WD Green 480GB

77000원

 

 

 

2020.08.31

WD Green 480GB

75000원

WD Green 1TB

139000원

WD Blue 1TB

149000원

'나의 작은 정보들' 카테고리의 다른 글

건강검진  (0) 2020.12.03
간편식 후기모음  (0) 2020.08.25
코로나 자가격리자 지침서  (0) 2020.08.19
posted by 모카쨩
2020. 8. 25. 17:39 나의 작은 정보들

2020년

 

오뚜기 오삼불고기 덮밥: 맛있다. 데워먹지 않아도 된다. 가성비 좋다

오뚜기 제육덮밥 :  데워먹지 않아도 된다. 맛있다.

오뚜기 불닭마요 : 맛있다. 닭꼬치맛. 데우지 않아도 된다. 가성비 좋다. 단점은 야채건더기가 딱딱함. 소스갯수가 많아 넣는거도 귀찮고 쓰레기가 많이나온다 빡쳐

오뚜기 김치참치 덮밥 : 괜찮다. 풍부한 단백질, 훈제계란 부숴서 넣으면 맛있다.

오뚜기 쇠고기 전골밥 : 정말 맛있다. 단점은 당면이 있어서 라면처럼 물넣어서 끓여야한다. 개빡쳐. 

오뚜기 볼케이노 치밥 : 우웩, 열여덟

오뚜기 허니갈릭 치밥 : 먹을만하다. 별로 취향은 아님. 마늘맛

오뚜기 부대찌개밥 : 정말 맛있다. 햄도 생각보다 많음. 단점은 끓여먹어야한다. 필수는 아니지만 그러는게 좋음

'나의 작은 정보들' 카테고리의 다른 글

SSD 시세 추이  (0) 2020.08.31
코로나 자가격리자 지침서  (0) 2020.08.19
애드몹 PIN등록하기  (0) 2020.08.19
posted by 모카쨩
2020. 8. 25. 17:17 Unity/C#

v1

    public string GetMD5(byte[] data)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        byte[] hash = System.Security.Cryptography.MD5.Create().ComputeHash(data);
        foreach (byte b in hash)
        {
            sb.Append(b.ToString("X2"));
        }
        return sb.ToString();
    }

 

 

v2

public string GetMD5(byte[] data)
{
    byte[] bytes = System.Security.Cryptography.MD5.Create().ComputeHash(data);
    return System.BitConverter.ToString(bytes).Replace("-", "");
}

'Unity > C#' 카테고리의 다른 글

failed to connect to localhost port 80: Connection  (0) 2020.09.01
UnityWebRequest  (0) 2020.08.20
형변환 모음  (0) 2020.08.11
posted by 모카쨩
2020. 8. 20. 15:54 Unity/C#

파일을 다운로드

    public string url;
    public string fileName;
    public string fileType;
    IEnumerator DownloadFile()
    {
        string filePath= $"{Application.persistentDataPath}/{fileName}";
        if( (fileType != null)&& (fileType.Trim() != "") )
        {
            filePath += $".{fileType}";
        }
        UnityWebRequest unityWebRequest = UnityWebRequest.Get(url);
        yield return unityWebRequest.SendWebRequest();
        if (unityWebRequest.isNetworkError)
        {
            Debug.LogError(unityWebRequest.error);
        }
        else
        {
            File.WriteAllBytes(filePath, unityWebRequest.downloadHandler.data);
        }
    }

 

 

V2




    /// <summary>
    /// 다운 다되면 파일경로를 반환
    /// </summary>
    /// <param name="downloadlink"></param>
    /// <param name="filePath"></param>
    /// <returns></returns>
    IEnumerator DownloadFile(string downloadlink, string filePath)
    {
        Debug.Log($"Download:{downloadlink}");
        {
            DOWNLOAD_RETRY:;
            {
                var unityWebRequest = UnityWebRequest.Get(downloadlink);
                var operation = unityWebRequest.SendWebRequest();
                yield return new WaitUntil(() => operation.isDone);

                if (unityWebRequest.isNetworkError)
                {
                    Debug.LogError(unityWebRequest.error);
                    yield return new WaitForSeconds(3f);
                    goto DOWNLOAD_RETRY;
                }
                else
                {
                    Debug.Log(filePath);

                    var folderPath = System.IO.Path.GetDirectoryName(filePath);
                    Debug.Log(folderPath);
                    if (System.IO.Directory.Exists(folderPath) == false)//폴더가 없으면 생성
                    {
                        System.IO.Directory.CreateDirectory(folderPath);
                    }
                    System.IO.File.WriteAllBytes(filePath, unityWebRequest.downloadHandler.data);
                }
            }
        }
        yield return filePath;
    }

 

 

 

 

 

DownloadHandlerFile 방식 

메모리를 딱 필요한만큼만 쓴다. 위에는 2배사용

V3



    List<string> downloadList = new List<string>();
    IEnumerator DownloadFile(string downloadlink, string filePath)
    {
        downloadList.Add(downloadlink);

        DOWNLOADRETRY:;
        {
            UnityWebRequest unityWebRequest = UnityWebRequest.Get(downloadlink);
            unityWebRequest.downloadHandler = new DownloadHandlerFile(filePath);

            var operation = unityWebRequest.SendWebRequest();
            yield return new WaitUntil(() => operation.isDone);

            if (unityWebRequest.isNetworkError)
            {
                Debug.LogError(unityWebRequest.error);
                yield return new WaitForSeconds(1f);
                goto DOWNLOADRETRY;
            }
            else
            {
                Debug.Log(filePath);
            }
        }
        downloadList.Remove(downloadlink);
    }

 

V1~V2

더보기
    IEnumerator DownloadFile(string downloadlink, string filePath)
    {
        UnityWebRequest unityWebRequest = UnityWebRequest.Get(downloadlink);
        unityWebRequest.downloadHandler = new DownloadHandlerFile(filePath);
        var operation = unityWebRequest.SendWebRequest();
        while (!operation.isDone)
        {
            yield return new WaitForSeconds(0.01f);
        }
        if (unityWebRequest.isNetworkError)
        {
            Debug.LogError(unityWebRequest.error);
        }
        else
        {
            Debug.Log(filePath);
        }
    }

 

 

 

V2

List<String> DownloadList = new List<String>();
    IEnumerator DownloadFile(string downloadlink, string filePath)
    {
        UnityWebRequest unityWebRequest = UnityWebRequest.Get(downloadlink);
        unityWebRequest.downloadHandler = new DownloadHandlerFile(filePath);

        DownloadList.Add(downloadlink);
        DOWNLOADRETRY:;
        var operation = unityWebRequest.SendWebRequest();
        while (!operation.isDone)
        {
            yield return new WaitForSeconds(0.01f);
        }
        if (unityWebRequest.isNetworkError)
        {
            Debug.LogError(unityWebRequest.error);
            yield return new WaitForSeconds(1f);
            goto DOWNLOADRETRY;
        }
        else
        {
            Debug.Log(filePath);
        }
        DownloadList.RemoveAt(DownloadList.FindIndex(0, DownloadList.Count, x => x == downloadlink));
    }

 

 

 

 

 

 

HTML 다운로드

    public string urlSample= "https://wmmu.tistory.com/";
    IEnumerator DownloadHTML(string url)
    {
        UnityWebRequest unityWebRequest;
        unityWebRequest = UnityWebRequest.Get(url);
        yield return unityWebRequest.SendWebRequest();
        if (unityWebRequest.isNetworkError)
        {
            Debug.LogError(unityWebRequest.error);
        }
        else
        {
            Debug.Log(unityWebRequest.downloadHandler.text);
        }
    }

 

 

 

오디오 파일 로드

//전용 세이브 폴더 참조시에는
//$"file://{UnityEngine.Application.persistentDataPath}/Audio.mp3";
static AudioClip LoadAudioClip(string downloadLink)
{
    var fileName= downloadLink;
    if (System.IO.File.Exists(downloadLink))
    {
        downloadLink = $"file://{downloadLink}";
        fileName = System.IO.Path.GetFileNameWithoutExtension(downloadLink);
    }
    UnityWebRequest unityWebRequest = UnityWebRequestMultimedia.GetAudioClip(downloadLink, AudioType.UNKNOWN);

    var operation = unityWebRequest.SendWebRequest();
    while (!operation.isDone)
    {
        Thread.Sleep(1);
    }
    if (unityWebRequest.isNetworkError)
    {
        Debug.LogError(unityWebRequest.error);
    }
    else
    {
        //Debug.Log("LoadAudioClipSuccess");
    }
    var clip = DownloadHandlerAudioClip.GetContent(unityWebRequest);
    clip.name = fileName;
    return clip;
}

 

 

 

 

캐시 테스트

    public string url;
    public string cookie;
    public string fileName;
    public string fileType;
    IEnumerator DownloadFile()
    {
        string filePath = $"{Application.persistentDataPath}/{fileName}";
        if ((fileType != null) && (fileType.Trim() != ""))
        {
            filePath += $".{fileType}";
        }
        UnityWebRequest unityWebRequest = UnityWebRequest.Get(url);
        if (string.IsNullOrWhiteSpace(cookie)==false)
        {
            unityWebRequest.SetRequestHeader("Cookie", cookie);
        }
        yield return unityWebRequest.SendWebRequest();
        if (unityWebRequest.isNetworkError)
        {
            Debug.LogError(unityWebRequest.error);
        }
        else
        {
            Debug.Log(unityWebRequest.downloadHandler.text);
            //File.WriteAllBytes(filePath, unityWebRequest.downloadHandler.data);
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        StartCoroutine(DownloadFile());
    }

'Unity > C#' 카테고리의 다른 글

c# MD5  (0) 2020.08.25
형변환 모음  (0) 2020.08.11
유니티 씬 계열 함수 모음  (0) 2020.07.30
posted by 모카쨩

저사양 유저용 블로그 진입