Creating Hardware Mouse Cursor Texture at Runtime

I’m creating a texture at runtime to use as a mouse cursor. Using something like :

 Texture2D moddedMouse = new Texture2D(mouseCursor.width, mouseCursor.height, mouseCursor.format, false, false);
 Color32[] bitmap = mouseCursor.GetPixels32();
 //stuff that edits the mouse cursor bitmap here
 moddedMouse.SetPixels32(bitmap);
 Cursor.SetCursor(moddedMouse, Vector2.one, CursorMode.Auto);

It works but Unity gives me this warning:

 Invalid texture used for cursor - check importer settings
 UnityEngine.Cursor:SetCursor(Texture2D, Vector2, CursorMode)
 Globals:UpdateCursorColor() (at Assets/Globals.cs:273)
 uStartMenu:Start() (at Assets/GUI/UGUI/uStartMenu.cs:50)

because Cursor.SetCursor() doesn’t like a texture that isn’t flagged as a “Cursor” type from the inspector. But I have no idea how to make a procedural texture “count” as a Cursor type. And I cant just create a Cursor and edit it at runtime because you cant set Cursor textures as read/write enabled.

Anyone know of a fix for this?

Import the cursor texture you want to edit as Texture Type: Advanced. Enable read/write and alpha is transparency. Disable mipmaps and override color format to be ARGB 32 bit. Now you can edit and set it as cursor texture at runtime without warnings (tested unity 5.4.1f)