Unity Editor
Table of Contents
- Use Emacs as the script editor
- Configure Mono(.Net) Compatibility
- Unity Hotkeys
- Special Folders
- Platform dependent compilation
- EditorWindow
- Layer vs Sorting Layer
- Make Input Axis discrete
Use Emacs as the script editor howto
Configure Mono(.Net) Compatibility howto
- Currently, It looks like that
C# 6.0
(.Net 4.6
) only supported for Windows target - For other platforms, only supports
.Net 2.0
Unity Hotkeys reference
Special Folders discussion
Folder | Description |
---|---|
Assets |
The main folder of assets |
Assets/**/Editor |
Treated as Editor scripts |
Assets/Editor Default Resources |
Editor script's on-demand resources |
Assets/Gizmos |
|
Assets/Plugins |
|
Assets/**/Resources |
|
Assets/Standard Assets |
|
Assets/StreamingAssets |
Platform dependent compilation discussion
EditorWindow
- General Use case:
void OnGUI()
for updating UIvoid OnEnable()
for restoring values (called when the editor loads)void OnDisable()
for saving values (called when the editor loses its focus)- To update during the runtime, saving and restoring on
OnGUI()
Layer vs Sorting Layer discussion
- Layers can be used for selective rendering from cameras or ignoring raycasts
- Sorting Layers and Order in Layer are to determine the render order of sprites in a scene.
- Lower numbers are rendered first
Make Input Axis discrete howto
GetAxis()
things have a joy-stick like input handling- By tweaking
Gravity
,Dead
,Sensitivity
, can make axes work just like buttons or keys.