1、網絡檢測函數(注意:需要在真機上實驗,我原來在Imac上 斷了網絡檢測不到)
static var internetReachability : NetworkReachability
Returns the type of Internet reachability currently possible on the device.
this property is mostly useful on handhelds to distinguish fast and cheap WiFi connection from carrier networking.
網絡檢測
if(Application.internetReachability==NetworkReachability.NotReachable)//無網絡 { } else//if(Application.internetReachability==NetworkReachability.ReachableViaLocalAreaNetwork||Application.internetReachability==NetworkReachability.ReachableViaCarrierDataNetwork) { }

2、設備類型檢測

或者采用Screen.width=(480、960、1024、2048)來判斷
3、游戲暫停
Time.timeScale=0f 暫停游戲 Time.timeScale=1f 恢復正常 介於0到1之間 可以做慢動作
4、 Screen.orientation=ScreenOrientation.Portrait; 解決華為設備橫豎屏旋轉
5、靜態批處理 降低DC好辦法 同時需要注意 Static batching only supports objects in the scene, you can't apply it to run-time instantiated items.
6.static function Combine(staticBatchRoot: GameObject): void; 手動靜態批處理
7.unity在android設備上路徑總結
Application.dataPath :/data/app/xxx.apk;
Application.persistentDataPath:/storage/sdcard0/Android/data/包名(例如:com.example.test)/files
Application.streamingAssetsPath:jar:file:///data/app/xxx.apk!/assets
8 unity3d 連接profiler
adb forward tcp:54999 localabstract:Unity-包名 前提是打包的時候勾選Autoconnect profiler
