- Home /
Question by
Stealthygolem · Feb 25, 2015 at 03:04 PM ·
texturespriteunity 2dcursorcursor-customization
Possible to change size of cursor with Cursor.SetCursor?
The game that I am creating is a pit pixely, and I want the resolutions of the graphics to look a lot like each other. Without tinkering with actual resolution size (making the cursor generally bigger), is there a way I can make the cursor texture bigger? This is my current code for changing cursors:
CursorMode cursorThing;
void Start() {
cursorThing = CursorMode.Auto;
}
void Update() {
Cursor.SetCursor(textureToReplaceCursor, Vector2.zero, cursorThing)
}
I'm also using a sprite that I am converting to a texture with this code:
void Start() {
public Sprite exitRoomCursor;
public Texture2D exitRoomCursor_text;
void Update () {
exitRoomCursor_text = new Texture2D((int)exitRoomCursor.rect.width, (int)exitRoomCursor.rect.height );
var exitpixels = exitRoomCursor.texture.GetPixels((int)exitRoomCursor.textureRect.x,
(int)exitRoomCursor.textureRect.y,
(int)exitRoomCursor.textureRect.width,
(int)exitRoomCursor.textureRect.height );
exitRoomCursor_text.SetPixels(exitpixels);
exitRoomCursor_text.Apply();
But that doesn't seem to restrict the mouse size itself, I believe. But at least I'm showing you what I'm doing here!
Comment