updated code snippet for Unity3D code in GameManager