I know i dont need to convert, but I want all my code in c#.
I am learning by using examples etc. Currently I am working on something 2D.
I realise in the java below I am just referencing the x position, but know that it is not directly available to me in c# hence I am using the transform.Translate command.
I have tried in c# changing the Player01 to player after setting player up as a getobject.Fin(“pLAYER01”) but it still doesnt want to let me modify its position giving me the following error:
error CS0029: Cannot implicitly convert type void' to UnityEngine.Vector3’
java
Player01.position.x = mainCam.ScreenToWorldPoint (new Vector3 (Screen.width - 75f, 0f, 0f)).x;
c#
Player01.transform.position = transform.Translate (Screen.width - 75f, 0f, 0f);
Any help is appreciated.