Skip to content

【Unity】

文前言

是也有想過說有一天可能需要碰到 Unity
但還真沒想到碰到的時候先學的不是語法,而是新專案爆掉怎麼修...= =

主文

  • 任何套件掛掉問題:
    • 先刪掉 Library 資料夾
    • 失敗:再跑去 Program Files/Unity 內刪掉 cache 資料夾試試看
  • Assets 要修改前先關掉 Editor 再大改動 否則可能卡住

debug

VS2022
ref: How to debug code with Microsoft Visual Studio 2022 | Unity

Game

播放:[Play]
暫停:[Pause]
繼續播放:[Pause]
停止:[Play]

build

  1. 使用 UI 設定:
    嘗試參考 [Unity 教學] 輸出至 Windows 平台 (.exe) - 偵錯桐人

    [Player Settings...] > [Resolution and Presentation]>

    [Resolution] > - [Fullscreen Mode] : [Windowed] - [Run In Background] : false

    [Standalone Player Options] > - [Resizable Window] : true - [Visible In Background] : false - [Allow Fullscreen Switch] : true

    結果:

  2. 使用程式設定
    ref: Unity - Scripting API: Screen.SetResolution