Overview
1. Install Jetbrains Rider
2. Unity External Tools
3. Unity File Templates
4. Namespace
5. Find Usages
6. Code Vision
7. Typo Detection
8. Error Detection
9. Unity Serialized Field Naming
10. Terminal
11. Version Control
12. Code Style
13. Reformat Code on Save (Macros)
14. Renaming MonoBehaviour
熱血人次: 129
Recommended to use string.Concat() or directly use + operator for better performance.
Test times: 10,000,000
1. PlusOperator: 6825
2. Interpolation: 10037
3. StringFormat: 9940
4. StringConcat: 6822
5. StringJoin: 8255
6. StringBuilder: 7157
熱血人次: 86
Overview
命名曾經被程式設計師們列為,寫程式時最困難的事
當有用到的 Serialized Fields 需要重新命名時
GameObject 或 ScriptableObject 中的資料會遺失
範例情境
1. 原始設計 :private member with public getter
2. 需求變更 :private member with public getter & setter
3. 重構問題 :將 private member 改為 public member,並移除多餘的 public getter & setter
解決方案
1. 直接使用文字編輯器打開 Prefab 或 ScriptableObject
2. 使用 [FormerlySerializedAs] attribute
熱血人次: 272
Overview
1. 下載 ILSpy for Mac
2. 打開終端機切換到下載目錄下
3. 鍵入 mono ILSpyMac.exe -n 自訂名稱 Dll資料夾路徑
熱血人次: 1273
Overview
1. Install Visual Studio
2. Unity External Tools
3. Visual style & Color Theme
4. Coding Style & Formatting
5. Refactoring
6. Debug
p.s 僅支援 Unity 5.6.1 以上的版本!
熱血人次: 1479
Overview
Recommended to use string.Equals() for better performance.
Test times: 10,000,000
1. EqualityOperator: 464
2. StringEquals: 406
3. StringEqualsByIgnoreCase: 13557
4. AnimatorHash: 1614
熱血人次: 435
使用 Unity Time 下的各種屬性,包含 time、deltaTime、fixedDeltaTime
只有在不同 Frame 才會有值
想要正確測試某個函式的時間,可以採用以下三種方法
值得一提的是,Stopwatch 似乎就是為了做這件事情而存在的
Overview
1. DateTime.Now
2. Environment.TickCount
3. System.Diagnostics.Stopwatch
熱血人次: 998
本篇文章主要針對 Animator 建立了一個小測試工具
能夠自動循環播放檢視所有 Animator 下的 Animation States
Overview
1. 取得 Animator 下的所有 Animation States
2. 自動循環播放
3. 自製編輯器
熱血人次: 1042
GUILayout.BeginHorizontal();
{
GUILayout.FlexibleSpace();
GUILayout.Label( message );
GUILayout.FlexibleSpace();
}
GUILayout.EndHorizontal();
熱血人次: 406
Overview
1. Create => Sprite Atlas
2. Editor Settings => Sprite Packer Mode = Always Enabled
3. SpriteAtlas GetSprite API
熱血人次: 2672