Hello,
The Cursor system does not seem to work if a custom texture is not provided. I get this warning:
“Runtime cursors other than the default cursor need to be defined using a texture.”
I don’t want to define custom texture for each cursor, for each operating system… I want native OS cursors (the little hand, the arrows etc.). I tried to implement it by myself but the ICursorManager interface (see Cursor.cs, line 59) is marked as internal. Any way to solve this?
In this post there’s the code I wanted to try for Windows
Problem is that we would possibly want something else public (ref: Cursor.defaultCursorId) but would also need MouseCursor to be available in runtime, however it is currently defined in the UnityEditor.UIElements namespace. I do not have a solution today for you unfortunately.
It’s not explained in the documentation but the error message is right here: Runtime cursors other than the default cursor need to be defined using a texture.
It seems elements like the Min-Max Slider do try to load cursors if used in runtime UI. Yet there is no way to just tell it to use the default cursor. The warnings issued are annoying.
Runtime cursors other than the default cursor need to be defined using a texture.
UnityEngine.UIElements.UIElementsRuntimeUtilityNative:UpdateRuntimePanels ()
I wonder if there is already (or at least planned) inclusion of default cursors (default, pointer, wait) in UIToolkit so that there will not be necessary to create/include user’s own textures for those standard cases in builds?
The feature seems quite obvious, it was unpleasant surprise to find out it’s missing…