# Unity bug 檢修指南 / Hint 小技巧 [toc] --- ### Bug #### 1. MissingReferenceException: ##### The object of type '' has been destroyed but you are still trying to access it. ```c# private void OnDisable() { EventHandler.GameWin += OnGameWin; // ^ // 應該是'-' } ``` ##### while executing 'performed' callbacks of [...] 注意Unity中其他的BUG,這是假Bug。 #### 2.ArgumentNullException ##### Value cannot be null. Parameter name: _unity_self 在Play按下時,不要選擇任何物件。 #### 3. Rigidbody3D的 velocity 一直為0 在 Project Setting > Physics > GameObject SDK 中 確認是不是PhysX,「**而不是 None**」 請改成PhysX  #### O. Build Bug ##### Building Library/Bee/artifacts/Android/AsyncPluginsFromLinker failed with output: System.IO.IOException: Read-only file system 換個存檔路徑 --- ### Unity Hint #### 1. OnTriggerStay 間斷不工作問題 修改OnTriggerStay2D的休眠時間方法: 點選Edit -> Project Settings, 然後選擇Physics 2D, 在General Settings中將Time To Sleep修改為較大的數值, 例如10000  #### 2. 在手機上多指點擊按鈕會有斷觸/不觸發的情況 項目中若是使用New Input System 的話,在 UI 的 EventSystem 中的 Input System Ul Input Module 的 Pointer Behavior 變數改為 ***All Pointers As Is*** > 預設可能是 ***Single Mouse Or Pen But Multi Touch And Track*** 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up