Use of ref in Unity3D