7. ⼀一個空⽩白的 Component ⻑⾧長這樣
using UnityEngine;
using System.Collections;
public class testComponent : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
37. void * 與 id
• void *
• a reference to some random chunk o' memory with untyped/
unknown contents
• ⼀一個任意指標,可⽤用來指向任何型別或內容的
記憶體區塊
• id
• a reference to some random Objective-C object of unknown
class
• ⼀一個任意指標,可以指向 Obj-C 中的物件
http://stackoverflow.com/questions/1304176/objective-c-difference-between-id-and-void
http://justlink-linus.blogspot.tw/2012/11/id-void-void-pointer.html