본문 바로가기

Programming/Unity 3D7

Serial to Keyboard (Win, C#, Unity3D) 유니티에서 시리얼통신 입력 받아서 키보드 신호로 만들어주는 기능이 필요해서 찾음. [DllImport("user32.dll")] public static extern void keybd_event(uint vk, uint scan, uint flags, uint extraInfo); 사용법> keybd_event(0x31, 0, 0, 0); // keycode.Alpha1 [vk code] 0x30 ~ 0x39 : Symbol 0 ~ 9 0x41 ~ 0x5A : Symbol A ~ Z https://learn.microsoft.com/ko-kr/windows/win32/api/winuser/nf-winuser-keybd_event keybd_event 함수(winuser.h) - Win32 apps 키 .. 2023. 8. 25.
C#, Unity3D, 외부 프로세스 실행시키기 런쳐 만들어서 외부 프로세스 실행 public class ScProcessStarter : MonoBehaviour { [System.Runtime.InteropServices.DllImport("User32", EntryPoint = "FindWindow")] private static extern System.IntPtr FindWindow(string lpClassName, string lpWindowName); [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern void SetForegroundWindow(System.IntPtr hWnd); [System.Runtime.InteropServices.DllImp.. 2023. 3. 7.
SteamVR Error - "No pose action set for this component" 해결 방법 : [CameraRig]를 Unpack Prefab하면 된다. 하하 2020. 5. 11.
Unity에서 쓸만한 user32.dll 와드 /* 타이틀 바 이름 바꾸기 */ [DllImport("user32.dll", EntryPoint = "SetWindowText")] public static extern bool SetWindowText(System.IntPtr hwnd, System.String lpString); [DllImport("user32.dll", EntryPoint = "SetWindowTextW")] public static extern bool SetWindowTextW(System.IntPtr hwnd, System.IntPtr lpString); [DllImport("user32.dll", EntryPoint = "SetWindowTextA")] public static extern bool SetWindowTex.. 2020. 4. 8.
Vive Controller Binding 검은화면 띄우는 문제... SteamVR + Unity 프로젝트 진행 도중...키 바인딩 화면이 안뜨는 문제 발생. Unity3D에서도 SteamVR에서도 에러같은건 뜨지도 않는다. SteamVR에서 Controller Binding하려고 해도 아래화면처럼 검은 화면만 뜨고 아무것도 되지 않음. 나머지는 잘 됨. (에러라도 띄우면 좋았을텐데...) 이것저것 시도해 보던 도중 이게 엣지창에서 열리는걸 보고 혹시나 해서 크롬으로 디버깅(F12) 열어서 이것저것 눌러보다가 빨간 에러 발견. ../bindingui koreana.json 404 (Not Found)...../webhelper koreana.json 404 (Not Found)... 두개의 에러 발견. 그래서... ..\Steam\steamapps\common\SteamV.. 2018. 12. 11.
스크립트템플릿 변경 유니티에서 스크립트를 만들면 void Start() 함수와 void Update()함수가 존재하는 스크립트가 생성된다. using UnityEngine;using System.Collections; public class ScriptName : MonoBehaviour{// Use this for initialization 2014. 8. 25.