Well, there are two approaches to it, though the results you’re looking for in particular may depend on how you want it presented.
If you’re looking for an absolute mouse cursor to go on top of everything, you’ll want to make use of the GUI, which means NOT being able to make good use of shaders.
If you go the GUI route, you’ll probably just need to create multiple images to simulate the cursor changing color, but your options would be much more limited for color.
The basic way of displaying the cursor in this way would be something like:
using UnityEngine;
public class MouseCursor
{
public Texture2D txCursor;
void Start()
{
Cursor.visible = false;
}
void OnGUI()
{
GUI.depth = 1;
if(txCursor != null)
{
GUI.DrawTexture(new Rect(Input.mousePosition.x, Screen.height - Input.mousePosition.y, txCursor.width, txCursor.height), txCursor);
}
}
}
If you’re looking to maximize versatility on the cursor’s potential appearance, here’s a very basic shader to apply to a plane to get you started on the effect:
Shader "Custom/CircleCursor"
{
Properties
{
_Color ("Color One", Color) = (0,0,1,1)
_ColorChange ("Color Two", Color) = (1,0,0,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_BlendTex ("Color Change Gradient", 2D) = "white" {}
}
SubShader
{
Tags { "Queue"="Transparent" "RenderType"="Transparent" }
LOD 200
CGPROGRAM
// Physically based Standard lighting model, and enable shadows on all light types
#pragma surface surf Standard fullforwardshadows alpha
// Use shader model 3.0 target, to get nicer looking lighting
#pragma target 3.0
sampler2D _MainTex;
sampler2D _BlendTex;
struct Input
{
float2 uv_MainTex;
float2 uv_BlendTex;
};
fixed4 _Color;
fixed4 _ColorChange;
void surf (Input IN, inout SurfaceOutputStandard o)
{
// Albedo comes from a texture tinted by color
fixed4 t = tex2D(_MainTex, IN.uv_MainTex);
fixed4 m = tex2D(_BlendTex, IN.uv_BlendTex);
fixed4 color = lerp(_Color, _ColorChange, saturate(floor(frac(_Time.x * 5.0) + m)));
o.Emission = t.rgb * color.rgb;
o.Alpha = t.a;
}
ENDCG
}
FallBack "Diffuse"
}
It’s by no means perfect, but it should serve as a basic framework for applying gradual, circular color changes to the texture.
Textures utilized in testing:

