TRANSLATED UnityScript into CSHarp.