Godot Version
v4.7.2.stable.mono.official [ed1daf0bf]
Question
When player is in game, I’m calling
Input.SetDefaultCursorShape(Input.CursorShape.Cross);
to change cursor from Arrow to Cross (I’ve already applied the styles that I want). The problem is that this line of code does nothing - visually cursor remains an Arrow, and even if you use print to check what type of cursor engine is using, it shows Arrow. So for whatever reason this method is effectively a no-op.
At this point all options are not exhausted. You can change cursor type through GUI on Control level, and every game needs HUD. So you can just change Default Cursor Shape to Cross, and in-game cursor will automatically match what you need, and you don’t have to change it in code for example when pause menu appears.
This sounds all well in theory, but for reasons unknown to me this approach doesn’t work either. I have added transparent ColorRect at the top in my HUD CanvasLayer with Default Cursor Shape set to Cross, and still Arrows displays. There is small progress though - Cross appears only when cursor is at the right edge of the screen. Moving the ColorRect around doesn’t change the area.
There is one extra way that I want to avoid - do not rely on prebuilt cursor types, but dynamically change Arrow texture on runtime. I’ve tested it and it works, but it’s not optimal to say the least.