


Assign an empty Cursor texture to the Empty Texture field.Attach the script to the Canvas and assign the Animator to the Animator field.Create another transition when the click animation ends, back to the default animation.Make sure that "Has Exit Time" is unchecked. Create a new Trigger parameter in the Animator named "Click", and use it to transition from the default animation to the click animation.Right-click in the Animator to make it the default (yellow). Also add another animation that acts as the default by just adding a single frame of animation that sets the RawImage's texture to the default cursor graphic.Attach an Animator and Animator Controller, and add an animation (using Unity's Animation workflow) that animates the RawImage in the way you intend when clicking.Set the RawImage's texture to the texture of your cursor's "regular" graphic.Attach a RawImage as a child object to a new UI Canvas.To use the script for just animating the cursor when clicking: Please state exactly what behaviour you're looking to achieve - how, and when, you want the cursor to be animated. The wiki page does assume prior knowledge of Unity UI / Animation workflows, and how the script is used is down to you, as each user's needs will be different. The script offers full animation control over the cursor, but the cursor itself is very complex - with different states, icons, and inventory items. The issue is complicated because the way you might want the cursor to behave can be so varied.
