Created
July 22, 2019 08:34
-
-
Save bartwttewaall/88c50b68cd5a9eca5f9696be29095a8a to your computer and use it in GitHub Desktop.
Set or unset a cursor with a pivot at the center (Crosshair texture is 64x64 px)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (player.canUseWeapons && current) { | |
Cursor.SetCursor (Resources.Load<Texture2D> ("Crosshair"), new Vector2 (32, 32), CursorMode.Auto); | |
} else { | |
Cursor.SetCursor (null, Vector2.zero, CursorMode.Auto); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment