- Home /
 
Can anyone translate this to C# (Change cursor appearance)
Hello guys. I Want to change cursor appearance for my game. I found this useful script from another answer and it works perfectly. The only problem is that it is witten in Java. Can anyone translate this into C#
 var cursorImage : Texture;
 
               function Start() { Screen.showCursor = false; }
  
               function OnGUI() { var mousePos : Vector3 = Input.mousePosition; var pos : Rect = Rect(mousePos.x,Screen.height - mousePos.y,cursorImage.width,cursorImage.height); GUI.Label(pos,cursorImage); } 
Thank you for your time.
Answer by Michael La Voie · Apr 05, 2010 at 08:27 PM
public Texture cursorImage;
 
               public void Start() { Screen.showCursor = false; }
 
               public void OnGUI() { Vector3 mousePos = Input.mousePosition; Rect pos = new Rect(mousePos.x, Screen.height - mousePos.y, cursorImage.width, cursorImage.height); GUI.Label(pos, cursorImage); } 
 
              Your answer