2018 4.4新的寫法
VirtualButtonBehaviour[] vbs = GetComponentsInChildren<VirtualButtonBehaviour>();
for (int i = 0; i < vbs.Length; ++i)
{
vbs[i].RegisterEventHandler(this);
}
寫在Start裡面不然會報錯
2018 4.4新的寫法
VirtualButtonBehaviour[] vbs = GetComponentsInChildren<VirtualButtonBehaviour>();
for (int i = 0; i < vbs.Length; ++i)
{
vbs[i].RegisterEventHandler(this);
}
寫在Start裡面不然會報錯