[Unity] exe의 제목 표시줄을 숨깁니다.
 ① WindowController.cs
장면에서 좋아하는 대상에 부착하다.
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.InteropServices;
namespace Utils {
    public class WindowController : MonoBehaviour {
        private string windowName = "windowname";
        private int x = 0;
        private int y = 0;
        private int width = 1920;
        private int height = 1080;
        private bool hideTitleBar = true;
        [DllImport("user32.dll", EntryPoint = "SetWindowPos")]
        private static extern bool SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int x, int Y, int cx, int cy, int wFlags);
        [DllImport("user32.dll", EntryPoint = "FindWindow")]
        public static extern IntPtr FindWindow(System.String className, System.String windowName);
        // Sets window attributes
        [DllImport("user32.dll")]
        public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
        // Gets window attributes
        [DllImport("user32.dll")]
        public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
        // assorted constants needed
        public static int GWL_STYLE = -16;
        public static int WS_CHILD = 0x40000000; //child window
        public static int WS_BORDER = 0x00800000; //window with border
        public static int WS_DLGFRAME = 0x00400000; //window with double border but no title
        public static int WS_CAPTION = WS_BORDER | WS_DLGFRAME; //window with a title bar
        void Awake () {
            var window = FindWindow(null, windowName);
            if(hideTitleBar) {
                int style = GetWindowLong(window, GWL_STYLE);
                SetWindowLong(window, GWL_STYLE, (style & ~WS_CAPTION));
            }
            SetWindowPos(window, 0, x, y, width, height, width * height == 0 ? 1 : 0);
        }
    }
}
private string windowName = "windowname";window의 제목.창 왼쪽 상단 좌표 x
.창 왼쪽 상단 좌표 y
private int x = 0; 창 너비private int y = 0; 창 높이private int width = 1920; 제목 표시줄 숨기기② user32.dll
Assets/Plugins 아래에 직접 놓으십시오.
extern "C" __declspec(dllexport) int Add(int a, int b)
{
     return(a + b);
}
※ 코드 내용은 의미가 없습니다. 더 좋은 코드가 있다면 누구입니까?③ Player Settings
Player Settings > Player > Resolution and Presentation > Resolution
· Fullscreen Mode를 Windows로 설정합니다.
・ Resizable Window 선택을 취소합니다.
 코드 참조 소스
Is there a way to set the position of a standalone unity window?
Removing the Title bar of external application using c#
Reference
이 문제에 관하여([Unity] exe의 제목 표시줄을 숨깁니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/takasy0331/items/842ec776cb873b7f17b0텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)