Search Issue Tracker
Fixed in 5.3.0
Votes
3
Found in
4.6.1f1
Issue ID
654942
Regression
No
Custom cursor appears on Android even when trying to hide it
If custom cursor is set in project, it appears in Android builds too and it cannot be hidden in any way
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
ashishsfb
Apr 27, 2017 17:17
I'm using mouse in my android game using micro USB to USB Female cable using Unity 5.6. I only want to have zoom capability using the scroll wheel and don't want the cursor to be visible in the game.
I tried both ways, only using Cursor.visible = false; and the above mentioned solution. But in both the cases the mouse cursor remains present, while both ways work inside editor none in android, Please guide me if I need something else to do.
d_kieffer
Jul 20, 2015 20:44
We are having this exact same problem. If we cannot figure a proper solution, we'll try KepAmun's workaround.
(Using Unity 5.0.2f1)
KepAmun
May 20, 2015 17:12
You could, of course, just clear the custom cursor before you build for Android each time, but I don't want to have to remember to do that each time I switch between mobile and stand-alone platforms.
Since Cursor.visible = false and Cursor.SetCursor(null... both seems to do nothing on Android, I made a work around; set the custom cursor texture to a single transparent pixel at run time.
Put this in Start() or Awake() of a script attached to a GameObject in your first scene:
if(Application.isMobilePlatform)
{
Cursor.visible = false; // Once Android cursor bug is fixed, you can delete the next 3 lines.
Texture2D cursorTexture = new Texture2D(1, 1);
cursorTexture.SetPixel(0, 0, Color.clear);
Cursor.SetCursor(cursorTexture, Vector2.zero, CursorMode.Auto);
}
(Using Unity 5.0.1f1)