Custom Cursor
outline¶
Custom Cursor is a function that allows the user to load a cursor shape of their choice rather than a typical mouse cursor on the UI. In addition to games, users can reduce the difference in cursor styles between games and Hive UI by applying customized cursors to UI provided by the Hive platform, such as terms and conditions pop-up and login pop-up.
Note
Custom Cursor feature is available starting with Hive SDK v4 Unity Windows 25.0.0.
Supported file format{ #supported-file-types }¶
File formats supported for custom cursors are listed below.
-
CUR file
-
ICO file
-
PNG file
Action priority¶
The priority for loading cursor files in the SDK is as follows:
-
If CUR, ICO, and PNG files all exist: Each file is read in the order of file format CUR → ICO → PNG and displayed as a cursor.
-
If the file name (e.g. customcursor) is the same: Among the customcursor.cur, customcursor.ico, and customcursor.png files, only the file read first according to priority is displayed as a cursor.
User settings¶
To use a custom cursor, you must largely set up the resource folder and specify the hot spa.
Resource folder settings{ #resources-folder }¶
Place the file incustomcursor.extensionformat under the Resources folder.
Specify hotspot{ #hotspot }¶
The hot spa designation method according to the cursor file type is as follows.
-
CUR file: Contains hotspot information, so the cursor is displayed accurately based on this.
-
ICO and PNG files: They do not contain hotspot information, so they default to the coordinates
(0,0)as the hotspot.
Notice{ #notes }¶
When applying the Custom Cursor feature to the Hive SDK, keep the following in mind.
-
Maximum supported resolution is 256x256 pixels. If the resolution of each CUR, ICO, or PNG file exceeds a 256x256 file, the corresponding cursor may not be displayed correctly.
-
ICO files and CUR files support multiple image sizes, but the SDK displays the cursor only in the default predefined size.
-
In PNG files, transparent areas are also considered image areas. Therefore, to avoid problems that arise when specifying the top left as the (0,0) hotspot, we recommend not using a transparent area in the top left.
Cursor customization for Android game controller support{ #android-cursor-custom }¶
Hive SDK v4 If Android supports game controllers, you can expose a custom cursor instead of the cursor that the Hive SDK exposes itself.
Hive SDK v4 When using a game controller in an Android environment, you can apply a custom cursor image defined directly in the app instead of the SDK default cursor. Here's how to use it:
-
Place the cursor image file (.png) under the res/drawable directory of the project.
-
The upper left point of the cursor image becomes the actual click recognition reference point.
-
Regardless of the original resolution of the cursor image, it performs its own scaling to the appropriate size inside the Hive SDK.
-
Applicable conditions: The cursor image is displayed only when a game controller is connected and the Hive SDK UI is displayed on the screen.
Note
The custom cursor feature is supported starting from Hive SDK v4 Android 26.7.0 and higher.