Get it on Google Play


Wm뮤 :: '2020/10 글 목록

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

Recent Comment

Archive


'2020/10'에 해당되는 글 16건

  1. 2020.10.31 절전모드 해제 방지
  2. 2020.10.31 자주 쓰는 윈폼 코드 모음
  3. 2020.10.29 이벤트 트리거
  4. 2020.10.28 mpu6050
  5. 2020.10.28 발진기
  6. 2020.10.27 편도결석 자료 모음
  7. 2020.10.25 유니티 내비게이션 navigation
  8. 2020.10.20 그래디언트효과
2020. 10. 31. 18:40 공학기술

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

기계부품 자료 모음  (0) 2020.11.10
mpu6050  (0) 2020.10.28
발진기  (0) 2020.10.28
posted by 모카쨩
2020. 10. 31. 09:56 윈도우폼

 

 

윈폼의 Debug로그이다.

System.Diagnostics.Debug.WriteLine("디버그 메세지");

 

팝업띄우는 버전

System.Windows.Forms.MessageBox.Show("디버그 메세지");

 

 

윈폼 리퀘스트

//v2
public static string DownloadText(string url)
{
    try
    {
        var webClient = new System.Net.WebClient();
        return webClient.DownloadString(url);
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.WriteLine(ex.Message);
        return null;
    }
}

//v1
/*
public static string DownloadText(string url)
{
    try
    {
        var webClient = new System.Net.WebClient();
        var response = webClient.OpenRead(url);
        using (var streamReader = new System.IO.StreamReader(response))
        {
            string result = streamReader.ReadToEnd();
            streamReader.Close();
            return result;
        }
    }
    catch (Exception ex)
    {
        System.Diagnostics.Debug.WriteLine(ex.Message);
        return null;
    }
}
*/

 

 

현재 컴퓨터 유저 이름을 반환합니다. 

System.Environment.UserName

 

 

 

 

 

Lerp

double Lerp(double a,double b,double t)
{
    //return a*(1.0-t)+b*t;
    return a + (b - a)* t;
}
Vector3 Lerp(Vector3 a, Vector3 b, float t)
{
    return a + (b - a)* t;
}

 

 

 

새창 띄울때

var form = Application.OpenForms[nameof(Form2_Prediction)];
if (form==null)
{
    form = new Form2_Prediction();
    form.Show();
}
else
{
    form.Activate();
}

 

 

 

프로세스 확인 (unity가 켜져있는지 확인하는 코드이다)

var processes=System.Diagnostics.Process.GetProcesses();
var processesNames = System.Array.ConvertAll(processes, x => x.HasExited ?"": x.ProcessName).ToList();
processesNames = processesNames.GroupBy(x=>x).Select(x=>x.First()).ToList();
processesNames = processesNames.FindAll(x => string.IsNullOrWhiteSpace(x) == false);
processesNames = processesNames.FindAll(x => x.ToLower().Contains("unity"));
foreach (var processesName in processesNames)
{
    Debug.Log(processesName);
}

 

 

콤보박스에 Enum 할당

var ProportionalOptionNames = System.Enum.GetNames(typeof(ProportionalOption));
ProportionalOptionBoxs[i].Items.AddRange(ProportionalOptionNames);

 

 

 

window form

.net

닷넷

'윈도우폼' 카테고리의 다른 글

c# 멀티스레드 기본소스  (0) 2020.11.23
c# 윈도우 폼  (0) 2018.01.28
OPENCV 오류  (0) 2017.11.19
posted by 모카쨩
2020. 10. 29. 14:40 Unity

 

 

떼었을때 작동하는 온클릭을 눌렀을때 작동하는 버튼으로 바꿔줌

할당후에 온클릭은 지워주면 된다

'Unity' 카테고리의 다른 글

유니티 아틀라스 이미지 깨질때  (0) 2020.11.09
유니티 내비게이션 navigation  (0) 2020.10.25
TTS  (0) 2020.10.19
posted by 모카쨩
2020. 10. 28. 00:07 공학기술

 

사진의 위쪽이 정면이

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

절전모드 해제 방지  (0) 2020.10.31
발진기  (0) 2020.10.28
안드로이드 스튜디오 앱 업로드  (0) 2020.10.19
posted by 모카쨩
2020. 10. 28. 00:02 공학기술

 

 

 

 

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

mpu6050  (0) 2020.10.28
안드로이드 스튜디오 앱 업로드  (0) 2020.10.19
HDclone 사용법  (0) 2020.09.03
posted by 모카쨩
2020. 10. 27. 20:38 카테고리 없음

 

영향이 있는것

-담배

-수분

-과거에 앓았던 편도염

 

 

치료방법

-레이저 치료

-질산치료

-수술치료

posted by 모카쨩
2020. 10. 25. 14:18 Unity

 

 

스탠다드 에셋 방식

더보기

먼저 스탠다드 에셋을 다운받는다

 

 

unityStandardAssetNavAI.unitypackage
8.83MB

 

 

3D모델의 애니메이터가 있는 최상단에 ThirdPersonAnimatorController를 넣는다

 

AI캐릭터 컨트롤을 넣고 이동하고자 하는 지점의 트랜스폼을 넣는다

 

Third Person Character의 Ground Check Distance값을 0.2로 수정한다.

왜냐하면 기본값은 Ground Check Distance가 너무 작아서 지면판정이 안되기 때문이다

 

Window-> AI/Navigation을 누른다

 

베이크 하면 완료된다

 

커스텀 방식

더보기

 

 

AIControl 코드

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

public class AIControl : MonoBehaviour
{

    public Transform target;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        var agent = GetComponent<NavMeshAgent>();
        if ((target != null)&& (agent != null))
        {
            agent.SetDestination(target.position);
        }
    }
}

 

저렇게 배치하고 AIControl을 넣는다

 

 

'Unity' 카테고리의 다른 글

이벤트 트리거  (0) 2020.10.29
TTS  (0) 2020.10.19
유니티 Mask  (0) 2020.09.24
posted by 모카쨩
2020. 10. 20. 16:51

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.


  • total
  • today
  • yesterday

Recent Post

저사양 유저용 블로그 진입