Skip to content

Latest commit

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

UnitySimpleCursor

Cover

Introduction

Change cursor for selection, panning, rotation, resizing.

Usage

usingSystem.Collections;usingSystem.Collections.Generic;usingUnityEngine;usingUnityEngine.EventSystems;publicclassHoverElement:MonoBehaviour,IPointerEnterHandler,IPointerExitHandler{publicvoidOnPointerEnter(PointerEventDataeventData){SimpleCursor.CursorUtilities.ChangeCursor(CursorType.Resize_N);}publicvoidOnPointerExit(PointerEventDataeventData){SimpleCursor.CursorUtilities.ChangeCursor(CursorType.Default);}}
  1. Call SimpleCursor.CursorUtilities.ChangeCursor(CursorType type) on hover.
  2. Call SimpleCursor.CursorUtilities.ChangeCursor(CursorType.Default) on unhover.

Following CursorTypes are implemented.

  • Default
  • Move
  • Resize_N
  • Resize_E
  • Resize_W
  • Resize_S
  • Resize_NE
  • Resize_NW
  • Resize_SE
  • Resize_SW
  • Rotate_N
  • Rotate_E
  • Rotate_W
  • Rotate_S
  • Rotate_NE
  • Rotate_NW
  • Rotate_SE
  • Rotate_SW

Environment

  • Unity 2018.4.1f1

Resources

Cursor images are managed on this repository.

About

Change cursor for selection, panning, rotation, resizing.

Topics

Resources

Stars

6 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages