Search Issue Tracker
Fixed in 2019.1.X
Fixed in 2018.3.X
Votes
0
Found in
2018.3.0b1
Issue ID
1082359
Regression
Yes
A warning is shown: "Invalid texture used for cursor" when using Texture2D.SetCursor()
Steps:
1. Open attached project "CursorTest20182-p2.zip"
2. Open scene SampleScene
3. Enter Play mode
Expected: no warning is shown.
Actual: warning in console:
Invalid texture used for cursor - check importer settings
UnityEngine.Cursor:SetCursor(Texture2D, Vector2, CursorMode)
CursorTest:Start() (at Assets/CursorTest.cs:21)
Reproduced with: 2018.3.0b2, 2019.1.0a1
Not reproduced with: 2017.4.11f1, 2018.1.9f2, 2018.2.8f1
Note: although a warning is shown, the texture is assigned.
Comments (1)
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
tmoneygames
Dec 07, 2022 07:47
I found a way to fix this error in 2020.3.42f1 and I'm sure it would work on 2018.x and 2019.x as well. Click on the texture to use as a cursor, then change it from Sprite(2D and UI) to Cursor in Texture Type. Click on the Advanced drop-down arrow and for Alpha Source change it to Input Texture Alpha, check the Alpha Is Transparent box, if it's checked, uncheck the Ignore PNG file gamma, click the Read/Write Enabled box, and on Generate Mip Maps, uncheck the box. And down in format for default change it to RGBA 32bit and also change it if you are building for PC, WebGL, and Android to the same RGBA 32bit. Not sure if these are the settings needed for iOS or Mac builds, as I don't have an Apple product to test this on.