All assets that are in a folder named "Resources" anywhere in the Assets folder can be accessed via theResources.Load functions. Multiple "Resources" folders may exist and when loading objects each will be examined.
不同Resources目錄同名目錄加載規則無法預測!
Reading Excel Files and Sheets into Unity,用的是直接COM讀取excel的方式,沒有參與資源管線
Unity doesn't support vector fonts. For every font size that you want to support, you need to import a new version of the font and change its import settings to a different size. @Unity 3.x Game Development by Exple Beginner's Guide[P201]
其他:
Unity3D實用工具彙總
Convert unity javascript (unityscript) to C#
Unity3D螢幕截圖
Unity目前能在手機上做到的效果,其中shader開放可免費使用
采用雙色半圓拼接餅狀圖是個技巧
Unity問題集(不斷更新中)
Unity中寫C#腳本要注意的問題(僅限于MonoBehaviour子類)
Inherit from MonoBehaviour
Use the Awake or Start function to do initialisation
The class name must match the file name
Coroutines have a different syntax in C#
Coroutines have to have a return type of IEnumerator and you yield using "yield return" instead of just "yield"
Don't use namespaces
Only member variables are serialized and are shown in the Inspector
Avoid using the constructor or variable initializers
Never initialize any values in the constructor or variable initializers in a MonoBehaviour script. Instead use Awake or Start for this purpose.
AssertBundle
Unity bundle的制作和使用
Build asset bundle .unity3d
Editor擴充腳本:
Editor腳本是可以用C#寫的,編譯完後重新開機Unity生效
不要在Editor腳本中采用中文菜單,有一定可能down機
如果亂碼,需要将檔案儲存為UTF8格式
壓縮方式用的是lzma
Unity的動态下載下傳關卡與動态下載下傳資源
Unity3D指令行Build,這個對版本制作有用
版本控制:
Unity3d版本控制,哪些檔案該放到svn的問題解決
Unity目前的版本已經把需要svn控制的檔案單獨歸類放到Project Settings裡了,現在隻需要将Assets和ProjectSettings兩目錄加入svn即可 @Using External Version Control Systems with Unity
Inspector視窗中的Static Checkbox: Checking this box tells Unity that a particular object in your scene will not be moving during the game, and as such can be lightmapped. ?
Be aware that any value adjusted in the Inspector will override the original value given to a variable within the script. It will not rewrite the value stated in the script, but simply replaces it when the game runs.? You can also revert to the values declared in the script by clicking on the Cog icon to the right of the component and choosing Reset from the drop-down menu that appears.
public property不會進入Instactor
enum在Inspector中會自動展示為ComboBox
動态調用, 解耦神器:
可通過SendMessage方法進行動态方法調用!
可采用Find/FindWithTag方法, 用字元串名稱的方式直接查找GameObject對象
将Prefab直接拖入場景可進行檢視
Where can i find the unityengine xml?, unity官方并未提供引擎dll對應的xml文檔, 這對VisualStudio下的自動提示不友好
WCF & Unity
Service References的代碼可用VisualStudio自帶的“添加服務引用”功能,沒必要非指令行用mono的svcutil。成功生成後需要将對應的C#代碼檔案拷貝到Assert下合适的目錄中,否則不會參加編譯